Update some server stat fields

This commit is contained in:
iamBadgers
2024-06-12 00:05:27 -07:00
parent 981efcadb2
commit 162f25d859
4 changed files with 11 additions and 14 deletions

View File

@@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to Vuetify 3</title>
<title>Rush Stats</title>
</head>
<body>

View File

@@ -123,7 +123,6 @@ watch(
async function loadGameDetails() {
const response = await axios.get(`/api/game/${gameId.value}`)
console.log(response)
game.value = response.data
loadPicks()
loadApps()
@@ -131,13 +130,11 @@ async function loadGameDetails() {
async function loadPicks() {
const response = await axios.post(`/api/game/${gameId.value}/picks`)
console.log(response)
picks.value = response.data
}
async function loadApps() {
const response = await axios.post(`/api/game/${gameId.value}/apps`)
console.log(response)
apps.value = response.data
}
</script>

View File

@@ -74,15 +74,9 @@ const filtervalue = ref<string>('')
async function loadData({ page, itemsPerPage, sortBy }: any) {
let sortString = 'id'
if (sortBy[0]) {
console.log(sortBy[0].key)
console.log(sortBy[0].order)
sortString = `${sortBy[0].key} ${sortBy[0].order}`
}
console.log(page)
console.log(itemsPerPage)
console.log(sortBy)
const response = await axios.post('/api/game', {
page: `${page - 1}`,
count: `${itemsPerPage}`,

View File

@@ -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() {