mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' into alerting
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user