diff --git a/ui/app/components/gutter-menu.js b/ui/app/components/gutter-menu.js index 6c7871ecc56..46c02d1374a 100644 --- a/ui/app/components/gutter-menu.js +++ b/ui/app/components/gutter-menu.js @@ -37,7 +37,13 @@ export default Component.extend({ gotoJobsForNamespace(namespace) { if (!namespace || !namespace.get('id')) return; - this.router.transitionTo('jobs', { + // Jobs and CSI Volumes are both namespace-sensitive. Changing namespaces is + // an intent to reset context, but where to reset to depends on where the namespace + // is being switched from. Jobs take precedence, but if the namespace is switched from + // a storage-related page, context should be reset to volumes. + const destination = this.router.currentRouteName.startsWith('csi.') ? 'csi.volumes' : 'jobs'; + + this.router.transitionTo(destination, { queryParams: { namespace: namespace.get('id') }, }); }, diff --git a/ui/app/templates/components/gutter-menu.hbs b/ui/app/templates/components/gutter-menu.hbs index e531a8c61ef..7878a4baf02 100644 --- a/ui/app/templates/components/gutter-menu.hbs +++ b/ui/app/templates/components/gutter-menu.hbs @@ -51,13 +51,27 @@ Workload