Skip to content

Commit

Permalink
default name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
petethepig committed Aug 10, 2021
1 parent 020b589 commit 000b348
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webapp/javascript/redux/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -64,7 +68,7 @@ ReduxQuerySync({
action: setRightUntil,
},
query: {
defaultValue: "now",
defaultValue: `${defaultName || "pyroscope.server.cpu"}{}`,
selector: (state) => state.query,
action: setQuery,
},
Expand Down

0 comments on commit 000b348

Please sign in to comment.