summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-03-23 21:39:50 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-03-23 21:39:50 (GMT)
commit729e6aa445323805c045d2aa1bf4c4d415e181ff (patch)
treeead65b78aa3b3889f085d25678338b45446e82c3 /www/js
parent8cb418ae09f4d00a8a91df54611dbb1ab48f1c41 (diff)
finished legacy system handler
Diffstat (limited to 'www/js')
-rw-r--r--www/js/system.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/www/js/system.js b/www/js/system.js
index 0c9534c..0c7bba6 100644
--- a/www/js/system.js
+++ b/www/js/system.js
@@ -23,6 +23,16 @@
function system_init() {
$.getJSON( "/rh-bin/activesystem.json", function(data) {
- alert(data);
+ if(data.status == "OK") {
+ var systemspan = $('#system span.system-name').removeClass().addClass('system-name').addClass('label');
+
+ if(data.system == "master") {
+ systemspan.addClass('label-success').text(data.system);
+ } else if(data.system == "standby") {
+ systemspan.addClass('label-danger').text(data.system);
+ } else {
+ systemspan.addClass('label-default').text("unkown");
+ }
+ }
});
}