mirror of https://github.com/rancher/dashboard.git
Edit yaml for !rke2 cluster should show mgmt cluster
This commit is contained in:
parent
c740629f9b
commit
3ad95772db
|
|
@ -1,5 +1,5 @@
|
|||
import { AGE, NAME as NAME_COL, STATE } from '@/config/table-headers';
|
||||
import { CAPI, NORMAN } from '@/config/types';
|
||||
import { CAPI, MANAGEMENT, NORMAN } from '@/config/types';
|
||||
import { MULTI_CLUSTER } from '@/store/features';
|
||||
import { DSL } from '@/store/type-map';
|
||||
|
||||
|
|
@ -100,6 +100,7 @@ export function init(store) {
|
|||
weightType(CAPI.MACHINE, 1, true);
|
||||
|
||||
basicType([
|
||||
MANAGEMENT.CLUSTER,
|
||||
CAPI.MACHINE_DEPLOYMENT,
|
||||
CAPI.MACHINE_SET,
|
||||
CAPI.MACHINE,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { set } from '@/utils/object';
|
|||
import { sortBy } from '@/utils/sort';
|
||||
import { ucFirst } from '@/utils/string';
|
||||
import { compare } from '@/utils/version';
|
||||
import { AS, MODE, _EDIT, _YAML } from '~/config/query-params';
|
||||
|
||||
export const DEFAULT_WORKSPACE = 'fleet-default';
|
||||
|
||||
|
|
@ -100,6 +101,28 @@ export default {
|
|||
return out;
|
||||
},
|
||||
|
||||
goToEditYaml() {
|
||||
return () => {
|
||||
let location;
|
||||
|
||||
if ( !this.isRke2 ) {
|
||||
location = this.mgmt?.detailLocation;
|
||||
}
|
||||
|
||||
if ( !location ) {
|
||||
location = this.detailLocation;
|
||||
}
|
||||
|
||||
location.query = {
|
||||
...location.query,
|
||||
[MODE]: _EDIT,
|
||||
[AS]: _YAML
|
||||
};
|
||||
|
||||
this.currentRouter().push(location);
|
||||
};
|
||||
},
|
||||
|
||||
isImported() {
|
||||
return this.provisioner === 'imported';
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue