mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 05:31:22 -03:30
Fix Instance Detail StatusLabel to show node_state.
This commit is contained in:
parent
08c18d71bf
commit
03685e51b5
@ -115,7 +115,6 @@ function InstanceDetails({ setBreadcrumb, instanceGroup }) {
|
||||
useEffect(() => {
|
||||
fetchDetails();
|
||||
}, [fetchDetails]);
|
||||
|
||||
const {
|
||||
error: healthCheckError,
|
||||
isLoading: isRunningHealthCheck,
|
||||
@ -148,7 +147,6 @@ function InstanceDetails({ setBreadcrumb, instanceGroup }) {
|
||||
[instance]
|
||||
)
|
||||
);
|
||||
|
||||
const debounceUpdateInstance = useDebounce(updateInstance, 200);
|
||||
|
||||
const handleChangeValue = (value) => {
|
||||
@ -200,7 +198,9 @@ function InstanceDetails({ setBreadcrumb, instanceGroup }) {
|
||||
<Detail
|
||||
label={t`Status`}
|
||||
value={
|
||||
<StatusLabel status={healthCheck?.errors ? 'error' : 'healthy'} />
|
||||
instance.node_state ? (
|
||||
<StatusLabel status={instance.node_state} />
|
||||
) : null
|
||||
}
|
||||
/>
|
||||
<Detail
|
||||
|
||||
@ -88,6 +88,7 @@ describe('<InstanceDetails/>', () => {
|
||||
enabled: true,
|
||||
managed_by_policy: true,
|
||||
node_type: 'hybrid',
|
||||
node_state: 'ready',
|
||||
},
|
||||
});
|
||||
InstancesAPI.readHealthCheckDetail.mockResolvedValue({
|
||||
|
||||
@ -113,7 +113,6 @@ function InstanceDetail({ setBreadcrumb, isK8s }) {
|
||||
setBreadcrumb(instance);
|
||||
}
|
||||
}, [instance, setBreadcrumb]);
|
||||
|
||||
const {
|
||||
error: healthCheckError,
|
||||
isLoading: isRunningHealthCheck,
|
||||
@ -186,7 +185,9 @@ function InstanceDetail({ setBreadcrumb, isK8s }) {
|
||||
<Detail
|
||||
label={t`Status`}
|
||||
value={
|
||||
<StatusLabel status={healthCheck?.errors ? 'error' : 'healthy'} />
|
||||
instance.node_state ? (
|
||||
<StatusLabel status={instance.node_state} />
|
||||
) : null
|
||||
}
|
||||
/>
|
||||
<Detail label={t`Node Type`} value={instance.node_type} />
|
||||
|
||||
@ -50,6 +50,7 @@ describe('<InstanceDetail/>', () => {
|
||||
enabled: true,
|
||||
managed_by_policy: true,
|
||||
node_type: 'hybrid',
|
||||
node_state: 'ready',
|
||||
},
|
||||
});
|
||||
InstancesAPI.readInstanceGroup.mockResolvedValue({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user