mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-11-22 08:37:38 +08:00
(cherry picked from commit 15950eb209165a980ec53d22fe2898b94d6b1c8b) Signed-off-by: Andy Lee <andy.lee@suse.com> Co-authored-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
1 parent
013d9f1d7e
commit
9aa311a7e3
17 files changed
+1371
-61
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import { clone } from '@shell/utils/object';
|
||||
import { HCI } from '../types';
|
||||
import HarvesterResource from './harvester';
|
||||
|
||||
export default class HciSubnet extends HarvesterResource {
|
||||
get groupByVpc() {
|
||||
return this.spec?.vpc || '';
|
||||
}
|
||||
|
||||
get doneOverride() {
|
||||
const detailLocation = clone(this.listLocation);
|
||||
|
||||
detailLocation.params.resource = HCI.VPC;
|
||||
|
||||
return detailLocation;
|
||||
}
|
||||
|
||||
get parentLocationOverride() {
|
||||
return {
|
||||
...this.listLocation,
|
||||
params: {
|
||||
...this.listLocation.params,
|
||||
resource: HCI.VPC
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { clone } from '@shell/utils/object';
|
||||
import { HCI } from '../types';
|
||||
import HarvesterResource from './harvester';
|
||||
|
||||
export default class HciVPC extends HarvesterResource {
|
||||
get parentNameOverride() {
|
||||
return this.$rootGetters['i18n/t'](`typeLabel."${ HCI.VPC }"`, { count: 1 })?.trim();
|
||||
}
|
||||
|
||||
get doneOverride() {
|
||||
const detailLocation = clone(this.listLocation);
|
||||
|
||||
detailLocation.params.resource = HCI.VPC;
|
||||
|
||||
return detailLocation;
|
||||
}
|
||||
|
||||
get parentLocationOverride() {
|
||||
return {
|
||||
...this.listLocation,
|
||||
params: {
|
||||
...this.listLocation.params,
|
||||
resource: HCI.VPC
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user