feat: display release_info in SystemPanel.vue

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2021-12-22 21:31:49 +01:00
parent f4b393053d
commit cb87b4c198
No known key found for this signature in database
GPG Key ID: 5D3A5823133D2246
4 changed files with 14 additions and 1 deletions

View File

@ -62,6 +62,7 @@
<br />
<span v-if="hostStats.version">{{ $t('Machine.SystemPanel.Version') }}: {{ hostStats.version }}<br /></span>
<span v-if="hostStats.os">{{ $t('Machine.SystemPanel.Os') }}: {{ hostStats.os }}<br /></span>
<span v-if="hostStats.release_info && hostStats.release_info.name !== '0.'">{{ $t('Machine.SystemPanel.Distro') }}: {{ hostStats.release_info.name }} {{ hostStats.release_info.version_id }} <span v-if="hostStats.release_info.codename">({{ hostStats.release_info.codename }})</span><br /></span>
<span>{{ $t('Machine.SystemPanel.Load') }}: {{ hostStats.load }}</span>
<span v-if="hostStats.memoryFormat">, {{ $t('Machine.SystemPanel.Memory') }}: {{ hostStats.memoryFormat }}</span>
<template v-if="hostStats.tempSensor">

View File

@ -586,7 +586,8 @@
"Memory": "Mem",
"Constants": "Constants",
"LastStats": "Last stats",
"HostDetails": "Host details"
"HostDetails": "Host details",
"Distro": "Distro"
}
},
"Settings": {

View File

@ -45,6 +45,11 @@ export const getters: GetterTree<ServerState, any> = {
cpuDesc: string | null
version: string | null
os: string | null
release_info?: {
name: string
version_id: string
id: string
} | null
load: number
loadPercent: number
loadProgressColor: string
@ -100,6 +105,7 @@ export const getters: GetterTree<ServerState, any> = {
cpuDesc: state.system_info?.cpu_info?.cpu_desc ?? null,
version,
os: state.system_info?.distribution?.name ?? null,
release_info: state.system_info?.distribution?.release_info ?? null,
load,
loadPercent: loadPercent < 100 ? loadPercent : 100,
loadProgressColor,

View File

@ -75,6 +75,11 @@ export interface ServerStateDistribution {
major: string
minor: string
}
release_info?: {
name: string
version_id: string
id: string
}
}
export interface ServerStateSdInfo {