diff --git a/changes/bug-12332-dashboard-loading-state b/changes/bug-12332-dashboard-loading-state new file mode 100644 index 0000000000..526bdfbdb7 --- /dev/null +++ b/changes/bug-12332-dashboard-loading-state @@ -0,0 +1 @@ +- Clean up dashboard loading states diff --git a/frontend/pages/DashboardPage/DashboardPage.tsx b/frontend/pages/DashboardPage/DashboardPage.tsx index 6c05cb33bb..d1a9febd4b 100644 --- a/frontend/pages/DashboardPage/DashboardPage.tsx +++ b/frontend/pages/DashboardPage/DashboardPage.tsx @@ -422,12 +422,18 @@ const DashboardPage = ({ router, location }: IDashboardProps): JSX.Element => { setShowAddHostsModal(!showAddHostsModal); }; + const { MANAGE_HOSTS } = paths; + const HostsSummaryCard = useInfoCard({ title: "Hosts", - action: { - type: "link", - text: "View all hosts", - }, + 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: (
MDM is used to change settings and install software on your hosts. diff --git a/frontend/pages/DashboardPage/cards/ActivityFeed/_styles.scss b/frontend/pages/DashboardPage/cards/ActivityFeed/_styles.scss index 0657a49523..531f20c494 100644 --- a/frontend/pages/DashboardPage/cards/ActivityFeed/_styles.scss +++ b/frontend/pages/DashboardPage/cards/ActivityFeed/_styles.scss @@ -104,8 +104,5 @@ display: flex; justify-content: center; align-items: center; - .loading-spinner { - margin-top: 33px; - } } } diff --git a/frontend/pages/DashboardPage/cards/MDM/_styles.scss b/frontend/pages/DashboardPage/cards/MDM/_styles.scss index 8452d1ebff..8fe69290f7 100644 --- a/frontend/pages/DashboardPage/cards/MDM/_styles.scss +++ b/frontend/pages/DashboardPage/cards/MDM/_styles.scss @@ -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;