-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: failed to create vm template on Rancher managed Harvester #55
Conversation
Signed-off-by: Yi-Ya Chen <[email protected]>
|
||
updateNameNsDescriptionValue(newValue) { | ||
this.templateValue.metadata.name = newValue.metadata.name; | ||
this.templateValue.metadata.namespace = newValue.metadata.namespace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that line 166 is missing this.templateValue?.metadata?.name
in create mode.
Fix it by updating templateValue as the user types.
@@ -226,7 +231,7 @@ export default { | |||
:mode="realTemplateMode" | |||
name-label="harvester.vmTemplate.nameNsDescription.name" | |||
:namespaced="true" | |||
@update:value="$emit('update:value', $event)" | |||
@update:value="updateNameNsDescriptionValue" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update value should be templateValue
which matches the logic in saveVMT(), even there is no parent component needs $emit('update:templateValue', $event)
, but it's fine and existing pattern for NameNsDescription
to emit an action. (You can search <NameNsDescription
in harvester-ui-extension)
<NameNsDescription
:value="templateValue"
:mode="realTemplateMode"
name-label="harvester.vmTemplate.nameNsDescription.name"
:namespaced="true"
@update:value="$emit('update:templateValue', $event)"
/>
Remember to update emits: ['update:templateValue']
in line 32.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update in commit 4d48e75.
Signed-off-by: Yi-Ya Chen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Unable to create vm template on Rancher managed Harvester successfully
PR Checklists
Related Issue
[BUG] Failed to create vm template on Rancher managed Harvester #7183
Test screenshot/video
Screen.Recording.2024-12-30.at.4.58.04.PM.mov
Extra technical notes summary