Files
grafana/public/app/plugins/datasource/dashboard/datasource.ts
Ryan McKinley e1924608a2 DashboardDatasource: reuse query results within a dashboard (#16660)
* move queryRunner to panelModel

* remove isEditing from PanelChrome

* move listener to QueriesTab

* add shared query datasource

* expose getDashboardSrv to react

* no changes to panel chrome

* issue queries when in fullscreen

* moved to regular QueryEditor interface

* moved to regular QueryEditor interface

* lower limit

* add dashboard query

* no changes to editor row

* fix sort order

* fix sort order

* make it an alpha panel

* make panelId a getter

* fix angular constructor

* rename SeriesData to DataFrame

* merge with master

* use series

* add simple tests

* check unsubscribe

* Minor code cleanup, creating Subjects look cheap and does not need to be lazy, simplifies code

* minor refactor

* Minor refacforing, renames

* added test dashboard
2019-08-27 11:06:49 +02:00

24 lines
677 B
TypeScript

import { DataSourceApi, DataQueryRequest, DataQueryResponse, DataSourceInstanceSettings } from '@grafana/ui';
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() {
return Promise.resolve({});
}
}