Variables: Exclude adhoc variables from the impacted by logic (#41717)

pull/41786/head
Hugo Häggmark 4 years ago committed by GitHub
parent e4cc41dd5b
commit 0dcea161fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      public/app/features/variables/state/actions.ts

@ -47,6 +47,7 @@ import {
hasLegacyVariableSupport,
hasOptions,
hasStandardVariableSupport,
isAdHoc,
isMulti,
isQuery,
} from '../guard';
@ -517,7 +518,9 @@ export const variableUpdated = (
const variables = getVariables(state);
const g = createGraph(variables);
const panels = state.dashboard?.getModel()?.panels ?? [];
const affectedPanelIds = getAllAffectedPanelIdsForVariableChange(variableInState.id, variables, panels);
const affectedPanelIds = isAdHoc(variableInState)
? undefined // for adhoc variables we don't know which panels that will be impacted
: getAllAffectedPanelIdsForVariableChange(variableInState.id, variables, panels);
const node = g.getNode(variableInState.name);
let promises: Array<Promise<any>> = [];

Loading…
Cancel
Save