Chart fixes

This commit is contained in:
Douglas Barone 2022-12-08 15:15:06 -04:00
parent 18ef12f537
commit 6765b22170
6 changed files with 41 additions and 30 deletions

View File

@ -1,12 +1,12 @@
{
"name": "ifms-pti-svr",
"version": "3.4.0",
"version": "3.4.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ifms-pti-svr",
"version": "3.4.0",
"version": "3.4.1",
"license": "ISC",
"dependencies": {
"@prisma/client": "^4.7.1",

View File

@ -1,6 +1,6 @@
{
"name": "ifms-pti-svr",
"version": "3.4.0",
"version": "3.4.1",
"description": "Servidor do Portal de TI do IFMS",
"main": "src/index.js",
"prisma": {

View File

@ -49,7 +49,9 @@ async function generateStatsForNetwork(shortName) {
}
export async function generateStatsForAllNetworks() {
const networks = await prisma.network.findMany()
const networks = await prisma.network.findMany({
orderBy: { name: 'asc' }
})
for (const network of networks) {
await generateStatsForNetwork(network.shortName)

4
web/package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "ifms-pti",
"version": "3.4.0",
"version": "3.4.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ifms-pti",
"version": "3.4.0",
"version": "3.4.1",
"dependencies": {
"@mdi/font": "^6.9.96",
"apollo-link-ws": "^1.0.20",

View File

@ -1,6 +1,6 @@
{
"name": "ifms-pti",
"version": "3.4.0",
"version": "3.4.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

View File

@ -1,27 +1,36 @@
<template>
<v-container>
<v-row>
<v-col v-for="subnet in subnets" :key="subnet.shortname" cols="4">
<v-card>
<v-card-title class="title font-weight-light text-sm-body-1">
{{ subnet.name }} - {{ subnet.cidr }}
<v-spacer />
<v-icon left> mdi-devices </v-icon>
{{ subnet.stats[0].clients }}
</v-card-title>
<v-card-text>
<ClientsChart
:stats="subnet.stats"
:subnet="subnet"
:suggested-max0="500"
:suggested-max1="500000000000"
:height="150"
/>
</v-card-text>
</v-card>
</v-col>
</v-row>
</v-container>
<div>
<!-- <v-toolbar></v-toolbar> -->
<v-container fluid>
<v-row dense>
<v-col
v-for="subnet in subnets"
:key="subnet.shortname"
sm="12"
md="6"
lg="4"
>
<v-card flat>
<v-card-title class="title font-weight-light text-sm-body-1">
{{ subnet.name }} - {{ subnet.cidr }}
<v-spacer />
<v-icon left> mdi-devices </v-icon>
{{ subnet.stats[0].clients }}
</v-card-title>
<v-card-text>
<ClientsChart
:stats="subnet.stats"
:subnet="subnet"
:suggested-max0="500"
:suggested-max1="100000000000"
:height="150"
/>
</v-card-text>
</v-card>
</v-col>
</v-row>
</v-container>
</div>
</template>
<script>