diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/system.js | 12 |
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"); + } + } }); } |