summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Tijhof <krinklemail@gmail.com>2015-04-03 03:41:17 +0100
committerTimo Tijhof <krinklemail@gmail.com>2015-05-08 06:20:13 +0000
commit89bb8cfb88a46d2751eb319c6d20f0ef17d89b9a (patch)
tree5cbe6ecba9ccd10c38e4ee9134f6ba2a9a129947
parent1c46057888c049724a66896a8a8c488cc82c11c5 (diff)
downloadzuul-89bb8cfb88a46d2751eb319c6d20f0ef17d89b9a.tar.gz
Status: Expose $.zuul object in zuul_start to allow extension
When embedding this into a branded dashboard with other pages it is preferable not to add custom hooks into these files but instead call zuul_start and be able to attach additional event handlers to zuul.app.on() or zuul.jq.on(). Used on https://integration.wikimedia.org/zuul/ and would likely be needed on http://status.openstack.org/zuul/ in the future as well. Change-Id: I77d935d67051d50d38db5a002f4bf766c4371731
-rw-r--r--etc/status/public_html/zuul.app.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/status/public_html/zuul.app.js b/etc/status/public_html/zuul.app.js
index 6f87a92c4..640437b00 100644
--- a/etc/status/public_html/zuul.app.js
+++ b/etc/status/public_html/zuul.app.js
@@ -39,6 +39,9 @@ function zuul_build_dom($, container) {
});
}
+/**
+ * @return The $.zuul instance
+ */
function zuul_start($) {
// Start the zuul app (expects default dom)
@@ -94,4 +97,6 @@ function zuul_start($) {
}
});
});
-} \ No newline at end of file
+
+ return zuul;
+}