diff --git a/main.go b/main.go index 3a93ed8..04e0840 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,7 @@ import ( "time" ) -const VERSION = "v32" +const VERSION = "v33" var ( logger *slog.Logger diff --git a/static/css/default_light/default_light.css b/static/css/default_light/default_light.css index 638f1a5..7240e14 100644 --- a/static/css/default_light/default_light.css +++ b/static/css/default_light/default_light.css @@ -49,7 +49,9 @@ dialog, #acknowledged-list, #values, #services, -#notifications { +#notifications, +#group, +.table { background-color: #fff !important; border: 1px solid #ddd; box-shadow: 5px 5px 8px 0px rgba(0, 0, 0, 0.25); diff --git a/static/css/default_light/main.css b/static/css/default_light/main.css index 21f3e6b..37b0e9d 100644 --- a/static/css/default_light/main.css +++ b/static/css/default_light/main.css @@ -1,3 +1,28 @@ +.table { + display: grid; + grid-gap: 6px 16px; + align-items: center; + margin-top: 32px; + margin-bottom: 32px; + background-color: #2979b8; + padding: 16px 24px; + width: min-content; + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} +.table .row { + grid-column: 1 / -1; +} +.table > div { + white-space: nowrap; + line-height: 24px; +} +.table .header { + font-size: 0.85em; + font-weight: bold; + color: #7bb8eb; + line-height: unset !important; +} html { box-sizing: border-box; } @@ -233,42 +258,34 @@ label { border-radius: 8px; } #time-selector { + position: absolute; + top: 16px; + right: 16px; display: grid; - grid-template-columns: min-content min-content; - grid-gap: 6px 16px; + grid-template-columns: 8px repeat(2, min-content) 8px 1px 8px repeat(3, min-content) 8px repeat(3, min-content) 8px 1px 8px repeat(2, min-content) 8px; + grid-gap: 6px 8px; + align-items: center; width: min-content; background-color: #fff; border: 1px solid #2979b8; - padding: 16px; border-radius: 6px; } #time-selector.hidden { display: none; } +#time-selector .vertical-line { + background-color: #2979b8; +} +#time-selector .header { + padding-top: 12px; + font-weight: bold; + font-size: 0.85em; +} #time-selector button { width: 100px; margin-top: 12px; justify-self: end; } -#time-selector #time-filter { - display: grid; - grid-template-columns: min-content repeat(3, min-content); - grid-gap: 16px; - margin-top: 16px; - align-items: center; - justify-items: center; -} -#time-selector #time-filter .header-1 { - font-weight: bold; - justify-self: start; -} -#time-selector #time-filter .header-2 { - font-weight: bold; - justify-self: start; - grid-column: 2 / -1; -} -#time-selector #time-filter .preset { +#time-selector div { white-space: nowrap; - justify-self: start; - padding-right: 32px; } diff --git a/static/css/default_light/problems.css b/static/css/default_light/problems.css index 85cb0b5..f89666b 100644 --- a/static/css/default_light/problems.css +++ b/static/css/default_light/problems.css @@ -1,61 +1,45 @@ #problems-list, #acknowledged-list { - display: grid; - grid-template-columns: repeat(6, min-content); - grid-gap: 4px 16px; - margin-top: 32px; - margin-bottom: 32px; - background-color: #2979b8; - padding: 16px 24px; - width: min-content; - border-top-left-radius: 8px; - border-top-right-radius: 8px; -} -#problems-list div, -#acknowledged-list div { - white-space: nowrap; - line-height: 24px; -} -#problems-list .header, -#acknowledged-list .header { - font-weight: 800; - color: #7bb8eb; + grid-template-columns: repeat(7, min-content); } #problems-list .trigger, #acknowledged-list .trigger { color: #1b4e78; - font-weight: 800; } -#problems-list .acknowledge img, -#acknowledged-list .acknowledge img { +#problems-list img.acknowledge, +#acknowledged-list img.acknowledge { height: 16px; } #problems-list .info, #acknowledged-list .info { margin-right: 8px; } +#problems-list .icons, +#acknowledged-list .icons { + display: grid; + grid-template-columns: min-content min-content; + align-items: center; +} #acknowledged-list.hidden { display: none; } -#areas { +#area-grouped { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 16px; + align-items: flex-start; } -#areas .area .section { - display: grid; - grid-template-columns: repeat(4, min-content); - grid-gap: 8px 12px; +#area-grouped .area { + grid-template-columns: repeat(5, min-content); } -#areas .area .section .name { - color: #000; - grid-column: 1 / -1; - font-weight: bold !important; - line-height: 24px; -} -#areas .area .section div { - white-space: nowrap; +#area-grouped .area .section { + padding: 4px 10px; + border-radius: 5px; + background: #2979b8; + color: #fff; + width: min-content; + margin-bottom: 8px; } .hidden { display: none; diff --git a/static/css/default_light/table.css b/static/css/default_light/table.css new file mode 100644 index 0000000..b238040 --- /dev/null +++ b/static/css/default_light/table.css @@ -0,0 +1,25 @@ +.table { + display: grid; + grid-gap: 6px 16px; + align-items: center; + margin-top: 32px; + margin-bottom: 32px; + background-color: #2979b8; + padding: 16px 24px; + width: min-content; + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} +.table .row { + grid-column: 1 / -1; +} +.table > div { + white-space: nowrap; + line-height: 24px; +} +.table .header { + font-size: 0.85em; + font-weight: bold; + color: #7bb8eb; + line-height: unset !important; +} diff --git a/static/css/gruvbox/default_light.css b/static/css/gruvbox/default_light.css index 95d95f2..c4781c3 100644 --- a/static/css/gruvbox/default_light.css +++ b/static/css/gruvbox/default_light.css @@ -49,7 +49,9 @@ dialog, #acknowledged-list, #values, #services, -#notifications { +#notifications, +#group, +.table { background-color: #fff !important; border: 1px solid #ddd; box-shadow: 5px 5px 8px 0px rgba(0, 0, 0, 0.25); diff --git a/static/css/gruvbox/main.css b/static/css/gruvbox/main.css index fd15ce2..4853b99 100644 --- a/static/css/gruvbox/main.css +++ b/static/css/gruvbox/main.css @@ -1,3 +1,28 @@ +.table { + display: grid; + grid-gap: 6px 16px; + align-items: center; + margin-top: 32px; + margin-bottom: 32px; + background-color: #333; + padding: 16px 24px; + width: min-content; + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} +.table .row { + grid-column: 1 / -1; +} +.table > div { + white-space: nowrap; + line-height: 24px; +} +.table .header { + font-size: 0.85em; + font-weight: bold; + color: #777; + line-height: unset !important; +} html { box-sizing: border-box; } @@ -233,42 +258,34 @@ label { border-radius: 8px; } #time-selector { + position: absolute; + top: 16px; + right: 16px; display: grid; - grid-template-columns: min-content min-content; - grid-gap: 6px 16px; + grid-template-columns: 8px repeat(2, min-content) 8px 1px 8px repeat(3, min-content) 8px repeat(3, min-content) 8px 1px 8px repeat(2, min-content) 8px; + grid-gap: 6px 8px; + align-items: center; width: min-content; background-color: #282828; border: 1px solid #333; - padding: 16px; border-radius: 6px; } #time-selector.hidden { display: none; } +#time-selector .vertical-line { + background-color: #333; +} +#time-selector .header { + padding-top: 12px; + font-weight: bold; + font-size: 0.85em; +} #time-selector button { width: 100px; margin-top: 12px; justify-self: end; } -#time-selector #time-filter { - display: grid; - grid-template-columns: min-content repeat(3, min-content); - grid-gap: 16px; - margin-top: 16px; - align-items: center; - justify-items: center; -} -#time-selector #time-filter .header-1 { - font-weight: bold; - justify-self: start; -} -#time-selector #time-filter .header-2 { - font-weight: bold; - justify-self: start; - grid-column: 2 / -1; -} -#time-selector #time-filter .preset { +#time-selector div { white-space: nowrap; - justify-self: start; - padding-right: 32px; } diff --git a/static/css/gruvbox/problems.css b/static/css/gruvbox/problems.css index 7670ba8..2af0baf 100644 --- a/static/css/gruvbox/problems.css +++ b/static/css/gruvbox/problems.css @@ -1,61 +1,45 @@ #problems-list, #acknowledged-list { - display: grid; - grid-template-columns: repeat(6, min-content); - grid-gap: 4px 16px; - margin-top: 32px; - margin-bottom: 32px; - background-color: #333; - padding: 16px 24px; - width: min-content; - border-top-left-radius: 8px; - border-top-right-radius: 8px; -} -#problems-list div, -#acknowledged-list div { - white-space: nowrap; - line-height: 24px; -} -#problems-list .header, -#acknowledged-list .header { - font-weight: 800; - color: #777; + grid-template-columns: repeat(7, min-content); } #problems-list .trigger, #acknowledged-list .trigger { color: #fb4934; - font-weight: 800; } -#problems-list .acknowledge img, -#acknowledged-list .acknowledge img { +#problems-list img.acknowledge, +#acknowledged-list img.acknowledge { height: 16px; } #problems-list .info, #acknowledged-list .info { margin-right: 8px; } +#problems-list .icons, +#acknowledged-list .icons { + display: grid; + grid-template-columns: min-content min-content; + align-items: center; +} #acknowledged-list.hidden { display: none; } -#areas { +#area-grouped { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 16px; + align-items: flex-start; } -#areas .area .section { - display: grid; - grid-template-columns: repeat(4, min-content); - grid-gap: 8px 12px; +#area-grouped .area { + grid-template-columns: repeat(5, min-content); } -#areas .area .section .name { - color: #f7edd7; - grid-column: 1 / -1; - font-weight: bold !important; - line-height: 24px; -} -#areas .area .section div { - white-space: nowrap; +#area-grouped .area .section { + padding: 4px 10px; + border-radius: 5px; + background: #333; + color: #fff; + width: min-content; + margin-bottom: 8px; } .hidden { display: none; diff --git a/static/css/gruvbox/table.css b/static/css/gruvbox/table.css new file mode 100644 index 0000000..d879e8b --- /dev/null +++ b/static/css/gruvbox/table.css @@ -0,0 +1,25 @@ +.table { + display: grid; + grid-gap: 6px 16px; + align-items: center; + margin-top: 32px; + margin-bottom: 32px; + background-color: #333; + padding: 16px 24px; + width: min-content; + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} +.table .row { + grid-column: 1 / -1; +} +.table > div { + white-space: nowrap; + line-height: 24px; +} +.table .header { + font-size: 0.85em; + font-weight: bold; + color: #777; + line-height: unset !important; +} diff --git a/static/images/default_light/ok.svg b/static/images/default_light/ok.svg new file mode 100644 index 0000000..2f2b62e --- /dev/null +++ b/static/images/default_light/ok.svg @@ -0,0 +1,67 @@ + + + + + + + + + + image/svg+xml + + + + + + check-circle + + + diff --git a/static/images/default_light/warning.svg b/static/images/default_light/warning.svg new file mode 100644 index 0000000..93ac751 --- /dev/null +++ b/static/images/default_light/warning.svg @@ -0,0 +1,68 @@ + + + + + + + + + + image/svg+xml + + + + + + alert + + + diff --git a/static/images/gruvbox/ok.svg b/static/images/gruvbox/ok.svg new file mode 100644 index 0000000..2f2b62e --- /dev/null +++ b/static/images/gruvbox/ok.svg @@ -0,0 +1,67 @@ + + + + + + + + + + image/svg+xml + + + + + + check-circle + + + diff --git a/static/images/gruvbox/warning.svg b/static/images/gruvbox/warning.svg new file mode 100644 index 0000000..93ac751 --- /dev/null +++ b/static/images/gruvbox/warning.svg @@ -0,0 +1,68 @@ + + + + + + + + + + image/svg+xml + + + + + + alert + + + diff --git a/static/less/default_light.less b/static/less/default_light.less index ba51838..4b75c80 100644 --- a/static/less/default_light.less +++ b/static/less/default_light.less @@ -62,7 +62,7 @@ dialog { border-radius: 8px; } -dialog, #datapoints, #problems-list, #acknowledged-list, #values, #services, #notifications { +dialog, #datapoints, #problems-list, #acknowledged-list, #values, #services, #notifications, #group, .table { background-color: #fff !important; border: 1px solid #ddd; box-shadow: 5px 5px 8px 0px rgba(0,0,0,0.25); diff --git a/static/less/main.less b/static/less/main.less index 22e012d..33d6845 100644 --- a/static/less/main.less +++ b/static/less/main.less @@ -1,4 +1,5 @@ @import "theme-@{THEME}.less"; +@import "table.less"; html { box-sizing: border-box; @@ -290,51 +291,42 @@ label { } #time-selector { + position: absolute; + + top: 16px; + right: 16px; + display: grid; - grid-template-columns: min-content min-content; - grid-gap: 6px 16px; + grid-template-columns: 8px repeat(2,min-content) 8px 1px 8px repeat(3,min-content) 8px repeat(3,min-content) 8px 1px 8px repeat(2,min-content) 8px; + grid-gap: 6px 8px; + align-items: center; width: min-content; background-color: @bg1; border: 1px solid @bg3; - padding: 16px; border-radius: 6px; &.hidden { display: none; } + .vertical-line { + background-color: @bg3; + } + + .header { + padding-top: 12px; + font-weight: bold; + font-size: 0.85em; + } + button { width: 100px; margin-top: 12px; justify-self: end; } - #time-filter { - display: grid; - grid-template-columns: min-content repeat(3, min-content); - grid-gap: 16px; - margin-top: 16px; - - align-items: center; - justify-items: center; - - .header-1 { - font-weight: bold; - justify-self: start; - } - - .header-2 { - font-weight: bold; - justify-self: start; - grid-column: ~"2 / -1"; - } - - .preset { - white-space: nowrap; - justify-self: start; - padding-right: 32px; - } + div { + white-space: nowrap; } } - diff --git a/static/less/problems.less b/static/less/problems.less index 92d3723..e9e334c 100644 --- a/static/less/problems.less +++ b/static/less/problems.less @@ -1,69 +1,48 @@ @import "theme-@{THEME}.less"; #problems-list, #acknowledged-list { - display: grid; - grid-template-columns: repeat(6, min-content); - grid-gap: 4px 16px; - margin-top: 32px; - margin-bottom: 32px; - background-color: @bg3; - padding: 16px 24px; - width: min-content; - border-top-left-radius: 8px; - border-top-right-radius: 8px; - - div { - white-space: nowrap; - line-height: 24px; - } - - .header { - font-weight: @bold; - color: @text3; - } + grid-template-columns: repeat(7, min-content); .trigger { color: @color1; - font-weight: @bold; } - .acknowledge { - img { - height: 16px; - } + img.acknowledge { + height: 16px; } .info { margin-right: 8px; } + + .icons { + display: grid; + grid-template-columns: min-content min-content; + align-items: center; + } } #acknowledged-list.hidden{ display: none; } -#areas { +#area-grouped { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 16px; + align-items: flex-start; .area { + grid-template-columns: repeat(5, min-content); + .section { - display: grid; - grid-template-columns: repeat(4, min-content); - grid-gap: 8px 12px; - - .name { - color: @text2; - grid-column: ~"1 / -1"; - font-weight: bold !important; - line-height: 24px; - } - - div { - white-space: nowrap; - } + padding: 4px 10px; + border-radius: 5px; + background: @bg3; + color: #fff; + width: min-content; + margin-bottom: 8px; } } } diff --git a/static/less/table.less b/static/less/table.less new file mode 100644 index 0000000..0bc4648 --- /dev/null +++ b/static/less/table.less @@ -0,0 +1,31 @@ +@import "theme-@{THEME}.less"; + +.table { + display: grid; + grid-gap: 6px 16px; + align-items: center; + + .row { + grid-column: ~"1 / -1"; + } + + margin-top: 32px; + margin-bottom: 32px; + background-color: @bg3; + padding: 16px 24px; + width: min-content; + border-top-left-radius: 8px; + border-top-right-radius: 8px; + + & > div { + white-space: nowrap; + line-height: 24px; + } + + .header { + font-size: 0.85em; + font-weight: bold; + color: @text3; + line-height: unset !important; + } +} diff --git a/views/components/timefilter.gotmpl b/views/components/timefilter.gotmpl index 0944254..df24df0 100644 --- a/views/components/timefilter.gotmpl +++ b/views/components/timefilter.gotmpl @@ -19,9 +19,96 @@
+ + {{/* Row 1 */}} +
+
Date and time
+ +
+
 
+
+ +
Offsets
+ +
+
+
+ +
Presets
+
+ + + {{/* Row 2 */}} +
+
From
+ + +
+ {{/* Vertical line */}} +
+ +
+
Hour
+
+ +
+ +
+
Week
+
+ +
+ {{/* Vertical line */}} +
+ +
⚫︎ Last hour
+
⚫︎ Last 7 days
+
+ + + {{/* Row 3 */}} +
+
To
+ + +
+ {{/* Vertical line */}} +
+ +
+
Day
+
+ +
+ +
+
Month
+
+ +
+ {{/* Vertical line */}} +
+ +
⚫︎ Last 24 hours
+
⚫︎ Last 31 days
+ +
+ + + {{/* Row 4 */}} +
+
+
+ + + {{/*
From
To
+
+
+
+ @@ -49,6 +136,8 @@
Last 31 days
+
Last 24 hours
+
Last 24 hours
Month
@@ -56,6 +145,7 @@
+ */}} {{ end }} diff --git a/views/pages/datapoint_values.gotmpl b/views/pages/datapoint_values.gotmpl index 3aa49e0..c2019f9 100644 --- a/views/pages/datapoint_values.gotmpl +++ b/views/pages/datapoint_values.gotmpl @@ -12,6 +12,7 @@ {{ if eq .Data.Datapoint.Datatype "INT" }}
+
{{ end }} diff --git a/views/pages/problems.gotmpl b/views/pages/problems.gotmpl index f762107..50f8757 100644 --- a/views/pages/problems.gotmpl +++ b/views/pages/problems.gotmpl @@ -10,123 +10,141 @@ {{ block "page_label" . }}{{ end }} -
- - -
- -
- - {{ block "timefilter" . }}{{ end }} - -
- - -
- +
+
+ Problem selection
+ +
+ +
+
+ Show
+ +
+ +
+ +
+ {{ block "timefilter" . }}{{ end }} +