blob: 6dd70d208df3f83a5882530efa93e524f36d3d53 [file] [log] [blame]
Timo Tijhof51516cd2013-04-09 01:32:29 +02001<!--
2Copyright 2013 OpenStack Foundation
3Copyright 2013 Timo Tijhof
4Copyright 2013 Wikimedia Foundation
5
6Licensed under the Apache License, Version 2.0 (the "License"); you may
7not use this file except in compliance with the License. You may obtain
8a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing, software
13distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15License for the specific language governing permissions and limitations
16under the License.
17-->
18<!DOCTYPE html>
19<html dir="ltr" lang="en">
20<head>
21 <title>Zuul Status</title>
22 <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
23 <link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css">
Joshua Hesketh625d3792014-04-03 11:24:31 +110024 <link rel="stylesheet" href="styles/zuul.css" />
Timo Tijhof51516cd2013-04-09 01:32:29 +020025</head>
26<body>
27 <div class="container">
28 <h1>Zuul Status</h1>
Joshua Heskethe8987162014-03-13 13:05:33 +110029 <p>Real-time status monitor of Zuul, the pipeline manager between Gerrit and Workers.</p>
Timo Tijhof51516cd2013-04-09 01:32:29 +020030
Joshua Hesketh0f5c66a2014-04-30 19:23:36 +100031 <div class="zuul-container" id="zuul-container">
32 <div style="display: none;" class="alert" id="zuul_msg"></div>
33 <button class="btn pull-right zuul-spinner">updating <span class="glyphicon glyphicon-refresh"></span></button>
34
35 <p>Queue lengths: <span id="zuul_queue_events_num">0</span> events, <span id="zuul_queue_results_num">0</span> results.</p>
36 <div id="zuul_controls"></div>
37 <div id="zuul_pipelines" class="row"></div>
38
39 <p>Zuul version: <span id="zuul-version-span"></span></p>
40 <p>Last reconfigured: <span id="last-reconfigured-span"></span></p>
41 </div>
Timo Tijhof51516cd2013-04-09 01:32:29 +020042 </div>
43 <script src="jquery.min.js"></script>
44 <script src="jquery-visibility.min.js"></script>
Joshua Hesketh9d013542014-04-03 13:08:04 +110045 <script src="jquery.graphite.js"></script>
Timo Tijhof51516cd2013-04-09 01:32:29 +020046 <script src="app.js"></script>
Joshua Hesketh0f5c66a2014-04-30 19:23:36 +100047 <script>
48 (function ($) {
49 // Load immediately
50
51 var $container, $indicator;
52 var demo = location.search.match(/[?&]demo=([^?&]*)/),
53 source_url = location.search.match(/[?&]source_url=([^?&]*)/),
54 source = demo ? './status-' + (demo[1] || 'basic') + '.json-sample' :
55 'status.json';
56 source = source_url ? source_url[1] : source;
57
58 var zuul = $.zuul({
59 source: source,
60 //graphite_url: 'http://graphite.openstack.org/render/'
61 });
62
63 zuul.jq.on('update-start', function () {
64 $container.addClass('zuul-container-loading');
65 $indicator.addClass('zuul-spinner-on');
66 });
67
68 zuul.jq.on('update-end', function () {
69 $container.removeClass('zuul-container-loading');
70 setTimeout(function () {
71 $indicator.removeClass('zuul-spinner-on');
72 }, 500);
73 });
74
75 zuul.jq.one('update-end', function () {
76 // Do this asynchronous so that if the first update adds a
77 // message, it will not animate while we fade in the content.
78 // Instead it simply appears with the rest of the content.
79 setTimeout(function () {
80 // Fade in the content
81 $container.addClass('zuul-container-ready');
82 });
83 });
84
85 $(function ($) {
86 // DOM ready
87 $container = $('#zuul-container');
88 $indicator = $('#zuul-spinner');
89 $('#zuul_controls').append(zuul.app.control_form());
90
91 zuul.app.schedule();
92
93 $(document).on({
94 'show.visibility': function () {
95 zuul.options.enabled = true;
96 zuul.app.update();
97 },
98 'hide.visibility': function () {
99 zuul.options.enabled = false;
100 }
101 });
102 });
103 }(jQuery));
104 </script>
Timo Tijhof51516cd2013-04-09 01:32:29 +0200105</body>
106</html>