Skip to content

Commit

Permalink
Fix nagivation from Global Settings --> Performance to any Cluster Ex…
Browse files Browse the repository at this point in the history
…plorer custom list

- 2.8 based bug
- Only reproducible when
  - performance settings have been changed
  - navigating from performance page to list page
- Root effect
  - Contstant trigger of two computed properties
     - namespaceFilterRequired
       - shell/mixins/resource-fetch-namespaced.js
     - namespaceFilter --> __namespaceRequired --> value (all same colour, suggesting our code)
       - tracing shows this also to start from shell/mixins/resource-fetch-namespaced.js
  • Loading branch information
richard-cox committed Jul 23, 2024
1 parent ba26cf5 commit b993d88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shell/pages/c/_cluster/settings/performance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default {
data() {
return {
uiPerfSetting: DEFAULT_PERF_SETTING,
uiPerfSetting: null,
authUserTTL: null,
bannerVal: {},
value: {},
Expand Down
4 changes: 3 additions & 1 deletion shell/utils/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,7 @@ export const getPerformanceSetting = (rootGetters: Record<string, (arg0: string,
}

// Start with the default and overwrite the values from the setting - ensures we have defaults for newly added options
return Object.assign(DEFAULT_PERF_SETTING, perfSetting || {});
const safeDefaults = Object.assign({}, DEFAULT_PERF_SETTING);

return Object.assign(safeDefaults, perfSetting || {});
};

0 comments on commit b993d88

Please sign in to comment.