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