mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-26 22:37:21 +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 outlined>
|
||||
${this._systemStatusData
|
||||
? html` <ha-card outlined>
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
${this.hass.localize("ui.panel.config.hardware.processor")}
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.hardware.processor"
|
||||
)}
|
||||
</div>
|
||||
<div class="value">
|
||||
${this._systemStatusData?.cpu_percent || "-"}%
|
||||
${this._systemStatusData.cpu_percent || "-"}%
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
@ -314,8 +316,6 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
||||
${this.hass.localize("ui.panel.config.hardware.memory")}
|
||||
</div>
|
||||
<div class="value">
|
||||
${this._systemStatusData
|
||||
? html`
|
||||
${round(this._systemStatusData.memory_used_mb / 1024, 1)}
|
||||
GB /
|
||||
${round(
|
||||
@ -325,8 +325,6 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
||||
0
|
||||
)}
|
||||
GB
|
||||
`
|
||||
: "- GB / - GB"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
@ -342,7 +340,8 @@ class HaConfigHardware extends SubscribeMixin(LitElement) {
|
||||
.options=${this._chartOptions}
|
||||
></ha-chart-base>
|
||||
</div>
|
||||
</ha-card>
|
||||
</ha-card>`
|
||||
: ""}
|
||||
</div>
|
||||
</hass-subpage>
|
||||
`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user