2024-04-29 08:36:13 +02:00
|
|
|
{{ define "page" }}
|
2024-05-01 20:01:43 +02:00
|
|
|
{{ $version := .VERSION }}
|
2024-06-25 10:50:31 +02:00
|
|
|
{{ $theme := .CONFIG.THEME }}
|
2024-05-01 20:01:43 +02:00
|
|
|
<script type="module" defer>
|
|
|
|
import {UI} from "/js/{{ .VERSION }}/problems.mjs"
|
|
|
|
|
|
|
|
window._ui = new UI()
|
|
|
|
</script>
|
2024-06-25 08:59:07 +02:00
|
|
|
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/{{ .CONFIG.THEME }}/problems.css">
|
2024-05-01 20:01:43 +02:00
|
|
|
|
2024-07-04 13:37:06 +02:00
|
|
|
{{ block "page_label" . }}{{ end }}
|
2024-04-29 08:36:13 +02:00
|
|
|
|
2024-07-04 13:37:06 +02:00
|
|
|
<div style="margin-bottom: 16px">
|
2024-07-04 15:14:24 +02:00
|
|
|
<input {{ if eq .Data.Selection "CURRENT" }}checked{{ end }} type="radio" name="selection" id="selection-current" onclick="_ui.selectCurrent()"> <label for="selection-current">Current 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>
|
2024-05-28 12:56:35 +02:00
|
|
|
</div>
|
|
|
|
|
2024-07-04 16:29:53 +02:00
|
|
|
<hr style="margin-bottom: 16px">
|
2024-07-04 15:14:24 +02:00
|
|
|
|
2024-07-04 13:37:06 +02:00
|
|
|
{{ block "timefilter" . }}{{ end }}
|
|
|
|
|
2024-07-04 15:14:24 +02:00
|
|
|
<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-list" onclick="_ui.displayList()"> <label for="display-list">List</label>
|
2024-07-04 16:29:53 +02:00
|
|
|
<div style="margin-top: 8px">
|
|
|
|
<input type="checkbox" id="show-acked" onclick="_ui.toggleAcknowledged(event)"> <label for="show-acked">Show acknowledged</label>
|
|
|
|
</div>
|
2024-07-04 15:14:24 +02:00
|
|
|
</div>
|
|
|
|
|
2024-05-28 12:56:35 +02:00
|
|
|
<div class="display-list hidden">
|
|
|
|
<div id="problems-list">
|
2024-07-04 15:59:29 +02:00
|
|
|
<div style="grid-column: 1/-1;"><h2>Unacknowledged</h2></div>
|
2024-05-28 12:56:35 +02:00
|
|
|
|
|
|
|
<div class="header">Trigger</div>
|
|
|
|
<div class="header">Area</div>
|
|
|
|
<div class="header">Section</div>
|
|
|
|
<div class="header">Since</div>
|
|
|
|
{{ range .Data.Problems }}
|
|
|
|
{{ if .Acknowledged }}
|
|
|
|
{{ continue }}
|
|
|
|
{{ end }}
|
|
|
|
<div class="line"></div>
|
2024-05-01 21:02:45 +02:00
|
|
|
|
2024-05-28 12:56:35 +02:00
|
|
|
{{ if eq .TriggerID -1 }}
|
|
|
|
<div class="trigger">{{ .TriggerName }}</div>
|
|
|
|
<div class="area">{{ .AreaName }}</div>
|
|
|
|
<div class="section">{{ .SectionName }}</div>
|
|
|
|
<div class="start"></div>
|
2024-07-04 08:54:03 +02:00
|
|
|
<div class="acknowledge">
|
|
|
|
<img class="info" src="/images/{{ $version }}/{{ $theme }}/info-outline.svg">
|
|
|
|
<img src="/images/{{ $version }}/{{ $theme }}/acknowledge.svg">
|
|
|
|
</div>
|
2024-05-28 12:56:35 +02:00
|
|
|
{{ else }}
|
|
|
|
<div class="trigger"><a href="/trigger/edit/{{ .TriggerID }}">{{ .TriggerName }}</a></div>
|
|
|
|
<div class="area">{{ .AreaName }}</div>
|
|
|
|
<div class="section">{{ .SectionName }}</div>
|
|
|
|
<div class="start">{{ format_time .Start }}</div>
|
2024-07-04 08:54:03 +02:00
|
|
|
<div class="acknowledge">
|
|
|
|
{{ if .FormattedValues }}
|
|
|
|
<img class="info" src="/images/{{ $version }}/{{ $theme }}/info-filled.svg" title="{{ .FormattedValues }}">
|
|
|
|
{{ else }}
|
|
|
|
<img class="info" src="/images/{{ $version }}/{{ $theme }}/info-outline.svg">
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<a href="/problem/acknowledge/{{ .ID }}">
|
|
|
|
<img src="/images/{{ $version }}/{{ $theme }}/acknowledge-filled.svg">
|
|
|
|
</a>
|
|
|
|
</div>
|
2024-05-28 12:56:35 +02:00
|
|
|
{{ end }}
|
2024-05-28 07:23:27 +02:00
|
|
|
{{ end }}
|
2024-05-28 12:56:35 +02:00
|
|
|
</div>
|
2024-05-28 07:23:27 +02:00
|
|
|
|
2024-05-28 12:56:35 +02:00
|
|
|
<div id="acknowledged-list" class="hidden">
|
2024-06-25 10:50:31 +02:00
|
|
|
<div style="grid-column: 1/-1;"><h2>Acknowledged</h2></div>
|
2024-05-28 12:56:35 +02:00
|
|
|
<div class="header">Trigger</div>
|
|
|
|
<div class="header">Area</div>
|
|
|
|
<div class="header">Section</div>
|
|
|
|
<div class="header">Since</div>
|
|
|
|
|
|
|
|
{{ range .Data.Problems }}
|
|
|
|
{{ if not .Acknowledged }}
|
|
|
|
{{ continue }}
|
|
|
|
{{ end }}
|
|
|
|
<div class="line"></div>
|
2024-05-28 07:23:27 +02:00
|
|
|
<div class="trigger"><a href="/trigger/edit/{{ .TriggerID }}">{{ .TriggerName }}</a></div>
|
|
|
|
<div class="area">{{ .AreaName }}</div>
|
|
|
|
<div class="section">{{ .SectionName }}</div>
|
|
|
|
<div class="start">{{ format_time .Start }}</div>
|
2024-07-04 08:54:03 +02:00
|
|
|
<div class="acknowledge">
|
2024-07-04 15:14:24 +02:00
|
|
|
{{ if .FormattedValues }}
|
|
|
|
<img class="info" src="/images/{{ $version }}/{{ $theme }}/info-filled.svg" title="{{ .FormattedValues }}">
|
|
|
|
{{ else }}
|
|
|
|
<img class="info" src="/images/{{ $version }}/{{ $theme }}/info-outline.svg">
|
|
|
|
{{ end }}
|
2024-07-04 08:54:03 +02:00
|
|
|
<a href="/problem/unacknowledge/{{ .ID }}"><img src="/images/{{ $version }}/{{ $theme }}/acknowledge-outline.svg"></a>
|
|
|
|
</div>
|
2024-05-28 07:23:27 +02:00
|
|
|
{{ end }}
|
2024-05-28 12:56:35 +02:00
|
|
|
</div>
|
2024-05-01 20:01:43 +02:00
|
|
|
</div>
|
|
|
|
|
2024-06-25 11:00:39 +02:00
|
|
|
<div class="display-areas hidden">
|
2024-05-28 12:56:35 +02:00
|
|
|
<div id="areas">
|
|
|
|
{{ range $areaName, $sections := .Data.ProblemsGrouped }}
|
|
|
|
<div class="area">
|
|
|
|
<div class="name">{{ $areaName }}</div>
|
|
|
|
|
|
|
|
{{ range $sectionName, $problems := $sections }}
|
|
|
|
<div class="section problems">
|
|
|
|
<div class="name">{{ $sectionName }}</div>
|
|
|
|
|
|
|
|
{{ range $problems }}
|
2024-07-04 16:29:53 +02:00
|
|
|
<div class="{{ if .Acknowledged }}acked hidden{{ end }}">{{ if .IsArchived }}<span class="ok">Archived</span>{{ else }}<span class="error">Current</span>{{ end }}</div>
|
2024-07-04 08:54:03 +02:00
|
|
|
|
2024-07-04 16:29:53 +02:00
|
|
|
<div class="{{ if .Acknowledged }}acked hidden{{ end }} trigger">{{ .TriggerName }}</div>
|
2024-05-01 20:01:43 +02:00
|
|
|
|
2024-07-04 16:29:53 +02:00
|
|
|
{{ if eq (.Start | html) "0001-01-01 00:00:00 +0000 UTC" }}
|
|
|
|
<div class="{{ if .Acknowledged }}acked hidden{{ end }} since"></div>
|
|
|
|
{{ else }}
|
|
|
|
<div class="{{ if .Acknowledged }}acked hidden{{ end }} since">{{ format_time .Start }}</div>
|
|
|
|
{{ end }}
|
2024-07-04 08:54:03 +02:00
|
|
|
|
2024-07-04 16:29:53 +02:00
|
|
|
{{ if .FormattedValues }}
|
|
|
|
<div class="{{ if .Acknowledged }}acked hidden{{ end }}"><img src="/images/{{ $version }}/{{ $theme }}/info-filled.svg" title="{{ .FormattedValues }}"></div>
|
|
|
|
{{ else }}
|
|
|
|
<div class="{{ if .Acknowledged }}acked hidden{{ end }}"><img src="/images/{{ $version }}/{{ $theme }}/info-outline.svg"></div>
|
|
|
|
{{ end }}
|
2024-07-04 08:54:03 +02:00
|
|
|
|
2024-05-28 12:56:35 +02:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2024-04-29 08:36:13 +02:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-07-04 15:14:24 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
const form = document.getElementById('form-time-selector')
|
|
|
|
const inputSelection = document.createElement('input')
|
|
|
|
inputSelection.type = 'hidden'
|
|
|
|
inputSelection.name = 'selection'
|
|
|
|
inputSelection.value = '{{ if eq .Data.Selection "ALL" }}all{{ else }}current{{ end }}'
|
|
|
|
form.append(inputSelection)
|
|
|
|
</script>
|
|
|
|
|
2024-04-29 08:36:13 +02:00
|
|
|
{{ end }}
|