Skip to content

Commit

Permalink
✨ Add an application tasks status icon and popover
Browse files Browse the repository at this point in the history
On the application table's name column, add a status
icon.  The icon summarizes the status of the various
kinds of tasks attached to an application (a single
application has 0 or more tasks while a task acts
on a single application).

The icon will be driven off looking at the most recent
task (by `createTime`) per `kind` for an application:
  - If there are no tasks, show the application in No Tasks state
  - Else if any are "running", show the application in Running
  - Else if any are "queued", show the application in Queued state
  - Else if any are "failed", show the application as Failed
  - Else if any are "canceled", show the application as Canceled
  - Else if any are "succeeded", show the application as Success

A popover on hover will render on the application name
column to display summary information about the application's
tasks.  The popover will have a table that shows the most recent
tasks for each kind of task associated to the application.
  - Task id
  - Task status icon with the task kind
  - How long ago the task was started/created (exact
    time in a tooltip)

Changes:
  - Created `useDecoratedApplications()` hook to run all calculations
    and cross-referencing necessary to render most of the table.

  - Created `ColumnApplicationName` to handle the application name
    column with the status icon and popover.

  - Refactored `useFetchTasks()` hook to only do a simple sort. The
    filtering based on kind is no longer necessary.

  - The base `ApplicationsTable` received some basic refactoring to:
    - group like function together
    - utilize the `DecoratedApplication`

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 committed Jul 1, 2024
1 parent 30f812a commit de4ae26
Show file tree
Hide file tree
Showing 4 changed files with 586 additions and 340 deletions.
Loading

0 comments on commit de4ae26

Please sign in to comment.