Hide Forgot
Description of problem: When the user opens the Observe > Dashboard in admin or developer perspective and switches the perspective in another tab, the observe dashboard crashs on reload. Version-Release number of selected component (if applicable): 4.9 How reproducible: Always Steps to Reproduce: 1. Navigate to the Observe dashboard view 2. Select a dashboard 3. Open the console in another browser tab (right click in navigation > open in new tab) 4. Change the perspective in this new tab 5. Switch back to the browser tab with the observe dashboard view and reload the browser tab Actual results: Content area crashs and shows "Oh no! Something went wrong." StackTrace: TypeError: Cannot read properties of undefined (reading 'value') in VariableDropdown (public/components/monitoring/dashboards/index.tsx:176) Quick code analyse shows that the variable to get the query is not defined here: const VariableDropdown: React.FC<VariableDropdownProps> = ({ id, name }) => { const [activePerspective] = useActivePerspective(); const timespan = useSelector(({ UI }: RootState) => UI.getIn(['monitoringDashboards', activePerspective, 'timespan']), ); const variables = useSelector(({ UI }: RootState) => UI.getIn(['monitoringDashboards', activePerspective, 'variables']), ); const variable = variables.toJS()[name]; const query = evaluateTemplate(variable.query, variables, timespan); The reason is that that the redux state ... => 'monitoringDashboards' => 'activePerspective => 'variables' is not initialized correctly. Expected results: No crash Additional info:
Assigned this to Dev Console because this is an followup issue after consolidating the admin monitoring dashboard to devconsole monitoring dashboard (https://issues.redhat.com/browse/ODC-6068 / https://github.com/openshift/console/pull/9644)
verified on firefox 90.0.2, build 4.10.0-0.nightly-2021-12-03-213835 following the steps to reproduce doesn't crash the console.
Since nightly builds are not having the changes from Nov 17th, We decided to QE verify the 4.10 issues on a ci build. Changing the perspective in another tab and refreshing the original tab no longer breaks the UI, so marking the ticket as Verified. Verified on: cluster build: 4.10.0-0.ci-2021-12-14-050037
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:0056