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

✨ Task table #1957

Merged
merged 3 commits into from
Jun 20, 2024
Merged

✨ Task table #1957

merged 3 commits into from
Jun 20, 2024

Conversation

rszwajko
Copy link
Collaborator

@rszwajko rszwajko commented Jun 12, 2024

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: #1931

Copy link

codecov bot commented Jun 12, 2024

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 ⚠️
client/src/app/queries/tasks.ts 14.28% 12 Missing ⚠️
client/src/app/api/rest.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            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 Coverage Δ
client 42.23% <30.43%> (+3.03%) ⬆️
server ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rszwajko
Copy link
Collaborator Author

rszwajko commented Jun 12, 2024

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

sjd78 added a commit to sjd78/tackle2-ui that referenced this pull request Jun 14, 2024
Update the `Task` interface, and related, to follow
the current definitions of Task REST resource[1] on
the hub.

Supports: konveyor#1955, konveyor#1956, konveyor#1957

[1] - https://github.com/konveyor/tackle2-hub/blob/1366d95b62ac7717826fd9f64c9e268013107008/api/task.go#L725-L748

Signed-off-by: Scott J Dickerson <[email protected]>
@sjd78 sjd78 added this to the v0.5.0 milestone Jun 14, 2024
sjd78 added a commit to sjd78/tackle2-ui that referenced this pull request Jun 14, 2024
Update the `Task` interface, and related, to follow
the current definitions of Task REST resource[1] on
the hub.

Supports: konveyor#1955, konveyor#1956, konveyor#1957

[1] - https://github.com/konveyor/tackle2-hub/blob/1366d95b62ac7717826fd9f64c9e268013107008/api/task.go#L725-L748

Signed-off-by: Scott J Dickerson <[email protected]>
sjd78 added a commit that referenced this pull request Jun 14, 2024
Update the `Task` interface, and related, to follow the current
definitions of Task REST resource[^1] on the hub.

Supports: #1955, #1956, #1957

[^1]:
https://github.com/konveyor/tackle2-hub/blob/1366d95b62ac7717826fd9f64c9e268013107008/api/task.go#L725-L748

---------

Signed-off-by: Scott J Dickerson <[email protected]>
@rszwajko rszwajko force-pushed the taskTable branch 2 times, most recently from 70a7c80 to 98ffb60 Compare June 18, 2024 16:35
@rszwajko rszwajko marked this pull request as ready for review June 18, 2024 16:35
@rszwajko
Copy link
Collaborator Author

@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
Copy link
Member

@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
Copy link
Collaborator Author

@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
Copy link

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

@jortel
Copy link
Contributor

jortel commented Jun 19, 2024

This looks great!

sjd78 added a commit that referenced this pull request Jun 20, 2024
Resolves: #1938

Add a queued tasks count badge and a task list drawer.
  - Add a `TaskManagerContext` to control the count indicator and
    visibility of the drawer. This is a top level context so the task
    manager is available on all pages. The context itself monitors the task
    queue report endpoint[^1] that drives the notification badge count.

  - Use the standard `NotificationDrawer` attached to the `Page` layout to
    render the task manager item drawer.

  - The `TaskNotificationBadge` is integrated to the application's
    `HeaderApp`.

  - The `TaskManagerDrawer` shows the list of currently "queued" tasks[^2]
    in task id descending sort order (most recently created tasks on the
    top).

  - Each task item is rendered in a "collapsed" state and after a click
    will render "expanded". The expanded state include the started
    timestamp.

  - **_Note 1:_** Until fetch more / infinite scroll is implemented in the
    task manager drawer list, only the first 20 queued tasks will be
    displayed.

  - **_Note 2:_** Task actions need to be added to the task items. These
    should reuse the same set of actions as the task table in #1957.

Related changes:
  - Update the `HeaderApp` to handle visibility of masthead toolbar items
    at the `ToolbarGroup` level.

  - Rename `SSOMenu` to `SsoToolbarItem`.

  - Updated the typing on a few task related API functions.


[^1]: konveyor/tackle2-hub#641
[^2]: konveyor/tackle2-hub#640

---------

Signed-off-by: Scott J Dickerson <[email protected]>
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

LGTM with 3 minor comments

client/src/app/api/rest.ts Show resolved Hide resolved
client/src/app/pages/tasks/tasks-page.tsx Outdated Show resolved Hide resolved
client/src/app/pages/tasks/tasks-page.tsx Outdated Show resolved Hide resolved
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 filetring

Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Create a task manager page and table
5 participants