Skip to content

Commit

Permalink
Merge fb73b61 into backport/b-ui-fix-ns-navigation/neatly-hopeful-quail
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-github-team-nomad-core authored Jan 26, 2023
2 parents a750612 + fb73b61 commit 4261ecb
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions ui/app/components/gutter-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,4 @@ export default class GutterMenu extends Component {
transitionTo(destination) {
return this.router.transitionTo(destination);
}

gotoJobsForNamespace(namespace) {
if (!namespace || !namespace.get('id')) return;

// 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') },
});
}
}

0 comments on commit 4261ecb

Please sign in to comment.