feat(monitor): add extended monitor statuses, check configuration, status overrides/paused indicators, and incident update templates
This commit is contained in:
@@ -308,11 +308,12 @@ export class UpladminIncidentUpdate extends DeesElement {
|
||||
{ value: 'postmortem', label: 'Postmortem', desc: 'Analysis complete' },
|
||||
];
|
||||
|
||||
const templates: Array<{ icon: string; label: string; message: string }> = [
|
||||
{ icon: 'lucide:Search', label: 'Started investigating', message: 'We are currently investigating this issue.' },
|
||||
{ icon: 'lucide:Target', label: 'Issue identified', message: 'We have identified the root cause and are working on a fix.' },
|
||||
{ icon: 'lucide:Rocket', label: 'Fix deployed', message: 'A fix has been deployed. We are monitoring the results.' },
|
||||
{ icon: 'lucide:CheckCircle', label: 'Resolved', message: 'This incident has been resolved. All systems are operating normally.' },
|
||||
const templates: Array<{ icon: string; label: string; status: TIncidentStatus; message: string }> = [
|
||||
{ icon: 'lucide:Search', label: 'Started investigating', status: 'investigating', message: 'We are currently investigating this issue.' },
|
||||
{ icon: 'lucide:Target', label: 'Issue identified', status: 'identified', message: 'We have identified the root cause and are working on a fix.' },
|
||||
{ icon: 'lucide:Rocket', label: 'Fix deployed', status: 'monitoring', message: 'A fix has been deployed. We are monitoring the results.' },
|
||||
{ icon: 'lucide:CheckCircle', label: 'Resolved', status: 'resolved', message: 'This incident has been resolved. All systems are operating normally.' },
|
||||
{ icon: 'lucide:FileText', label: 'Postmortem', status: 'postmortem', message: 'Postmortem will be released shortly.' },
|
||||
];
|
||||
|
||||
const severityIcons: Record<string, string> = {
|
||||
@@ -340,6 +341,19 @@ export class UpladminIncidentUpdate extends DeesElement {
|
||||
|
||||
<div class="update-body">
|
||||
<dees-form>
|
||||
<div class="template-section">
|
||||
<label class="field-label">Quick Templates</label>
|
||||
<div class="template-label">Select a template to prefill status and message:</div>
|
||||
<div class="template-buttons">
|
||||
${templates.map(tpl => html`
|
||||
<button type="button" class="template-btn" @click="${() => this.applyTemplate(tpl)}">
|
||||
<dees-icon .icon=${tpl.icon} .iconSize=${12}></dees-icon>
|
||||
${tpl.label}
|
||||
</button>
|
||||
`)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="field-label required">Status</label>
|
||||
<div class="status-grid">
|
||||
@@ -364,17 +378,6 @@ export class UpladminIncidentUpdate extends DeesElement {
|
||||
|
||||
<div>
|
||||
<label class="field-label required">Update Message</label>
|
||||
<div class="template-section">
|
||||
<div class="template-label">Quick templates:</div>
|
||||
<div class="template-buttons">
|
||||
${templates.map(tpl => html`
|
||||
<button type="button" class="template-btn" @click="${() => this.applyTemplate(tpl.message)}">
|
||||
<dees-icon .icon=${tpl.icon} .iconSize=${12}></dees-icon>
|
||||
${tpl.label}
|
||||
</button>
|
||||
`)}
|
||||
</div>
|
||||
</div>
|
||||
<dees-input-text
|
||||
key="message"
|
||||
inputType="textarea"
|
||||
@@ -430,8 +433,8 @@ export class UpladminIncidentUpdate extends DeesElement {
|
||||
this.formData = { ...this.formData, status };
|
||||
}
|
||||
|
||||
private applyTemplate(message: string) {
|
||||
this.formData = { ...this.formData, message };
|
||||
private applyTemplate(template: { status: TIncidentStatus; message: string }) {
|
||||
this.formData = { ...this.formData, status: template.status, message: template.message };
|
||||
}
|
||||
|
||||
private validate(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user