style: 💄 server metrics widgets

This commit is contained in:
ThatOneCalculator 2023-05-29 15:10:14 -07:00
parent 4a05f0c876
commit a87fc03b92
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
3 changed files with 9 additions and 9 deletions

View File

@ -2,7 +2,7 @@
<div class="vrvdvrys"> <div class="vrvdvrys">
<XPie class="pie" :value="usage" /> <XPie class="pie" :value="usage" />
<div> <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.cores }} Logical cores</p>
<p>{{ meta.cpu.model }}</p> <p>{{ meta.cpu.model }}</p>
</div> </div>

View File

@ -8,8 +8,8 @@
<div> <div>
<p><i class="ph-file-search ph-bold ph-lg"></i>MeiliSearch</p> <p><i class="ph-file-search ph-bold ph-lg"></i>MeiliSearch</p>
<p>{{ i18n.ts._widgets.meiliStatus }}: {{ available }}</p> <p>{{ i18n.ts._widgets.meiliStatus }}: {{ available }}</p>
<p>{{ i18n.ts._widgets.meiliSize }}: {{ bytes(total_size, 2) }}</p> <p>{{ i18n.ts._widgets.meiliSize }}: {{ bytes(totalSize, 1) }}</p>
<p>{{ i18n.ts._widgets.meiliIndexCount }}: {{ index_count }}</p> <p>{{ i18n.ts._widgets.meiliIndexCount }}: {{ indexCount }}</p>
</div> </div>
</div> </div>
<br /> <br />
@ -29,15 +29,15 @@ const props = defineProps<{
let progress: number = $ref(0); let progress: number = $ref(0);
let serverStats = $ref(null); let serverStats = $ref(null);
let total_size: number = $ref(0); let totalSize: number = $ref(0);
let index_count: number = $ref(0); let indexCount: number = $ref(0);
let available: string = $ref("unavailable"); let available: string = $ref("unavailable");
function onStats(stats) { function onStats(stats) {
total_size = stats.meilisearch.size; totalSize = stats.meilisearch.size;
index_count = stats.meilisearch.indexed_count; indexCount = stats.meilisearch.indexed_count;
available = stats.meilisearch.health; available = stats.meilisearch.health;
progress = index_count / serverStats.notesCount; progress = indexCount / serverStats.notesCount;
} }
onMounted(() => { onMounted(() => {

View File

@ -2,7 +2,7 @@
<div class="zlxnikvl"> <div class="zlxnikvl">
<XPie class="pie" :value="usage" /> <XPie class="pie" :value="usage" />
<div> <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>Total: {{ bytes(total, 1) }}</p>
<p>Used: {{ bytes(used, 1) }}</p> <p>Used: {{ bytes(used, 1) }}</p>
<p>Free: {{ bytes(free, 1) }}</p> <p>Free: {{ bytes(free, 1) }}</p>