From 000b3488296978aab27fd7a852c9af3ecbe84ffc Mon Sep 17 00:00:00 2001 From: Dmitry Filimonov Date: Mon, 9 Aug 2021 19:20:51 -0700 Subject: [PATCH] default name fix --- webapp/javascript/redux/store.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/javascript/redux/store.js b/webapp/javascript/redux/store.js index 965adfef11..5b27209c2f 100644 --- a/webapp/javascript/redux/store.js +++ b/webapp/javascript/redux/store.js @@ -30,6 +30,10 @@ const enhancer = composeWithDevTools( const store = createStore(rootReducer, enhancer); +const defaultName = window.initialState.appNames.find( + (x) => x !== "pyroscope.server.cpu" +); + ReduxQuerySync({ store, // your Redux store params: { @@ -64,7 +68,7 @@ ReduxQuerySync({ action: setRightUntil, }, query: { - defaultValue: "now", + defaultValue: `${defaultName || "pyroscope.server.cpu"}{}`, selector: (state) => state.query, action: setQuery, },