Add a helpful friend to gerrit reviews
This adds clippy, the workflow accelerator, to gerrit rewiews. Clippy comes from: https://www.smore.com/clippy-js A demo is available at: http://reviewtest.cloud.nibalizer.com/#/c/1/ Change-Id: Ia0d9151d1ce81f87f41e8e9083c839898472d6e3
This commit is contained in:
parent
5dd8577042
commit
353d4bd4ab
@ -2,4 +2,24 @@
|
|||||||
<script type="text/javascript" src="static/jquery.js" />
|
<script type="text/javascript" src="static/jquery.js" />
|
||||||
<script type="text/javascript" src="static/hideci.js" />
|
<script type="text/javascript" src="static/hideci.js" />
|
||||||
<a href="/"><h1 style="color: #CF2F19"><img src="static/title.png" style="vertical-align:middle;" /></h1></a>
|
<a href="/"><h1 style="color: #CF2F19"><img src="static/title.png" style="vertical-align:middle;" /></h1></a>
|
||||||
|
|
||||||
|
<!-- Clippy.js -->
|
||||||
|
<script src="static/clippy.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Init script -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('head').append( $('<link rel="stylesheet" type="text/css" />').attr('href', 'static/clippy.css') );
|
||||||
|
var now = new Date();
|
||||||
|
if (now.getMonth() == 3) {
|
||||||
|
if (now.getDate() == 1){
|
||||||
|
clippy.load('Clippy', function(agent) {
|
||||||
|
// Do anything with the loaded agent
|
||||||
|
agent.show();
|
||||||
|
agent.animate();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
62
modules/openstack_project/files/gerrit/clippy.css
Normal file
62
modules/openstack_project/files/gerrit/clippy.css
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
.clippy, .clippy-balloon {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1000;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clippy-balloon {
|
||||||
|
|
||||||
|
background: #FFC;
|
||||||
|
color: black;
|
||||||
|
padding: 8px;
|
||||||
|
border: 1px solid black;
|
||||||
|
border-radius: 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.clippy-content {
|
||||||
|
max-width: 200px;
|
||||||
|
min-width: 120px;
|
||||||
|
font-family: "Microsoft Sans", sans-serif;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clippy-tip {
|
||||||
|
width: 10px;
|
||||||
|
height: 16px;
|
||||||
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAMAAAAlvKiEAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAlQTFRF///MAAAA////52QwgAAAAAN0Uk5T//8A18oNQQAAAGxJREFUeNqs0kEOwCAIRFHn3//QTUU6xMyyxii+jQosrTPkyPEM6IN3FtzIRk1U4dFeKWQiH6pRRowMVKEmvronEynkwj0uZJgR22+YLopPSo9P34wJSamLSU7lSIWLJU7NkNomNlhqxUeAAQC+TQLZyEuJBwAAAABJRU5ErkJggg==) no-repeat;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clippy-top-left .clippy-tip {
|
||||||
|
top: 100%;
|
||||||
|
margin-top: 0px;
|
||||||
|
left: 100%;
|
||||||
|
margin-left: -50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clippy-top-right .clippy-tip {
|
||||||
|
top: 100%;
|
||||||
|
margin-top: 0px;
|
||||||
|
left: 0;
|
||||||
|
margin-left: 50px;
|
||||||
|
background-position: -10px 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.clippy-bottom-right .clippy-tip {
|
||||||
|
top: 0;
|
||||||
|
margin-top: -16px;
|
||||||
|
left: 0;
|
||||||
|
margin-left: 50px;
|
||||||
|
background-position: -10px -16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clippy-bottom-left .clippy-tip {
|
||||||
|
top: 0;
|
||||||
|
margin-top: -16px;
|
||||||
|
left: 100%;
|
||||||
|
margin-left: -50px;
|
||||||
|
background-position: 0px -16px;
|
||||||
|
}
|
||||||
|
|
1
modules/openstack_project/files/gerrit/clippy.min.js
vendored
Normal file
1
modules/openstack_project/files/gerrit/clippy.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -292,6 +292,20 @@ class openstack_project::gerrit (
|
|||||||
notify => Exec['reload_gerrit_header'],
|
notify => Exec['reload_gerrit_header'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { '/home/gerrit2/review_site/static/clippy.min.js':
|
||||||
|
ensure => present,
|
||||||
|
source => 'puppet:///modules/openstack_project/gerrit/clippy.min.js',
|
||||||
|
require => Class['::gerrit'],
|
||||||
|
notify => Exec['reload_gerrit_header'],
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/home/gerrit2/review_site/static/clippy.css':
|
||||||
|
ensure => present,
|
||||||
|
source => 'puppet:///modules/openstack_project/gerrit/clippy.css',
|
||||||
|
require => Class['::gerrit'],
|
||||||
|
notify => Exec['reload_gerrit_header'],
|
||||||
|
}
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/etc/GerritSite.css':
|
file { '/home/gerrit2/review_site/etc/GerritSite.css':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => 'puppet:///modules/openstack_project/gerrit/GerritSite.css',
|
source => 'puppet:///modules/openstack_project/gerrit/GerritSite.css',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user