Zuul status page: Redesign and fix bugs
status.html:
- Added eventqueue-length status (was already present in production
but not committed here yet).
- HTML5 markup.
- Remove unused jquery-visibility.min.js and jquery-graphite.js.
status.js:
- Clean up (various js best practices and consistent coding style)
- Use empty() instead of html('').
- Use text() for text instead of html().
html() will trigger the parser where text will simply create
a text node with the string literal, much faster, safer and
semantically correct.
- Fix implied global variable leak 'result'.
- Fix reference error that crashes/freezes the page
Property data.trigger_event_queue and data.trigger_event_queue
can be undefined, in which case data.trigger_event_queue.length
causes an uncaught TypeError to be thrown.
- Use a closure instead of polluting global scope.
- Rewrite object oriented.
- Added 'demo' feature for easy local testing.
Downstream commits at
https://gerrit.wikimedia.org/r/#/q/project:integration/docroot+topic:zuul-js+branch:master+owner:Krinkle+is:merged,n,z
Change-Id: Iddd4e2787f2e2eb27bf428f733fbb8b4a9d162d5
Reviewed-on: https://review.openstack.org/26416
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
diff --git a/etc/status/fetch-dependencies.sh b/etc/status/fetch-dependencies.sh
new file mode 100755
index 0000000..f224557
--- /dev/null
+++ b/etc/status/fetch-dependencies.sh
@@ -0,0 +1,9 @@
+#!/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