Skip to content

Commit

Permalink
removed states
Browse files Browse the repository at this point in the history
  • Loading branch information
SayakMukhopadhyay committed Nov 17, 2023
1 parent 14ed032 commit 1cfc2fd
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions frontend/src/components/charts/SystemAPRStateChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1cfc2fd

Please sign in to comment.