mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 05:01:43 +00:00
Compare commits
2 Commits
5b668a176c
...
6c27a46274
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c27a46274 | ||
|
|
b03fffbc30 |
@ -50,6 +50,7 @@ export const HCI = {
|
||||
STORAGE_CLASS: 'harvesterhci.io/storageClassName',
|
||||
STORAGE_NETWORK: 'storage-network.settings.harvesterhci.io',
|
||||
ADDON_EXPERIMENTAL: 'addon.harvesterhci.io/experimental',
|
||||
ADDON_DISPLAYNAME: 'addon.harvesterhci.io/displayName',
|
||||
VOLUME_ERROR: 'longhorn.io/volume-scheduling-error',
|
||||
VOLUME_FOR_VM: 'harvesterhci.io/volumeForVirtualMachine',
|
||||
KVM_AMD_CPU: 'cpu-feature.node.kubevirt.io/svm',
|
||||
|
||||
@ -96,7 +96,6 @@ export default {
|
||||
templateVersionId: '',
|
||||
namePrefix: '',
|
||||
isSingle: true,
|
||||
useTemplate: false,
|
||||
isOpen: false,
|
||||
hostname,
|
||||
isRestartImmediately,
|
||||
|
||||
@ -1563,6 +1563,7 @@ harvester:
|
||||
'harvester-seeder': harvester-seeder is an add-on that uses IPMI and Redfish to discover hardware information and perform out-of-band operations.
|
||||
'harvester-system/harvester-seeder': harvester-seeder is an add-on that uses IPMI and Redfish to discover hardware information and perform out-of-band operations.
|
||||
'harvester-csi-driver-lvm': harvester-csi-driver-lvm is an add-on allowing users to create PVC through the LVM with local devices.
|
||||
'descheduler': 'The virtual machine auto balance optimizes workload scheduling by evicting pods that are not optimally placed according to administrator-defined policies.'
|
||||
vmImport:
|
||||
titles:
|
||||
basic: Basic
|
||||
|
||||
@ -142,6 +142,7 @@ export default {
|
||||
showYaml: false,
|
||||
spec: null,
|
||||
osType: 'linux',
|
||||
useTemplate: false,
|
||||
sshKey: [],
|
||||
maintenanceStrategies,
|
||||
maintenanceStrategy: 'Migrate',
|
||||
@ -273,7 +274,7 @@ export default {
|
||||
|
||||
needNewSecret() {
|
||||
// When creating a template it is always necessary to create a new secret.
|
||||
return this.showYaml ? false : this.resourceType === HCI.VM_VERSION || this.isCreate;
|
||||
return this.isCreate || this.showYaml ? false : this.resourceType === HCI.VM_VERSION;
|
||||
},
|
||||
|
||||
defaultTerminationSetting() {
|
||||
@ -1647,7 +1648,8 @@ export default {
|
||||
|
||||
secretRef: {
|
||||
handler(secret) {
|
||||
if (secret && this.resourceType !== HCI.BACKUP && this.resourceType !== HCI.VM) {
|
||||
// we should not inherit the secret if it's from VM template.
|
||||
if (secret && this.resourceType !== HCI.BACKUP && !this.useTemplate) {
|
||||
this.secretName = secret?.metadata.name;
|
||||
}
|
||||
},
|
||||
|
||||
@ -113,8 +113,9 @@ export default class HciAddonConfig extends HarvesterResource {
|
||||
|
||||
get displayName() {
|
||||
const isExperimental = this.metadata?.labels?.[HCI_ANNOTATIONS.ADDON_EXPERIMENTAL] === 'true';
|
||||
const name = this.metadata?.labels?.[HCI_ANNOTATIONS.ADDON_DISPLAYNAME] || this.metadata.name;
|
||||
|
||||
return isExperimental ? `${ this.metadata.name } (${ this.t('generic.experimental') })` : this.metadata.name;
|
||||
return isExperimental ? `${ name } (${ this.t('generic.experimental') })` : name;
|
||||
}
|
||||
|
||||
get customValidationRules() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user