Capture agents not shown offline in new UI
Steps to reproduce
Steps to reproduce:
1. Connect a CA that registers with Opencast (e.g. Galicaster)
2. Shut down the CA (without the CA sending a state update)
In the new admin UI, CA shows as "idle"
In the old admin UI, CA shows as "offline"
CA should show as offline if there have no state updates recently.
Workaround (if any):
Consult the "last updated" column
There is some question here about the semantics of this: https://github.com/lkiesow/pyCA/issues/28
My opinion would be it should transition to offline. There could be an argument for "unknown" (e.g. it could be available but detached from the network) but then we'd also need an error state implemented so a CA can explicitly flag an error (e.g. currently Galicaster sets the "unknown" state for errors because there's no error state available).
Ask on list? (without getting into a "redesign the entire CA API" discussion)
Stephen, is the desired functionality for the CA to register as 'offline' specifically, or is going into the existing 'unknown' state acceptable? Should the CA be unavailable for scheduling as well?
The old UI has logic in the UI itself to decide whether an "idle" CA is offline.
Probably this logic should be moved into the service layer, so the CA's state is actually changed to offline by a maintenance thread if no status update has been received after a configurable time.