fix(lite/dashboard): add missing 'id' field for storage usage (#6467)

This commit is contained in:
Mathieu 2022-10-18 15:03:28 +02:00 committed by Julien Fontanet
parent 9963568368
commit d1b210cf16

View File

@ -51,16 +51,16 @@ const percentFree = computed(() =>
const showFooter = computed(() => !isNaN(percentUsed.value));
const data = computed<{
result: { label: string; value: number }[];
result: { id: string; label: string; value: number }[];
maxSize: number;
usedSize: number;
}>(() => {
const result: { label: string; value: number }[] = [];
const result: { id: string; label: string; value: number }[] = [];
let maxSize = 0;
let usedSize = 0;
srStore.allRecords.forEach(
({ name_label, physical_size, physical_utilisation }) => {
({ name_label, physical_size, physical_utilisation, uuid }) => {
if (physical_size < 0 || physical_utilisation < 0) {
return;
}
@ -75,6 +75,7 @@ const data = computed<{
}
result.push({
id: uuid,
label: name_label,
value: percent,
});