mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Fleet UI: Add default table empty state (#14510)
This commit is contained in:
parent
c5ffd58679
commit
eec7b439d3
@ -15,6 +15,7 @@ import Icon from "components/Icon/Icon";
|
||||
import TableContainer from "components/TableContainer";
|
||||
import ShowQueryModal from "components/modals/ShowQueryModal";
|
||||
import TooltipWrapper from "components/TooltipWrapper";
|
||||
import EmptyTable from "components/EmptyTable";
|
||||
|
||||
import generateResultsTableHeaders from "./QueryReportTableConfig";
|
||||
|
||||
@ -80,10 +81,6 @@ const QueryReport = ({
|
||||
setShowQueryModal(!showQueryModal);
|
||||
};
|
||||
|
||||
const renderNoResults = () => {
|
||||
return <p className="no-results-message">TODO</p>;
|
||||
};
|
||||
|
||||
const renderTableButtons = () => {
|
||||
return (
|
||||
<div className={`${baseClass}__results-cta`}>
|
||||
@ -140,7 +137,17 @@ const QueryReport = ({
|
||||
<TableContainer
|
||||
columns={tableHeaders}
|
||||
data={tableResults(queryReport?.results || [])}
|
||||
emptyComponent={renderNoResults}
|
||||
// All empty states are handled in QueryDetailsPage.tsx and returned in lieu of QueryReport.tsx
|
||||
emptyComponent={() => {
|
||||
return (
|
||||
<EmptyTable
|
||||
className={baseClass}
|
||||
iconName="empty-software"
|
||||
header={"Nothing to report yet"}
|
||||
info={"This query has returned no data so far."}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
isLoading={false}
|
||||
isClientSidePagination
|
||||
isClientSideFilter
|
||||
|
Loading…
Reference in New Issue
Block a user