-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05dcf00
commit a368264
Showing
6 changed files
with
174 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {getTemplateSrv} from "@grafana/runtime"; | ||
|
||
/** | ||
* This represents variables that are automatically populated. | ||
* The keys are the variable names, and the values should be interpolated by {@link getTemplateSrv}. | ||
* | ||
* The values should only be used when making a query directly from the frontend (without going through the Go backend). | ||
* | ||
* This can be used as a reference for which values the backend should replace. | ||
* | ||
* NOTE: Do not add variables to this that the backend cannot supply. | ||
* User provided variables should be interpolated on the frontend when possible, | ||
* but we want to reduce the dependency on the frontend here specifically because the backend cannot use {@link getTemplateSrv}. | ||
* Remember THE VALUES HERE ARE NOT USED BY THE BACKEND AND ARE ONLY USED FOR DEBUGGING QUERIES IN THE FRONTEND BY THE RUN BUTTON. | ||
*/ | ||
export const AUTO_POPULATED_VARIABLES: Record<string, any> = { | ||
"from": "$__from", | ||
"to": "$__to", | ||
"interval_ms": "$__interval_ms", | ||
}; | ||
|