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
Bug 1871103: Remove 'Template' field from VM wizard #6402
Bug 1871103: Remove 'Template' field from VM wizard #6402
Conversation
@irosenzw: This pull request references Bugzilla bug 1871103, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
@@ -73,14 +71,6 @@ export const VMSettingsTabComponent: React.FC<VMSettingsTabComponentProps> = ({ | |||
/> | |||
</FormField> | |||
</FormFieldMemoRow> |
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.
how will the user know which template was selected in virtualization/templates
?
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.
what do you propose ? keep the template's dropdown or add a label (or another component) to show the chosen template ?
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.
I guess having a label should be enough. Although there will probably be some logic , when the template doesn't exist, etc. So having a component might be beneficial.
307b29b
to
d469b72
Compare
@irosenzw: This pull request references Bugzilla bug 1871103, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1 similar comment
@irosenzw: This pull request references Bugzilla bug 1871103, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
import { FormField, FormFieldType } from '../../form/form-field'; | ||
import { ignoreCaseSort } from '../../../../utils/sort'; | ||
import { VMSettingsField } from '../../types'; | ||
import { |
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.
what about all these strings?
@@ -290,6 +291,7 @@ class CreateVMWizardComponent extends React.Component<CreateVMWizardComponentPro | |||
const wizardStateToProps = (state, { reduxID }) => ({ | |||
isLastTabErrorFatal: isLastStepErrorFatal(state, reduxID), | |||
tabsMetadata: getStepsMetadata(state, reduxID), | |||
userTemplateName: iGetCommonData(state, reduxID, VMWizardProps.userTemplateName), | |||
// fetch data from store to detect and fire changes | |||
...[...DetectCommonDataChanges] | |||
.filter((v) => v !== VMWizardProps.storageClassConfigMap) // passed directly |
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.
we don't have to load all the userTemplates anymore. Just the one is enough.
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.
plus we don't have to load it at all when we are not in the userTemplateMode
@@ -73,14 +71,6 @@ export const VMSettingsTabComponent: React.FC<VMSettingsTabComponentProps> = ({ | |||
/> | |||
</FormField> | |||
</FormFieldMemoRow> | |||
<UserTemplates | |||
userTemplateField={getField(VMSettingsField.USER_TEMPLATE)} |
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.
we can remove VMSettingsField.USER_TEMPLATE field as it is not used anymore
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.
plus all the not needed logic
@matthewcarleton what is your opinion on this design and what should we do when the template is missing? (somebody has wrong url) |
Having the template name in the title of the wizard works. We could also have For when the template is missing |
@matthewcarleton can you please attach a design proposal so we can all be on the same page of what you are suggesting ? |
I don't expect anything to be wrong template. I think the only issue will be that the user saved a template creation url and is trying to use, while that template has been already deleted |
Yes in the case where someone is trying to create from a template and then another user deletes that template it would be nice if they are aware right away and not have to wait for the creation to fail.
Not sure if we can provide any additional info around the user that deleted it can we? |
yes, but not that likely - you go to create from a template and somebody deletes it nevertheless we should add a guard against it |
6857641
to
f57e0ba
Compare
8f7938e
to
60793ca
Compare
fd79b5a
to
668c01f
Compare
@@ -89,6 +94,8 @@ const CreateVMWizardFooterComponent: React.FC<CreateVMWizardFooterComponentProps | |||
const areMainTabsHidden = VM_WIZARD_DIFFICULT_TABS.some((tab) => steps[tab].isHidden); | |||
const isLastStepValid = steps[VMWizardTab.RESULT].isValid; | |||
|
|||
const isValidUserTemplate = !userTemplateName || (userTemplateName && isUserTemplateValid); |
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.
it would make more sense to call this isInvalidUserTemplate IMO
userTemplateName: { | ||
value: props.userTemplateName, | ||
initialized: false, | ||
isValid: true, |
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.
we should not load all the userTemplates, but just the one we need.
In that case we don't need isValid value here, because the validity is already present in FirehoseResult object
It is a fluid value. It could easily happen that we open wizard and then somebody deletes the userTemplate - and in that case the wizard stops being valid
@@ -10,6 +10,32 @@ import { K8sKind } from '@console/internal/module/k8s'; | |||
import { TemplateModel } from '@console/internal/models'; | |||
import { DataVolumeModel, VirtualMachineModel } from '../../../models'; | |||
import { getExtraWSQueries } from '../selectors/selectors'; | |||
import { iGetUserTemplateName, iGetUserTemplateValidity } from '../selectors/immutable/template'; | |||
|
|||
const userTemplateError = (state: any, wizardReduxID: string): Error => { |
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.
if we load one use template in that case we don't need a special handler like this one but a generic handler like VMWizardProps.userTemplates have right now
@@ -37,6 +37,27 @@ export const vmWizardInternalActions: VMWizardInternalActions = { | |||
}, | |||
type: InternalActionType.Update, | |||
}), | |||
[InternalActionType.UpdateUserTemplateName]: (id, value) => ({ |
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.
that is too many actions and it will not scale. Please create just a generic action like setCommonDataDataValue
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.
and it seems you are dispatching it in just one place, so you don't need such granularity
}; | ||
|
||
const selectedUserTemplateUpdater = (options: UpdateOptions) => { | ||
const { id, prevState, dispatch, getState } = options; | ||
const state = getState(); | ||
if (!hasVmSettingsChanged(prevState, state, id, VMSettingsField.USER_TEMPLATE)) { | ||
|
||
if (!hasCommonDataChanged(prevState, state, id, VMWizardProps.userTemplateName)) { |
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.
we don't expect the name to change so the logic has to be redone.
VMSettingsField.USER_TEMPLATE, | ||
) | ||
) && | ||
!hasCommonDataChanged(prevState, state, id, VMWizardProps.userTemplateName) |
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.
no need to have it here
668c01f
to
e3edc7f
Compare
}); | ||
const stateToProps = (state, { wizardReduxID }) => { | ||
const iUserTemplate = iGetCommonData(state, wizardReduxID, VMWizardProps.userTemplate); | ||
const isInvalidUserTemplate = iUserTemplate ? !!iGetLoadError(iUserTemplate) : false; |
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.
it should be prob also disabled when it is loading
getResource(TemplateModel, { | ||
namespace: 'openshift', | ||
prop: VMWizardProps.commonTemplates, | ||
matchLabels: { [TEMPLATE_TYPE_LABEL]: TEMPLATE_TYPE_BASE }, | ||
}), | ||
getResource(TemplateModel, { |
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.
this websocket should only run when isCreateTemplate
: operatingSystemsNative; | ||
|
||
if (openshiftFlag) { | ||
operatingSystems.push(iUserTemplate.toJS()); |
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.
can fail on NPE
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.
can we refactor this function so that we gather info only from iUserTemplate
when we have it. Otherwise from iCommonTemplates
?
@@ -117,11 +120,12 @@ const CreateVMWizardFooterComponent: React.FC<CreateVMWizardFooterComponentProps | |||
const isFinishingStep = [VMWizardTab.REVIEW, VMWizardTab.RESULT].includes(activeStepID); | |||
const isLastStep = activeStepID === VMWizardTab.RESULT; | |||
|
|||
const isNextButtonDisabled = isAnyStepLocked; | |||
const isReviewButtonDisabled = isAnyStepLocked; | |||
const isNextButtonDisabled = isAnyStepLocked || isInvalidUserTemplate; |
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.
after some consideration. These metadata are used in multiple places - that is why this will not disable left nav when needed. We should track this invalidity in redux. I think a good place for this would be finalizeTabResolver
. You can play with the logic there and get inspired with finalizeImportProviderStateUpdate
.
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.
first, I don't understand why it won't disable the left nav when needed, can you provide an example.
second, can we maybe add the functionality as a followup ?
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.
delete the template why you are in a wizard. IMO it is better to do it here, as these inconsistencies add up and are hard to follow up.
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.
another valid option IMO is to disable just the review and create
button and let the wizard be navigable with the error on the top. But the navigation would be at least consistent
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.
when the template gets deleted all the nav buttons are disabled (next
, back
, review and create
)
and when the template gets create while in the wizard they are enabled again.
I don't see what is wrong with the logic here
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 nav is enabled and it is possible to jump to other tabs
}; | ||
|
||
const selectedUserTemplateUpdater = (options: UpdateOptions) => { | ||
const { id, prevState, dispatch, getState } = options; | ||
const state = getState(); | ||
if (!hasVmSettingsChanged(prevState, state, id, VMSettingsField.USER_TEMPLATE)) { | ||
|
||
if (!hasCommonDataChanged(prevState, state, id, VMWizardProps.isUserTemplateInitialized)) { |
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.
why should here be something instead when the logic gets executed there?
const params = { | ||
userTemplate, | ||
userTemplateName, |
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.
can we remove it from params. It does not seem necessary to have it there.
const vanillaTemplates = immutableListToShallowJS(iGetLoadedData(commonTemplates)); | ||
|
||
if (isUserTemplateValid) { | ||
vanillaTemplates.push(userTemplate); |
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.
lets just use the one userTemplate when resolving os/flavor/workload
concatImmutableLists(iGetLoadedData(commonTemplates), iGetLoadedData(userTemplates)), | ||
); | ||
const isUserTemplateLoaded = iGetIsLoaded(iUserTemplate); | ||
const userTemplateName: string = isUserTemplateLoaded |
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.
same - no need to resolve the name here
| ChangedCommonDataProp; | ||
|
||
export type ChangedCommonData = Set<ChangedCommonDataProp>; | ||
|
||
export const DetectCommonDataChanges = new Set<ChangedCommonDataProp>([ | ||
VMWizardProps.activeNamespace, | ||
VMWizardProps.openshiftFlag, | ||
VMWizardProps.userTemplate, | ||
VMWizardProps.virtualMachines, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -45,12 +45,14 @@ export const getOperatingSystems = (templates: TemplateKind[], userTemplate: str | |||
|
|||
export const getWorkloadProfiles = ( | |||
templates: TemplateKind[], | |||
{ flavor, os, userTemplate }: { flavor: string; os: string; userTemplate: string }, | |||
{ flavor, os, userTemplateName }: { flavor: string; os: string; userTemplateName: string }, |
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.
repeating myself, but let's not pass the name but just the [template]
for userTemplates
We could do this, but I am against it at this time. This component handles all types of errors (of all resources and casuses) and if we start adding customization like this one on top of each other iit will become a mess. We have to come either with a better generic solution to these errors or add a good extension framework. |
2251e43
to
6de9114
Compare
let operatingSystems = []; | ||
|
||
if (openshiftFlag && iUserTemplate) { | ||
operatingSystems.push(getTemplateOperatingSystems([iUserTemplate.toJS()])); |
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.
please use toJSON here or toShallowJS
]); | ||
} | ||
return getTemplateOperatingSystems(getTemplatesOfLabelType(templates, TEMPLATE_TYPE_BASE)); | ||
}; | ||
|
||
export const getWorkloadProfiles = ( | ||
templates: TemplateKind[], | ||
{ flavor, os, userTemplate }: { flavor: string; os: string; userTemplate: string }, | ||
{ flavor, os, isUserTemplateValid }: { flavor: string; os: string; isUserTemplateValid: boolean }, |
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.
why do we need isUserTemplateValid variable? can we just pass templates and that is all?
@@ -34,48 +34,46 @@ export const getFlavorLabel = (flavor: string) => { | |||
return undefined; | |||
}; | |||
|
|||
export const getOperatingSystems = (templates: TemplateKind[], userTemplate: string) => { | |||
if (userTemplate) { | |||
export const getOperatingSystems = (templates: TemplateKind[], userTemplateName: string) => { |
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.
same, why do we need to pass userTemplateName?
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.
@irosenzw please take a look. This should work the same way as getWorkloadProfiles.
workload, | ||
os, | ||
isUserTemplateValid, | ||
}: { workload: string; os: string; isUserTemplateValid: boolean }, |
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.
same
const isUserTemplateValid = iGetIsLoaded(iUserTemplate) && !iGetLoadError(iUserTemplate); | ||
|
||
const templates = isUserTemplateValid | ||
? [iGetLoadedData(iUserTemplate).toJS()] |
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.
please prefer toShallowJS here
6de9114
to
fec2f7d
Compare
let operatingSystems = []; | ||
|
||
if (openshiftFlag && iUserTemplate) { | ||
operatingSystems.push(getTemplateOperatingSystems([toShallowJS(iUserTemplate)])); |
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.
array in an array. better to have an assignment?
@@ -43,7 +45,6 @@ export const WorkloadProfile: React.FC<WorkloadProps> = React.memo( | |||
field={workloadProfileField} | |||
fieldType={FormFieldType.SELECT} | |||
loadingResources={{ |
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.
it should be in loading resources if the wizard is in userTemplate mode
|
||
const workloadProfiles = getWorkloadProfiles(vanillaTemplates, params); | ||
const workloadProfiles = getWorkloadProfiles(templates, params); | ||
|
||
const loadingResources = openshiftFlag | ||
? { |
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.
loadingResources: same here
fec2f7d
to
0804db0
Compare
+1 to improving this in general - I think errors are most helpful when they are specific. These generic errors don't help the user take action to fix the problem. |
commonTemplates, | ||
iUserTemplate, |
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.
this should be only assigned in userTemplate mode
}; | ||
|
||
const selectedUserTemplateUpdater = (options: UpdateOptions) => { | ||
const { id, prevState, dispatch, getState } = options; | ||
const state = getState(); | ||
if (!hasVmSettingsChanged(prevState, state, id, VMSettingsField.USER_TEMPLATE)) { | ||
|
||
if (!hasCommonDataChanged(prevState, state, id, VMWizardProps.isUserTemplateInitialized)) { |
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.
I don't see any issue with it. It seems pretty simple:
const selectUserTemplateOnLoadedUpdater = (options: UpdateOptions) => {
const { id, dispatch, getState } = options;
const state = getState();
if (
iGetCommonData(state, id, VMWizardProps.isUserTemplateInitialized) ||
!iGetLoadedCommonData(state, id, VMWizardProps.userTemplate)
) {
return;
}
dispatch(
vmWizardInternalActions[InternalActionType.UpdateCommonDataValue](
id,
[VMWizardProps.isUserTemplateInitialized],
true,
),
);
const iUserTemplate = iGetLoadedCommonData(state, id, VMWizardProps.userTemplate);
const isDisabled = asDisabled(iUserTemplate != null, VMWizardProps.userTemplate);
dispatch(
vmWizardInternalActions[InternalActionType.UpdateVmSettings](id, {
[VMSettingsField.PROVISION_SOURCE_TYPE]: { isDisabled },
[VMSettingsField.CONTAINER_IMAGE]: { isDisabled },
[VMSettingsField.IMAGE_URL]: { isDisabled },
[VMSettingsField.OPERATING_SYSTEM]: { isDisabled },
[VMSettingsField.CLONE_COMMON_BASE_DISK_IMAGE]: {
isHidden: asHidden(iUserTemplate != null, VMWizardProps.userTemplate),
},
}),
);
prefillVmTemplateUpdater(options);
};
@@ -34,48 +34,46 @@ export const getFlavorLabel = (flavor: string) => { | |||
return undefined; | |||
}; | |||
|
|||
export const getOperatingSystems = (templates: TemplateKind[], userTemplate: string) => { | |||
if (userTemplate) { | |||
export const getOperatingSystems = (templates: TemplateKind[], userTemplateName: string) => { |
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.
@irosenzw please take a look. This should work the same way as getWorkloadProfiles.
81a5144
to
4be8724
Compare
if (isCreateTemplate) { | ||
return CREATE_VM_TEMPLATE; | ||
} | ||
if (isProviderImport) { | ||
return IMPORT_VM; | ||
} | ||
return CREATE_VM; | ||
return iUserTemplate ? `${CREATE_VM} from ${iGetName(iUserTemplate)} template` : CREATE_VM; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
already changed it
); | ||
const isUserTemplateValid = iGetIsLoaded(iUserTemplate) && !iGetLoadError(iUserTemplate); | ||
|
||
const templates = isUserTemplateValid |
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.
There are 3 options here
if iUserTemplate {
if isUserTemplateValid {
use iUserTemplate
} else {
use []
}
} else {
use commonTemplates
}
const vanillaTemplates = immutableListToShallowJS( | ||
concatImmutableLists(iGetLoadedData(commonTemplates), iGetLoadedData(userTemplates)), | ||
); | ||
const templates = isUserTemplateValid |
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.
same here, there are 3 options
commonTemplates, | ||
cnvBaseImages, | ||
} | ||
: {}; | ||
|
||
if (openshiftFlag && iUserTemplate) { | ||
Object.assign(loadingResources, { [iUserTemplate]: iUserTemplate }); |
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.
Object.assign(loadingResources, { [iUserTemplate]: iUserTemplate }); | |
Object.assign(loadingResources, { iUserTemplate: iUserTemplate }); |
the key is just called iUserTemplate (this notation would resolve in a key called [object Object]
)
}; | ||
|
||
if (iUserTemplate) { | ||
Object.assign(loadingResources, { [iUserTemplate]: iUserTemplate }); |
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.
Object.assign(loadingResources, { [iUserTemplate]: iUserTemplate }); | |
Object.assign(loadingResources, { iUserTemplate: iUserTemplate }); |
@@ -144,7 +147,7 @@ export const OSFlavor: React.FC<OSFlavorProps> = React.memo( | |||
checkboxDescription: '', | |||
}; | |||
|
|||
if (!userTemplate) { | |||
if (!isUserTemplateValid) { |
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.
if (!isUserTemplateValid) { | |
if (!iUserTemplate) { |
like this?
let operatingSystemValidation; | ||
let flavorValidation; | ||
|
||
if ( | ||
iGetIsLoaded(commonTemplates) && | ||
iGetIsLoaded(userTemplates) && | ||
(iGetIsLoaded(commonTemplates) || isUserTemplateValid) && |
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.
just loaded not valid and &&
7656c41
to
c3f7ea3
Compare
@@ -88,7 +56,7 @@ const selectedUserTemplateUpdater = (options: UpdateOptions) => { | |||
[VMSettingsField.IMAGE_URL]: { isDisabled }, | |||
[VMSettingsField.OPERATING_SYSTEM]: { isDisabled }, |
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.
I suppose we should disable also workload profile since it cannot be changed for the user template
@@ -118,7 +121,7 @@ const CreateVMWizardFooterComponent: React.FC<CreateVMWizardFooterComponentProps | |||
const isLastStep = activeStepID === VMWizardTab.RESULT; | |||
|
|||
const isNextButtonDisabled = isAnyStepLocked; | |||
const isReviewButtonDisabled = isAnyStepLocked; | |||
const isReviewButtonDisabled = isAnyStepLocked || isInvalidUserTemplate; |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
c3f7ea3
to
9660223
Compare
@@ -118,7 +121,8 @@ const CreateVMWizardFooterComponent: React.FC<CreateVMWizardFooterComponentProps | |||
const isLastStep = activeStepID === VMWizardTab.RESULT; | |||
|
|||
const isNextButtonDisabled = isAnyStepLocked; | |||
const isReviewButtonDisabled = isAnyStepLocked; | |||
const isReviewButtonDisabled = isAnyStepLocked || isInvalidUserTemplate; | |||
const isCreateButtonDisabled = isInvalidUserTemplate; |
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.
const isCreateButtonDisabled = isInvalidUserTemplate; | |
const isCreateButtonDisabled = isNextButtonDisabled || isInvalidUserTemplate; |
When creating a VM from template the title will be: `Create Virtual Machine from <template name>` Signed-off-by: Ido Rosenzwig <irosenzw@redhat.com>
9660223
to
b7c474c
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: irosenzw, suomiy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@irosenzw: All pull requests linked via external trackers have merged: Bugzilla bug 1871103 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When creating a VM from template the wizard title will be:
Create Virtual Machine from <template name> template
Signed-off-by: Ido Rosenzwig irosenzw@redhat.com