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);
|
setShowAddHostsModal(!showAddHostsModal);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const { MANAGE_HOSTS } = paths;
|
||||||
|
|
||||||
const HostsSummaryCard = useInfoCard({
|
const HostsSummaryCard = useInfoCard({
|
||||||
title: "Hosts",
|
title: "Hosts",
|
||||||
action: {
|
action:
|
||||||
|
selectedPlatform === "all"
|
||||||
|
? {
|
||||||
type: "link",
|
type: "link",
|
||||||
text: "View all hosts",
|
text: "View all hosts",
|
||||||
},
|
}
|
||||||
|
: undefined,
|
||||||
|
actionUrl: selectedPlatform === "all" ? MANAGE_HOSTS : undefined,
|
||||||
total_host_count: (() => {
|
total_host_count: (() => {
|
||||||
if (!isHostSummaryFetching && !errorHosts) {
|
if (!isHostSummaryFetching && !errorHosts) {
|
||||||
return `${hostSummaryData?.totals_hosts_count}` || undefined;
|
return `${hostSummaryData?.totals_hosts_count}` || undefined;
|
||||||
@ -596,7 +602,7 @@ const DashboardPage = ({ router, location }: IDashboardProps): JSX.Element => {
|
|||||||
{useInfoCard({
|
{useInfoCard({
|
||||||
title: "Mobile device management (MDM)",
|
title: "Mobile device management (MDM)",
|
||||||
titleDetail: mdmTitleDetail,
|
titleDetail: mdmTitleDetail,
|
||||||
showTitle: !isMacAdminsFetching,
|
showTitle: !isMdmFetching,
|
||||||
description: (
|
description: (
|
||||||
<p>
|
<p>
|
||||||
MDM is used to change settings and install software on your hosts.
|
MDM is used to change settings and install software on your hosts.
|
||||||
|
@ -104,8 +104,5 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.loading-spinner {
|
|
||||||
margin-top: 33px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
.home-mdm {
|
.home-mdm {
|
||||||
margin-top: $pad-large;
|
margin-top: $pad-large;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
height: 100%; // centers loading spinner
|
||||||
|
|
||||||
.component__tabs-wrapper .table-container__header {
|
.component__tabs-wrapper .table-container__header {
|
||||||
display: none;
|
display: none;
|
||||||
|
Loading…
Reference in New Issue
Block a user