konveyor / tackle2-ui

Tackle (2nd generation) UI component.
Apache License 2.0
6 stars 29 forks source link

:sparkles: Task table #1957

Closed rszwajko closed 1 week ago

rszwajko commented 2 weeks ago

Functional changes:

  1. create task manager entry in the sidebar navigation list
  2. place task page under /tasks route
  3. present tasks in a server-filtered table
  4. row actions supported: canceling, enable/disable preemption flag
  5. use column management to hide optional columns: pod, started, terminated

Related features:

  1. make id property required in Task type
  2. switch task update endpoint to use patch method
  3. provide icon-to-state mapping that preserves original state names which are required for server filtering

Resolves: https://github.com/konveyor/tackle2-ui/issues/1931

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 30.43478% with 32 lines in your changes missing coverage. Please review.

Project coverage is 42.23%. Comparing base (b654645) to head (9f921e8). Report is 169 commits behind head on main.

Files Patch % Lines
...lient/src/app/components/Icons/taskStateToIcon.tsx 29.62% 19 Missing :warning:
client/src/app/queries/tasks.ts 14.28% 12 Missing :warning:
client/src/app/api/rest.ts 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1957 +/- ## ========================================== + Coverage 39.20% 42.23% +3.03% ========================================== Files 146 170 +24 Lines 4857 5448 +591 Branches 1164 1361 +197 ========================================== + Hits 1904 2301 +397 - Misses 2939 3131 +192 - Partials 14 16 +2 ``` | [Flag](https://app.codecov.io/gh/konveyor/tackle2-ui/pull/1957/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor) | Coverage Δ | | |---|---|---| | [client](https://app.codecov.io/gh/konveyor/tackle2-ui/pull/1957/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor) | `42.23% <30.43%> (+3.03%)` | :arrow_up: | | [server](https://app.codecov.io/gh/konveyor/tackle2-ui/pull/1957/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=konveyor#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rszwajko commented 2 weeks ago

Cancel and toggle preemption actions (for a Pending task)

Screenshot from 2024-06-17 19-12-35

Cancel action (for a Running task)

Screenshot from 2024-06-17 19-11-33

Optional columns: pod, started, terminated

image

rszwajko commented 2 weeks ago

@JustinXHale @rromannissen @jortel Take a look at screenshots above - I've added 3 extra columns that looked very useful to me. They are initially hidden and can be enabled using column management dialog. Please let me know if you would rather remove them.

JustinXHale commented 2 weeks ago

@JustinXHale @rromannissen @jortel Take a look at screenshots above - I've added 3 extra columns that looked very useful to me. They are initially hidden and can be enabled using column management dialog. Please let me know if you would rather remove them.

I think we're at the maximum number of columns we should be using, its borderline cramped. I think you've added relevant information. We could potentially save a little space using and provide some extra clarity using Relative Time or Timestamp

rszwajko commented 2 weeks ago

@JustinXHale

I think we're at the maximum number of columns we should be using,

Yep. The default columns take all space on a 1920x1080 screen. To show optional columns I had to hide some other columns.

We could potentially save a little space using and provide some extra clarity using Relative Time or Timestamp

Relative time makes harder to compare started with terminated. Both dates are related but may end up in different "humanized" units. As for timestamp, it looks promising.

rromannissen commented 2 weeks ago

I agree with @JustinXHale 's remarks. Overall LGTM!

jortel commented 2 weeks ago

This looks great!