chore: dashboard update field name
This commit is contained in:
@@ -87,12 +87,12 @@ const ActiveTable = () => {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'dashboard.allocatevram' }),
|
||||
dataIndex: 'resource_claim.memory',
|
||||
key: 'gpu_memory',
|
||||
key: 'vram',
|
||||
render: (text: any, record: any) => {
|
||||
return (
|
||||
<span>
|
||||
{convertFileSize(record.resource_claim?.gpu_memory || 0)} /{' '}
|
||||
{convertFileSize(record.resource_claim?.memory || 0)}
|
||||
{convertFileSize(record.resource_claim?.vram || 0)} /{' '}
|
||||
{convertFileSize(record.resource_claim?.ram || 0)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ const TypeKeyMap = {
|
||||
intl: false,
|
||||
color: 'rgba(250, 173, 20,.8)'
|
||||
},
|
||||
memory: {
|
||||
ram: {
|
||||
label: 'dashboard.memory',
|
||||
type: 'Memory',
|
||||
intl: true,
|
||||
@@ -29,7 +29,7 @@ const TypeKeyMap = {
|
||||
intl: false,
|
||||
color: 'rgba(84, 204, 152,.8)'
|
||||
},
|
||||
gpu_memory: {
|
||||
vram: {
|
||||
label: 'dashboard.vram',
|
||||
type: 'VRAM',
|
||||
intl: true,
|
||||
@@ -114,7 +114,7 @@ const UtilizationOvertime: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const data = useContext(DashboardContext)?.system_load?.history || {};
|
||||
|
||||
const typeList = ['gpu', 'cpu', 'memory', 'gpu_memory'];
|
||||
const typeList = ['gpu', 'cpu', 'ram', 'vram'];
|
||||
|
||||
const tooltipValueFormatter = (value: any) => {
|
||||
return !value ? value : `${value}%`;
|
||||
|
||||
@@ -83,8 +83,8 @@ const SystemLoad = () => {
|
||||
id: 'dashboard.vramutilization'
|
||||
})}
|
||||
height={smallChartHeight}
|
||||
color={strokeColorFunc(data.gpu_memory)}
|
||||
value={_.round(data.gpu_memory || 0, 1)}
|
||||
color={strokeColorFunc(data.vram)}
|
||||
value={_.round(data.vram || 0, 1)}
|
||||
></GaugeChart>
|
||||
</Col>
|
||||
<Col span={12} style={{ height: smallChartHeight }}>
|
||||
@@ -103,8 +103,8 @@ const SystemLoad = () => {
|
||||
id: 'dashboard.memoryutilization'
|
||||
})}
|
||||
height={smallChartHeight}
|
||||
color={strokeColorFunc(data.memory)}
|
||||
value={_.round(data.memory || 0, 1)}
|
||||
color={strokeColorFunc(data.ram)}
|
||||
value={_.round(data.ram || 0, 1)}
|
||||
></GaugeChart>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -8,16 +8,16 @@ export interface DashboardProps {
|
||||
system_load: {
|
||||
current: {
|
||||
cpu: number;
|
||||
memory: number;
|
||||
ram: number;
|
||||
gpu: number;
|
||||
gpu_memory: number;
|
||||
vram: number;
|
||||
};
|
||||
history: {
|
||||
cpu: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
memory: {
|
||||
ram: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
@@ -25,7 +25,7 @@ export interface DashboardProps {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
gpu_memory: {
|
||||
vram: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
|
||||
@@ -87,12 +87,12 @@ const ActiveTable = () => {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'dashboard.allocatevram' }),
|
||||
dataIndex: 'resource_claim.memory',
|
||||
key: 'gpu_memory',
|
||||
key: 'vram',
|
||||
render: (text: any, record: any) => {
|
||||
return (
|
||||
<span>
|
||||
{convertFileSize(record.resource_claim?.gpu_memory || 0)} /{' '}
|
||||
{convertFileSize(record.resource_claim?.memory || 0)}
|
||||
{convertFileSize(record.resource_claim?.vram || 0)} /{' '}
|
||||
{convertFileSize(record.resource_claim?.ram || 0)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ const TypeKeyMap = {
|
||||
intl: false,
|
||||
color: 'rgba(250, 173, 20,.8)'
|
||||
},
|
||||
memory: {
|
||||
ram: {
|
||||
label: 'dashboard.memory',
|
||||
type: 'Memory',
|
||||
intl: true,
|
||||
@@ -29,7 +29,7 @@ const TypeKeyMap = {
|
||||
intl: false,
|
||||
color: 'rgba(84, 204, 152,.8)'
|
||||
},
|
||||
gpu_memory: {
|
||||
vram: {
|
||||
label: 'dashboard.vram',
|
||||
type: 'VRAM',
|
||||
intl: true,
|
||||
@@ -114,7 +114,7 @@ const UtilizationOvertime: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const data = useContext(DashboardContext)?.system_load?.history || {};
|
||||
|
||||
const typeList = ['gpu', 'cpu', 'memory', 'gpu_memory'];
|
||||
const typeList = ['gpu', 'cpu', 'ram', 'vram'];
|
||||
|
||||
const tooltipValueFormatter = (value: any) => {
|
||||
return !value ? value : `${value}%`;
|
||||
|
||||
@@ -83,8 +83,8 @@ const SystemLoad = () => {
|
||||
id: 'dashboard.vramutilization'
|
||||
})}
|
||||
height={smallChartHeight}
|
||||
color={strokeColorFunc(data.gpu_memory)}
|
||||
value={_.round(data.gpu_memory || 0, 1)}
|
||||
color={strokeColorFunc(data.vram)}
|
||||
value={_.round(data.vram || 0, 1)}
|
||||
></GaugeChart>
|
||||
</Col>
|
||||
<Col span={12} style={{ height: smallChartHeight }}>
|
||||
@@ -103,8 +103,8 @@ const SystemLoad = () => {
|
||||
id: 'dashboard.memoryutilization'
|
||||
})}
|
||||
height={smallChartHeight}
|
||||
color={strokeColorFunc(data.memory)}
|
||||
value={_.round(data.memory || 0, 1)}
|
||||
color={strokeColorFunc(data.ram)}
|
||||
value={_.round(data.ram || 0, 1)}
|
||||
></GaugeChart>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -8,16 +8,16 @@ export interface DashboardProps {
|
||||
system_load: {
|
||||
current: {
|
||||
cpu: number;
|
||||
memory: number;
|
||||
ram: number;
|
||||
gpu: number;
|
||||
gpu_memory: number;
|
||||
vram: number;
|
||||
};
|
||||
history: {
|
||||
cpu: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
memory: {
|
||||
ram: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
@@ -25,7 +25,7 @@ export interface DashboardProps {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
gpu_memory: {
|
||||
vram: {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
}[];
|
||||
|
||||
Reference in New Issue
Block a user