Skip to content

Dashboard: disable Resolve / Resolve-all while the request is in flight #196

Description

@LiorFink00

On the Dashboard (ui/src/pages/Dashboard.tsx), resolveOne (L71) and resolveAllOpen (L75) fire the API call with no in-flight/disabled state:

function resolveOne(id: string) { api.resolveAlert(id).then(reload); }
function resolveAllOpen() { api.resolveAllAlerts().then(reload); }

Rapid double-clicks send duplicate requests before reload() re-renders. Minor, but sloppy UX.

Task

Disable the relevant button (and ideally show a brief "Resolving…" label) while its request is pending, re-enabling on completion.

Acceptance

  • A second click is a no-op until the first resolve completes.
  • Works for both the per-row "Resolve" and the "Resolve all" button.
  • npm run build passes.

Pairs naturally with #119 (confirm before Resolve all) but is independent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions