bansho/app/components/grafana/grafana.js
Vincent Fournier 45aae4bf8a Add Grafana configuration to docker file and add graph
Change-Id: I687c1c24fed49a98f83015cab73879a3323432fb
2015-06-04 10:39:43 -04:00

23 lines
895 B
JavaScript

'use strict';
angular.module('bansho.grafana', [])
.service('iframeUrl', function () {
var createIFrameUrl = function (templateName, host_name, service_description, metric) {
return '/grafana/dashboard-solo/db/' + templateName + '?' +
'panelId=' + '1' +
'&fullscreen&from=' + 'now-6h' +
'&to=' + 'now' +
'&var-metric1=' + metric +
'&var-host_name=' + host_name +
'&var-service_description=' + service_description;
};
var getIFrameUrl = function (metric, host_name, service_description) {
return createIFrameUrl('templatehostnameservicedescriptiononemetric',
host_name, service_description, metric);
};
return {
getIFrameUrl: getIFrameUrl
};
});