From 4863b60280db05e235960119a1caf925cd1c7c95 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Fri, 21 Mar 2014 14:19:06 +1100 Subject: [PATCH] Update zuul's status page to bootstrap 3.1.1 Also utilise bootstrap's components more for display. Change-Id: I7c89a5cda2cdb9f4b3e1d473f7d7792840e9fd61 --- etc/status/fetch-dependencies.sh | 8 +- etc/status/public_html/app.js | 70 ++++++----- etc/status/public_html/index.html | 118 +++--------------- .../public_html/status-basic.json-sample | 2 +- 4 files changed, 64 insertions(+), 134 deletions(-) diff --git a/etc/status/fetch-dependencies.sh b/etc/status/fetch-dependencies.sh index f224557809..a5dddff22b 100755 --- a/etc/status/fetch-dependencies.sh +++ b/etc/status/fetch-dependencies.sh @@ -1,9 +1,15 @@ #!/bin/bash BASE_DIR=$(cd $(dirname $0); pwd) echo "Destination: $BASE_DIR/public_html" + echo "Fetching jquery.min.js..." curl --silent http://code.jquery.com/jquery.min.js > $BASE_DIR/public_html/jquery.min.js + echo "Fetching jquery-visibility.min.js..." curl --silent https://raw.github.com/mathiasbynens/jquery-visibility/master/jquery-visibility.min.js > $BASE_DIR/public_html/jquery-visibility.min.js + echo "Fetching bootstrap..." -curl --silent http://twitter.github.io/bootstrap/assets/bootstrap.zip > bootstrap.zip && unzip -q -o bootstrap.zip -d $BASE_DIR/public_html/ && rm bootstrap.zip +curl -L --silent https://github.com/twbs/bootstrap/releases/download/v3.1.1/bootstrap-3.1.1-dist.zip > bootstrap.zip +unzip -q -o bootstrap.zip -d $BASE_DIR/public_html/ +mv $BASE_DIR/public_html/bootstrap-3.1.1-dist $BASE_DIR/public_html/bootstrap +rm bootstrap.zip diff --git a/etc/status/public_html/app.js b/etc/status/public_html/app.js index 0780346063..d752149c74 100644 --- a/etc/status/public_html/app.js +++ b/etc/status/public_html/app.js @@ -17,7 +17,7 @@ // under the License. (function ($) { - var $container, $msg, $msgWrap, $indicator, $queueInfo, $queueEventsNum, + var $container, $msg, $indicator, $queueInfo, $queueEventsNum, $queueResultsNum, $pipelines, $jq; var xhr, zuul, demo = location.search.match(/[?&]demo=([^?&]*)/), @@ -50,11 +50,12 @@ xhr = $.getJSON(source) .done(function (data) { if ('message' in data) { + $msg.removeClass('alert-danger').addClass('alert-info'); $msg.text(data.message); - $msgWrap.removeClass('zuul-msg-wrap-off'); + $msg.show(); } else { $msg.empty(); - $msgWrap.addClass('zuul-msg-wrap-off'); + $msg.hide(); } if ('zuul_version' in data) { @@ -100,10 +101,10 @@ } var $html = $('
') - .addClass('well well-small zuul-change') - var $list = $('