mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #11502 from marefr/graphite_ds_test
graphite: use a query when testing data source
This commit is contained in:
@@ -453,7 +453,13 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.testDatasource = function() {
|
this.testDatasource = function() {
|
||||||
return this.metricFindQuery('*').then(function() {
|
let query = {
|
||||||
|
panelId: 3,
|
||||||
|
rangeRaw: { from: 'now-1h', to: 'now' },
|
||||||
|
targets: [{ target: 'constantLine(100)' }],
|
||||||
|
maxDataPoints: 300,
|
||||||
|
};
|
||||||
|
return this.query(query).then(function() {
|
||||||
return { status: 'success', message: 'Data source is working' };
|
return { status: 'success', message: 'Data source is working' };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user