mirror of
https://github.com/grafana/grafana.git
synced 2025-09-22 08:52:52 +08:00
Merge branch 'master' into postgres-query-builder
This commit is contained in:
@ -123,25 +123,7 @@ export class PostgresDatasource {
|
||||
}
|
||||
|
||||
testDatasource() {
|
||||
return this.backendSrv
|
||||
.datasourceRequest({
|
||||
url: '/api/tsdb/query',
|
||||
method: 'POST',
|
||||
data: {
|
||||
from: '5m',
|
||||
to: 'now',
|
||||
queries: [
|
||||
{
|
||||
refId: 'A',
|
||||
intervalMs: 1,
|
||||
maxDataPoints: 1,
|
||||
datasourceId: this.id,
|
||||
rawSql: 'SELECT 1',
|
||||
format: 'table',
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
return this.metricFindQuery('SELECT 1', {})
|
||||
.then(res => {
|
||||
return { status: 'success', message: 'Database Connection OK' };
|
||||
})
|
||||
|
Reference in New Issue
Block a user