mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
Add container group flag to add/edit data
This commit is contained in:
committed by
Shane McDonald
parent
1c4a376758
commit
098ec63944
@@ -33,6 +33,7 @@ function ContainerGroupAdd() {
|
|||||||
pod_spec_override: values.override
|
pod_spec_override: values.override
|
||||||
? getPodSpecValue(values.pod_spec_override)
|
? getPodSpecValue(values.pod_spec_override)
|
||||||
: null,
|
: null,
|
||||||
|
is_container_group: true,
|
||||||
});
|
});
|
||||||
history.push(`/instance_groups/container_group/${response.id}/details`);
|
history.push(`/instance_groups/container_group/${response.id}/details`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ const initialPodSpec = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
is_container_group: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,6 +81,7 @@ describe('<ContainerGroupAdd/>', () => {
|
|||||||
expect(InstanceGroupsAPI.create).toHaveBeenCalledWith({
|
expect(InstanceGroupsAPI.create).toHaveBeenCalledWith({
|
||||||
...instanceGroupCreateData,
|
...instanceGroupCreateData,
|
||||||
credential: 71,
|
credential: 71,
|
||||||
|
is_container_group: true,
|
||||||
});
|
});
|
||||||
expect(wrapper.find('FormSubmitError').length).toBe(0);
|
expect(wrapper.find('FormSubmitError').length).toBe(0);
|
||||||
expect(history.location.pathname).toBe(
|
expect(history.location.pathname).toBe(
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ function ContainerGroupEdit({ instanceGroup }) {
|
|||||||
name: values.name,
|
name: values.name,
|
||||||
credential: values.credential ? values.credential.id : null,
|
credential: values.credential ? values.credential.id : null,
|
||||||
pod_spec_override: values.override ? values.pod_spec_override : null,
|
pod_spec_override: values.override ? values.pod_spec_override : null,
|
||||||
|
is_container_group: true,
|
||||||
});
|
});
|
||||||
history.push(detailsIUrl);
|
history.push(detailsIUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ describe('<ContainerGroupEdit/>', () => {
|
|||||||
...updatedInstanceGroup,
|
...updatedInstanceGroup,
|
||||||
credential: 12,
|
credential: 12,
|
||||||
pod_spec_override: null,
|
pod_spec_override: null,
|
||||||
|
is_container_group: true,
|
||||||
});
|
});
|
||||||
expect(history.location.pathname).toEqual(
|
expect(history.location.pathname).toEqual(
|
||||||
'/instance_groups/container_group/123/details'
|
'/instance_groups/container_group/123/details'
|
||||||
|
|||||||
Reference in New Issue
Block a user