Merge pull request #11502 from marefr/graphite_ds_test

graphite: use a query when testing data source
This commit is contained in:
Daniel Lee 2018-04-22 11:31:51 +02:00 committed by GitHub
commit 6b5854936d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -453,7 +453,13 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
};
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' };
});
};