feat(platform): label dashboard protocols as evidence
This commit is contained in:
@@ -153,12 +153,12 @@ export function Dashboard({ onOpenVehicle, onOpenQuality, onOpenVehicles }: { on
|
|||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<Card title="数据来源在线分布" bordered>
|
<Card title="来源证据在线分布" bordered>
|
||||||
<Table
|
<Table
|
||||||
pagination={false}
|
pagination={false}
|
||||||
dataSource={serviceSummary?.protocols ?? summary?.protocols ?? []}
|
dataSource={serviceSummary?.protocols ?? summary?.protocols ?? []}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: '数据来源', dataIndex: 'protocol' },
|
{ title: '来源证据', dataIndex: 'protocol' },
|
||||||
{ title: '在线', dataIndex: 'online' },
|
{ title: '在线', dataIndex: 'online' },
|
||||||
{ title: '总数', dataIndex: 'total' },
|
{ title: '总数', dataIndex: 'total' },
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ test('dashboard renders vehicle service summary metrics', async () => {
|
|||||||
expect(screen.getByText('暂无来源车辆')).toBeInTheDocument();
|
expect(screen.getByText('暂无来源车辆')).toBeInTheDocument();
|
||||||
expect(screen.getByText('461')).toBeInTheDocument();
|
expect(screen.getByText('461')).toBeInTheDocument();
|
||||||
expect(screen.getByText('身份未绑定')).toBeInTheDocument();
|
expect(screen.getByText('身份未绑定')).toBeInTheDocument();
|
||||||
|
expect(screen.getByText('来源证据在线分布')).toBeInTheDocument();
|
||||||
expect(fetchMock).toHaveBeenCalledWith('/api/vehicle-service/summary', undefined);
|
expect(fetchMock).toHaveBeenCalledWith('/api/vehicle-service/summary', undefined);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user