diff --git a/resource/static/theme-hotaru/css/core.css b/resource/static/theme-hotaru/css/core.css index c5f0214..21e9086 100644 --- a/resource/static/theme-hotaru/css/core.css +++ b/resource/static/theme-hotaru/css/core.css @@ -1,5 +1,3 @@ -/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ - @media print { *, *:before, *:after { color: #000 !important; diff --git a/resource/static/theme-hotaru/css/main.css b/resource/static/theme-hotaru/css/main.css index a74ae53..8f7459b 100644 --- a/resource/static/theme-hotaru/css/main.css +++ b/resource/static/theme-hotaru/css/main.css @@ -170,6 +170,7 @@ h1 { .ui.progress .bar { line-height: unset !important; + height: unset !important; } table tr { diff --git a/resource/template/common/footer.html b/resource/template/common/footer.html index a395dd7..60f9ffb 100644 --- a/resource/template/common/footer.html +++ b/resource/template/common/footer.html @@ -9,7 +9,7 @@ - + diff --git a/resource/template/theme-default/home.html b/resource/template/theme-default/home.html index 2354788..8f0c36c 100644 --- a/resource/template/theme-default/home.html +++ b/resource/template/theme-default/home.html @@ -126,7 +126,7 @@ this.cache[percent].style['background-color'] = 'slategray' this.cache[percent].class.offline = true } else if (percent < 51) { - this.cache[percent].style['background-color'] = 'lime' + this.cache[percent].style['background-color'] = 'rgb(0, 235, 139)' this.cache[percent].class.fine = true } else if (percent < 81) { this.cache[percent].style['background-color'] = 'orange' diff --git a/resource/template/theme-hotaru/home.html b/resource/template/theme-hotaru/home.html index 4b4d0b4..73cf890 100644 --- a/resource/template/theme-hotaru/home.html +++ b/resource/template/theme-hotaru/home.html @@ -17,7 +17,7 @@ - + {{if ts .CustomCSS}} {{tag "style"}} @@ -177,7 +177,7 @@ this.cache[percent].style['background-color'] = 'slategray' this.cache[percent].class.offline = true } else if (percent < 51) { - this.cache[percent].style['background-color'] = 'lime' + this.cache[percent].style['background-color'] = 'rgb(0, 235, 139)' this.cache[percent].class.fine = true } else if (percent < 81) { this.cache[percent].style['background-color'] = 'orange' diff --git a/service/alertmanager/alertmanager.go b/service/alertmanager/alertmanager.go index 2a8299b..fd603a7 100644 --- a/service/alertmanager/alertmanager.go +++ b/service/alertmanager/alertmanager.go @@ -113,14 +113,18 @@ func checkStatus() { var flag bool if cacheN, has := dao.Cache.Get(nID); has { nHistory := cacheN.(NotificationHistory) - // 超过一天或者超过上次提醒阈值 - if time.Now().After(nHistory.Until) || nHistory.Duration >= time.Hour*24 { + // 每次提醒都增加一倍等待时间,最后每天最多提醒一次 + if time.Now().After(nHistory.Until) { flag = true nHistory.Duration *= 2 + if nHistory.Duration > time.Hour*24 { + nHistory.Duration = time.Hour * 24 + } nHistory.Until = time.Now().Add(nHistory.Duration) + dao.Cache.Set(nID, nHistory, nHistory.Duration) } } else { - // 新提醒 + // 新提醒直接通知 flag = true dao.Cache.Set(nID, NotificationHistory{ Duration: firstNotificationDelay,