DataLinks: suggestions menu improvements (#19396)

* Deduplicate series labels in datalinks variables suggestions

* Allways show all variables available in datalinks suggestions
This commit is contained in:
Dominik Prokop
2019-09-25 12:46:37 +02:00
committed by GitHub
parent c60882b497
commit 97beb26f0c
2 changed files with 10 additions and 31 deletions

View File

@@ -77,7 +77,10 @@ export const getPanelLinksVariableSuggestions = (): VariableSuggestion[] => [
];
const getSeriesVars = (dataFrames: DataFrame[]) => {
const labels = _.flatten(dataFrames.map(df => Object.keys(df.labels || {})));
const labels = _.chain(dataFrames.map(df => Object.keys(df.labels || {})))
.flatten()
.uniq()
.value();
return [
{