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 application tasks status icon and popover to application table #1985

Merged
merged 5 commits into from
Jul 2, 2024

Commits on Jul 1, 2024

  1. ✨ Add an application tasks status icon and popover

    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]>
    sjd78 committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    4d9d987 View commit details
    Browse the repository at this point in the history
  2. Move ApplicationStatus to ApplicationTasksStatus

    The tasks status looks better being calculated in
    the hook than in the component.  Moved it there
    and readjusted the component.  Now the summarized
    tasks status is available everywhere a
    `DecoratedApplication` is used.
    
    Signed-off-by: Scott J Dickerson <[email protected]>
    sjd78 committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    5effadc View commit details
    Browse the repository at this point in the history
  3. Fix sort and unique operations in useDecoratedApplications

    Signed-off-by: Scott J Dickerson <[email protected]>
    sjd78 committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    4c72fdd View commit details
    Browse the repository at this point in the history
  4. Add some jsdoc to the DecoratedApplication type

    Signed-off-by: Scott J Dickerson <[email protected]>
    sjd78 committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    9de8187 View commit details
    Browse the repository at this point in the history
  5. Don't display a table in the popover if no tasks exist

    Signed-off-by: Scott J Dickerson <[email protected]>
    sjd78 committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    8cf2f5e View commit details
    Browse the repository at this point in the history