Logo
Explore Help
Sign In
IntenseWebs/grafana
3
0
Fork 0
You've already forked grafana
mirror of https://github.com/grafana/grafana.git synced 2025-02-25 18:55:37 -06:00
Code Issues Packages Projects Releases Wiki Activity
Files
567bbdf6e647374cc9ea344e2fb2e4f954e53f42
grafana/public/test/helpers/convertToStoreState.ts

13 lines
313 B
TypeScript
Raw Normal View History

Variables: turns on newVariables as a new default (#23272) * Variables: turns on newVariables as default * Chore: adds default templating state * Some small refactorings to get the template_srv tests to get green when toggle is enabled by default. * Refactor: adds getVariables dependency to DashboardModel * Tests: fixes StackDriver tests * Tests: updates snapshots * Tests: updates snapshot for DashboardGrid.test.tsx * Tests: fixes DashboardModel.test.ts * fixed initDashboard tests. * renamed variable. * changed so we use the templating.list when running the migration work. * changed so we always returns the variables in sorted order. * Tests: fixed cloudwatch tests * added so we set the global template variable props. * Fixed tests and added moved logic to complete templateSrv variables. * removed unneccesary updateIndex. Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2020-04-03 09:38:14 +02:00
import { StoreState } from '../../app/types';
export const convertToStoreState = (variables: any[]): StoreState => {
return {
templating: {
variables: variables.reduce((byName, variable) => {
byName[variable.name] = variable;
return byName;
}, {}),
},
} as StoreState;
};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 87ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API