add version to stats

This commit is contained in:
jb-alvarado 2024-01-29 08:19:37 +01:00
parent 413406ca6e
commit c1b8fe4bde
2 changed files with 5 additions and 4 deletions

View File

@ -11,7 +11,8 @@
</div> </div>
</div> </div>
<div v-if="sysStat.system.kernel" class="col-6 bg-primary border-start border-end border-bottom"> <div v-if="sysStat.system.kernel" class="col-6 bg-primary border-start border-end border-bottom">
{{ sysStat.system.kernel }} {{ sysStat.system.kernel }} <br />
<span v-if="sysStat.system.ffp_version">ffplayout version: {{ sysStat.system.ffp_version }}</span>
</div> </div>
<div class="col-6 p-2 border"> <div class="col-6 p-2 border">
<div class="fs-4">Load</div> <div class="fs-4">Load</div>
@ -75,7 +76,7 @@ const sysStat = ref({
network: { name: '', current_in: 0.0, current_out: 0.0, total_in: 0.0, total_out: 0.0 }, network: { name: '', current_in: 0.0, current_out: 0.0, total_in: 0.0, total_out: 0.0 },
storage: { path: '', total: 0.0, used: 0.0 }, storage: { path: '', total: 0.0, used: 0.0 },
swap: { total: 0.0, used: 0.0, free: 0.0 }, swap: { total: 0.0, used: 0.0, free: 0.0 },
system: { name: '', kernel: '', version: '' }, system: { name: '', kernel: '', version: '', ffp_version: '' },
} as SystemStatistics) } as SystemStatistics)
onMounted(() => { onMounted(() => {
@ -106,7 +107,7 @@ async function systemStatus() {
const channel = configStore.configGui[configStore.configID].id const channel = configStore.configGui[configStore.configID].id
if (!document?.hidden) { if (!document?.hidden) {
await $fetch<SystemStatistics>(`/api/system/${channel}`, { await $fetch(`/api/system/${channel}`, {
method: 'GET', method: 'GET',
headers: { ...contentType, ...authStore.authHeader }, headers: { ...contentType, ...authStore.authHeader },
}).then((stat: SystemStatistics) => { }).then((stat: SystemStatistics) => {

2
types/index.d.ts vendored
View File

@ -95,6 +95,6 @@ declare global {
network?: { name: String; current_in: number; current_out: number; total_in: number; total_out: number } network?: { name: String; current_in: number; current_out: number; total_in: number; total_out: number }
storage?: { path: String; total: number; used: number } storage?: { path: String; total: number; used: number }
swap: { total: number; used: number; free: number } swap: { total: number; used: number; free: number }
system: { name?: String; kernel?: String; version?: String } system: { name?: String; kernel?: String; version?: String, ffp_version?: string }
} }
} }