Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port/date initiator columns #702

Merged
merged 14 commits into from
Jul 4, 2023
Merged

Port/date initiator columns #702

merged 14 commits into from
Jul 4, 2023

Conversation

aaronchongth
Copy link
Member

@aaronchongth aaronchongth commented Apr 16, 2023

What's new

Requires

Self-checks

  • I have prototyped this new feature (if necessary) on Figma
  • I'm familiar with and follow this Typescript guideline
  • I added unit-tests for new components
  • I tried testing edge cases
  • I tested the behavior of the components that interact with the backend, with an e2e test

Discussion

Angatupyry and others added 3 commits April 16, 2023 09:43
* Add unix-millis-request-time field in taskstate

Signed-off-by: fierro <[email protected]>

* Generate taskstate model according to the rmf_api_msgs changes

Signed-off-by: fierro <[email protected]>

* Generate api client to get the new field

Signed-off-by: fierro <[email protected]>

* Save unix request time as now() and use previous value if the method is update

Signed-off-by: fierro <[email protected]>

* Show unix_millis_request_time in dashboard

Signed-off-by: fierro <[email protected]>

* Add Unix_millis_request_time into booking instead of taskstate directly

Signed-off-by: fierro <[email protected]>

* Access to unix_millis_request_time field through booking

Signed-off-by: fierro <[email protected]>

* Get previous task_state and if is not none use its request_time value

Signed-off-by: fierro <[email protected]>

---------

Signed-off-by: fierro <[email protected]>
(cherry picked from commit 7ea986d)
Signed-off-by: Aaron Chong <[email protected]>
* Added date column to minimal export, only update fields of task state when it has not been created before

Signed-off-by: Aaron Chong <[email protected]>

* Use create and get_or_none, and save model if it exists

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
(cherry picked from commit a1ea778)
Signed-off-by: Aaron Chong <[email protected]>
* Add initiator column in taskstate model

Signed-off-by: fierro <[email protected]>

* Initiator field has been added on client side

Signed-off-by: fierro <[email protected]>

* Set initiator field with the previous value if its is updated or use self.user.username if its is created

Signed-off-by: fierro <[email protected]>

* Add initiator as column in datagrid and show it in TaskSection

Signed-off-by: fierro <[email protected]>

* Populate initiator field with self.user.name when task is created

Signed-off-by: fierro <[email protected]>

* Add initiator column to minimal export

Signed-off-by: fierro <[email protected]>

* Set initiator column to minimal export

Signed-off-by: fierro <[email protected]>

* In update method, fill the initiator field with the previous db_task_state value

Signed-off-by: fierro <[email protected]>

---------

Signed-off-by: fierro <[email protected]>
(cherry picked from commit 86700da)
Signed-off-by: Aaron Chong <[email protected]>
@codecov
Copy link

codecov bot commented Apr 16, 2023

Codecov Report

Merging #702 (294ff12) into main (bd1b279) will decrease coverage by 0.07%.
The diff coverage is 48.48%.

@@            Coverage Diff             @@
##             main     #702      +/-   ##
==========================================
- Coverage   56.37%   56.30%   -0.07%     
==========================================
  Files         293      293              
  Lines        6954     6981      +27     
  Branches      954      962       +8     
==========================================
+ Hits         3920     3931      +11     
- Misses       2844     2858      +14     
- Partials      190      192       +2     
Flag Coverage Δ
api-server 83.01% <100.00%> (+0.03%) ⬆️
dashboard 18.52% <26.66%> (+0.06%) ⬆️
react-components 57.96% <14.28%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/dashboard/src/components/tasks/utils.ts 0.00% <0.00%> (ø)
...ackages/react-components/lib/tasks/create-task.tsx 1.42% <0.00%> (-0.03%) ⬇️
...react-components/lib/tasks/task-table-datagrid.tsx 59.52% <33.33%> (-2.02%) ⬇️
packages/dashboard/src/components/appbar.tsx 30.62% <40.00%> (+0.47%) ⬆️
...i-server/api_server/models/rmf_api/task_request.py 100.00% <100.00%> (ø)
...api-server/api_server/models/rmf_api/task_state.py 100.00% <100.00%> (ø)
...-server/api_server/models/tortoise_models/tasks.py 100.00% <100.00%> (ø)
...ckages/api-server/api_server/repositories/tasks.py 82.41% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@aaronchongth aaronchongth marked this pull request as ready for review May 9, 2023 09:00
Copy link
Collaborator

@Angatupyry Angatupyry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Angatupyry
Copy link
Collaborator

This is great, Aaron!
Thank you very much!

@aaronchongth aaronchongth merged commit b39540c into main Jul 4, 2023
6 checks passed
@aaronchongth aaronchongth deleted the port/date-initiator-columns branch July 4, 2023 11:08
@aaronchongth aaronchongth restored the port/date-initiator-columns branch July 4, 2023 11:08
@aaronchongth aaronchongth deleted the port/date-initiator-columns branch July 5, 2023 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants