Skip to content

Commit

Permalink
[Enterprise Search] Remove last updated stat card from Index Detail: …
Browse files Browse the repository at this point in the history
…Overview in Content app (#136666)

* Remove last updated box from index overview

* Clean-up overview page
  • Loading branch information
Byron Hulcher authored Jul 20, 2022
1 parent f30cfc1 commit aec5dc9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const GenerateApiKeyPanel: React.FC = () => {
)}
<EuiFlexGroup>
<EuiFlexItem>
<EuiPanel>
<EuiPanel hasBorder>
<EuiFlexGroup direction="column">
<EuiFlexItem>
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ export const SearchIndexOverview: React.FC = () => {
}
/>
)}
{isApi && <GenerateApiKeyPanel />}
{isApi && (
<>
<EuiSpacer />
<GenerateApiKeyPanel />
</>
)}
{isCrawler && (
<>
<EuiSpacer />
<CrawlRequestsPanel />
<CrawlDetailsFlyout />
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiStat, EuiStatProps } from '@ela

import { i18n } from '@kbn/i18n';

import { CustomFormattedTimestamp } from '../../../shared/custom_formatted_timestamp/custom_formatted_timestamp';

import { OverviewLogic } from './overview.logic';

interface TotalStatsProps {
Expand All @@ -26,9 +24,6 @@ interface TotalStatsProps {
export const TotalStats: React.FC<TotalStatsProps> = ({ ingestionType, additionalItems = [] }) => {
const { indexData, isSuccess } = useValues(OverviewLogic);
const documentCount = indexData?.total.docs.count ?? 0;
const lastUpdated = (
<CustomFormattedTimestamp timestamp={Date.now() - 1000 * 60 * 12 /* TODO: Implement this */} />
);
const isLoading = !isSuccess;
const stats: EuiStatProps[] = [
{
Expand All @@ -51,16 +46,6 @@ export const TotalStats: React.FC<TotalStatsProps> = ({ ingestionType, additiona
isLoading,
title: documentCount,
},
{
description: i18n.translate(
'xpack.enterpriseSearch.content.searchIndex.totalStats.lastUpdatedCardLabel',
{
defaultMessage: 'Last updated',
}
),
isLoading,
title: lastUpdated,
},
...additionalItems,
];

Expand Down

0 comments on commit aec5dc9

Please sign in to comment.