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