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