forked from grafana/grafana
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Graphite: fix autocomplete when tags are not available (grafana#31680)
* Return empty list of tags when tags are not available In some configurations graphite-web fail to return the list of tags. It shouldn't however prevent displaying list of metrics (which is concatenated with tags). * Populate jsonData with default version of Graphite The version of Graphite is preselected in the dropdown but was not saved in jsonData initially. * Fix a typo * Show a popup with an error message * Always use the latest Graphite value as the default one when creating a datasource * Move autocomplete error handling to GraphiteQueryCtrl * Test error handing in Graphite autocomplete * Test default Graphite version fallback * Rename graphite_versions.ts to versions.ts * Remove redundant import * Code formatting, minor renaming * Remove redundant error info
- Loading branch information
Showing
6 changed files
with
122 additions
and
24 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
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
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,5 @@ | ||
import { last } from 'lodash'; | ||
|
||
export const GRAPHITE_VERSIONS = ['0.9', '1.0', '1.1']; | ||
|
||
export const DEFAULT_GRAPHITE_VERSION = last(GRAPHITE_VERSIONS)!; |