Add Openstack look to gerrit
* Adds stylesheet, header and images to make gerrit look more like an Openstack thing * Adds Javascript hack that the CSS detects so we don't ruin the style of the patch pages * Adds both openstack and stackforge logo * Also adds stackforge logo to stackforge Jenkins Change-Id: Ic541443fb706ab119a9d47f474bcad2bf8e9907e
This commit is contained in:
parent
dce9792cae
commit
08be53181b
@ -162,7 +162,8 @@ node "gerrit.openstack.org" {
|
||||
}, {
|
||||
name => 'openstack-dev/openstack-nose',
|
||||
close_pull => 'true'
|
||||
} ]
|
||||
} ],
|
||||
logo => 'openstack.png'
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +177,8 @@ node "gerrit-dev.openstack.org" {
|
||||
github_projects => [ {
|
||||
name => 'gtest-org/test',
|
||||
close_pull => 'true'
|
||||
} ]
|
||||
} ],
|
||||
logo => 'openstack.png'
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,7 +187,8 @@ node "jenkins.openstack.org" {
|
||||
include openstack_server
|
||||
class { 'jenkins_master':
|
||||
site => 'jenkins.openstack.org',
|
||||
serveradmin => 'webmaster@openstack.org'
|
||||
serveradmin => 'webmaster@openstack.org',
|
||||
logo => 'openstack.png'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,8 @@ node "review.stackforge.org" {
|
||||
github_projects => [ {
|
||||
name => 'stackforge/MRaaS',
|
||||
close_pull => 'true'
|
||||
} ]
|
||||
} ],
|
||||
logo => 'stackforge.png'
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,7 +98,8 @@ node "jenkins.stackforge.org" {
|
||||
include openstack_server
|
||||
class { 'jenkins_master':
|
||||
serveradmin => 'webmaster@stackforge.org',
|
||||
site => 'jenkins.stackforge.org'
|
||||
site => 'jenkins.stackforge.org',
|
||||
logo => 'stackforge.png'
|
||||
}
|
||||
}
|
||||
|
||||
|
32
modules/gerrit/files/GerritSite.css
Normal file
32
modules/gerrit/files/GerritSite.css
Normal file
@ -0,0 +1,32 @@
|
||||
body {color: #535353 !important; background: url("static/openstack-page-bkg.jpg") no-repeat scroll 0 0 white !important; position: static}
|
||||
a,a:visited {color: #CF2F19 !important; text-decoration: none;}
|
||||
a:hover {color: #000 !important; text-decoration: underline}
|
||||
|
||||
a.gwt-InlineHyperlink {background: none !important}
|
||||
|
||||
#gerrit_header {display: block !important; position: relative; top: -60px; margin-bottom: -60px; width: 400px; padding-left: 17px}
|
||||
|
||||
#gerrit_topmenu {background: none; position:relative; top: 0px; left: 400px; margin-right: 400px}
|
||||
|
||||
#gerrit_topmenu tbody tr td table {border: 0}
|
||||
|
||||
#gerrit_body table {background: none;}
|
||||
#gerrit_body:not(.patch) td {border-bottom: 1px solid #C5E2EA; border-right: 1px solid #C5E2EA}
|
||||
#gerrit_body:not(.patch) tr:nth-child(even) {background: #EEF3F5; color: #353535}
|
||||
#gerrit_body:not(.patch) tr:nth-child(odd) {background: #FFF; color: #353535}
|
||||
#gerrit_body.patch tr {background: #FFF; color: #353535}
|
||||
|
||||
#gerrit_body:not(.patch) tr:nth-child(even)>td {background: #EEF3F5; color: #353535}
|
||||
#gerrit_body:not(.patch) tr:nth-child(odd)>td {background: #FFF; color: #353535}
|
||||
#gerrit_body tr:nth-child(even)>td.header {background: #EEF3F5; font-style: normal; color: #353535; font-weight: bold;}
|
||||
#gerrit_body tr:nth-child(odd)>td.header {background: #FFF; font-style: normal; color: #353535; font-weight: bold;}
|
||||
#gerrit_body tr>td div {background: none; color: #353535}
|
||||
#gerrit_body tr>td div a {background: none; color: #353535}
|
||||
#gerrit_body:not(.patch) tr:first-child>td {color: #353535; font-size: 16px; font-style: normal; background: #FFF}
|
||||
|
||||
#gerrit_topmenu tbody tr td table.gwt-TabBar {color: #353535; border-bottom: 1px solid #C5E2EA;}
|
||||
.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 .gwt-TextBox {width: 250px}
|
26
modules/gerrit/files/GerritSiteHeader.html
Normal file
26
modules/gerrit/files/GerritSiteHeader.html
Normal file
@ -0,0 +1,26 @@
|
||||
<div>
|
||||
<h1 style="color: #CF2F19"><img src="static/title.png" style="vertical-align:middle;" /> Code Review</h1>
|
||||
<script type="text/javascript">
|
||||
function getHash() {
|
||||
var hash = window.location.hash;
|
||||
return hash.substring(1); // remove #
|
||||
}
|
||||
window.onload = function() {
|
||||
var hash_arr= getHash().split(",");
|
||||
if (hash_arr[0] == 'patch') {
|
||||
var elem = document.getElementById("gerrit_body");
|
||||
elem.className = elem.className + ' patch';
|
||||
}
|
||||
};
|
||||
window.onhashchange = function() {
|
||||
var hash_arr= getHash().split(",");
|
||||
var elem = document.getElementById("gerrit_body");
|
||||
if (hash_arr[0] == 'patch') {
|
||||
elem.className = elem.className + ' patch';
|
||||
} else {
|
||||
elem.className = elem.className.replace(' patch', '');
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
</div>
|
BIN
modules/gerrit/files/openstack-page-bkg.jpg
Normal file
BIN
modules/gerrit/files/openstack-page-bkg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
modules/gerrit/files/stackforge.png
Normal file
BIN
modules/gerrit/files/stackforge.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
@ -14,7 +14,8 @@ $commentlinks = [ { name => 'changeid',
|
||||
match => '([Bb]lue[Pp]rint|[Bb][Pp])[\\s#:]*([A-Za-z0-9\\-]+)',
|
||||
link => 'https://blueprints.launchpad.net/openstack/?searchtext=$2' },
|
||||
|
||||
]
|
||||
],
|
||||
$logo
|
||||
) {
|
||||
|
||||
user { "gerrit2":
|
||||
@ -123,6 +124,26 @@ $commentlinks = [ { name => 'changeid',
|
||||
require => User["gerrit2"]
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/static/title.png':
|
||||
ensure => 'present',
|
||||
source => 'puppet:///modules/gerrit/${logo}',
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/static/openstack-page-bkg.jpg':
|
||||
ensure => 'present',
|
||||
source => 'puppet:///modules/gerrit/openstack-page-bkg.jpg'
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/etc/GerritSite.css':
|
||||
ensure => 'present',
|
||||
source => 'puppet:///modules/gerrit/GerritSite.css'
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/etc/GerritSiteHeader.html':
|
||||
ensure => 'present',
|
||||
source => 'puppet:///modules/gerrit/GerritSiteHeader.html'
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/etc/replication.config':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
|
BIN
modules/jenkins_master/files/openstack.png
Normal file
BIN
modules/jenkins_master/files/openstack.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
BIN
modules/jenkins_master/files/stackforge.png
Normal file
BIN
modules/jenkins_master/files/stackforge.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
@ -1,4 +1,4 @@
|
||||
class jenkins_master($site, $serveradmin) {
|
||||
class jenkins_master($site, $serveradmin, $logo) {
|
||||
|
||||
#This key is at http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key
|
||||
apt::key { "D50582E6":
|
||||
@ -154,7 +154,7 @@ class jenkins_master($site, $serveradmin) {
|
||||
|
||||
file { "/var/lib/jenkins/plugins/simple-theme-plugin/openstack.js":
|
||||
ensure => present,
|
||||
source => "puppet:///modules/jenkins_master/openstack.js",
|
||||
content => template("jenkins_master/openstack.js.erb"),
|
||||
require => File["/var/lib/jenkins/plugins/simple-theme-plugin"]
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ class jenkins_master($site, $serveradmin) {
|
||||
|
||||
file { "/var/lib/jenkins/plugins/simple-theme-plugin/title.png":
|
||||
ensure => present,
|
||||
source => "puppet:///modules/jenkins_master/title.png",
|
||||
source => "puppet:///modules/jenkins_master/${logo}",
|
||||
require => File["/var/lib/jenkins/plugins/simple-theme-plugin"]
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ function makeDoubleDelegate(function1, function2) {
|
||||
function chgeLogo() {
|
||||
var imgs=document.getElementsByTagName("img");
|
||||
var imgTag = document.createElement("img");
|
||||
imgTag.setAttribute("src","https://jenkins.openstack.org/plugin/simple-theme-plugin/title.png");
|
||||
imgTag.setAttribute("src","https://<%= site %>/plugin/simple-theme-plugin/title.png");
|
||||
imgTag.setAttribute("style", "vertical-align: middle;padding-left: 0.75em;");
|
||||
imgs[0].parentNode.appendChild(imgTag);
|
||||
var spanTag = document.createElement("span");
|
Loading…
Reference in New Issue
Block a user