diff options
-rw-r--r-- | www/index.html | 5 | ||||
-rw-r--r-- | www/js/system.js | 12 | ||||
-rw-r--r-- | www/styles/main.css | 54 |
3 files changed, 52 insertions, 19 deletions
diff --git a/www/index.html b/www/index.html index 1487376..924fe39 100644 --- a/www/index.html +++ b/www/index.html @@ -22,6 +22,11 @@ <span class="clock-date"></span> <span class="clock-time"></span> </div> + + <div id="system"> + <span>Active System</span> + <span class="system-name label label-default">unknown</span> + </div> </div> <script type="text/javascript"> 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"); + } + } }); } diff --git a/www/styles/main.css b/www/styles/main.css index 1fd9842..65b04de 100644 --- a/www/styles/main.css +++ b/www/styles/main.css @@ -30,35 +30,53 @@ body { } #clock { - display: block; - width: 100%; - height: 100%; - vertical-align: middle; - text-align: center; - margin: 0; + display: block; + width: 100%; + height: 100%; + vertical-align: middle; + text-align: center; + margin: 0; } #clock span { - display:table; - margin:0 auto; + display:table; + margin:0 auto; } #clock span.current-week { - margin-top: 1em; - padding: 0.3em 2em; - font-size: 1.2em; + margin-top: 1em; + padding: 0.3em 2em; + font-size: 1.2em; } #clock span.clock-date { - padding: 0.2em; - font-weight: bold; - font-size: 1.4em; + padding: 0.2em; + font-weight: bold; + font-size: 1.4em; } #clock span.clock-time { - padding: 0.2em; - font-weight: bold; - font-size: 1.6em; + padding: 0.2em; + font-weight: bold; + font-size: 1.6em; +} + +#system { + display: block; + width: 100%; + height: 100%; + vertical-align: middle; + text-align: center; + margin-top: 2em; +} + +#system span { + margin-top: 1em; + padding: 0.3em 2em; + font-size: 1.2em; + font-weight: bold; + display:table; + margin:0 auto; } .label { @@ -125,4 +143,4 @@ a.label:focus { .label-danger[href]:hover, .label-danger[href]:focus { background-color: #c9302c; -}
\ No newline at end of file +} |