Merge "Display zuul version from zuul/status"

This commit is contained in:
Jenkins 2014-01-27 19:50:44 +00:00 committed by Gerrit Code Review
commit dae01ce6ab
2 changed files with 19 additions and 1 deletions

View File

@ -133,6 +133,9 @@ td.tree {
#graph-container img:first-of-type { #graph-container img:first-of-type {
margin-left: 0px; margin-left: 0px;
} }
#zuul_info_container {
margin-top: 12px;
}
a:link { a:link {
color: #204A87; color: #204A87;
} }
@ -346,6 +349,14 @@ $("#graph-container").append($(new Image()).addClass('graph').graphite({
</script> </script>
</div> </div>
<div class="container" id="zuul_info_container">
<h2>Zuul info</h2>
<p>
Zuul version:
<span id="zuul-version"></span>
</p>
</div>
<script type="text/javascript">footer();</script> <script type="text/javascript">footer();</script>
</BODY> </BODY>
</html> </html>

View File

@ -415,10 +415,18 @@ function clean_changes_lists() {
window.zuul_collapsed_exceptions = new_collapsed_exceptions; window.zuul_collapsed_exceptions = new_collapsed_exceptions;
} }
function update_zuul_info(data) {
if ('zuul_version' in data) {
$('#zuul-version').text(data['zuul_version']);
}
}
function update() { function update() {
var html = ''; var html = '';
$.getJSON('http://zuul.openstack.org/status.json', function(data) { $.getJSON('http://zuul.openstack.org/status.json', function(data) {
update_zuul_info(data);
if ('message' in data) { if ('message' in data) {
$("#message").attr('class', 'alertbox'); $("#message").attr('class', 'alertbox');
$("#message").html(data['message']); $("#message").html(data['message']);
@ -440,7 +448,6 @@ function update() {
data['trigger_event_queue']['length']); data['trigger_event_queue']['length']);
$("#result_event_queue_length").html( $("#result_event_queue_length").html(
data['result_event_queue']['length']); data['result_event_queue']['length']);
}); });
clean_changes_lists(); clean_changes_lists();