Fleet UI: Clean up dashboard loading state (#12395)

This commit is contained in:
RachelElysia 2023-06-19 12:08:33 -04:00 committed by GitHub
parent 39a60e037e
commit 2efb48ee0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 8 deletions

View File

@ -0,0 +1 @@
- Clean up dashboard loading states

View File

@ -422,12 +422,18 @@ const DashboardPage = ({ router, location }: IDashboardProps): JSX.Element => {
setShowAddHostsModal(!showAddHostsModal);
};
const { MANAGE_HOSTS } = paths;
const HostsSummaryCard = useInfoCard({
title: "Hosts",
action: {
action:
selectedPlatform === "all"
? {
type: "link",
text: "View all hosts",
},
}
: undefined,
actionUrl: selectedPlatform === "all" ? MANAGE_HOSTS : undefined,
total_host_count: (() => {
if (!isHostSummaryFetching && !errorHosts) {
return `${hostSummaryData?.totals_hosts_count}` || undefined;
@ -596,7 +602,7 @@ const DashboardPage = ({ router, location }: IDashboardProps): JSX.Element => {
{useInfoCard({
title: "Mobile device management (MDM)",
titleDetail: mdmTitleDetail,
showTitle: !isMacAdminsFetching,
showTitle: !isMdmFetching,
description: (
<p>
MDM is used to change settings and install software on your hosts.

View File

@ -104,8 +104,5 @@
display: flex;
justify-content: center;
align-items: center;
.loading-spinner {
margin-top: 33px;
}
}
}

View File

@ -1,6 +1,7 @@
.home-mdm {
margin-top: $pad-large;
position: relative;
height: 100%; // centers loading spinner
.component__tabs-wrapper .table-container__header {
display: none;