Merge "Clean up old Gerrit html theming and commentlinks"

This commit is contained in:
Zuul 2020-11-22 20:20:43 +00:00 committed by Gerrit Code Review
commit fc09bc3668
8 changed files with 0 additions and 11273 deletions

View File

@ -1,179 +0,0 @@
body {color: #000 !important;}
a,a:visited {color: #264D69 !important; text-decoration: none;}
a:hover {color: #000 !important; text-decoration: underline}
a.gwt-InlineHyperlink {background: none !important}
#openstack-logo img { height: 40px; }
#openstack-logo h1 { margin: 20px; }
#gerrit_header #openstack-logo h1 { margin: 20px 0 0 0; }
#gerrit_header {display: block !important; position: relative; top: -60px; margin-bottom: -60px; width: 200px; padding-left: 17px}
#gerrit_header h1 {font-family: 'PT Sans', sans-serif; font-weight: normal; letter-spacing: -1px}
#gerrit_topmenu {background: none; position:relative; top: 0px; left: 220px; margin-right: 220px}
#gerrit_topmenu tbody tr td table {border: 0}
#gerrit_topmenu tbody tr td table.gwt-TabBar {color: #353535; border-bottom: 1px solid #C5E2EA;}
#gerrit_topmenu .gwt-Button {padding: 3px 6px}
.gwt-TabBarItem-selected {color: #CF2F19 !important; border-bottom: 3px solid #CF2F19;}
.gwt-TabBarItem {color: #353535; border-right: 0 !important}
.gwt-TabBar .gwt-TabBarItem, .gwt-TabBar .gwt-TabBarRest, .gwt-TabPanelBottom {background: 0 !important;}
#gerrit_topmenu .searchTextBox {width: 250px}
#change_infoTable {
border-collapse: collapse;
}
#change_infoTable th {
padding: 2px 4px 2px 6px;
background-color: #eef3f5;
font-style: italic;
text-align: left;
}
#change_infoTable td {
padding: 2px 4px 2px 6px;
border-bottom: 1px solid #eef3f5;
border-right: 1px solid #eef3f5;
}
#change_infoTable tr:last-child td {
border: none;
}
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-cs2 {
padding-left: 10px;
padding-right: 10px;
}
/* Section headers */
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-cs2
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-headerLine,
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-cs2
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-sectionHeader {
margin-top: 10px !important;
margin-bottom: 10px !important;
}
/* Commit message */
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-cs2
.com-google-gerrit-client-change-CommitBox_BinderImpl_GenCss_style-text::first-line {
font-weight: bold !important;
}
/* Commit metadata */
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-cs2
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-commitColumn
.com-google-gerrit-client-change-CommitBox_BinderImpl_GenCss_style-header th {
padding: 2px 4px 2px 6px;
background-color: #eef3f5;
font-style: italic;
text-align: left;
}
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-cs2
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-commitColumn
.com-google-gerrit-client-change-CommitBox_BinderImpl_GenCss_style-header td {
border-bottom: 1px solid #eef3f5;
padding: 2px 4px 2px 6px;
}
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-cs2
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-commitColumn
.com-google-gerrit-client-change-CommitBox_BinderImpl_GenCss_style-header td:last-child {
border-right: 1px solid #eef3f5;
}
/* increase the middle info column to fill empty space (for wide
monitors), but ensure there is a sufficient lower bound to kick in
horiz scroll bar. This will relieve the preasure on the hideci test
results. */
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-infoColumn {
width: 100% !important;
min-width: 400px;
}
/* Review history */
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-cs2
.com-google-gerrit-client-change-Message_BinderImpl_GenCss_style-name {
font-weight: bold !important;
}
.com-google-gerrit-client-change-ChangeScreen_BinderImpl_GenCss_style-cs2
.com-google-gerrit-client-change-Message_BinderImpl_GenCss_style-messageBox {
width: inherit;
max-width: 1168px;
}
.comment_test_name {
display: inline-block;
*display: inline;
*zoom: 1;
width: auto !important;
width: 25em;
min-width: 20em;
padding-bottom: 2pt;
}
.comment_test_result {
}
.result_SUCCESS {
color: #007f00;
}
.result_FAILURE, .result_POST_FAILURE, .result_TIMED_OUT, .result_RETRY_LIMIT, .result_DISK_FULL {
color: #cf2f19;
}
.result_UNSTABLE, .result_WARNING {
color: #e39f00;
}
.result_LOST {
color: #e39f00;
}
li.comment_test {list-style-type: none; }
/* this is for support of 'Display Person Name In Review Category' */
.cAPPROVAL {
max-width: 100px;
overflow: hidden;
}
/* fixes to make this like old gerrit */
.changeTable td.dataCell {
height: 1em;
}
/* don't make the non voting stand out more than the voting */
table.infoTable td.notVotable,
.changeTable td.dataCell.labelNotApplicable {
background: inherit;
}
.test_result_table {
border-collapse: collapse;
}
.test_result_table tr {
border-left: 1px solid #eef3f5;
border-right: 1px solid #eef3f5;
}
.test_result_table td.header {
background-color: #eef3f5;
}
.test_result_table td {
padding: 2px 4px 2px 6px;
border: 1px solid #eef3f5;
}
.addMemberTextBox {
width: 20em;
}
/* css attribute selector to make -1s show up red in new screen */
[title="Doesn't seem to work"],
[title="This patch needs further work before it can be merged"] {
color: red;
}

View File

@ -1,6 +0,0 @@
<div id="openstack-logo">
<script type="text/javascript" src="static/jquery.js" />
<script type="text/javascript" src="static/jquery-visibility.js"></script>
<script type="text/javascript" src="static/hideci.js" />
<a href="/"><h1><img src="static/title.svg" style="vertical-align:middle;" /></h1></a>
</div>

View File

@ -1,575 +0,0 @@
// Copyright (c) 2014 VMware, Inc.
// Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
//
// 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
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
// this regex matches the hash part of review pages
var hashRegex = /^\#\/c\/([\d]+)((\/\d+)([.][.](\d+))?)?\/?$/;
// this regex matches CI comments
var ciRegex = /^(.* CI|Jenkins|Zuul)$/;
// this regex matches "Patch set #"
var psRegex = /^(Uploaded patch set|Patch Set) (\d+)(:|\.)/;
// this regex matches merge failure messages
var mergeFailedRegex = /Merge Failed\./;
// this regex matches the name of CI systems we trust to report merge failures
var trustedCIRegex = /^(OpenStack CI|Jenkins|Zuul)$/;
// this regex matches the name+pipeline that we want at the top of the CI list
var firstPartyCI = /^(Jenkins|Zuul)/;
// this regex matches the pipeline markup
var pipelineNameRegex = /Build \w+ \(([-\w]+) pipeline\)/;
// The url to full status information on running jobs
var zuulStatusURL = 'https://zuul.openstack.org';
// The json URL to check for running jobs
var zuulStatusJSON = 'https://zuul.openstack.org/status/change/';
// This is a variable to determine if we're in debugging mode, which
// lets you globally set it to see what's going on in the flow.
var hideci_debug = false;
// This is a variable to enable zuul integration, we default it off so
// that it creates no additional load, and that it's easy to turn off
// the feature.
var zuul_inline = false;
/**
dbg(...) - prints a list of items out to the javascript
console.log. This allows us to leave tracing in this file which is a
no-op by default, but can be triggered if you enter a javascript
console and set hideci_debug = true.
*/
function dbg () {
if (hideci_debug == true) {
for (var i = 0; i < arguments.length; i++) {
console.log(arguments[i]);
}
}
}
function format_time(ms, words) {
if (ms == null) {
return "unknown";
}
var seconds = (+ms)/1000;
var minutes = Math.floor(seconds/60);
var hours = Math.floor(minutes/60);
seconds = Math.floor(seconds % 60);
minutes = Math.floor(minutes % 60);
r = '';
if (words) {
if (hours) {
r += hours;
r += ' hr ';
}
r += minutes + ' min';
} else {
if (hours < 10) r += '0';
r += hours + ':';
if (minutes < 10) r += '0';
r += minutes + ':';
if (seconds < 10) r += '0';
r += seconds;
}
return r;
}
var ci_parse_psnum = function($panel) {
var match = psRegex.exec($panel.html());
if (match !== null) {
return parseInt(match[2]);
}
return 0;
};
var ci_parse_is_merge_conflict = function($panel) {
return (mergeFailedRegex.exec($panel.html()) !== null);
};
var ci_find_pipeline = function($panel) {
var match = pipelineNameRegex.exec($panel.html());
if (match !== null) {
return match[1];
} else {
return null;
}
};
var ci_parse_results = function($panel) {
var result_list = [];
var test_results = $panel.find("li.comment_test");
var pipeline = null;
if (test_results !== null) {
test_results.each(function(i, li) {
var result = {};
if ($(li).find("a").length > 0) {
result["name"] = $(li).find("span.comment_test_name").find("a")[0].innerHTML;
result["link"] = $(li).find("span.comment_test_name").find("a")[0];
}
else {
result["name"] = $(li).find("span.comment_test_name")[0].innerHTML;
}
result["result"] = $(li).find("span.comment_test_result")[0];
result_list.push(result);
});
}
return result_list;
};
/***
* function ci_group_by_ci_pipeline - create a group by structure for
* iterating on CI's pipelines
*
* This function takes the full list of comments, the current patch
* number, and builds an array of (ci_name_pipelinename, comments array)
* tuples. That makes it very easy to process during the display
* phase to ensure we only display the latest result for every CI
* pipeline.
*
* Comments that do not have a parsable pipeline (3rd party ci
* systems) get collapsed by name, and we specify 'check' for their
* pipeline.
*
**/
var ci_group_by_ci_pipeline = function(current, comments) {
var ci_pipelines = [];
var ci_pipeline_comments = [];
for (var i = 0; i < comments.length; i++) {
var comment = comments[i];
if ((comment.psnum != current) || !comment.is_ci || (comment.results.length == 0)) {
continue;
}
var name_pipeline = comment.name;
if (comment.pipeline !== null) {
name_pipeline += ' ' + comment.pipeline;
}
var index = ci_pipelines.indexOf(name_pipeline);
if (index == -1) {
// not found, so create new entries
ci_pipelines.push(name_pipeline);
ci_pipeline_comments.push([comment]);
} else {
ci_pipeline_comments[index].push(comment);
}
}
function sort_by_name(a,b) {
if (a[0] < b[0])
return -1;
else if (a[0] > b[0])
return 1;
else
return 0;
}
var results = [];
var notfirstparty = [];
// we want to separate out first party CI results to always be the
// top of the list, and third party CI to come after, so that
// hunting for first party CI isn't tough.
for (i = 0; i < ci_pipelines.length; i++) {
if (firstPartyCI.test(ci_pipelines[i])) {
results.push([ci_pipelines[i], ci_pipeline_comments[i]]);
} else {
notfirstparty.push([ci_pipelines[i], ci_pipeline_comments[i]]);
}
}
notfirstparty.sort(sort_by_name);
for (i = 0; i < notfirstparty.length; i++) {
results.push(notfirstparty[i]);
}
return results;
};
var ci_parse_comments = function() {
var comments = [];
$("p").each(function() {
var match = psRegex.exec($(this).html());
if (match !== null) {
var psnum = parseInt(match[2]);
var top = $(this).parent().parent().parent();
// old change screen
var name = top.attr("name");
if (!name) {
// new change screen
name = $(this).parent().parent().parent().children().children()[0].innerHTML;
top = $(this).parent().parent().parent().parent();
}
var comment = {};
comment.name = name;
var date_cell = top.find(".commentPanelDateCell");
if (date_cell.attr("title")) {
// old change screen
comment.date = date_cell.attr("title");
} else {
// new change screen
comment.date = $(this).parent().parent().parent().children().children()[2].innerHTML
}
var comment_panel = $(this).parent();
comment.psnum = psnum;
comment.merge_conflict = ci_parse_is_merge_conflict(comment_panel);
comment.pipeline = ci_find_pipeline(comment_panel);
comment.results = ci_parse_results(comment_panel);
comment.is_ci = (ciRegex.exec(comment.name) !== null);
comment.is_trusted_ci = (trustedCIRegex.exec(comment.name) !== null);
comment.ref = top;
dbg("Found comment", comment);
comments.push(comment);
}
});
return comments;
};
var ci_latest_patchset = function(comments) {
var psnum = 0;
for (var i = 0; i < comments.length; i++) {
psnum = Math.max(psnum, comments[i].psnum);
}
return psnum;
};
var ci_is_merge_conflict = function(comments) {
var latest = ci_latest_patchset(comments);
var conflict = false;
for (var i = 0; i < comments.length; i++) {
var comment = comments[i];
// only if we are actually talking about the latest patch set
if (comment.psnum == latest) {
if (comment.is_trusted_ci) {
conflict = comment.merge_conflict;
}
}
}
return conflict;
};
var ci_prepare_results_table = function() {
// Create a table and insert it after the approval table
var table = $("table.test_result_table")[0];
if (!table) {
table = document.createElement("table");
$(table).addClass("test_result_table");
$(table).addClass("infoTable").css({"margin-top":"1em", "margin-bottom":"1em"});
var approval_table = $("div.approvalTable");
if (approval_table.length) {
var outer_table = document.createElement("table");
$(outer_table).insertBefore(approval_table);
var outer_table_row = document.createElement("tr");
$(outer_table).append(outer_table_row);
var td = document.createElement("td");
$(outer_table_row).append(td);
$(td).css({"vertical-align":"top"});
$(td).append(approval_table);
td = document.createElement("td");
$(outer_table_row).append(td);
$(td).css({"vertical-align":"top"});
$(td).append(table);
} else {
var big_table_row = $("div.screen>div>div>table>tbody>tr");
var td = $(big_table_row).children()[1];
$(td).append(table);
}
} else {
$(table).empty();
}
return table;
};
var ci_display_results = function(comments) {
var table = ci_prepare_results_table();
if (ci_is_merge_conflict(comments)) {
var mc_header = $("<tr>").append($('<td class="merge_conflict" colpsan="2">Patch in Merge Conflict</td>'));
mc_header.css('width', '400');
mc_header.css('font-weight', 'bold');
mc_header.css('color', 'red');
mc_header.css('padding-left', '2em');
$(table).append(mc_header);
return;
}
var current = ci_latest_patchset(comments);
var ci_pipelines = ci_group_by_ci_pipeline(current, comments);
for (var i = 0; i < ci_pipelines.length; i++) {
var ci_pipeline_name = ci_pipelines[i][0];
var ci_pipeline_comments = ci_pipelines[i][1];
// the most recent comment on a pipeline
var last = ci_pipeline_comments.length - 1;
var comment = ci_pipeline_comments[last];
var rechecks = "";
if (last > 0) {
rechecks = " (" + last + " rechecks)";
}
var header = $("<tr>").append($('<td class="header">' + ci_pipeline_name + rechecks + '</td>'));
header.append('<td class="header ci_date">' + comment.date + '</td>');
$(table).append(header);
for (var j = 0; j < comment.results.length; j++) {
var result = comment.results[j];
var tr = $("<tr>");
if ("link" in result) {
tr.append($("<td>").append($(result["link"]).clone()));
}
else {
tr.append($("<td>").text(result["name"]));
}
tr.append($("<td>").append($(result["result"]).clone()));
$(table).append(tr);
}
}
};
var set_cookie = function (name, value) {
document.cookie = name + "=" + value + "; path=/";
};
var read_cookie = function (name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1, c.length);
}
if (c.indexOf(nameEQ) == 0) {
return c.substring(nameEQ.length, c.length);
}
}
return null;
};
var ci_toggle_visibility = function(comments, showOrHide) {
if (!comments) {
comments = ci_parse_comments();
}
$.each(comments, function(i, comment) {
if (comment.is_ci && !comment.is_trusted_ci) {
$(comment.ref).toggle(showOrHide);
}
});
};
var ci_hide_ci_comments = function(comments) {
if (!comments) {
comments = ci_parse_comments();
}
$.each(comments, function(i, comment) {
if (comment.is_ci && !comment.is_trusted_ci) {
$(comment.ref).hide();
}
});
};
var ci_page_loaded = function() {
if (hashRegex.test(window.location.hash)) {
dbg("Searching for ci results on " + window.location.hash);
$("#toggleci").show();
var comments = ci_parse_comments();
ci_display_results(comments);
var showOrHide = 'true' == read_cookie('show-ci-comments');
if (!showOrHide) {
ci_hide_ci_comments(comments);
}
if (zuul_inline === true) {
ci_zuul_for_change(comments);
}
} else {
$("#toggleci").hide();
}
};
var ci_current_change = function() {
var change = hashRegex.exec(window.location.hash);
if (change.length > 1) {
return change[1];
}
return null;
};
// recursively find the zuul status change, will be much more
// efficient once zuul supports since json status.
var ci_find_zuul_status = function (data, change_psnum) {
var objects = [];
for (var i in data) {
if (!data.hasOwnProperty(i)) continue;
if (typeof data[i] == 'object') {
objects = objects.concat(ci_find_zuul_status(data[i],
change_psnum));
} else if (i == 'id' && data.id == change_psnum) {
objects.push(data);
}
}
return objects;
};
var ci_zuul_all_status = function(jobs) {
var status = "passing";
for (var i = 0; i < jobs.length; i++) {
if (jobs[i].result && jobs[i].result != "SUCCESS") {
status = "failing";
break;
}
}
return status;
};
var ci_zuul_display_status = function(status) {
var zuul_table = $("table.zuul_result_table")[0];
if (!zuul_table) {
var test_results = $("table.test_result_table")[0];
zuul_table = document.createElement("table");
$(zuul_table).addClass("zuul_result_table");
$(zuul_table).addClass("infoTable").css({"margin-bottom":"1em"});
if (test_results) {
$(test_results).prepend(zuul_table);
}
}
$(zuul_table).empty();
$(zuul_table).show();
$(zuul_table).append("<tr><td class='header'>Change currently being tested (<a href='" + zuulStatusURL + "'>full status</a>)</td></tr>");
for (var i = 0; i < status.length; i++) {
var item = status[i];
var pipeline = item.jobs[0].pipeline;
var passing = (item.failing_reasons && item.failing_reasons.length > 0) ? "failing" : "passing";
var timeleft = item.remaining_time;
var row = "<tr><td>";
if (pipeline != null) {
row += pipeline + " pipeline: " + passing;
row += " (" + format_time(timeleft, false) + " left)";
} else {
row += "in between pipelines, status should update shortly";
}
row += "</td></tr>";
$(zuul_table).append(row);
}
};
var ci_zuul_clear_status = function () {
var zuul_table = $("table.zuul_result_table")[0];
if (zuul_table) {
$(zuul_table).hide();
}
};
var ci_zuul_process_changes = function(data, change_psnum) {
var zuul_status = ci_find_zuul_status(data, change_psnum);
if (zuul_status.length) {
ci_zuul_display_status(zuul_status);
} else {
ci_zuul_clear_status();
}
};
var ci_zuul_for_change = function(comments) {
if (!comments) {
comments = ci_parse_comments();
}
var change = ci_current_change();
var psnum = ci_latest_patchset(comments);
var change_psnum = change + "," + psnum;
// do the loop recursively in ajax
(function poll() {
$.ajax({
url: zuulStatusJSON + change_psnum,
type: "GET",
success: function(data) {
dbg("Found zuul data for " + change_psnum, data);
ci_zuul_process_changes(data, change_psnum);
},
dataType: "json",
complete: setTimeout(function() {
// once we are done with this cycle in the loop we
// schedule ourselves again in the future with
// setTimeout. However, by the time the function
// actually gets called, other things might have
// happened, and we may want to just dump the data
// instead.
//
// the UI might have gone hidden (user was bored,
// switched to another tab / window).
//
// the user may have navigated to another review url,
// so the data returned is not relevant.
//
// both cases are recoverable when the user navigates
// around, because a new "thread" gets started on
// ci_page_load.
//
// BUG(sdague): there is the possibility that the user
// navigates away from a page and back fast enough
// that the first "thread" is not dead, and a second
// one is started. greghaynes totally said he'd come
// up with a way to fix that.
if (window.zuul_enable_status_updates == false) {
return;
}
var current = ci_current_change();
if (current && change_psnum.indexOf(current) != 0) {
// window url is dead, so don't schedule any more future
// updates for this url.
return;
}
poll();
}, 15000),
timeout: 5000
});
})();
};
window.onload = function() {
var input = document.createElement("input");
input.id = "toggleci";
input.type = "button";
input.className = "gwt-Button";
input.value = "Toggle Extra CI";
input.onclick = function () {
// Flip the cookie
var showOrHide = 'true' == read_cookie('show-ci-comments');
set_cookie('show-ci-comments', showOrHide ? 'false' : 'true');
// Hide or Show existing comments based on cookie
ci_toggle_visibility(null, !showOrHide);
};
document.body.appendChild(input);
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
var observer = new MutationObserver(function(mutations, observer) {
var span = $("span.rpcStatus");
$.each(mutations, function(i, mutation) {
if (mutation.target === span[0] &&
mutation.attributeName === "style" &&
(!(span.is(":visible")))) {
ci_page_loaded();
}
});
});
observer.observe(document, {
subtree: true,
attributes: true
});
$(document).on({
'show.visibility': function() {
window.zuul_enable_status_updates = true;
ci_page_loaded();
},
'hide.visibility': function() {
window.zuul_enable_status_updates = false;
}
});
};

View File

@ -1,88 +0,0 @@
/*!
* jquery-visibility v1.0.12
* Page visibility shim for jQuery.
*
* Project Website: http://mths.be/visibility
*
* @version 1.0.12
* @license MIT.
* @author Mathias Bynens - @mathias
* @author Jan Paepke - @janpaepke
*/
;(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], function ($) {
return factory(root, $);
});
} else if (typeof exports === 'object') {
// Node/CommonJS
module.exports = factory(root, require('jquery'));
} else {
// Browser globals
factory(root, jQuery);
}
}(typeof window !== 'undefined' ? window : this, function(window, $, undefined) {
"use strict";
var
document = window.document,
property, // property name of document, that stores page visibility
vendorPrefixes = ['webkit', 'o', 'ms', 'moz', ''],
$support = $.support || {},
// In Opera, `'onfocusin' in document == true`, hence the extra `hasFocus` check to detect IE-like behavior
eventName = 'onfocusin' in document && 'hasFocus' in document ?
'focusin focusout' :
'focus blur';
var prefix;
while ((prefix = vendorPrefixes.pop()) !== undefined) {
property = (prefix ? prefix + 'H': 'h') + 'idden';
$support.pageVisibility = document[property] !== undefined;
if ($support.pageVisibility) {
eventName = prefix + 'visibilitychange';
break;
}
}
// normalize to and update document hidden property
function updateState() {
if (property !== 'hidden') {
document.hidden = $support.pageVisibility ? document[property] : undefined;
}
}
updateState();
$(/blur$/.test(eventName) ? window : document).on(eventName, function(event) {
var type = event.type;
var originalEvent = event.originalEvent;
// Avoid errors from triggered native events for which `originalEvent` is
// not available.
if (!originalEvent) {
return;
}
var toElement = originalEvent.toElement;
// If its a `{focusin,focusout}` event (IE), `fromElement` and `toElement`
// should both be `null` or `undefined`; else, the page visibility hasnt
// changed, but the user just clicked somewhere in the doc. In IE9, we need
// to check the `relatedTarget` property instead.
if (
!/^focus./.test(type) || (
toElement === undefined &&
originalEvent.fromElement === undefined &&
originalEvent.relatedTarget === undefined
)
) {
$(document).triggerHandler(
property && document[property] || /^(?:blur|focusout)$/.test(type) ?
'hide' :
'show'
);
}
// and update the current state
updateState();
});
}));

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +0,0 @@
<?xml version="1.0"?>
<svg width="700" height="179.99999999999997" xmlns="http://www.w3.org/2000/svg">
<metadata id="metadata8">image/svg+xml</metadata>
<defs>
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath66">
<path d="m472.700104,245.024887l71.999603,0l0,71.875198l-71.999603,0l0,-71.875198z" id="path68"/>
</clipPath>
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath82">
<path d="m551.526001,266.600006l27.074036,0l0,28l-27.074036,0l0,-28z" id="path84"/>
</clipPath>
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath92">
<path d="m581.600037,266.600006l26.999939,0l0,37.035004l-26.999939,0l0,-37.035004z" id="path94"/>
</clipPath>
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath110">
<path d="m725,267.600006l21.718994,0l0,26l-21.718994,0l0,-26z" id="path112"/>
</clipPath>
</defs>
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="182" width="702" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<g id="svg_2">
<g id="g62" transform="matrix(2.5 0 0 2.5 -1179.81 -610.313)">
<g id="g64" clip-path="url(#clipPath66)">
<path fill="#ee265e" fill-rule="nonzero" d="m544.480713,280.482086c0,-19.582001 -15.875,-35.457199 -35.456573,-35.457199c-19.582031,0 -35.457031,15.875198 -35.457031,35.457199c0,19.582001 15.875,35.457001 35.457031,35.457001c19.581573,0 35.456573,-15.875 35.456573,-35.457001" id="path70"/>
<path fill="#ffffff" fill-rule="nonzero" d="m486.579132,284.904083c0,-3 2.440979,-5.441986 5.440979,-5.441986c3,0 5.442017,2.441986 5.442017,5.441986c0,3.003998 -2.442017,5.44101 -5.442017,5.44101c-3,0 -5.440979,-2.437012 -5.440979,-5.44101m13.004028,0c0,-4.167999 -3.391052,-7.562988 -7.563049,-7.562988c-4.171997,0 -7.561951,3.394989 -7.561951,7.562988c0,4.171997 3.389954,7.56601 7.561951,7.56601c4.171997,0 7.563049,-3.394012 7.563049,-7.56601" id="path72"/>
<path fill="#ffffff" fill-rule="nonzero" d="m523.2547,290.349091l-5.442017,0c-3,0 -5.440674,-2.44101 -5.440674,-5.445007c0,-3 2.440674,-5.441986 5.440674,-5.441986l5.442017,0l0,10.886993zm1.062012,-13.007996l-6.504028,0c-4.171997,0 -7.561615,3.394989 -7.561615,7.562988c0,4.171997 3.389618,7.56601 7.561615,7.56601l6.504028,0c0.585999,0 1.05896,-0.476013 1.05896,-1.062012l0,-13.007996c0,-0.585999 -0.472961,-1.05899 -1.05896,-1.05899" id="path74"/>
<path fill="#ffffff" fill-rule="nonzero" d="m530.605713,286.103088c-0.664001,0 -1.198975,-0.539001 -1.198975,-1.199005c0,-0.660004 0.534973,-1.195007 1.198975,-1.195007c0.660034,0 1.195984,0.535004 1.195984,1.195007c0,0.660004 -0.53595,1.199005 -1.195984,1.199005m0,10.464996c0.660034,0 1.195984,0.539001 1.195984,1.199005c0,0.660004 -0.53595,1.199005 -1.195984,1.199005c-0.664001,0 -1.198975,-0.539001 -1.198975,-1.199005c0,-0.660004 0.534973,-1.199005 1.198975,-1.199005m-52.018585,-15.242004c0.221985,-0.22699 0.526978,-0.35199 0.842957,-0.35199c0.321045,0 0.622009,0.125 0.848022,0.35199c0.468994,0.468994 0.468994,1.230011 0,1.695007c-0.453003,0.453003 -1.242004,0.453003 -1.695007,0c-0.464966,-0.464996 -0.464966,-1.226013 0.004028,-1.695007m10.359009,-7.742004c-0.453003,0.453003 -1.242004,0.453003 -1.695007,0c-0.468994,-0.468994 -0.468994,-1.22699 0,-1.695984c0.234009,-0.234009 0.539001,-0.351013 0.846985,-0.351013c0.309021,0 0.614014,0.117004 0.848022,0.351013c0.464966,0.468994 0.464966,1.22699 0,1.695984m45.565582,-13.707001l-10.195007,0c-0.585999,0 -1.062012,0.476013 -1.062012,1.062012l0,10.042999l-5.511963,0c-5.827606,0 -10.827606,3.609009 -12.897614,8.707001c-0.676025,-1.652008 -1.679993,-3.195007 -3.02002,-4.535004c-2.886963,-2.886993 -6.796997,-4.312988 -10.835999,-4.019989c-0.14801,-0.265015 -0.320007,-0.519012 -0.542969,-0.746002c-1.29303,-1.292999 -3.39801,-1.292999 -4.695007,0c-1.29303,1.292999 -1.29303,3.398987 0,4.695984c0.628967,0.625 1.460999,0.972015 2.346985,0.972015c0.887024,0 1.718994,-0.347015 2.348022,-0.972015c0.519958,-0.519989 0.820007,-1.175995 0.921997,-1.85199c3.343994,-0.175995 6.565979,1.031006 8.95697,3.421997c4.60199,4.601013 4.60199,12.089996 0,16.69101c-4.60199,4.60199 -12.085999,4.60199 -16.687012,0c-2.136963,-2.136017 -3.339966,-4.945007 -3.437988,-7.949005c0.593994,-0.140991 1.137024,-0.43399 1.578003,-0.875c1.29303,-1.292999 1.29303,-3.39801 0,-4.695007c-1.253967,-1.253998 -3.440979,-1.25 -4.690979,0c-1.296997,1.296997 -1.296997,3.402008 -0.004028,4.695007c0.29303,0.289001 0.629028,0.511993 0.988037,0.671997c0.050964,3.64801 1.480957,7.06601 4.066956,9.652008c2.71405,2.714996 6.277039,4.070984 9.843018,4.070984c3.567017,0 7.129028,-1.355988 9.843994,-4.070984c1.363037,-1.363007 2.379028,-2.937012 3.059021,-4.621002c2.093018,5.042999 7.065979,8.60199 12.858612,8.60199l9.72998,0c0.445984,1.308014 1.676025,2.261993 3.132996,2.261993c1.828003,0 3.317017,-1.492981 3.317017,-3.320984c0,-1.832001 -1.489014,-3.320007 -3.317017,-3.320007c-1.45697,0 -2.687012,0.949005 -3.132996,2.257996l-9.72998,0c-6.507599,0 -11.800629,-5.292999 -11.800629,-11.800995c0,-6.507996 5.29303,-11.800995 11.800629,-11.800995l6.573975,0c0.585999,0 1.059021,-0.472992 1.059021,-1.057983l0,-10.046997l8.078003,0l0,2.721985l-2.85199,0.003998c-0.582031,0 -1.058044,0.47699 -1.058044,1.05899l0,15.992004c-1.30896,0.445007 -2.257996,1.671997 -2.257996,3.128998c0,1.832001 1.488037,3.320007 3.320007,3.320007c1.828003,0 3.317017,-1.488007 3.317017,-3.320007c0,-1.457001 -0.950012,-2.68399 -2.257996,-3.128998l0,-14.929993l2.846985,-0.003998c0.585999,0 1.059021,-0.476013 1.059021,-1.058014l0,-4.843994c0,-0.585999 -0.473022,-1.062012 -1.059021,-1.062012" id="path76"/>
</g>
</g>
<g id="svg_1">
<g id="g78" transform="matrix(2.5 0 0 2.5 -1179.81 -610.313)">
<g id="g80" clip-path="url(#clipPath82)">
<path fill="#000000" fill-rule="nonzero" d="m574.158997,280.565002c0,5.171997 -4.18396,9.378998 -9.325012,9.378998c-5.171997,0 -9.378967,-4.207001 -9.378967,-9.378998c0,-5.140991 4.20697,-9.324005 9.378967,-9.324005c5.141052,0 9.325012,4.183014 9.325012,9.324005m-9.325012,-13.304993c-7.335999,0 -13.307983,5.968994 -13.307983,13.304993c0,7.339996 5.971985,13.308014 13.307983,13.308014c7.335999,0 13.305054,-5.968018 13.305054,-13.308014c0,-7.335999 -5.969055,-13.304993 -13.305054,-13.304993" id="path86"/>
</g>
</g>
<g id="g88" transform="matrix(2.5 0 0 2.5 -1179.81 -610.313)">
<g id="g90" clip-path="url(#clipPath92)">
<path fill="#000000" fill-rule="nonzero" d="m604.279968,280.565002c0,5.171997 -4.184021,9.378998 -9.328003,9.378998c-5.167969,0 -9.374939,-4.207001 -9.374939,-9.378998c0,-5.140991 4.20697,-9.324005 9.374939,-9.324005c5.143982,0 9.328003,4.183014 9.328003,9.324005m-9.328003,-13.304993c-7.335938,0 -13.304932,5.968994 -13.304932,13.332001l0,21.945984c0,0.656006 0.440979,1.097015 1.100952,1.097015l1.676025,0c0.659973,0 1.10199,-0.44101 1.10199,-1.097015l0,-12.621979c2.5,2.519989 5.910034,3.957001 9.425964,3.957001c7.338989,0 13.307983,-5.968018 13.307983,-13.308014c0,-7.335999 -5.968994,-13.304993 -13.307983,-13.304993" id="path96"/>
</g>
</g>
<path fill="#000000" fill-rule="nonzero" d="m520.639893,116.402481c-13.954926,0 -25.302429,-11.347504 -25.302429,-25.302505c0,-14.024963 11.347504,-25.430008 25.302429,-25.430008c14.022522,0 25.429993,11.405045 25.429993,25.430008c0,13.955002 -11.407471,25.302505 -25.429993,25.302505m30.517456,-80.987492l-4.200012,0c-0.554993,0 -0.759888,0.205017 -0.759888,0.762497l0,36.592464l-2.647522,-2.86245c-5.9375,-6.405045 -14.287598,-10.087513 -22.910034,-10.087513c-17.245026,0 -31.28006,14.03252 -31.28006,31.279987c0,17.245003 14.035034,31.279984 31.28006,31.279984c17.244995,0 31.28009,-14.034981 31.28009,-31.279984l-0.087585,-2.372513l0.087585,0l0,-52.549976c0,-0.55748 -0.205139,-0.762497 -0.762634,-0.762497" id="path100"/>
<path fill="#000000" fill-rule="nonzero" d="m359.087463,86.059975c2.147522,-12.332436 12.540009,-18.787437 21.835022,-18.787437c10.64502,0 19.989929,8.044952 21.962433,18.787437l-43.797455,0zm21.835022,-28.222485c-18.377533,0 -32.244995,13.810047 -32.244995,32.119984c0,16.912537 12.392578,34.412537 33.13504,34.412537c9.62738,0 18.642456,-3.847504 25.447388,-10.897522c1.007538,-1.152496 0.987579,-2.547455 0,-3.672493l-2.567413,-3.202507c-0.692444,-0.879974 -1.434967,-1.102448 -1.912567,-1.132523c-1.125031,-0.117477 -1.759949,0.605026 -1.904907,0.76255c-3.330078,3.054962 -10.235138,8.192451 -19.0625,8.192451c-11.417542,0 -20.695038,-8.174957 -22.725067,-19.932465l51.717529,0c1.719971,0 2.744904,-1.025009 2.744904,-2.752472l0,-0.097488c-1.014862,-19.902512 -14.432373,-33.800053 -32.627411,-33.800053" id="path102"/>
<path fill="#000000" fill-rule="nonzero" d="m572.269958,86.294983c2.110046,-13.790001 13.61499,-21.00502 23.887512,-21.00502c11.787598,0 22.109985,9.022522 24.015076,20.995026l0.28241,1.767502l-48.447388,0l0.26239,-1.757507zm24.785034,36.084976c9.072571,0 17.579956,-3.634949 23.947449,-10.215019c0.330078,-0.392433 0.330078,-0.674957 -0.059937,-1.114937l-2.577515,-3.222504c-0.215027,-0.27253 -0.390015,-0.370026 -0.487549,-0.380043c-0.167358,-0.009972 -0.264893,0.087524 -0.429993,0.245003c-3.564941,3.280022 -10.889893,8.710022 -20.392456,8.710022c-12.597473,0 -22.792542,-9.102478 -24.785034,-22.147537l-0.26239,-1.759933l54.03241,0c0.615051,0 0.762512,-0.13504 0.762512,-0.760056c-0.967407,-18.759995 -13.564941,-31.914967 -30.64502,-31.914967c-17.244995,0 -30.252563,12.959957 -30.252563,30.137486c0,15.937477 11.650146,32.422485 31.150085,32.422485" id="path104"/>
<g id="g106" transform="matrix(2.5 0 0 2.5 -1179.81 -610.313)">
<g id="g108" clip-path="url(#clipPath110)">
<path fill="#000000" fill-rule="nonzero" d="m735.47998,292.670013l1.067017,0c0.264954,0 0.320007,-0.156006 0.343994,-0.214996l9.823975,-23.972015c0,-0.007996 0.004028,-0.011993 0.004028,-0.019989c-0.012024,0 -0.031006,0 -0.051025,0l-2.187988,0c-0.260986,0 -0.320007,0.160004 -0.338989,0.210999l-8.106018,20.636993l-8.042969,-20.628998c-0.02301,-0.05899 -0.082031,-0.218994 -0.343994,-0.218994l-2.238037,0c-0.018982,0 -0.034973,0 -0.050964,0c0.003967,0.011993 0.007996,0.028015 0.015991,0.042999l9.753967,23.93399c0.031006,0.074005 0.085999,0.230011 0.351013,0.230011" id="path114"/>
</g>
</g>
<path fill="#000000" fill-rule="nonzero" id="path118" d="m469.555023,121.362503zm4.317474,1.982475c1.650024,0 2.755066,-1.10247 2.755066,-2.742485l0,-35.859985c0,-14.815033 -12.052551,-26.885029 -26.90509,-26.895023l-0.3125,-0.009995c-14.804993,0 -26.854919,12.070011 -26.854919,26.905018l0,35.859985c0,1.640015 1.102448,2.742485 2.752441,2.742485l4.327576,0c1.639923,0 2.742432,-1.10247 2.742432,-2.742485l0,-35.859985c0,-9.482498 7.725006,-17.207527 17.217499,-17.207527c9.492493,0 17.20755,7.725029 17.20755,17.207527l0,35.859985c0,1.640015 1.102478,2.742485 2.752472,2.742485l4.317474,0z"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@ -213,15 +213,9 @@
mode: preserve
loop:
- static/cla.html
- static/hideci.js
- static/jquery.js
- static/jquery-visibility.js
- static/robots.txt
- static/system-cla.html
- static/title.svg
- static/usg-cla.html
- etc/GerritSite.css
- etc/GerritSiteHeader.html
- name: Write jeepyb utility scripts
template:

View File

@ -102,18 +102,6 @@
match = "(\\b[Bb]lue[Pp]rint\\b|\\b[Bb][Pp]\\b)[ \\t#:]*([A-Za-z0-9\\-]+)"
link = "https://blueprints.launchpad.net/openstack/?searchtext=$2"
html = ""
[commentlink "testresult"]
match = "<li>([^ ]+) <a href=\"[^\"]+\" target=\"_blank\" rel=\"nofollow\">([^<]+)</a> : ([^ ]+)([^<]*)</li>"
link = ""
html = "<li class=\"comment_test\"><span class=\"comment_test_name\"><a href=\"$2\" rel=\"nofollow\">$1</a></span> <span class=\"comment_test_result\"><span class=\"result_$3\">$3</span>$4</span></li>"
[commentlink "testresultnoop"]
match = "<li>noop noop : SUCCESS([^<]*)</li>"
link = ""
html = "<li class=\"comment_test\"><span class=\"comment_test_name\">noop</span> <span class=\"comment_test_result\"><span class=\"result_SUCCESS\">SUCCESS</span>$1</span></li>"
[commentlink "launchpadbug"]
match = "<a href=\"(https://bugs\\.launchpad\\.net/[a-zA-Z0-9\\-]+/\\+bug/(\\d+))[^\"]*\">[^<]+</a>"
link = ""
html = "<a href=\"$1\">$1</a>"
[commentlink "changeid"]
match = "(I[0-9a-f]{8,40})"
link = "/#/q/$1"