@@ -20,8 +20,8 @@ import { getOperatorVersion, checkGatedFeatureCompatibility, MACH_REG_CONFIG_DEF
20
20
import { OLD_DEFAULT_CREATION_YAML , DEFAULT_CREATION_YAML } from ' ../models/elemental.cattle.io.machineregistration' ;
21
21
22
22
export default {
23
- name: ' MachineRegistrationEditView' ,
24
- components: {
23
+ name: ' MachineRegistrationEditView' ,
24
+ components: {
25
25
Loading,
26
26
CruResource,
27
27
YamlEditor,
@@ -41,18 +41,14 @@ export default {
41
41
mode: {
42
42
type: String ,
43
43
required: true
44
- },
45
- resource: {
46
- type: String ,
47
- required: true
48
- },
44
+ }
49
45
},
50
46
async fetch () {
51
47
// in CREATE mode, since YAMLEditor doesn't live update, we need to force a re-render of the component for it to update
52
48
if (this .mode === _CREATE ) {
53
49
const operatorVersion = await getOperatorVersion (this .$store );
54
50
55
- this .newCloudConfigcompatibilityCheck = checkGatedFeatureCompatibility (this .resource , this .mode , MACH_REG_CONFIG_DEFAULTS , operatorVersion);
51
+ this .newCloudConfigcompatibilityCheck = checkGatedFeatureCompatibility (this .value . type , this .mode , MACH_REG_CONFIG_DEFAULTS , operatorVersion);
56
52
57
53
if (! this .value .spec ) {
58
54
this .value .spec = this .newCloudConfigcompatibilityCheck ? DEFAULT_CREATION_YAML : OLD_DEFAULT_CREATION_YAML ;
@@ -208,7 +204,7 @@ export default {
208
204
<div class =" col span-12" >
209
205
<h3 >{{ t('elemental.machineRegistration.create.configuration') }}</h3 >
210
206
<NameNsDescription
211
- v-model =" value"
207
+ :value =" value"
212
208
:mode =" mode"
213
209
:description-hidden =" true"
214
210
:namespaced =" false"
@@ -221,7 +217,7 @@ export default {
221
217
<YamlEditor
222
218
:key =" rerender"
223
219
ref =" yamleditor"
224
- v-model =" cloudConfig"
220
+ v-model:value =" cloudConfig"
225
221
class =" mb-20"
226
222
:editor-mode =" editorMode"
227
223
/>
@@ -273,7 +269,7 @@ export default {
273
269
:title =" t('labels.labels.title')"
274
270
:read-allowed =" false"
275
271
:value-can-be-empty =" true"
276
- @input =" updateLabels($event)"
272
+ @update:value =" updateLabels($event)"
277
273
/>
278
274
</div >
279
275
<div class =" row mb-10" >
@@ -286,7 +282,7 @@ export default {
286
282
:title =" t('labels.annotations.title')"
287
283
:read-allowed =" false"
288
284
:value-can-be-empty =" true"
289
- @input =" value.setAnnotations($event, 'machineInventoryAnnotations', true)"
285
+ @update:value =" value.setAnnotations($event, 'machineInventoryAnnotations', true)"
290
286
/>
291
287
</div >
292
288
</Tab >
@@ -313,7 +309,7 @@ export default {
313
309
:title =" t('labels.labels.title')"
314
310
:read-allowed =" false"
315
311
:value-can-be-empty =" true"
316
- @input =" value.setLabels($event)"
312
+ @update:value =" value.setLabels($event)"
317
313
/>
318
314
</div >
319
315
<div class =" row mb-10" >
@@ -326,7 +322,7 @@ export default {
326
322
:title =" t('labels.annotations.title')"
327
323
:read-allowed =" false"
328
324
:value-can-be-empty =" true"
329
- @input =" value.setAnnotations($event)"
325
+ @update:value =" value.setAnnotations($event)"
330
326
/>
331
327
</div >
332
328
</Tab >
0 commit comments