Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
08ada202
Commit
08ada202
authored
Nov 07, 2019
by
Ryan McKinley
Committed by
Torkel Ödegaard
Nov 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
@grafana/runtime: Expose datasourceRequest in backendSrv
parent
53f80883
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
packages/grafana-runtime/src/services/backendSrv.ts
+10
-0
public/app/core/services/backend_srv.ts
+1
-1
No files found.
packages/grafana-runtime/src/services/backendSrv.ts
View file @
08ada202
...
...
@@ -12,6 +12,13 @@ export type BackendSrvRequest = {
// Show a message with the result
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
;
};
...
...
@@ -29,6 +36,9 @@ export interface BackendSrv {
// If there is an error, set: err.isHandled = true
// otherwise the backend will show a message for you
request
(
options
:
BackendSrvRequest
):
Promise
<
any
>
;
// DataSource requests add hooks into the query inspector
datasourceRequest
(
options
:
BackendSrvRequest
):
Promise
<
any
>
;
}
let
singletonInstance
:
BackendSrv
;
...
...
public/app/core/services/backend_srv.ts
View file @
08ada202
...
...
@@ -143,7 +143,7 @@ export class BackendSrv implements BackendService {
}
}
datasourceRequest
(
options
:
any
)
{
datasourceRequest
(
options
:
BackendSrvRequest
)
{
let
canceler
:
angular
.
IDeferred
<
any
>
=
null
;
options
.
retry
=
options
.
retry
||
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment