Update some server stat fields
This commit is contained in:
@@ -33,23 +33,31 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">Role</th>
|
||||
<th class="text-left">Active</th>
|
||||
<th class="text-left">
|
||||
Characters
|
||||
</th>
|
||||
<th class="text-left">App Count</th>
|
||||
<th class="text-left">Games Played</th>
|
||||
<th class="text-left">Pick Rate %</th>
|
||||
<th class="text-left">% Games With Role</th>
|
||||
<th cladd="text-ledt">Apps Per Game</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(roleStat, roleName) in roleStats">
|
||||
<td>{{ roleName }}</td>
|
||||
<td class="text-left">{{ roleStat.active }}</td>
|
||||
<td class="text-left">
|
||||
{{ roleStat.active }}
|
||||
</td>
|
||||
<td class="text-left">{{ roleStat.apps }}</td>
|
||||
<td class="text-left">{{ roleStat.picks }}</td>
|
||||
<td class="text-left">{{ Math.floor((roleStat.picks / roleStat.apps) * 100) }}%</td>
|
||||
<td class="text-left">
|
||||
{{ Math.floor((roleStat.picks / gameStats.Complete) * 100) }}%
|
||||
</td>
|
||||
<td class="text-left">
|
||||
{{ Math.round((roleStat.apps / gameStats.Complete) * 100) / 100 }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</v-table>
|
||||
@@ -183,13 +191,11 @@ async function loadData() {
|
||||
monthId: dateSelect.value
|
||||
})
|
||||
gameStats.value = gameStatsResponse.data
|
||||
console.log(gameStatsResponse.data)
|
||||
|
||||
const roleStatsResponse = await axios.post('/api/serverstats/rolestats', {
|
||||
monthId: dateSelect.value
|
||||
})
|
||||
roleStats.value = roleStatsResponse.data
|
||||
console.log(roleStatsResponse.data)
|
||||
}
|
||||
|
||||
function buildDateItems() {
|
||||
|
||||
Reference in New Issue
Block a user