From 3333080616b346066a686126227da6bf54e5568a Mon Sep 17 00:00:00 2001 From: Kia Lam Date: Mon, 29 Aug 2022 21:22:28 -0700 Subject: [PATCH] Remove 'hop' node type from Add Instance form. --- .../screens/Instances/Shared/InstanceForm.js | 36 ++++--------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/awx/ui/src/screens/Instances/Shared/InstanceForm.js b/awx/ui/src/screens/Instances/Shared/InstanceForm.js index 15890d16a3..8c57889f34 100644 --- a/awx/ui/src/screens/Instances/Shared/InstanceForm.js +++ b/awx/ui/src/screens/Instances/Shared/InstanceForm.js @@ -12,18 +12,8 @@ import { FormColumnLayout } from 'components/FormLayout'; import FormField, { FormSubmitError } from 'components/FormField'; import FormActionGroup from 'components/FormActionGroup'; import { required } from 'util/validators'; -import AnsibleSelect from 'components/AnsibleSelect'; - -// This is hard coded because the API does not have the ability to send us a list that contains -// only the types of instances that can be added. Control and Hybrid instances cannot be added. - -const INSTANCE_TYPES = [ - { id: 'execution', name: t`Execution` }, - { id: 'hop', name: t`Hop` }, -]; function InstanceFormFields() { - const [instanceType, , instanceTypeHelpers] = useField('node_type'); const [enabled, , enabledHelpers] = useField('enabled'); return ( <> @@ -55,27 +45,13 @@ function InstanceFormFields() { type="number" isRequired /> - - ({ - key: type.id, - value: type.id, - label: type.name, - }))} - value={instanceType.value} - onChange={(e, opt) => { - instanceTypeHelpers.setValue(opt); - }} - /> - + name="node_type" + type="text" + isDisabled + />