mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 10:19:06 +01:00
style: 💄 server metrics widgets
This commit is contained in:
parent
71a78a9305
commit
0f2aecdf59
@ -2,7 +2,7 @@
|
||||
<div class="vrvdvrys">
|
||||
<XPie class="pie" :value="usage" />
|
||||
<div>
|
||||
<p><i class="ph-microchip ph-bold ph-lg"></i>CPU</p>
|
||||
<p><i class="ph-cpu ph-bold ph-lg"></i>CPU</p>
|
||||
<p>{{ meta.cpu.cores }} Logical cores</p>
|
||||
<p>{{ meta.cpu.model }}</p>
|
||||
</div>
|
||||
|
@ -8,8 +8,8 @@
|
||||
<div>
|
||||
<p><i class="ph-file-search ph-bold ph-lg"></i>MeiliSearch</p>
|
||||
<p>{{ i18n.ts._widgets.meiliStatus }}: {{ available }}</p>
|
||||
<p>{{ i18n.ts._widgets.meiliSize }}: {{ bytes(total_size, 2) }}</p>
|
||||
<p>{{ i18n.ts._widgets.meiliIndexCount }}: {{ index_count }}</p>
|
||||
<p>{{ i18n.ts._widgets.meiliSize }}: {{ bytes(totalSize, 1) }}</p>
|
||||
<p>{{ i18n.ts._widgets.meiliIndexCount }}: {{ indexCount }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@ -29,15 +29,15 @@ const props = defineProps<{
|
||||
|
||||
let progress: number = $ref(0);
|
||||
let serverStats = $ref(null);
|
||||
let total_size: number = $ref(0);
|
||||
let index_count: number = $ref(0);
|
||||
let totalSize: number = $ref(0);
|
||||
let indexCount: number = $ref(0);
|
||||
let available: string = $ref("unavailable");
|
||||
|
||||
function onStats(stats) {
|
||||
total_size = stats.meilisearch.size;
|
||||
index_count = stats.meilisearch.indexed_count;
|
||||
totalSize = stats.meilisearch.size;
|
||||
indexCount = stats.meilisearch.indexed_count;
|
||||
available = stats.meilisearch.health;
|
||||
progress = index_count / serverStats.notesCount;
|
||||
progress = indexCount / serverStats.notesCount;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="zlxnikvl">
|
||||
<XPie class="pie" :value="usage" />
|
||||
<div>
|
||||
<p><i class="ph-cpu ph-bold ph-lg"></i>RAM</p>
|
||||
<p><i class="ph-microchip ph-bold ph-lg"></i>RAM</p>
|
||||
<p>Total: {{ bytes(total, 1) }}</p>
|
||||
<p>Used: {{ bytes(used, 1) }}</p>
|
||||
<p>Free: {{ bytes(free, 1) }}</p>
|
||||
|
Loading…
Reference in New Issue
Block a user