Add Browse and Alarms dashboard tabs
Browse renders the Galaxy hierarchy tree from IGalaxyHierarchyCache: expandable areas/objects with attribute name, data type and the alarm/historized flags, plus a name/reference filter. Right-click or double-click an attribute to add it to a subscription panel that polls live value, quality and source timestamp every two seconds. Alarms lists the worker's currently-active alarm set via IAlarmRpcDispatcher, defaulting to unacknowledged Active alarms with filters for acknowledged alarms, area, severity range and text. It is read-only and warns when alarm auto-subscribe is disabled. Both tabs read live MXAccess data through a new singleton DashboardLiveDataService that owns one shared, lazily-opened gateway session (one worker) for the whole dashboard, re-opened transparently if it faults or its lease expires. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -254,6 +254,49 @@ Show aggregate event diagnostics:
|
||||
Do not display full tag values by default. If value display is later added, make
|
||||
it opt-in and redacted.
|
||||
|
||||
### Browse page
|
||||
|
||||
`/dashboard/browse` lets an operator explore the Galaxy tag hierarchy and watch
|
||||
live values. The tree is built in-process by `DashboardBrowseTreeBuilder` from
|
||||
`IGalaxyHierarchyCache.Current` — the same cache the Galaxy page reads — so a
|
||||
render costs no gRPC call and no SQL round-trip. Each node shows its child
|
||||
objects and, when expanded, its attributes with attribute name, data type
|
||||
(including array dimension), and the alarm / historized flags. Galaxy SQL
|
||||
carries no attribute description, so none is shown. A filter box switches the
|
||||
tree to a flat list of matching attributes.
|
||||
|
||||
Right-clicking an attribute (or double-clicking it) adds it to the subscription
|
||||
panel. The panel shows each subscribed tag's live value, MXAccess data type,
|
||||
quality and source timestamp, refreshed every two seconds. The subscription
|
||||
panel is the explicit opt-in tag-value surface: it always shows values
|
||||
regardless of `Dashboard:ShowTagValues`, which continues to govern only the
|
||||
diagnostic session/worker views.
|
||||
|
||||
### Alarms page
|
||||
|
||||
`/dashboard/alarms` lists the alarms the dashboard session's worker currently
|
||||
reports as Active or ActiveAcked, refreshed every three seconds. It defaults to
|
||||
showing unacknowledged `Active` alarms; filters add acknowledged alarms and
|
||||
narrow by area, severity range, and a reference/source/description text search.
|
||||
Cleared alarms are not retained — the gateway holds no alarm-history store, so
|
||||
the page reflects only the live active set. The page is read-only; it does not
|
||||
acknowledge alarms. If `MxGateway:Alarms:Enabled` is false the session is never
|
||||
subscribed to an alarm provider, and the page says so instead of showing an
|
||||
empty list with no explanation.
|
||||
|
||||
### Live data source
|
||||
|
||||
Both the Browse subscription panel and the Alarms page read live MXAccess data
|
||||
through `IDashboardLiveDataService` (`DashboardLiveDataService`). It owns one
|
||||
shared gateway session for the whole dashboard, opened lazily on first use via
|
||||
`ISessionManager` and re-opened transparently when it faults or its lease
|
||||
expires. One session means one worker process backs every dashboard circuit;
|
||||
all access is serialised so the worker sees one in-flight command at a time.
|
||||
Tag reads go through `GatewaySession.SubscribeBulkAsync` / `ReadBulkAsync`;
|
||||
alarm queries go through `IAlarmRpcDispatcher`. Alarm subscription is the
|
||||
gateway's existing auto-subscribe-on-open hook, so the dashboard session is
|
||||
alarm-subscribed only when `MxGateway:Alarms:Enabled` is set.
|
||||
|
||||
### API keys page
|
||||
|
||||
`/dashboard/apikeys` lists the gateway's API keys and, for authorized
|
||||
|
||||
Reference in New Issue
Block a user