Skip to content

Stretch Goal: Allow user-defined expected health status in ServerHealth widget #33

@CarterIrish

Description

@CarterIrish

Overview

Currently, the ServerHealthWidget hardcodes a check against data.status === "healthy" on the client side. This means any remote that doesn't return exactly that field/value will always appear unhealthy, regardless of its actual state.

Proposed Feature

Allow users to configure what a "healthy" response looks like for each widget, set via the widget's create/edit modal.

Changes Required

  • server/models/ServerHealthWidget.ts — Add fields for the expected status field name and expected healthy value (e.g. statusField: String, expectedStatus: String)
  • server/controllers/Widget.ts — Read and persist the new fields in createWidget and implement updateWidget to support editing them
  • client/ServerHealthWidget.jsx — Replace hardcoded "healthy" check with props-driven comparison
  • client/App.jsx — Pass the new fields as props when rendering <ServerHealthWidget />
  • Create/Edit modal UI — Add inputs for the status field name and expected value

Example

A remote might return { state: "ok" } instead of { status: "healthy" }. The user should be able to configure:

  • Status field: state
  • Expected value: ok

Notes

  • Consider whether to support only the expected value (assuming status as the field), or both the field name and the expected value for full flexibility.
  • The edit modal for widgets does not yet exist and would need to be built as part of this or a related issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    above-and-beyondFeatures that are above and beyond the base project requirements

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions