UI and API: Needs attention, incident pages, known conditions, /covering for Gandalf and hwmonDaemon
CI / Lint (flake8, house style) (pull_request) Successful in 56s
CI / Test (pytest) (pull_request) Successful in 53s
CI / Security (bandit, pip-audit) (pull_request) Successful in 1m8s
CI / Integration (MariaDB) (pull_request) Successful in 1m49s
CI / UI (screenshots) (pull_request) Failing after 1m7s
CI / Scan (secrets, workflows, shell, patterns) (pull_request) Successful in 1m58s
CI / Deploy (pull_request) Skipped
CI / Lint (flake8, house style) (pull_request) Successful in 56s
CI / Test (pytest) (pull_request) Successful in 53s
CI / Security (bandit, pip-audit) (pull_request) Successful in 1m8s
CI / Integration (MariaDB) (pull_request) Successful in 1m49s
CI / UI (screenshots) (pull_request) Failing after 1m7s
CI / Scan (secrets, workflows, shell, patterns) (pull_request) Successful in 1m58s
CI / Deploy (pull_request) Skipped
- thor/web/api.py: /api/incidents/covering (thor#1 pre-check), /api/incidents, /api/incident/<key>, machine keys by SHA-256 with optional source CIDRs, like Gandalf's (gandalf#68); 503 when the database is away so callers fail open. covered=true only when there is a ticket to comment on; shadow incidents are listed but never cover. - thor/web/ui.py + templates: Needs attention (incidents, Thor itself, timeline-only, known conditions seen again, unexplained symptoms), incident page (what happened, also seen, what Thor sent or would have sent, ticket text), known conditions. Read-only; CSP with nonces; Authelia identity shown only when it comes from NPM. Mobile nav drawer. - web_template v1.2 (8286bb2) vendored and checked against upstream in CI. - docs/contract.md: the /covering contract for the Gandalf and hwmonDaemon sessions. - scripts/ui_demo.py + scripts/screenshots.py, and a CI job that renders every page with replay data (desktop, mobile, dark, light) and uploads the screenshots. - Fix: systemd-escaped cpusets (system-ceph\x2dosd.slice) were not recognised as Ceph; four of the 11-23 kills came from the OSD slice. Found while reviewing the screenshots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6c2328c2b1
commit
ab4b20d15f
23 files changed
+9946
-9
No files matched your search
@@ -118,6 +118,23 @@ class FakeStore:
|
||||
self._check('delete_incident')
|
||||
self.incidents.pop(key, None)
|
||||
|
||||
def get_incident(self, key):
|
||||
self._check('get_incident')
|
||||
return self.incidents.get(key)
|
||||
|
||||
def actions_for(self, key):
|
||||
self._check('actions_for')
|
||||
return [a for a in self.actions if a['incident_key'] == key]
|
||||
|
||||
def recent_actions(self, since, limit=200):
|
||||
self._check('recent_actions')
|
||||
return [a for a in reversed(self.actions) if a['created'] >= since][:limit]
|
||||
|
||||
def recent_observations(self, since):
|
||||
self._check('recent_observations')
|
||||
return [dict(o, first_seen=o['start'], last_seen=o['end'], k=o['key'])
|
||||
for o in self.observations.values() if o['end'] >= since]
|
||||
|
||||
def known_conditions(self):
|
||||
self._check('known_conditions')
|
||||
return [dict(k) for k in self.known if not k.get('ended')]
|
||||
|
||||
Reference in new issue
Block a user