Add configurable graphite url on zuul status

Add the ability to pass the graphite url by parameter
on zuul status page.

Change-Id: I3252ea2b727e3867136bba3256239bcae409e99e
This commit is contained in:
Yolanda Robla 2015-03-06 15:49:21 +01:00
parent 6c8b78058a
commit 80bf9229a2
3 changed files with 5 additions and 4 deletions

View File

@ -14,6 +14,7 @@ class openstack_project::status (
$recheck_bot_nick,
$status_base_url = 'http://status.openstack.org/',
$status_title = 'OpenStack',
$graphite_render_url = 'http://graphite.openstack.org/render/',
) {
class { 'openstack_project::server':
@ -161,13 +162,13 @@ class openstack_project::status (
file { '/srv/static/status/zuul/index.html':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/status.html',
content => template('openstack_project/zuul/status.html.erb'),
require => File['/srv/static/status/zuul'],
}
file { '/srv/static/status/zuul/status.js':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/status.js',
content => template('openstack_project/zuul/status.js.erb'),
require => File['/srv/static/status/zuul'],
}

View File

@ -300,7 +300,7 @@ progress[aria-valuenow]:before {
<h2> Job Stats </h2>
<script type="text/javascript">
$.fn.graphite.defaults.url = "http://graphite.openstack.org/render/";
$.fn.graphite.defaults.url = "<%= @graphite_render_url %>";
$("#graph-container").append($(new Image()).addClass('graph').graphite({
from: "-24hours",

View File

@ -147,7 +147,7 @@ function create_tree(pipeline) {
function get_sparkline_url(pipeline_name) {
if (!(pipeline_name in window.zuul_sparkline_urls)) {
window.zuul_sparkline_urls[pipeline_name] = $.fn.graphite.geturl({
url: "http://graphite.openstack.org/render/",
url: "<%= @graphite_render_url %>",
from: "-8hours",
width: 100,
height: 16,