From 7cf05f959dad251d7913fa0f7f87430992c88c9a Mon Sep 17 00:00:00 2001 From: Starow Date: Mon, 11 Aug 2014 15:06:38 +0200 Subject: [PATCH 1/2] Javascript modification dashboard log table --- var/www/static/js/indexjavascript.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/var/www/static/js/indexjavascript.js b/var/www/static/js/indexjavascript.js index eef01bbb..c17e5f4b 100644 --- a/var/www/static/js/indexjavascript.js +++ b/var/www/static/js/indexjavascript.js @@ -39,6 +39,9 @@ function create_log_table(obj_json) { else if ( chansplit[1] == "WARNING" ){ tr.className = "warning"; } + else if ( chansplit[1] == "CRITICAL"){ + tr.className = "critical" + } source_link = document.createElement("A"); if (parsedmess[1] == "slexy.org"){ @@ -70,8 +73,17 @@ function create_log_table(obj_json) { tr.appendChild(nam); tr.appendChild(msage); + if (tr.className == document.getElementById("checkbox_log_info").value && document.getElementById("checkbox_log_info").checked == true) { + tableBody.appendChild(tr); + } + if (tr.className == document.getElementById("checkbox_log_warning").value && document.getElementById("checkbox_log_warning").checked == true) { + tableBody.appendChild(tr); + } + if (tr.className == document.getElementById("checkbox_log_critical").value && document.getElementById("checkbox_log_critical").checked == true) { + tableBody.appendChild(tr); + }; + var sel = document.getElementById("log_select") - tableBody.appendChild(tr); if (tableBody.rows.length > sel.options[sel.options.selectedIndex].value){ while (tableBody.rows.length != sel.options[sel.options.selectedIndex].value){ tableBody.deleteRow(0); From 25cebf314cc4735026e07cfd06f6f80cc3154a0a Mon Sep 17 00:00:00 2001 From: Starow Date: Mon, 11 Aug 2014 15:07:55 +0200 Subject: [PATCH 2/2] Index.html log table modification --- var/www/templates/index.html | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/var/www/templates/index.html b/var/www/templates/index.html index 4c732d60..ac06d919 100644 --- a/var/www/templates/index.html +++ b/var/www/templates/index.html @@ -82,24 +82,24 @@
Logs +
+ + INFO + WARNING + CRITICAL + +
-
-
- -
- -
-