fix: dashboard model data format

This commit is contained in:
jialin
2026-02-10 11:33:24 +08:00
parent 9418e5b635
commit 9b498d10d5
@@ -55,7 +55,13 @@ const ActiveTable = () => {
{ {
title: intl.formatMessage({ id: 'models.form.replicas' }), title: intl.formatMessage({ id: 'models.form.replicas' }),
dataIndex: 'instance_count', dataIndex: 'instance_count',
key: 'instance_count' key: 'instance_count',
render(text: any, record: any) {
if (record.provider_name) {
return <span>N/A</span>;
}
return text;
}
}, },
{ {
title: intl.formatMessage({ id: 'dashboard.tokens' }), title: intl.formatMessage({ id: 'dashboard.tokens' }),
@@ -64,9 +70,7 @@ const ActiveTable = () => {
ellipsis: true, ellipsis: true,
render: (text: any, record: any) => { render: (text: any, record: any) => {
let val = text; let val = text;
if (record.provider_name) {
return <span>N/A</span>;
}
if (!text) { if (!text) {
val = !NACategories.includes(record.categories?.[0]) ? 'N/A' : 0; val = !NACategories.includes(record.categories?.[0]) ? 'N/A' : 0;
} }