diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/package_policies_panel.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/package_policies_panel.tsx index 4061b86f1f74..4d8cb5a16034 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/package_policies_panel.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/package_policies_panel.tsx @@ -13,7 +13,7 @@ import { EuiTableFieldDataColumnType, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { FormattedRelative } from '@kbn/i18n/react'; +import { FormattedRelative, FormattedMessage } from '@kbn/i18n/react'; import { useGetPackageInstallStatus } from '../../hooks'; import { InstallStatus } from '../../../../types'; import { useLink } from '../../../../hooks'; @@ -37,6 +37,7 @@ const IntegrationDetailsLink = memo<{ + {description} + + ); + }, }, { field: 'packagePolicy.policy_id', @@ -172,7 +180,7 @@ export const PackagePoliciesPanel = ({ name, version }: PackagePoliciesPanelProp truncateText: true, render(updatedAt: PackagePolicyAndAgentPolicy['packagePolicy']['updated_at']) { return ( - + ); @@ -182,6 +190,24 @@ export const PackagePoliciesPanel = ({ name, version }: PackagePoliciesPanelProp [] ); + const noItemsMessage = useMemo(() => { + return isLoading ? ( + + ) : undefined; + }, [isLoading]); + + const tablePagination = useMemo(() => { + return { + pageIndex: pagination.currentPage - 1, + pageSize: pagination.pageSize, + totalItemCount: data?.total ?? 0, + pageSizeOptions, + }; + }, [data?.total, pageSizeOptions, pagination.currentPage, pagination.pageSize]); + // if they arrive at this page and the package is not installed, send them to overview // this happens if they arrive with a direct url or they uninstall while on this tab if (packageInstallStatus.status !== InstallStatus.installed) { @@ -192,15 +218,11 @@ export const PackagePoliciesPanel = ({ name, version }: PackagePoliciesPanelProp ); };