fix(platform): label storage health as reads
This commit is contained in:
@@ -14,6 +14,10 @@ function formatLag(value?: number | null) {
|
||||
return value == null ? '未接入' : value.toLocaleString();
|
||||
}
|
||||
|
||||
function storageReadStatus(health: OpsHealth | null) {
|
||||
return health?.tdengineWritable && health.mysqlWritable ? 'ok' : 'error';
|
||||
}
|
||||
|
||||
export function Quality() {
|
||||
const [issues, setIssues] = useState<QualityIssueRow[]>([]);
|
||||
const [health, setHealth] = useState<OpsHealth | null>(null);
|
||||
@@ -48,7 +52,11 @@ export function Quality() {
|
||||
<Row gutter={16}>
|
||||
<Col span={8}><Card bordered title="Kafka Lag">{formatLag(health?.kafkaLag)}</Card></Col>
|
||||
<Col span={8}><Card bordered title="Redis 在线 Key">{formatLag(health?.redisOnlineKeys)}</Card></Col>
|
||||
<Col span={8}><Card bordered title="存储写入">{health?.tdengineWritable && health.mysqlWritable ? '正常' : '异常'}</Card></Col>
|
||||
<Col span={8}>
|
||||
<Card bordered title="存储读取">
|
||||
<Tag color={statusColor[storageReadStatus(health)]}>{storageReadStatus(health) === 'ok' ? '正常' : '异常'}</Tag>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Card bordered title="质量问题" style={{ marginTop: 16 }}>
|
||||
<Form layout="horizontal" onSubmit={(values) => {
|
||||
|
||||
Reference in New Issue
Block a user