Add support for sensor temperature in host state (#359)

* feat: Add support for sensor temperature in host state

* chore: Update file permissions for saving config data
This commit is contained in:
Leon
2024-06-01 19:11:48 +08:00
committed by GitHub
parent 3782c0dcaf
commit e0e2b8c3c2
9 changed files with 214 additions and 80 deletions

View File

@@ -640,6 +640,9 @@ other = "Template"
[Stat]
other = "Asset"
[Temperature]
other = "Temperature"
[DisableSwitchTemplateInFrontend]
other = "Disable Switch Template in Frontend"

View File

@@ -640,6 +640,9 @@ other = "Plantilla"
[Stat]
other = "Stat"
[Temperature]
other = "Temperatura"
[DisableSwitchTemplateInFrontend]
other = "Deshabilitar Cambio de Plantilla en Frontend"

View File

@@ -640,6 +640,9 @@ other = "主题"
[Stat]
other = "信息"
[Temperature]
other = "温度"
[DisableSwitchTemplateInFrontend]
other = "禁止前台切换模板"

View File

@@ -640,6 +640,9 @@ other = "主題"
[Stat]
other = "信息"
[Temperature]
other = "溫度"
[DisableSwitchTemplateInFrontend]
other = "禁止前台切換主題"

View File

@@ -41,7 +41,12 @@
{{tr "ConnCount"}}: TCP @# server.State.TcpConnCount #@ / UDP @# server.State.UdpConnCount #@<br />
{{tr "BootTime"}}: @# formatTimestamp(server.Host.BootTime) #@<br />
{{tr "LastActive"}}: @# new Date(server.LastActive).toLocaleString() #@<br />
{{tr "Version"}}: @#server.Host.Version#@
{{tr "Version"}}: @#server.Host.Version#@ <br/>
{{tr "Temperature"}}:
<span v-for="temp in server.State.Temperatures">
@#temp.Name#@: @#temp.Temperature#@°C &nbsp;
</span>
<div class="chartbox" :key="server.ID" :ref="`chart${server.ID}`" style="width: 100%; height: auto; margin-bottom: 2px;"></div>
</div>
<div class="ui divider" style="margin-bottom: 5px"></div>