mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Add loading spinner to host details' scripts tab (#15607)
This commit is contained in:
parent
0967256cce
commit
6ee5d87d48
2 changed files with 6 additions and 2 deletions
1
changes/14998-add-loading-spinner-to-scripts
Normal file
1
changes/14998-add-loading-spinner-to-scripts
Normal file
|
|
@ -0,0 +1 @@
|
|||
- Fixed loading indicator not appearing on host details' scripts tab.
|
||||
|
|
@ -15,6 +15,7 @@ import Card from "components/Card";
|
|||
import TableContainer from "components/TableContainer";
|
||||
import EmptyTable from "components/EmptyTable";
|
||||
import DataError from "components/DataError";
|
||||
import Spinner from "components/Spinner";
|
||||
import { ITableQueryData } from "components/TableContainer/TableContainer";
|
||||
import { IHost } from "interfaces/host";
|
||||
import { IUser } from "interfaces/user";
|
||||
|
|
@ -102,12 +103,14 @@ const Scripts = ({
|
|||
return (
|
||||
<Card className={baseClass} borderRadiusSize="large" includeShadow>
|
||||
<h2>Scripts</h2>
|
||||
{data && data.length === 0 ? (
|
||||
{isLoadingScriptData && <Spinner />}
|
||||
{!isLoadingScriptData && data && data.length === 0 && (
|
||||
<EmptyTable
|
||||
header="No scripts are available for this host"
|
||||
info="Expecting to see scripts? Try selecting “Refetch” to ask this host to report new vitals."
|
||||
/>
|
||||
) : (
|
||||
)}
|
||||
{!isLoadingScriptData && data && data.length > 0 && (
|
||||
<TableContainer
|
||||
resultsTitle=""
|
||||
emptyComponent={() => <></>}
|
||||
|
|
|
|||
Loading…
Reference in a new issue