Merge branch 'master' into alerting

This commit is contained in:
bergquist
2016-08-22 12:27:08 +02:00
1197 changed files with 777643 additions and 14176 deletions

View File

@@ -262,6 +262,23 @@ function (_, $) {
defaultParams: [3, "sum"]
});
addFuncDef({
name: "groupByNodes",
category: categories.Special,
params: [
{
name: "function",
type: "string",
options: ['sum', 'avg', 'maxSeries']
},
{ name: "node", type: "int", options: [0,1,2,3,4,5,6,7,8,9,10,12] },
{ name: "node", type: "int", options: [0,-1,-2,-3,-4,-5,-6,-7], optional: true },
{ name: "node", type: "int", options: [0,-1,-2,-3,-4,-5,-6,-7], optional: true },
{ name: "node", type: "int", options: [0,-1,-2,-3,-4,-5,-6,-7], optional: true },
],
defaultParams: ["sum", 3]
});
addFuncDef({
name: 'aliasByNode',
category: categories.Special,

View File

@@ -79,7 +79,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
query.expr = templateSrv.replace(target.expr, options.scopedVars, self.interpolateQueryExpr);
query.requestId = options.panelId + target.refId;
var interval = target.interval || options.interval;
var interval = templateSrv.replace(target.interval, options.scopedVars) || options.interval;
var intervalFactor = target.intervalFactor || 1;
target.step = query.step = this.calculateInterval(interval, intervalFactor);
var range = Math.ceil(end - start);

View File

@@ -68,7 +68,7 @@ class PrometheusQueryCtrl extends QueryCtrl {
expr: this.templateSrv.replace(this.target.expr, this.panelCtrl.panel.scopedVars, this.datasource.interpolateQueryExpr),
range_input: rangeDiff + 's',
end_input: endTime,
step_input: '',
step_input: this.target.step,
stacked: this.panelCtrl.panel.stack,
tab: 0
};