Jump to workload detail page if it belongs to a wrokload

https://github.com/rancher/rancher/issues/12498
This commit is contained in:
loganhz 2018-09-12 11:54:27 +08:00
parent b86845453c
commit 44a09b297d
1 changed files with 7 additions and 1 deletions

View File

@ -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() {