Update some server stat fields
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Welcome to Vuetify 3</title>
|
<title>Rush Stats</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ watch(
|
|||||||
|
|
||||||
async function loadGameDetails() {
|
async function loadGameDetails() {
|
||||||
const response = await axios.get(`/api/game/${gameId.value}`)
|
const response = await axios.get(`/api/game/${gameId.value}`)
|
||||||
console.log(response)
|
|
||||||
game.value = response.data
|
game.value = response.data
|
||||||
loadPicks()
|
loadPicks()
|
||||||
loadApps()
|
loadApps()
|
||||||
@@ -131,13 +130,11 @@ async function loadGameDetails() {
|
|||||||
|
|
||||||
async function loadPicks() {
|
async function loadPicks() {
|
||||||
const response = await axios.post(`/api/game/${gameId.value}/picks`)
|
const response = await axios.post(`/api/game/${gameId.value}/picks`)
|
||||||
console.log(response)
|
|
||||||
picks.value = response.data
|
picks.value = response.data
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadApps() {
|
async function loadApps() {
|
||||||
const response = await axios.post(`/api/game/${gameId.value}/apps`)
|
const response = await axios.post(`/api/game/${gameId.value}/apps`)
|
||||||
console.log(response)
|
|
||||||
apps.value = response.data
|
apps.value = response.data
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -74,15 +74,9 @@ const filtervalue = ref<string>('')
|
|||||||
async function loadData({ page, itemsPerPage, sortBy }: any) {
|
async function loadData({ page, itemsPerPage, sortBy }: any) {
|
||||||
let sortString = 'id'
|
let sortString = 'id'
|
||||||
if (sortBy[0]) {
|
if (sortBy[0]) {
|
||||||
console.log(sortBy[0].key)
|
|
||||||
console.log(sortBy[0].order)
|
|
||||||
sortString = `${sortBy[0].key} ${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', {
|
const response = await axios.post('/api/game', {
|
||||||
page: `${page - 1}`,
|
page: `${page - 1}`,
|
||||||
count: `${itemsPerPage}`,
|
count: `${itemsPerPage}`,
|
||||||
|
|||||||
@@ -33,23 +33,31 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-left">Role</th>
|
<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">App Count</th>
|
||||||
<th class="text-left">Games Played</th>
|
<th class="text-left">Games Played</th>
|
||||||
<th class="text-left">Pick Rate %</th>
|
<th class="text-left">Pick Rate %</th>
|
||||||
<th class="text-left">% Games With Role</th>
|
<th class="text-left">% Games With Role</th>
|
||||||
|
<th cladd="text-ledt">Apps Per Game</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(roleStat, roleName) in roleStats">
|
<tr v-for="(roleStat, roleName) in roleStats">
|
||||||
<td>{{ roleName }}</td>
|
<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.apps }}</td>
|
||||||
<td class="text-left">{{ roleStat.picks }}</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 / roleStat.apps) * 100) }}%</td>
|
||||||
<td class="text-left">
|
<td class="text-left">
|
||||||
{{ Math.floor((roleStat.picks / gameStats.Complete) * 100) }}%
|
{{ Math.floor((roleStat.picks / gameStats.Complete) * 100) }}%
|
||||||
</td>
|
</td>
|
||||||
|
<td class="text-left">
|
||||||
|
{{ Math.round((roleStat.apps / gameStats.Complete) * 100) / 100 }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</v-table>
|
</v-table>
|
||||||
@@ -183,13 +191,11 @@ async function loadData() {
|
|||||||
monthId: dateSelect.value
|
monthId: dateSelect.value
|
||||||
})
|
})
|
||||||
gameStats.value = gameStatsResponse.data
|
gameStats.value = gameStatsResponse.data
|
||||||
console.log(gameStatsResponse.data)
|
|
||||||
|
|
||||||
const roleStatsResponse = await axios.post('/api/serverstats/rolestats', {
|
const roleStatsResponse = await axios.post('/api/serverstats/rolestats', {
|
||||||
monthId: dateSelect.value
|
monthId: dateSelect.value
|
||||||
})
|
})
|
||||||
roleStats.value = roleStatsResponse.data
|
roleStats.value = roleStatsResponse.data
|
||||||
console.log(roleStatsResponse.data)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildDateItems() {
|
function buildDateItems() {
|
||||||
|
|||||||
Reference in New Issue
Block a user