|
|
@ -12,6 +12,13 @@ export type BackendSrvRequest = { |
|
|
|
// Show a message with the result
|
|
|
|
// Show a message with the result
|
|
|
|
showSuccessAlert?: boolean; |
|
|
|
showSuccessAlert?: boolean; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// A requestID is provided by the datasource as a unique identifier for a
|
|
|
|
|
|
|
|
// particular query. If the requestID exists, the promise it is keyed to
|
|
|
|
|
|
|
|
// is canceled, canceling the previous datasource request if it is still
|
|
|
|
|
|
|
|
// in-flight.
|
|
|
|
|
|
|
|
requestId?: string; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Allow any other parameters
|
|
|
|
[key: string]: any; |
|
|
|
[key: string]: any; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -29,6 +36,9 @@ export interface BackendSrv { |
|
|
|
// If there is an error, set: err.isHandled = true
|
|
|
|
// If there is an error, set: err.isHandled = true
|
|
|
|
// otherwise the backend will show a message for you
|
|
|
|
// otherwise the backend will show a message for you
|
|
|
|
request(options: BackendSrvRequest): Promise<any>; |
|
|
|
request(options: BackendSrvRequest): Promise<any>; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// DataSource requests add hooks into the query inspector
|
|
|
|
|
|
|
|
datasourceRequest(options: BackendSrvRequest): Promise<any>; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let singletonInstance: BackendSrv; |
|
|
|
let singletonInstance: BackendSrv; |
|
|
|