feat(server): add /status command handler for webhook providers
The generic-webhook provider has no upstream API, so /status reports DB-derived stats: active/total trackers, provider name, and last event timestamp (formatted via the shared get_last_event_str helper). Includes pytest coverage for handler registration, populated stats with a recent event, the empty-state dash sentinel, and unknown-command fall-through. Template variable docs in command_template_configs.py extended with the new trackers_active/trackers_total keys.
This commit is contained in:
@@ -403,7 +403,13 @@ async def get_command_variables(
|
||||
webhook = {
|
||||
"status": {
|
||||
"description": "/status webhook provider summary",
|
||||
"variables": {**common_vars, "provider_name": "Webhook provider name", "last_event": "Last event timestamp"},
|
||||
"variables": {
|
||||
**common_vars,
|
||||
"trackers_active": "Number of enabled trackers attached to the webhook provider",
|
||||
"trackers_total": "Total number of trackers attached to the webhook provider",
|
||||
"provider_name": "Webhook provider name",
|
||||
"last_event": "Last event timestamp ('YYYY-MM-DD HH:MM' or '-')",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user