mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
Fix unreleased bug in host summary UI (#16999)
This commit is contained in:
parent
71255557da
commit
eaa5c8bf56
2 changed files with 21 additions and 5 deletions
|
|
@ -271,12 +271,24 @@ const HostSummary = ({
|
|||
platform,
|
||||
diskEncryptionEnabled
|
||||
);
|
||||
|
||||
let statusText;
|
||||
if (platform === "chrome") {
|
||||
statusText = "Always on";
|
||||
} else {
|
||||
statusText = diskEncryptionEnabled ? "On" : "Off";
|
||||
switch (true) {
|
||||
case platform === "chrome":
|
||||
statusText = "Always on";
|
||||
break;
|
||||
case diskEncryptionEnabled === true:
|
||||
statusText = "On";
|
||||
break;
|
||||
case diskEncryptionEnabled === false:
|
||||
statusText = "Off";
|
||||
break;
|
||||
default:
|
||||
// something unexpected happened on the way to this component, display whatever we got or
|
||||
// "Unknown" to draw attention to the issue.
|
||||
statusText = diskEncryptionEnabled || "Unknown";
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="info-flex__item info-flex__item--title">
|
||||
<span className="info-flex__header">Disk encryption</span>
|
||||
|
|
|
|||
|
|
@ -783,7 +783,11 @@ export const normalizeEmptyValues = (
|
|||
return reduce(
|
||||
hostData,
|
||||
(result, value, key) => {
|
||||
if ((Number.isFinite(value) && value !== 0) || !isEmpty(value)) {
|
||||
if (
|
||||
(Number.isFinite(value) && value !== 0) ||
|
||||
!isEmpty(value) ||
|
||||
typeof value === "boolean"
|
||||
) {
|
||||
Object.assign(result, { [key]: value });
|
||||
} else {
|
||||
Object.assign(result, { [key]: DEFAULT_EMPTY_CELL_VALUE });
|
||||
|
|
|
|||
Loading…
Reference in a new issue