From 1cfc2fdd89356a5ee2bdeeba82f42cf7c1449f07 Mon Sep 17 00:00:00 2001 From: Sayak Mukhopadhyay Date: Sat, 28 Oct 2023 22:05:09 +0530 Subject: [PATCH] removed states --- .../components/charts/SystemAPRStateChart.vue | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/frontend/src/components/charts/SystemAPRStateChart.vue b/frontend/src/components/charts/SystemAPRStateChart.vue index 9b84e83..8193c0d 100644 --- a/frontend/src/components/charts/SystemAPRStateChart.vue +++ b/frontend/src/components/charts/SystemAPRStateChart.vue @@ -90,31 +90,6 @@ export default { } }) console.log(data) - allTimeFactions.forEach((faction) => { - const allStates = [] - let maxStates = 0 - this.systemData.faction_history.forEach((record, recordIndex, records) => { - if (record.faction_name === faction && record[stateType]) { - if (record[stateType].length === 0) { - records[recordIndex][stateType].push({ - state: 'none', - trend: 0 - }) - } - record[stateType].forEach((recordState) => { - if (allStates.indexOf(recordState.state) === -1) { - allStates.push(recordState.state) - } - }) - maxStates = record[stateType].length > maxStates ? record[stateType].length : maxStates - } - }) - allTimeStates.push(allStates) - if (maxStates === 0) { - maxStates = 1 - } - maxStatesConcurrent.push(maxStates) - }) this.systemData.faction_history.sort((a, b) => { if (a.updated_at < b.updated_at) { return -1