mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
Merge pull request #180 from harvester/mergify/bp/release-harvester-v1.5/pr-175
Add label tab to vm template (backport #175)
This commit is contained in:
commit
477206d8d0
@ -6,12 +6,11 @@ import { Checkbox } from '@components/Form/Checkbox';
|
|||||||
import CruResource from '@shell/components/CruResource';
|
import CruResource from '@shell/components/CruResource';
|
||||||
import NameNsDescription from '@shell/components/form/NameNsDescription';
|
import NameNsDescription from '@shell/components/form/NameNsDescription';
|
||||||
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
||||||
import Labels from '@shell/components/form/Labels';
|
import { Banner } from '@components/Banner';
|
||||||
import KeyValue from '@shell/components/form/KeyValue';
|
import KeyValue from '@shell/components/form/KeyValue';
|
||||||
import NodeScheduling from '@shell/components/form/NodeScheduling';
|
import NodeScheduling from '@shell/components/form/NodeScheduling';
|
||||||
import PodAffinity from '@shell/components/form/PodAffinity';
|
import PodAffinity from '@shell/components/form/PodAffinity';
|
||||||
import UnitInput from '@shell/components/form/UnitInput';
|
import UnitInput from '@shell/components/form/UnitInput';
|
||||||
|
|
||||||
import { randomStr } from '@shell/utils/string';
|
import { randomStr } from '@shell/utils/string';
|
||||||
import { _CONFIG, _EDIT, _VIEW } from '@shell/config/query-params';
|
import { _CONFIG, _EDIT, _VIEW } from '@shell/config/query-params';
|
||||||
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
|
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
|
||||||
@ -47,7 +46,7 @@ export default {
|
|||||||
PodAffinity,
|
PodAffinity,
|
||||||
Reserved,
|
Reserved,
|
||||||
UnitInput,
|
UnitInput,
|
||||||
Labels,
|
Banner,
|
||||||
KeyValue,
|
KeyValue,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -321,34 +320,44 @@ export default {
|
|||||||
</Tab>
|
</Tab>
|
||||||
|
|
||||||
<Tab
|
<Tab
|
||||||
:name="t('generic.labels')"
|
name="labels"
|
||||||
:label="t('harvester.tab.instanceLabel')"
|
:label="t('generic.labels')"
|
||||||
:weight="-5"
|
:weight="-9"
|
||||||
>
|
>
|
||||||
<Labels
|
<Banner color="info">
|
||||||
:default-container-class="'labels-and-annotations-container'"
|
<t k="harvester.virtualMachine.labels.banner" />
|
||||||
:value="value"
|
</Banner>
|
||||||
|
<KeyValue
|
||||||
|
key="labels"
|
||||||
|
:value="value.labels"
|
||||||
|
:add-label="t('labels.addLabel')"
|
||||||
:mode="mode"
|
:mode="mode"
|
||||||
:display-side-by-side="false"
|
:read-allowed="false"
|
||||||
:show-annotations="false"
|
:value-can-be-empty="true"
|
||||||
:show-label-title="false"
|
@update:value="value.setLabels($event)"
|
||||||
>
|
/>
|
||||||
<template #labels="{toggler}">
|
|
||||||
<KeyValue
|
|
||||||
key="labels"
|
|
||||||
:value="value.instanceLabels"
|
|
||||||
:protected-keys="value.systemLabels || []"
|
|
||||||
:toggle-filter="toggler"
|
|
||||||
:add-label="t('labels.addLabel')"
|
|
||||||
:mode="mode"
|
|
||||||
:read-allowed="false"
|
|
||||||
:value-can-be-empty="true"
|
|
||||||
@input="value.setInstanceLabels($event)"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</Labels>
|
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|
||||||
|
<Tab
|
||||||
|
name="instanceLabel"
|
||||||
|
:label="t('harvester.tab.instanceLabel')"
|
||||||
|
:weight="-10"
|
||||||
|
>
|
||||||
|
<Banner color="info">
|
||||||
|
<t k="harvester.virtualMachine.instanceLabels.banner" />
|
||||||
|
</Banner>
|
||||||
|
<KeyValue
|
||||||
|
key="instance-labels"
|
||||||
|
:value="value.instanceLabels"
|
||||||
|
:protected-keys="value.systemLabels || []"
|
||||||
|
:toggle-filter="toggler"
|
||||||
|
:add-label="t('labels.addLabel')"
|
||||||
|
:mode="mode"
|
||||||
|
:read-allowed="false"
|
||||||
|
:value-can-be-empty="true"
|
||||||
|
@update:value="value.setInstanceLabels($event)"
|
||||||
|
/>
|
||||||
|
</Tab>
|
||||||
<Tab
|
<Tab
|
||||||
name="advanced"
|
name="advanced"
|
||||||
:label="t('harvester.tab.advanced')"
|
:label="t('harvester.tab.advanced')"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user