Update common.js to include OpenStack-Health
This commit includes an entry for OpenStack-Health on the header, as well fixes a few minor lint issues found during the process. Change-Id: I57825f7e04bbdb405f7a1e67e4639d6afd7f3c5c
This commit is contained in:
parent
8e21ec389c
commit
91e6200de1
@ -1,4 +1,4 @@
|
||||
// Copyright 2013 OpenStack Foundation
|
||||
// Copyright (c) 2013-2015 OpenStack Foundation
|
||||
// //
|
||||
// // Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
// // not use this file except in compliance with the License. You may obtain
|
||||
@ -12,15 +12,18 @@
|
||||
// // License for the specific language governing permissions and limitations
|
||||
// // under the License.
|
||||
|
||||
'use strict';
|
||||
|
||||
function header(activeTabName) {
|
||||
tabsName = new Array();
|
||||
tabsLink = new Array();
|
||||
var tabsName = [];
|
||||
var tabsLink = [];
|
||||
tabsName[0] = 'Status'; tabsLink[0] = '<%= @status_base_url %>';
|
||||
tabsName[1] = 'Zuul'; tabsLink[1] = '<%= @status_base_url %>/zuul/';
|
||||
tabsName[2] = 'Rechecks'; tabsLink[2] = '<%= @status_base_url %>/elastic-recheck/';
|
||||
tabsName[3] = 'QA health'; tabsLink[3] = '<%= @status_base_url %>/openstack-health/';
|
||||
tabsName[4] = 'Reviews'; tabsLink[4] = '<%= @status_base_url %>/reviews/';
|
||||
tabsName[5] = 'Bugday'; tabsLink[5] = '<%= @status_base_url %>/bugday/';
|
||||
tabsName[6] = 'OpenStack-Health'; tabsLink[6] = '<%= @status_base_url %>/openstack-health/';
|
||||
|
||||
document.write(
|
||||
'<div id="header" class="container">' +
|
||||
@ -29,21 +32,21 @@ function header(activeTabName) {
|
||||
'</div>\n' +
|
||||
'<div class="span-19 last blueLine">' +
|
||||
'<div id="navigation" class="span-19">' +
|
||||
'<ul id="Menu1">\n')
|
||||
'<ul id="Menu1">\n');
|
||||
|
||||
for (var i = 0; i < tabsName.length; i++) {
|
||||
document.write('<li><a id="menu-'+tabsName[i]+'" href="'+tabsLink[i]+'"')
|
||||
if (tabsName[i] == activeTabName) {
|
||||
tabsName.forEach(function(value, index) {
|
||||
document.write('<li><a id="menu-' + tabsName[index] + '" href="' + tabsLink[index] + '"');
|
||||
if (tabsName[index] == activeTabName) {
|
||||
document.write(' class="current"');
|
||||
}
|
||||
document.write('>'+tabsName[i]+'</a></li>\n');
|
||||
}
|
||||
document.write('>' + tabsName[index] + '</a></li>\n');
|
||||
});
|
||||
|
||||
document.write(
|
||||
'</ul>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>')
|
||||
'</div>');
|
||||
}
|
||||
|
||||
function footer() {
|
||||
@ -88,6 +91,6 @@ function footer() {
|
||||
'</ul>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>')
|
||||
'</div>');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user