Time window filter dropdown doesn't retain previously selected window
Summary
Time window filtering dropdown in Monitor dashboard doesn't retain the previously selected value. Selecting a value from the dropdown reloads the page as expected with the correct URL parameters. However, the dropdown doesn't pre-select the right time window in the dropdown.
Steps to reproduce
- Open metrics dashboard for a project (assuming that Prometheus integration is enabled)
- Select a different time window and it should reload the page. The time window filtering dropdown has 8 hours selected by default.
- Notice that the page reloads with correct URL params but the time window dropdown shows wrong window as selected.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Possible fixes
Anybody working on this should take a look at this line in utils.js https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/monitoring/utils.js#L16