mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-14 21:51:43 +00:00
34 lines
963 B
JavaScript
34 lines
963 B
JavaScript
import { clone } from '@shell/utils/object';
|
|
import { HCI } from '../../types';
|
|
import HarvesterResource from '../harvester';
|
|
import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../../config/harvester';
|
|
|
|
export default class HciConfigMap extends HarvesterResource {
|
|
get detailLocation() {
|
|
const detailLocation = clone(this._detailLocation);
|
|
|
|
detailLocation.params.resource = HCI.CLOUD_TEMPLATE;
|
|
|
|
return detailLocation;
|
|
}
|
|
|
|
get doneOverride() {
|
|
const detailLocation = clone(this._detailLocation);
|
|
|
|
delete detailLocation.params.namespace;
|
|
delete detailLocation.params.id;
|
|
detailLocation.params.resource = HCI.CLOUD_TEMPLATE;
|
|
detailLocation.name = `${ HARVESTER_PRODUCT }-c-cluster-resource`;
|
|
|
|
return detailLocation;
|
|
}
|
|
|
|
get parentNameOverride() {
|
|
return this.$rootGetters['i18n/t'](`typeLabel."${ HCI.CLOUD_TEMPLATE }"`, { count: 1 })?.trim();
|
|
}
|
|
|
|
get parentLocationOverride() {
|
|
return this.doneOverride;
|
|
}
|
|
}
|