mirror of https://github.com/rancher/dashboard.git
allow doneRoute to be an object
This commit is contained in:
parent
3860e9a60c
commit
6149e97ea5
|
|
@ -24,7 +24,7 @@ export default {
|
|||
|
||||
props: {
|
||||
doneRoute: {
|
||||
type: String,
|
||||
type: [String, Object],
|
||||
default: null
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import FileSelector from '@shell/components/form/FileSelector';
|
|||
import Footer from '@shell/components/form/Footer';
|
||||
import { ANNOTATIONS_TO_FOLD } from '@shell/config/labels-annotations';
|
||||
import { ensureRegex } from '@shell/utils/string';
|
||||
import { typeOf } from '@shell/utils/sort';
|
||||
|
||||
import {
|
||||
_CREATE,
|
||||
|
|
@ -46,7 +47,7 @@ export default {
|
|||
},
|
||||
|
||||
doneRoute: {
|
||||
type: String,
|
||||
type: [String, Object],
|
||||
default: null,
|
||||
},
|
||||
|
||||
|
|
@ -314,6 +315,11 @@ export default {
|
|||
if ( !this.doneRoute ) {
|
||||
return;
|
||||
}
|
||||
if (typeOf(this.doneRoute) === 'object') {
|
||||
this.$router.replace(this.doneRoute);
|
||||
|
||||
return;
|
||||
}
|
||||
this.$router.replace({
|
||||
name: this.doneRoute,
|
||||
params: { resource: this.value.type }
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ export default {
|
|||
<template>
|
||||
<CruResource
|
||||
class="receiver"
|
||||
:done-route="getReceiverDetailRoute(value.name)"
|
||||
:done-route="alertmanagerConfigResource.getAlertmanagerConfigDetailRoute()"
|
||||
:mode="mode"
|
||||
:resource="alertmanagerConfigResource"
|
||||
:subtypes="[]"
|
||||
|
|
|
|||
Loading…
Reference in New Issue