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

✨ Add task dashboard report. #720

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Jul 12, 2024

Better support succeeded with errors.

closes #725

needed by: konveyor/tackle2-ui#1997

Example:
GET /tasks/report/dashboard

- id: 7
  createUser: admin.noauth
  createTime: 2024-07-15T15:35:53.198405073Z
  name: Daytrader7.1.windup
  kind: analyzer
  addon: analyzer
  state: Succeeded
  application:
    id: 1
    name: Daytrader7
  started: 2024-07-15T15:35:53.514805251Z
  terminated: 2024-07-15T15:39:40.54619695Z
- id: 8
  createTime: 2024-07-15T18:29:25.26836735Z
  name: Daytrader8-
  kind: language-discovery
  addon: language-discovery
  state: Failed
  application:
    id: 2
    name: Daytrader8
  started: 2024-07-15T18:29:25.648121267Z
  terminated: 2024-07-15T18:29:29.798022283Z
  errors: 1
- id: 9
  createTime: 2024-07-15T18:29:25.26883083Z
  name: Daytrader8-
  kind: tech-discovery
  addon: tech-discovery
  state: Failed
  application:
    id: 2
    name: Daytrader8
  started: 2024-07-15T18:29:29.798635671Z
  terminated: 2024-07-15T18:29:32.944556989Z
  errors: 1

Signed-off-by: Jeff Ortel <jortel@redhat.com>
@@ -181,6 +183,7 @@ func (h TaskHandler) List(ctx *gin.Context) {
db := h.DB(ctx)
db = db.Model(&model.Task{})
db = db.Joins("Application")
db = db.Joins("Report")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hint: joining so that /tasks will return the same resources as /tasks/:d.

@jortel jortel changed the title 🐛 propagate errors for /tasks. ✨ Add task dashboard report. Jul 16, 2024
Copy link
Collaborator

@mansam mansam left a comment

Choose a reason for hiding this comment

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

LGTM

@jortel jortel merged commit 1d3f382 into konveyor:main Jul 16, 2024
15 checks passed
sjd78 added a commit to konveyor/tackle2-ui that referenced this pull request Jul 16, 2024
…ion tables (#2011)

### Summary
Resolves: #1997

When a task is succeeded but has attached errors, render task state,
application tasks state and application analysis state with a warning.

### Details of Changes
With this change, hub is not adding a new terminal state, but having a
new terminal state is an easy way to handle things. The task queries
will now evaluate the `state` and `errors` props to determine if
"Succeeded" should be "SucceededWithErrors". This synthetic task status
makes updating all of the UI component much simpler.

To function properly, HUB [Issue
725](konveyor/tackle2-hub#725) / [PR
720](konveyor/tackle2-hub#720) are required.

Changes have also been made to utilize the `/tasks/reports/dashboard`
endpoint to get a much smaller view of tasks when dealing with them in
aggregate.

The application details drawer was refactored to push data fetching
closer to actual use, and to break up a very large component into a
container component with a component dedicated to each tab.

### Screenshots
Application inventory page:
![screenshot-localhost_9000-2024 07
15-18_33_20](https://github.com/user-attachments/assets/b7015ebf-4305-4d6d-a670-5e4fe532981d)

Application tasks popover:
![image](https://github.com/user-attachments/assets/14d4d19e-eaca-4505-88be-d5016da1e70b)

Task Manager page:
![screenshot-localhost_9000-2024 07
15-18_35_15](https://github.com/user-attachments/assets/2547a46a-1fa6-456f-836c-4e59cc0fd074)

---------

Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
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.

🐛 Fetch task collection limited to 500
2 participants