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

Create a task manager page and table #1931

Closed
sjd78 opened this issue May 31, 2024 · 9 comments · Fixed by #1957
Closed

Create a task manager page and table #1931

sjd78 opened this issue May 31, 2024 · 9 comments · Fixed by #1957
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/normal Higher priority than priority/minor. Nice to have. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@sjd78
Copy link
Member

sjd78 commented May 31, 2024

Summary

With the addition of automatic language discovery and to give the user more insight and control over discovery and analysis tasks, create a new Task Manager page and table.

Enhancement references:

Requirements

Base requirements:

  • Navigation to the page is allowed from the left nav as "Task Manager" on the Migration perspective
  • Navigation to the page with filters applied (from at least the application table with the application filter already applied)
  • Standard table functionality with filtering, sorting, pagination and the right side details view tray
  • Each row in the table corresponds to a task in the system

Table columns to initially include at least:

  • Application linked to the Task
  • Task ID
  • Task Kind (analysis, discovery, others?)
  • Task Status (Scheduled, Pending, In progress, Success, Fail, others?)
  • Task Priority
  • User that created the task (this column has no meaning when running auth disabled)

Table filters and sorting to initially include at least:

  • Application name
  • Task id
  • Task kind
  • Task status
  • Task priority
  • User name

Actions that can be performed:

  • Cancel tasks created by the user (tasks created by other users cannot be cancelled)
  • Enable/disable preemption for the task created by the user (preemption allows the task system to cancel a running lower priority task in order to allow the task to run)

Actions that cannot be performed for Tasks:

  • Create a new task. This must be done through the analysis wizard or similar.
  • Delete a task

HUB enhancements that may be needed

See konveyor/tackle2-hub#640 for the filtering, sorting and pagination of the tasks endpoint to be used by the table. This will reduce the number of task activity logs accessed and sent to keep the table performant.

Mock ups

Base task manager table:
Task Manager Table

@konveyor-ci-bot
Copy link

This issue is currently awaiting triage.
If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members.

@konveyor-ci-bot konveyor-ci-bot bot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. labels May 31, 2024
@konveyor-ci-bot konveyor-ci-bot bot added the needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. label May 31, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Planning May 31, 2024
@sjd78 sjd78 added kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/normal Higher priority than priority/minor. Nice to have. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. labels May 31, 2024
@sjd78 sjd78 added this to the v0.5.0 milestone May 31, 2024
@sjd78 sjd78 moved this from 🆕 New to 🔖 Ready in Planning May 31, 2024
@sjd78
Copy link
Member Author

sjd78 commented May 31, 2024

@dymurray, @JustinXHale, @rromannissen -- for your consideration

@JustinXHale
Copy link
Member

@sjd78 couple of questions:

  1. Will users have BULK Action capabilities? Delete/Cancel mainly.
  2. What are the priority levels? Low-High, 1-100?

@sjd78
Copy link
Member Author

sjd78 commented Jun 3, 2024

@jortel, @mansam -- also for your consideration (sorry about the late tags)

@sjd78
Copy link
Member Author

sjd78 commented Jun 3, 2024

@sjd78 couple of questions:

  1. Will users have BULK Action capabilities? Delete/Cancel mainly.

Good question. As long as we can do the action individually, we can add the bulk action.

  1. What are the priority levels? Low-High, 1-100?

https://github.com/konveyor/enhancements/tree/master/enhancements/multiple-provider#task-priority

As of right now, the priority in a number starting a 0 and going up. I don't know if there is an upper bound. I also don't know if it makes sense to have a defined "increase / decrease priority 10%" of just a "set priority to this non-negative number" UX. I kinda like the defined "do this by 10%" kind of operation just to make a user bump their tasks multiple times instead of just bulk setting all of their task priorities to MAX_INT.

@jortel - Thoughts on the priority and the increase or decrease operations?

@dymurray dymurray changed the title [Enhancement] Create a task manager table Create a task manager table Jun 4, 2024
@sjd78 sjd78 changed the title Create a task manager table Create a task manager page and table Jun 5, 2024
@jortel
Copy link
Contributor

jortel commented Jun 6, 2024

@sjd78 couple of questions:

  1. Will users have BULK Action capabilities? Delete/Cancel mainly.

Perhaps not to begin with.

  1. What are the priority levels? Low-High, 1-100?

0-n low-high.

@jortel
Copy link
Contributor

jortel commented Jun 6, 2024

Recommend the column order be:

  • id
  • application

instead of:

  • application
  • id

@rszwajko
Copy link
Collaborator

rszwajko commented Jun 6, 2024

@jortel @rromannissen
Do we plan to add date columns (creation/start/end etc) ? I recall such plans being discussed. If we do then remember about new filtering capabilities in this area -> #1913

jortel added a commit to konveyor/tackle2-hub that referenced this issue Jun 11, 2024
Support: konveyor/tackle2-ui#1931

Note: UI team requested alias for _queued_ states to be supported in
filter. Ex: `?filter=state:queued`.

closes: #641

---------

Signed-off-by: Jeff Ortel <jortel@redhat.com>
rszwajko added a commit to rszwajko/tackle2-ui that referenced this issue Jun 12, 2024
rszwajko added a commit to rszwajko/tackle2-ui that referenced this issue Jun 12, 2024
Part-of: konveyor#1931
Reference-Url: konveyor/tackle2-hub#640
Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@rszwajko
Copy link
Collaborator

@jortel
I've started tests with the prototype (#1957) - some things don't work for me. Can you check how they work on your side?

  1. sorting seems to work only for id field i.e.
// OK 
http://localhost:9000/hub/tasks?sort=desc%3Aid&limit=10&offset=0
//400  i.e. {error: ""state" not supported by sort."}
http://localhost:9000/hub/tasks?sort=asc%3Astate&limit=10&offset=0
  1. filtering not supported for createUser and id fields( both listed in the enhancement)
  2. application name is missing in the response and in filtering. Filtering by application ID works but this is not so nice.
  3. priority is missing in the response and in the filtering
  4. for kind the filtering is supported by the server but it seems it's not included in the response
  5. name, locator, addon filtering supported by the server but not included in the enhancement - do we want to add them as optional columns?

@dymurray dymurray moved this from 🔖 Ready to 🏗 In progress in Planning Jun 13, 2024
rszwajko added a commit that referenced this issue Jun 13, 2024
Part-of: #1931
Reference-Url: konveyor/tackle2-hub#640

Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
jortel added a commit to konveyor/tackle2-hub that referenced this issue Jun 13, 2024
Fix issues reported
[here](konveyor/tackle2-ui#1931 (comment)).
1. sorting seems to work only for `id` field i.e. 
2. filtering not supported for `createUser` and `id` fields( both listed
in the enhancement)
3. application name is missing in the response and in filtering.
Filtering by application ID works but this is not so nice.
4. `priority` is missing in the response and in the filtering
5. for `kind` the filtering is supported by the server but it seems it's
not included in the response

---

Filter and sorting: needed to support GORM join queries which qualifies
fields by table.

Example: For a task query joined with application, produces all of the
task fields qualified as table.column:
```
SELECT task.id, task.name ...
```
And the (joined) application fields prefixed with `APPLICATION__`
```
SELECT APPLICATION__ID, APPLICATION__NAME ...
```

---------

Signed-off-by: Jeff Ortel <jortel@redhat.com>
rszwajko added a commit that referenced this issue Jun 18, 2024
Related improvements:
1. support restoring columns to initial configuration
2. clean up invalid columns stored in local storage
    
Part-of: #1931

Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
rszwajko added a commit that referenced this issue Jun 20, 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

---------

Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Planning Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/normal Higher priority than priority/minor. Nice to have. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants