mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Variables: replaces homegrown variableAdapters with Registry (#22866)
* Refactor: intial commit * Tests: fixes tests * Refactor: adds stricter typings
This commit is contained in:
@@ -188,7 +188,7 @@ export function initDashboard(args: InitDashboardArgs): ThunkResult<void> {
|
||||
const list =
|
||||
dashboard.variables.list.length > 0
|
||||
? dashboard.variables.list
|
||||
: dashboard.templating.list.filter(v => variableAdapters.contains(v.type));
|
||||
: dashboard.templating.list.filter(v => variableAdapters.getIfExists(v.type));
|
||||
await dispatch(initDashboardTemplating(list));
|
||||
await dispatch(processVariables());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user