diff --git a/deps/rabbitmq_management/priv/www/css/main.css b/deps/rabbitmq_management/priv/www/css/main.css index 5f37f8526d..cdd6af992c 100644 --- a/deps/rabbitmq_management/priv/www/css/main.css +++ b/deps/rabbitmq_management/priv/www/css/main.css @@ -10,12 +10,12 @@ body { font: 12px Verdana,sans-serif; color: #444; padding: 8px 35px; } #main a { color: #444; } #menu a.selected { background-color: #F60; color:white; } #status { border-top:1px solid #E4E4E4; } -h1 { color: #F60; font-size: 2em; } +h1 { font-size: 2em; } -table { border-collapse: collapse; margin-bottom: 2em; } +table { border-collapse: collapse; } table th, table td { font: 12px/17px Verdana,sans-serif; padding: 4px; } -table.list { border-width: 1px; border-bottom: 1px solid #bbb; } +table.list { border-width: 1px; border-bottom: 1px solid #bbb; margin-bottom: 1em;} table.list th, table.list td { border-left: 1px solid #bbb; border-right: 1px solid #bbb; } table.list th { text-align: center; font-weight: bold; border-top: 1px solid #bbb; border-bottom: 1px solid #bbb; } @@ -45,6 +45,10 @@ p.status-error { color: white; background-color: #f00; } .highlight {width: 150px; font-size: 150%; float: right; text-align:center; padding:10px; background-color: #ddd; margin: 0 20px 20px 0; color: #888;} .highlight strong {font-size: 2em; display: block; color: #444; font-weight: normal;} -h2 { color: #F60; font-size: 1.5em; } +div.section, div.section-hidden {border: 1px solid #ddd; margin: 0 0 1em 0;} +div.section-hidden div {display: none;} +div.section div, div.section-hidden div {padding: 0.5em;} +div.section h2, div.section-hidden h2 { font-size: 1em; padding: 0.5em; cursor: pointer; background: #ddd; margin: 0;} +form { margin: 0; } table.form { margin-bottom: 0.5em; } diff --git a/deps/rabbitmq_management/priv/www/js/main.js b/deps/rabbitmq_management/priv/www/js/main.js index 304398e9c4..974b4d7fb4 100644 --- a/deps/rabbitmq_management/priv/www/js/main.js +++ b/deps/rabbitmq_management/priv/www/js/main.js @@ -64,7 +64,7 @@ function go_to(url) { var current_template; var current_reqs; var current_highlight; -var timer; +//var timer; function render(reqs, template, highlight) { current_template = template; @@ -74,28 +74,31 @@ function render(reqs, template, highlight) { } function update() { - clearInterval(timer); + //clearInterval(timer); with_reqs(current_reqs, [], function(jsons) { var json = merge(jsons, current_template); var html = format(current_template, json); replace_content('main', html); update_status('ok', json['datetime']); postprocess(); - timer = setInterval('update()', 5000); + //timer = setInterval('update()', 5000); }); } function postprocess() { $('a').removeClass('selected'); $('a[href="' + current_highlight + '"]').addClass('selected'); - $('input').focus(function() { - clearInterval(timer); - update_status('paused'); - }); + // $('input').focus(function() { + // clearInterval(timer); + // update_status('paused'); + // }); $('form.confirm').submit(function() { return confirm("Are you sure? This object cannot be recovered " + "after deletion."); }); + $('div.section h2, div.section-hidden h2').click(function() { + $(this).next().toggle(100); + }); } function with_reqs(reqs, acc, fun) { @@ -144,7 +147,7 @@ function format(template, json) { var tmpl = new EJS({url: '/js/tmpl/' + template + '.ejs'}); return tmpl.render(json); } catch (err) { - clearInterval(timer); + //clearInterval(timer); debug(err['name'] + ": " + err['message']); } } @@ -157,8 +160,8 @@ function update_status(status, datetime) { text = "Warning: server reported busy at " + datetime; else if (status == 'error') text = "Error: could not connect to server at " + datetime; - else if (status == 'paused') - text = "Updating halted due to form interaction."; + //else if (status == 'paused') + // text = "Updating halted due to form interaction."; var html = format('status', {status: status, text: text}); replace_content('status', html); @@ -185,7 +188,7 @@ function with_req(path, fun) { } else { debug("Got response code " + req.status); - clearInterval(timer); + //clearInterval(timer); } } }; diff --git a/deps/rabbitmq_management/priv/www/js/tmpl/connection.ejs b/deps/rabbitmq_management/priv/www/js/tmpl/connection.ejs index e5768bef99..10a6977e2b 100644 --- a/deps/rabbitmq_management/priv/www/js/tmpl/connection.ejs +++ b/deps/rabbitmq_management/priv/www/js/tmpl/connection.ejs @@ -1,5 +1,8 @@
| Channels | <%= connection.channels %> |
|---|---|
| Vhost | <%= connection.vhost %> |
| State | <%= connection.state %> |
| Timeout | <%= connection.timeout %> |