fix: fix the error of compute service state

Fix the error of compute service state on Platform Overview page

Closes-Bug: #2004462
Change-Id: I6ae88611f4431da4e63ed1c65c37b5fd04568373
This commit is contained in:
zhangke 2023-02-01 14:41:38 +08:00
parent fbc8fde808
commit 021bde48ef

View File

@ -20,6 +20,7 @@ import {
CheckCircleTwoTone,
CloseCircleTwoTone,
} from '@ant-design/icons/lib/icons';
import { serviceState } from 'resources/nova/service';
import styles from '../style.less';
export class ComputeService extends Component {
@ -39,8 +40,8 @@ export class ComputeService extends Component {
{item.host}
</Col>
<Col span={8} style={{ textAlign: 'center' }}>
<span>{item.status === 'enabled' ? t('Up') : t('Down')}</span>
{item.status === 'enabled' ? (
<span>{serviceState[item.state]}</span>
{item.state === 'up' ? (
<CheckCircleTwoTone
style={{ marginLeft: 12 }}
twoToneColor="#52c41a"