fix(lite/dashboard): add missing 'id' field for storage usage (#6467)
This commit is contained in:
parent
9963568368
commit
d1b210cf16
@ -51,16 +51,16 @@ const percentFree = computed(() =>
|
|||||||
const showFooter = computed(() => !isNaN(percentUsed.value));
|
const showFooter = computed(() => !isNaN(percentUsed.value));
|
||||||
|
|
||||||
const data = computed<{
|
const data = computed<{
|
||||||
result: { label: string; value: number }[];
|
result: { id: string; label: string; value: number }[];
|
||||||
maxSize: number;
|
maxSize: number;
|
||||||
usedSize: number;
|
usedSize: number;
|
||||||
}>(() => {
|
}>(() => {
|
||||||
const result: { label: string; value: number }[] = [];
|
const result: { id: string; label: string; value: number }[] = [];
|
||||||
let maxSize = 0;
|
let maxSize = 0;
|
||||||
let usedSize = 0;
|
let usedSize = 0;
|
||||||
|
|
||||||
srStore.allRecords.forEach(
|
srStore.allRecords.forEach(
|
||||||
({ name_label, physical_size, physical_utilisation }) => {
|
({ name_label, physical_size, physical_utilisation, uuid }) => {
|
||||||
if (physical_size < 0 || physical_utilisation < 0) {
|
if (physical_size < 0 || physical_utilisation < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -75,6 +75,7 @@ const data = computed<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
result.push({
|
result.push({
|
||||||
|
id: uuid,
|
||||||
label: name_label,
|
label: name_label,
|
||||||
value: percent,
|
value: percent,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user