package web // IncidentStatuses are the statuses an incident update gives, in their // usual order. var IncidentStatuses = []string{"investigating", "identified", "monitoring", "resolved"} // incidentStatusClass colors an incident status: red while it is being // worked on, amber while watched, green once resolved. func incidentStatusClass(status string) string { switch status { case "resolved": return "text-up" case "monitoring": return "text-degraded" } return "text-down" } // IncidentTimelineEntry is an update or one of the monitor's own events // on an incident's timeline. type IncidentTimelineEntry struct { At string // Kind is update, started or resolved. Kind string // Update fields. ID, Status, HTML, Author string Public bool } // IncidentDetailView is the page of one incident. type IncidentDetailView struct { Row IncidentRow CanWrite bool Timeline []IncidentTimelineEntry // NextStatus preselects the status of the next update. NextStatus string }