From 44a09b297d34a14caba2914e67181ca3f9fb6a2f Mon Sep 17 00:00:00 2001 From: loganhz Date: Wed, 12 Sep 2018 11:54:27 +0800 Subject: [PATCH] Jump to workload detail page if it belongs to a wrokload https://github.com/rancher/rancher/issues/12498 --- app/container/controller.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/container/controller.js b/app/container/controller.js index a75a6f71f..0c2f413ae 100644 --- a/app/container/controller.js +++ b/app/container/controller.js @@ -20,7 +20,13 @@ export default Controller.extend({ podStateDidChange: observer('model.state', function() { if ( get(this, 'model.state') === 'removed' && get(this, 'router.currentRouteName') === 'container' ) { - this.transitionToRoute('authenticated.project.index'); + const workloadId = get(this, 'model.workloadId'); + + if ( workloadId ) { + this.transitionToRoute('workload', workloadId); + } else { + this.transitionToRoute('authenticated.project.index'); + } } }), displayEnvironmentVars: computed('selectedContainer', function() {