Finish
This commit is contained in:
@@ -31,5 +31,55 @@ export interface ZabbixMetricsQuery extends DataQuery {
|
||||
itemFilter: string;
|
||||
}
|
||||
|
||||
export { TemplateSrv } from 'grafana/app/features/templating/template_srv';
|
||||
export { DashboardSrv } from 'grafana/app/features/dashboard/dashboard_srv';
|
||||
// export { TemplateSrv } from 'grafana/app/features/templating/template_srv';
|
||||
// export { DashboardSrv } from 'grafana/app/features/dashboard/dashboard_srv';
|
||||
|
||||
// The paths of these files have moved around in Grafana and they don't resolve properly
|
||||
// either. Safer not to bother trying to import them just for type hinting.
|
||||
|
||||
export interface TemplateSrv {
|
||||
variables: {
|
||||
name: string;
|
||||
};
|
||||
highlightVariablesAsHtml(str: any): any;
|
||||
replace(target: any, scopedVars?: any, format?: any): any;
|
||||
}
|
||||
|
||||
export interface DashboardSrv {
|
||||
dash: any
|
||||
}
|
||||
|
||||
// Grafana types from backend code
|
||||
|
||||
type RowValues = object[];
|
||||
type TimePoint = [number?, number?];
|
||||
type TimeSeriesPoints = TimePoint[];
|
||||
type TimeSeriesSlice = TimeSeries[];
|
||||
|
||||
interface TimeSeries {
|
||||
name: string;
|
||||
points: TimeSeriesPoints;
|
||||
tags: { [key: string]: string };
|
||||
}
|
||||
|
||||
interface TableColumn {
|
||||
text: string;
|
||||
}
|
||||
|
||||
interface Table {
|
||||
columns: TableColumn[];
|
||||
rows: RowValues[];
|
||||
}
|
||||
|
||||
interface QueryResult {
|
||||
error: string;
|
||||
refId: string;
|
||||
meta: any;
|
||||
series: TimeSeriesSlice[];
|
||||
tables: Table[];
|
||||
}
|
||||
|
||||
export interface TSDBResponse {
|
||||
results: { [key: string]: QueryResult };
|
||||
message: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user