mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Fleet UI: Clean up dashboard loading state (#12395)
This commit is contained in:
parent
39a60e037e
commit
2efb48ee0c
1
changes/bug-12332-dashboard-loading-state
Normal file
1
changes/bug-12332-dashboard-loading-state
Normal file
@ -0,0 +1 @@
|
||||
- Clean up dashboard loading states
|
@ -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.
|
||||
|
@ -104,8 +104,5 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.loading-spinner {
|
||||
margin-top: 33px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user