Statistics styling
This commit is contained in:
parent
6c47c5b178
commit
3ce2ba5013
6 changed files with 198 additions and 19 deletions
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import StatisticsCard from "@/components/admin/StatisticsCard.vue";
|
||||
import { useStatisticsStore } from "@/stores/statistics";
|
||||
|
||||
const statistics = useStatisticsStore();
|
||||
|
@ -13,18 +14,57 @@ refresh();
|
|||
<template>
|
||||
<main>
|
||||
<div v-if="statistics.getStatistics">
|
||||
<h1>Nodes</h1>
|
||||
<h2>Knotenstatistik</h2>
|
||||
|
||||
<div>
|
||||
Registered: {{ statistics.getStatistics.nodes.registered }}<br />
|
||||
With VPN-key: {{ statistics.getStatistics.nodes.withVPN }}<br />
|
||||
With coordinates: {{ statistics.getStatistics.nodes.withCoords }}<br />
|
||||
Monitoring active: {{ statistics.getStatistics.nodes.monitoring.active }}<br />
|
||||
Monitoring pending: {{ statistics.getStatistics.nodes.monitoring.pending }}
|
||||
<div class="statistics">
|
||||
<StatisticsCard
|
||||
title="Registrierte Knoten"
|
||||
icon="circle-o"
|
||||
variant="info"
|
||||
:value="statistics.getStatistics.nodes.registered"
|
||||
link="/admin/nodes"
|
||||
/>
|
||||
<StatisticsCard
|
||||
title="Mit hinterlegtem fastd-Key"
|
||||
icon="lock"
|
||||
variant="warning"
|
||||
:value="statistics.getStatistics.nodes.withVPN"
|
||||
link="/admin/nodes"
|
||||
:filter="{hasKey: true}"
|
||||
/>
|
||||
<StatisticsCard
|
||||
title="Mit Koordinaten"
|
||||
icon="map-marker"
|
||||
variant="success"
|
||||
:value="statistics.getStatistics.nodes.withCoords"
|
||||
link="/admin/nodes"
|
||||
:filter="{hasCoords: true}"
|
||||
/>
|
||||
<StatisticsCard
|
||||
title="Monitoring aktiv"
|
||||
icon="heartbeat"
|
||||
variant="success"
|
||||
:value="statistics.getStatistics.nodes.monitoring.active"
|
||||
link="/admin/nodes"
|
||||
:filter="{monitoringState: 'active'}"
|
||||
/>
|
||||
<StatisticsCard
|
||||
title="Monitoring noch nicht bestätigt"
|
||||
icon="envelope"
|
||||
variant="danger"
|
||||
:value="statistics.getStatistics.nodes.monitoring.pending"
|
||||
link="/admin/nodes"
|
||||
:filter="{monitoringState: 'pending'}"
|
||||
/>
|
||||
</div>
|
||||
<button @click="refresh()">Refresh</button>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.statistics {
|
||||
display: grid;
|
||||
// TODO: Responsive sizes
|
||||
grid-template-columns: repeat(auto-fill, minmax(25%, 100%));
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue