Skip to content

Commit d09ec34

Browse files
committed
feat(rancher-ui-extension): add "Force full cloning" option to advanced section
Signed-off-by: Kacper Szymański <kacper@stellatarum.com>
1 parent 09ea327 commit d09ec34

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

pkg/pve-node-driver/l10n/en-us.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ cluster:
4242
network:
4343
label: Network interface
4444
tooltip: Bus/Device of the network interface to read machine‘s IP address from (e.g. `net0`)
45+
cloning:
46+
label: Force full cloning
47+
tooltip: Linked clones are used by default
4548
hardware:
4649
header: Hardware
4750
processorSockets:

pkg/pve-node-driver/machine-config/pve.vue

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import { SECRET } from '@shell/config/types';
33
import { LabeledInput } from '@components/Form/LabeledInput';
44
import LabeledSelect from '@shell/components/form/LabeledSelect';
55
import UnitInput from '@shell/components/form/UnitInput';
6+
import Checkbox from '@components/Form/Checkbox/Checkbox';
67
78
export default {
89
components: {
910
LabeledInput,
1011
LabeledSelect,
1112
UnitInput,
13+
Checkbox,
1214
},
1315
props: {
1416
uuid: {
@@ -57,6 +59,7 @@ export default {
5759
processorCores: this.value.processorCores ? parseInt(this.value.processorCores) : "",
5860
memory: this.value.memory ? parseInt(this.value.memory) : "",
5961
memoryBalloon: this.value.memoryBalloon ? parseInt(this.value.memoryBalloon) : "",
62+
fullClone: this.value.fullClone ?? false,
6063
},
6164
}
6265
},
@@ -240,6 +243,7 @@ export default {
240243
this.value.processorCores = this.currentValue.processorCores.toString();
241244
this.value.memory = this.currentValue.memory.toString();
242245
this.value.memoryBalloon = this.currentValue.memoryBalloon.toString();
246+
this.value.fullClone = this.currentValue.fullClone;
243247
244248
this.$emit('validationChanged', true);
245249
},
@@ -636,7 +640,7 @@ export default {
636640
<h3>
637641
<t k="cluster.machineConfig.pve.ssh.header" />
638642
</h3>
639-
<div class="row">
643+
<div class="row mb-20">
640644
<div class="col span-6">
641645
<!-- SSH Username -->
642646
<LabeledInput
@@ -662,6 +666,22 @@ export default {
662666
/>
663667
</div>
664668
</div>
669+
670+
<h3>
671+
<t k="cluster.machineConfig.pve.template.header" />
672+
</h3>
673+
<div class="row">
674+
<div class="col span-6">
675+
<!-- Force full cloning -->
676+
<Checkbox
677+
:mode="mode"
678+
:disabled="disabled || (templates != null && !currentValue.template)"
679+
v-model:value="currentValue.fullClone"
680+
label-key="cluster.machineConfig.pve.template.cloning.label"
681+
tooltip-key="cluster.machineConfig.pve.template.cloning.tooltip"
682+
/>
683+
</div>
684+
</div>
665685
</portal>
666686
</div>
667687
</template>

0 commit comments

Comments
 (0)