mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 18:07:33 -02:30
Disable health check button if managed
Also, update ui screen tests to expect injecting "listener_port: null" if listener_port is empty Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
@@ -36,6 +36,7 @@ describe('<InstanceAdd />', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
expect(InstancesAPI.create).toHaveBeenCalledWith({
|
expect(InstancesAPI.create).toHaveBeenCalledWith({
|
||||||
|
listener_port: null, // injected if listener_port is not set
|
||||||
node_type: 'hop',
|
node_type: 'hop',
|
||||||
});
|
});
|
||||||
expect(history.location.pathname).toBe('/instances/13/details');
|
expect(history.location.pathname).toBe('/instances/13/details');
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ function InstanceDetail({ setBreadcrumb, isK8s }) {
|
|||||||
isDisabled={
|
isDisabled={
|
||||||
!config?.me?.is_superuser ||
|
!config?.me?.is_superuser ||
|
||||||
instance.health_check_pending ||
|
instance.health_check_pending ||
|
||||||
!instance.managed
|
instance.managed
|
||||||
}
|
}
|
||||||
variant="primary"
|
variant="primary"
|
||||||
ouiaId="health-check-button"
|
ouiaId="health-check-button"
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ describe('<InstanceDetail/>', () => {
|
|||||||
cpu_capacity: 32,
|
cpu_capacity: 32,
|
||||||
mem_capacity: 38,
|
mem_capacity: 38,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
managed: false,
|
||||||
managed_by_policy: true,
|
managed_by_policy: true,
|
||||||
node_type: 'execution',
|
node_type: 'execution',
|
||||||
node_state: 'ready',
|
node_state: 'ready',
|
||||||
|
|||||||
Reference in New Issue
Block a user