mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
only show cpu and mem when available (#13589)
This commit is contained in:
parent
310df387e7
commit
02d608b704
@ -284,14 +284,16 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
|||||||
</ha-card>
|
</ha-card>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
|
${this._systemStatusData
|
||||||
<ha-card outlined>
|
? html` <ha-card outlined>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
${this.hass.localize("ui.panel.config.hardware.processor")}
|
${this.hass.localize(
|
||||||
|
"ui.panel.config.hardware.processor"
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
${this._systemStatusData?.cpu_percent || "-"}%
|
${this._systemStatusData.cpu_percent || "-"}%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
@ -314,8 +316,6 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
|||||||
${this.hass.localize("ui.panel.config.hardware.memory")}
|
${this.hass.localize("ui.panel.config.hardware.memory")}
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
${this._systemStatusData
|
|
||||||
? html`
|
|
||||||
${round(this._systemStatusData.memory_used_mb / 1024, 1)}
|
${round(this._systemStatusData.memory_used_mb / 1024, 1)}
|
||||||
GB /
|
GB /
|
||||||
${round(
|
${round(
|
||||||
@ -325,8 +325,6 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
|||||||
0
|
0
|
||||||
)}
|
)}
|
||||||
GB
|
GB
|
||||||
`
|
|
||||||
: "- GB / - GB"}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
@ -342,7 +340,8 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
|||||||
.options=${this._chartOptions}
|
.options=${this._chartOptions}
|
||||||
></ha-chart-base>
|
></ha-chart-base>
|
||||||
</div>
|
</div>
|
||||||
</ha-card>
|
</ha-card>`
|
||||||
|
: ""}
|
||||||
</div>
|
</div>
|
||||||
</hass-subpage>
|
</hass-subpage>
|
||||||
`;
|
`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user