mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* - initial work on data source config page * - add links to test status box - add tracking function * - add test for the DataSourceConfigAlert component * - fix flicker of the alert box * - fix the build * - small improvements * - fix failing build * - fix failing unit tests * - prettier and betterer fixes * - fix failing e2e tests * - fix build again * - rewrite solution according to the PR comments * - cleanup * - fix failing e2e * - use absolute path in link * Minor fixes --------- Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
31 lines
773 B
TypeScript
31 lines
773 B
TypeScript
import {
|
|
DataSourceApi,
|
|
DataQueryRequest,
|
|
DataQueryResponse,
|
|
DataSourceInstanceSettings,
|
|
TestDataSourceResponse,
|
|
} from '@grafana/data';
|
|
|
|
import { DashboardQuery } from './types';
|
|
|
|
/**
|
|
* This should not really be called
|
|
*/
|
|
export class DashboardDatasource extends DataSourceApi<DashboardQuery> {
|
|
constructor(instanceSettings: DataSourceInstanceSettings) {
|
|
super(instanceSettings);
|
|
}
|
|
|
|
getCollapsedText(query: DashboardQuery) {
|
|
return `Dashboard Reference: ${query.panelId}`;
|
|
}
|
|
|
|
query(options: DataQueryRequest<DashboardQuery>): Promise<DataQueryResponse> {
|
|
return Promise.reject('This should not be called directly');
|
|
}
|
|
|
|
testDatasource(): Promise<TestDataSourceResponse> {
|
|
return Promise.resolve({ message: '', status: '' });
|
|
}
|
|
}
|