mirror of
https://github.com/Dvorinka/Dash.git
synced 2026-10-28 15:51:27 +00:00
feat: ops layer — incidents, maintenance, status pages, badges, metrics (merge plan M4)
incidents + incident_updates + maintenance_windows + status_pages tables. Monitor transitions auto-open incidents on down and auto-resolve on recovery; an active maintenance window covering the monitor suppresses alerts and auto-incidents, and status pages report the covered monitor as `maintenance`. Public status view: GET /api/status-pages/:slug/public aggregates overall state, monitor uptime, systems, open incidents, and scheduled maintenance; rendered read-only at /status/:slug. GET /api/badge/:kind/:id.svg serves stateless shields; GET /api/metrics exposes Prometheus text over existing tables; POST /api/import/csv?kind=monitors|domains does header-driven bulk import; /api/export v2 folds monitors/domains/systems rows into the backup payload. Frontend: /incidents with timeline + status flow, /status admin for pages + windows, /status/:slug public page; nav and palette wired. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
74c987c18a
commit
c84a4be876
17 files changed
+2212
-11
No files matched your search
@@ -101,6 +101,26 @@ func (s *Server) routes() *gin.Engine {
|
||||
v1.GET("/systems/:id/stats", s.systemStats)
|
||||
v1.POST("/systems/ingest", s.ingestSystem)
|
||||
|
||||
v1.GET("/incidents", s.listIncidents)
|
||||
v1.POST("/incidents", s.createIncident)
|
||||
v1.PATCH("/incidents/:id", s.patchIncident)
|
||||
v1.DELETE("/incidents/:id", s.deleteIncident)
|
||||
v1.POST("/incidents/:id/updates", s.addIncidentUpdate)
|
||||
|
||||
v1.GET("/maintenance", s.listWindows)
|
||||
v1.POST("/maintenance", s.createWindow)
|
||||
v1.DELETE("/maintenance/:id", s.deleteWindow)
|
||||
|
||||
v1.GET("/status-pages", s.listStatusPages)
|
||||
v1.POST("/status-pages", s.createStatusPage)
|
||||
v1.PATCH("/status-pages/:id", s.patchStatusPage)
|
||||
v1.DELETE("/status-pages/:id", s.deleteStatusPage)
|
||||
v1.GET("/status-pages/:slug/public", s.publicStatus)
|
||||
|
||||
v1.GET("/badge/:kind/:file", s.badge)
|
||||
v1.GET("/metrics", s.metrics)
|
||||
v1.POST("/import/csv", s.importCSV)
|
||||
|
||||
v1.GET("/status", s.getStatus)
|
||||
v1.GET("/widgets/types", s.widgetTypes)
|
||||
v1.GET("/widgets/:id/data", s.widgetData)
|
||||
|
||||
Reference in new issue
Block a user