Timo Tijhof | 51516cd | 2013-04-09 01:32:29 +0200 | [diff] [blame] | 1 | <!-- |
| 2 | Copyright 2013 OpenStack Foundation |
| 3 | Copyright 2013 Timo Tijhof |
| 4 | Copyright 2013 Wikimedia Foundation |
| 5 | |
| 6 | Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 7 | not use this file except in compliance with the License. You may obtain |
| 8 | a copy of the License at |
| 9 | |
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | |
| 12 | Unless required by applicable law or agreed to in writing, software |
| 13 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 14 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 15 | License for the specific language governing permissions and limitations |
| 16 | under 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 Hesketh | 625d379 | 2014-04-03 11:24:31 +1100 | [diff] [blame] | 24 | <link rel="stylesheet" href="styles/zuul.css" /> |
Timo Tijhof | 51516cd | 2013-04-09 01:32:29 +0200 | [diff] [blame] | 25 | </head> |
| 26 | <body> |
| 27 | <div class="container"> |
| 28 | <h1>Zuul Status</h1> |
Joshua Hesketh | e898716 | 2014-03-13 13:05:33 +1100 | [diff] [blame] | 29 | <p>Real-time status monitor of Zuul, the pipeline manager between Gerrit and Workers.</p> |
Timo Tijhof | 51516cd | 2013-04-09 01:32:29 +0200 | [diff] [blame] | 30 | |
Joshua Hesketh | 0f5c66a | 2014-04-30 19:23:36 +1000 | [diff] [blame] | 31 | <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 Tijhof | 51516cd | 2013-04-09 01:32:29 +0200 | [diff] [blame] | 42 | </div> |
| 43 | <script src="jquery.min.js"></script> |
| 44 | <script src="jquery-visibility.min.js"></script> |
Joshua Hesketh | 9d01354 | 2014-04-03 13:08:04 +1100 | [diff] [blame] | 45 | <script src="jquery.graphite.js"></script> |
Joshua Hesketh | 4dde439 | 2014-05-23 10:12:35 +1000 | [diff] [blame^] | 46 | <script src="jquery.zuul.js"></script> |
Joshua Hesketh | 0f5c66a | 2014-04-30 19:23:36 +1000 | [diff] [blame] | 47 | <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 Tijhof | 51516cd | 2013-04-09 01:32:29 +0200 | [diff] [blame] | 105 | </body> |
| 106 | </html> |