Removed server status
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 2m34s
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 2m34s
This commit is contained in:
@@ -1,143 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
const { get } = useApi();
|
|
||||||
const { t } = useI18n();
|
|
||||||
|
|
||||||
const status = ref<{
|
|
||||||
status: string;
|
|
||||||
uptime: string;
|
|
||||||
memory: { rss: string; heapUsed: string };
|
|
||||||
mongo: string;
|
|
||||||
} | null>(null);
|
|
||||||
const loading = ref(true);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
try {
|
|
||||||
status.value = await get('/status');
|
|
||||||
} catch (e) {
|
|
||||||
console.error('Status fetch error:', e);
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const online = computed(() => status.value?.mongo === 'connected');
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="server-status-card">
|
|
||||||
<div class="monitor-bar">
|
|
||||||
<span class="monitor-label">STATUS</span>
|
|
||||||
<span v-if="loading" class="monitor-blink">▚</span>
|
|
||||||
<span v-else class="monitor-dot" :class="online ? 'green' : 'red'"></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="monitor-screen">
|
|
||||||
<div class="screen-grid">
|
|
||||||
<div class="screen-line">
|
|
||||||
<span>Everything OK!</span>
|
|
||||||
</div>
|
|
||||||
<div class="screen-line">
|
|
||||||
<span class="screen-key">UPTIME</span>
|
|
||||||
<span class="screen-val">{{ loading ? '.......' : status?.uptime || '--' }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.server-status-card {
|
|
||||||
position: relative;
|
|
||||||
background: var(--color-background-fore);
|
|
||||||
box-shadow: 4px -4px 0px 0px var(--color-container-shadow);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
min-height: 100%;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.monitor-bar {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 6px 10px;
|
|
||||||
background: #0e0e0e;
|
|
||||||
color: #d4d4d4;
|
|
||||||
font-family: 'Hurmit', monospace;
|
|
||||||
letter-spacing: 2px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
border-bottom: 2px solid #3a3a3a;
|
|
||||||
|
|
||||||
.monitor-blink {
|
|
||||||
animation: blink-cursor 0.8s steps(1) infinite;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.monitor-dot {
|
|
||||||
width: 7px;
|
|
||||||
height: 7px;
|
|
||||||
display: inline-block;
|
|
||||||
shape-rendering: pixelated;
|
|
||||||
|
|
||||||
&.green {
|
|
||||||
background-color: #4ade80;
|
|
||||||
box-shadow: 0 0 6px #4ade80, 0 0 12px rgba(74, 222, 128, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.red {
|
|
||||||
background-color: #ef4444;
|
|
||||||
box-shadow: 0 0 6px #ef4444, 0 0 12px rgba(239, 68, 68, 0.4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.monitor-screen {
|
|
||||||
flex: 1;
|
|
||||||
padding: 10px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.screen-grid {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.screen-line {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: baseline;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 2px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.screen-key {
|
|
||||||
font-family: 'Hurmit', monospace;
|
|
||||||
color: var(--color-text);
|
|
||||||
opacity: 0.4;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
.screen-val {
|
|
||||||
font-family: 'Hurmit', monospace;
|
|
||||||
color: var(--color-link);
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
|
|
||||||
&.ok {
|
|
||||||
color: #4ade80;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.err {
|
|
||||||
color: #ef4444;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink-cursor {
|
|
||||||
0%, 50% { opacity: 1; }
|
|
||||||
51%, 100% { opacity: 0; }
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import FixedLayout from '~/components/layouts/FixedLayout.vue';
|
import FixedLayout from '~/components/layouts/FixedLayout.vue';
|
||||||
import TableHeader from '~/components/parts/TableHeader.vue';
|
import TableHeader from '~/components/parts/TableHeader.vue';
|
||||||
import ServerStatus from '~/components/parts/ServerStatus.vue';
|
|
||||||
|
|
||||||
import ContactLinks from '~/components/parts/ContactLinks.vue';
|
import ContactLinks from '~/components/parts/ContactLinks.vue';
|
||||||
|
|
||||||
@@ -178,9 +177,6 @@ const sectionTargets = {
|
|||||||
<ContentRenderer v-if="markdown" :value="markdown"></ContentRenderer>
|
<ContentRenderer v-if="markdown" :value="markdown"></ContentRenderer>
|
||||||
</Container>
|
</Container>
|
||||||
</div>
|
</div>
|
||||||
<div class="intro-sidebar">
|
|
||||||
<ServerStatus />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user