diff --git a/app/vmui/packages/vmui/src/components/Home/Configurator/DisplayTypeSwitch.tsx b/app/vmui/packages/vmui/src/components/Home/Configurator/DisplayTypeSwitch.tsx index 84f920db0f..a60f19621d 100644 --- a/app/vmui/packages/vmui/src/components/Home/Configurator/DisplayTypeSwitch.tsx +++ b/app/vmui/packages/vmui/src/components/Home/Configurator/DisplayTypeSwitch.tsx @@ -12,8 +12,12 @@ export type DisplayType = "table" | "chart" | "code"; const StylizedToggleButton = withStyles({ root: { - padding: 6, + display: "grid", + gridTemplateColumns: "18px auto", + gridGap: 6, + padding: "8px 12px", color: "white", + lineHeight: "19px", "&.Mui-selected": { color: "white" } @@ -34,13 +38,13 @@ export const DisplayTypeSwitch: FC = () => { dispatch({type: "SET_DISPLAY_TYPE", payload: val ?? displayType}) }> -  Query Range as Chart + Query Range as Chart -  Instant Query as JSON + Instant Query as JSON -  Instant Query as Table + Instant Query as Table ; }; \ No newline at end of file diff --git a/app/vmui/packages/vmui/src/state/common/reducer.ts b/app/vmui/packages/vmui/src/state/common/reducer.ts index a0b3ac2502..64a5a5dd6f 100644 --- a/app/vmui/packages/vmui/src/state/common/reducer.ts +++ b/app/vmui/packages/vmui/src/state/common/reducer.ts @@ -50,7 +50,7 @@ const query = getQueryStringValue("g0.expr", "") as string; export const initialState: AppState = { serverUrl: getDefaultServer(), - displayType: "chart", + displayType: getQueryStringValue("tab", "chart") as DisplayType, query: query, // demo_memory_usage_bytes queryHistory: { index: 0, values: [query] }, time: { diff --git a/app/vmui/packages/vmui/src/utils/query-string.ts b/app/vmui/packages/vmui/src/utils/query-string.ts index 49270ef633..8d8721994d 100644 --- a/app/vmui/packages/vmui/src/utils/query-string.ts +++ b/app/vmui/packages/vmui/src/utils/query-string.ts @@ -6,7 +6,7 @@ const stateToUrlParams = { "time.duration": "g0.range_input", "time.period.date": "g0.end_input", "time.period.step": "g0.step_input", - "stacked": "g0.stacked", + "displayType": "tab" }; // TODO need function for detect types.