Compare commits
No commits in common. "3227c22de179d2ad99cd5595bf84448645898855" and "4d7f0d557ed3e795e20cc12463bfbb0cf8687e69" have entirely different histories.
3227c22de1
...
4d7f0d557e
2
main.go
2
main.go
@ -29,7 +29,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VERSION = "v30"
|
const VERSION = "v29"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
logger *slog.Logger
|
logger *slog.Logger
|
||||||
|
@ -1 +0,0 @@
|
|||||||
ALTER TABLE public.problem ADD COLUMN trigger_name VARCHAR NOT NULL DEFAULT '[Unknown]';
|
|
@ -237,9 +237,6 @@ label {
|
|||||||
grid-template-columns: min-content min-content;
|
grid-template-columns: min-content min-content;
|
||||||
grid-gap: 6px 16px;
|
grid-gap: 6px 16px;
|
||||||
width: min-content;
|
width: min-content;
|
||||||
background-color: #fff;
|
|
||||||
border: 1px solid #2979b8;
|
|
||||||
padding: 16px;
|
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
#time-selector.hidden {
|
#time-selector.hidden {
|
||||||
|
@ -237,9 +237,6 @@ label {
|
|||||||
grid-template-columns: min-content min-content;
|
grid-template-columns: min-content min-content;
|
||||||
grid-gap: 6px 16px;
|
grid-gap: 6px 16px;
|
||||||
width: min-content;
|
width: min-content;
|
||||||
background-color: #282828;
|
|
||||||
border: 1px solid #333;
|
|
||||||
padding: 16px;
|
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
#time-selector.hidden {
|
#time-selector.hidden {
|
||||||
|
@ -6,7 +6,6 @@ export class UI {
|
|||||||
const list = document.getElementById('acknowledged-list')
|
const list = document.getElementById('acknowledged-list')
|
||||||
list.classList.remove('hidden')
|
list.classList.remove('hidden')
|
||||||
}
|
}
|
||||||
this.acknowledgeDisplay(showAcked == 'true')
|
|
||||||
|
|
||||||
const display = localStorage.getItem('problems_display')
|
const display = localStorage.getItem('problems_display')
|
||||||
if (display === null)
|
if (display === null)
|
||||||
@ -24,20 +23,13 @@ export class UI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toggleAcknowledged(evt) {
|
toggleAcknowledged(evt) {
|
||||||
this.acknowledgeDisplay(evt.target.checked)
|
|
||||||
}
|
|
||||||
|
|
||||||
acknowledgeDisplay(show) {
|
|
||||||
const list = document.getElementById('acknowledged-list')
|
const list = document.getElementById('acknowledged-list')
|
||||||
const areaItems = document.querySelectorAll('.acked')
|
|
||||||
|
|
||||||
if (show) {
|
if (evt.target.checked) {
|
||||||
list.classList.remove('hidden')
|
list.classList.remove('hidden')
|
||||||
areaItems.forEach(item=>item.classList.remove('hidden'))
|
|
||||||
localStorage.setItem('show_acknowledged', true)
|
localStorage.setItem('show_acknowledged', true)
|
||||||
} else {
|
} else {
|
||||||
list.classList.add('hidden')
|
list.classList.add('hidden')
|
||||||
areaItems.forEach(item=>item.classList.add('hidden'))
|
|
||||||
localStorage.setItem('show_acknowledged', false)
|
localStorage.setItem('show_acknowledged', false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -295,9 +295,6 @@ label {
|
|||||||
grid-gap: 6px 16px;
|
grid-gap: 6px 16px;
|
||||||
|
|
||||||
width: min-content;
|
width: min-content;
|
||||||
background-color: @bg1;
|
|
||||||
border: 1px solid @bg3;
|
|
||||||
padding: 16px;
|
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
|
||||||
&.hidden {
|
&.hidden {
|
||||||
|
@ -15,16 +15,13 @@
|
|||||||
<input {{ if eq .Data.Selection "ALL" }}checked{{ end }} type="radio" name="selection" id="selection-all" onclick="_ui.selectAll()"> <label for="selection-all">Time-filtered problems</label>
|
<input {{ if eq .Data.Selection "ALL" }}checked{{ end }} type="radio" name="selection" id="selection-all" onclick="_ui.selectAll()"> <label for="selection-all">Time-filtered problems</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr style="margin-bottom: 16px">
|
<hr>
|
||||||
|
|
||||||
{{ block "timefilter" . }}{{ end }}
|
{{ block "timefilter" . }}{{ end }}
|
||||||
|
|
||||||
<div style="margin-top: 16px">
|
<div style="margin-top: 16px">
|
||||||
<input type="radio" name="display" id="display-table" onclick="_ui.displayAreas()"> <label for="display-table">Areas</label>
|
<input type="radio" name="display" id="display-table" onclick="_ui.displayAreas()"> <label for="display-table">Areas</label>
|
||||||
<input type="radio" name="display" id="display-list" onclick="_ui.displayList()"> <label for="display-list">List</label>
|
<input type="radio" name="display" id="display-list" onclick="_ui.displayList()"> <label for="display-list">List</label>
|
||||||
<div style="margin-top: 8px">
|
|
||||||
<input type="checkbox" id="show-acked" onclick="_ui.toggleAcknowledged(event)"> <label for="show-acked">Show acknowledged</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="display-list hidden">
|
<div class="display-list hidden">
|
||||||
@ -70,6 +67,8 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<input type="checkbox" id="show-acked" onclick="_ui.toggleAcknowledged(event)"> <label for="show-acked">Show acknowledged</label>
|
||||||
|
|
||||||
<div id="acknowledged-list" class="hidden">
|
<div id="acknowledged-list" class="hidden">
|
||||||
<div style="grid-column: 1/-1;"><h2>Acknowledged</h2></div>
|
<div style="grid-column: 1/-1;"><h2>Acknowledged</h2></div>
|
||||||
<div class="header">Trigger</div>
|
<div class="header">Trigger</div>
|
||||||
@ -109,20 +108,20 @@
|
|||||||
<div class="name">{{ $sectionName }}</div>
|
<div class="name">{{ $sectionName }}</div>
|
||||||
|
|
||||||
{{ range $problems }}
|
{{ range $problems }}
|
||||||
<div class="{{ if .Acknowledged }}acked hidden{{ end }}">{{ if .IsArchived }}<span class="ok">Archived</span>{{ else }}<span class="error">Current</span>{{ end }}</div>
|
<div>{{ if .IsArchived }}<span class="ok">Archived</span>{{ else }}<span class="error">Current</span>{{ end }}</div>
|
||||||
|
|
||||||
<div class="{{ if .Acknowledged }}acked hidden{{ end }} trigger">{{ .TriggerName }}</div>
|
<div class="trigger">{{ .TriggerName }}</div>
|
||||||
|
|
||||||
{{ if eq (.Start | html) "0001-01-01 00:00:00 +0000 UTC" }}
|
{{ if eq (.Start | html) "0001-01-01 00:00:00 +0000 UTC" }}
|
||||||
<div class="{{ if .Acknowledged }}acked hidden{{ end }} since"></div>
|
<div class="since"></div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="{{ if .Acknowledged }}acked hidden{{ end }} since">{{ format_time .Start }}</div>
|
<div class="since">{{ format_time .Start }}</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .FormattedValues }}
|
{{ if .FormattedValues }}
|
||||||
<div class="{{ if .Acknowledged }}acked hidden{{ end }}"><img src="/images/{{ $version }}/{{ $theme }}/info-filled.svg" title="{{ .FormattedValues }}"></div>
|
<div><img src="/images/{{ $version }}/{{ $theme }}/info-filled.svg" title="{{ .FormattedValues }}"></div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="{{ if .Acknowledged }}acked hidden{{ end }}"><img src="/images/{{ $version }}/{{ $theme }}/info-outline.svg"></div>
|
<div><img src="/images/{{ $version }}/{{ $theme }}/info-outline.svg"></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user