feat: disable label (#310)

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
Yiya Chen 2025-05-23 16:23:09 +08:00 committed by GitHub
parent 796d98e61a
commit b689e3aacf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -67,5 +67,6 @@ export const HCI = {
VM_DEVICE_ALLOCATION_DETAILS: 'harvesterhci.io/deviceAllocationDetails', VM_DEVICE_ALLOCATION_DETAILS: 'harvesterhci.io/deviceAllocationDetails',
SVM_BACKUP_ID: 'harvesterhci.io/svmbackupId', SVM_BACKUP_ID: 'harvesterhci.io/svmbackupId',
DISABLE_LONGHORN_V2_ENGINE: 'node.longhorn.io/disable-v2-data-engine', DISABLE_LONGHORN_V2_ENGINE: 'node.longhorn.io/disable-v2-data-engine',
K8S_ARCH: 'kubernetes.io/arch' K8S_ARCH: 'kubernetes.io/arch',
IMAGE_DISPLAY_NAME: 'harvesterhci.io/imageDisplayName'
}; };

View File

@ -110,6 +110,7 @@ export default {
headers: {}, headers: {},
fileUrl: '', fileUrl: '',
file: '', file: '',
HCI_ANNOTATIONS,
}; };
}, },
@ -595,6 +596,8 @@ export default {
:pad-left="false" :pad-left="false"
:read-allowed="false" :read-allowed="false"
:value-can-be-empty="true" :value-can-be-empty="true"
:toggle-filter="true"
:protected-keys="[HCI_ANNOTATIONS.IMAGE_DISPLAY_NAME]"
@focusKey="focusKey" @focusKey="focusKey"
@update:value="value.setLabels($event)" @update:value="value.setLabels($event)"
> >
@ -611,7 +614,7 @@ export default {
<input <input
v-else v-else
v-model="row[valueName]" v-model="row[valueName]"
:disabled="isView" :disabled="isView || row[keyName] === HCI_ANNOTATIONS.IMAGE_DISPLAY_NAME"
:type="'text'" :type="'text'"
:placeholder="t('keyValue.valuePlaceholder')" :placeholder="t('keyValue.valuePlaceholder')"
autocorrect="off" autocorrect="off"