diff --git a/templates/static/checks/issues2.html b/templates/static/checks/issues2.html
index 523edba..e24f4a2 100644
--- a/templates/static/checks/issues2.html
+++ b/templates/static/checks/issues2.html
@@ -3,7 +3,8 @@
Aktuelle Störfälle ()
Kritisch:
- Warnungen:
+ Warnungen:
+ OK < 600s:
@@ -170,8 +171,8 @@
currentIssue.html.addClass("issue-" + issue.CheckState );
var now = moment();
- var m1 = moment(issue.History.slice(-1)[0].Timestamp);
- var m2 = moment(issue.History.slice(-2)[0].Timestamp);
+ var m1 = issue.History.length > 0 ? moment(issue.History.slice(-1)[0].Timestamp) : moment();
+ var m2 = issue.History.length > 1 ? moment(issue.History.slice(-2)[0].Timestamp) : moment();
$($("td", currentIssue.html).get(0))
.text(currentIssue.issue.Node.Name + " [ "+ currentIssue.issue.Node.UniqueIdentity +" ]");
@@ -180,7 +181,7 @@
$($("td", currentIssue.html).get(2))
.text(currentIssue.issue.CheckName);
$($("td", currentIssue.html).get(3))
- .text( timespan((now - m1)/1000) + " ( " +issue.History.slice(-2)[0].NewState + "=" + timespan((m1 - m2)/1000) + " )");
+ .text( timespan((now - m1)/1000) + (issue.History.length > 1 ? " ( " + issue.History.slice(-2)[0].NewState + "=" + timespan((m1 - m2)/1000) + " )" : "") );
$($("td", currentIssue.html).get(4)).empty();
$.each( currentIssue.issue.PerformanceValues, function(){
@@ -294,8 +295,8 @@
var aissue = $(a).data("issue");
var bissue = $(b).data("issue");
- var ta = moment(aissue.issue.History.slice(-1)[0].Timestamp);
- var tb = moment(bissue.issue.History.slice(-1)[0].Timestamp);
+ var ta = aissue.issue.History.length > 0 ? moment(aissue.issue.History.slice(-1)[0].Timestamp) : moment();
+ var tb = bissue.issue.History.length > 0 ? moment(bissue.issue.History.slice(-1)[0].Timestamp) : moment();
if (ta < tb)
return -1;
@@ -308,6 +309,7 @@
$("#nCRITICAL").text( $("#issues > tbody > .issue-CRITICAL").length );
$("#nWARN").text( $("#issues > tbody > .issue-WARN").length );
+ $("#nOK").text( $("#issues > tbody > .issue-OK").length );
$("#lastUpdate").text( moment().format() );
}
diff --git a/templates/static/css/style.css b/templates/static/css/style.css
index 49fc14c..b53fd3f 100644
--- a/templates/static/css/style.css
+++ b/templates/static/css/style.css
@@ -376,6 +376,11 @@ fieldset > label {
overflow-y: auto;
}
+.issue-OK {
+ border-color: white;
+ background-color: white;
+ color: green;
+}
.issue-WARN {
border-color: #C0C000;
background-color: #C0C000;
@@ -390,6 +395,9 @@ fieldset > label {
#CheckState {
font-size: 20px;
}
+#CheckState.OK, span#nOK {
+ color: #00C000;
+}
#CheckState.WARN, span#nWARN {
color: #C0C000;
}
@@ -417,7 +425,7 @@ fieldset > label {
background-color: red;
}
-span#nWARN, span#nCRITICAL {
+span#nWARN, span#nCRITICAL, span#nOK {
font-size: 24px;
}