mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
(cherry picked from commit a52d8b31db
)
Co-authored-by: Efe Gürkan YALAMAN <efeguerkan.yalaman@elastic.co>
This commit is contained in:
parent
4922f5da53
commit
30bd13db5e
1 changed files with 7 additions and 30 deletions
|
@ -17,7 +17,6 @@ import {
|
|||
EuiText,
|
||||
} from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FormattedRelative } from '@kbn/i18n-react';
|
||||
|
||||
import { Meta } from '../../../../../common/types';
|
||||
import { EuiLinkTo, EuiButtonIconTo } from '../../../shared/react_router_helpers';
|
||||
|
@ -55,6 +54,7 @@ const columns: Array<EuiBasicTableColumn<ElasticsearchViewIndex>> = [
|
|||
),
|
||||
sortable: true,
|
||||
truncateText: true,
|
||||
width: '40%',
|
||||
},
|
||||
{
|
||||
field: 'health',
|
||||
|
@ -69,6 +69,7 @@ const columns: Array<EuiBasicTableColumn<ElasticsearchViewIndex>> = [
|
|||
),
|
||||
sortable: true,
|
||||
truncateText: true,
|
||||
width: '10%',
|
||||
},
|
||||
{
|
||||
field: 'total.docs.count',
|
||||
|
@ -77,6 +78,7 @@ const columns: Array<EuiBasicTableColumn<ElasticsearchViewIndex>> = [
|
|||
}),
|
||||
sortable: true,
|
||||
truncateText: true,
|
||||
width: '10%',
|
||||
},
|
||||
{
|
||||
field: 'ingestionMethod',
|
||||
|
@ -90,34 +92,7 @@ const columns: Array<EuiBasicTableColumn<ElasticsearchViewIndex>> = [
|
|||
<EuiText size="s">{ingestionMethodToText(ingestionMethod)}</EuiText>
|
||||
),
|
||||
truncateText: true,
|
||||
},
|
||||
{
|
||||
field: 'lastUpdated',
|
||||
name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.lastUpdated.columnTitle', {
|
||||
defaultMessage: 'Last updated',
|
||||
}),
|
||||
render: (dateString: string) => {
|
||||
if (dateString === 'never') {
|
||||
return (
|
||||
<EuiText size="s">
|
||||
{i18n.translate('xpack.enterpriseSearch.content.searchIndices.lastUpdated.never', {
|
||||
defaultMessage: 'Never',
|
||||
})}
|
||||
</EuiText>
|
||||
);
|
||||
}
|
||||
return dateString ? (
|
||||
<FormattedRelative value={new Date(dateString)} />
|
||||
) : (
|
||||
<EuiText size="s">
|
||||
{i18n.translate('xpack.enterpriseSearch.content.searchIndices.lastUpdated.none', {
|
||||
defaultMessage: 'Unknown',
|
||||
})}
|
||||
</EuiText>
|
||||
);
|
||||
},
|
||||
sortable: true,
|
||||
truncateText: true,
|
||||
width: '10%',
|
||||
},
|
||||
{
|
||||
name: i18n.translate(
|
||||
|
@ -150,6 +125,7 @@ const columns: Array<EuiBasicTableColumn<ElasticsearchViewIndex>> = [
|
|||
}
|
||||
},
|
||||
truncateText: true,
|
||||
width: '10%',
|
||||
},
|
||||
{
|
||||
actions: [
|
||||
|
@ -169,6 +145,7 @@ const columns: Array<EuiBasicTableColumn<ElasticsearchViewIndex>> = [
|
|||
name: i18n.translate('xpack.enterpriseSearch.content.searchIndices.actions.columnTitle', {
|
||||
defaultMessage: 'Actions',
|
||||
}),
|
||||
width: '5%',
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -190,7 +167,7 @@ export const IndicesTable: React.FC<IndicesTableProps> = ({
|
|||
columns={columns}
|
||||
onChange={onChange}
|
||||
pagination={{ ...convertMetaToPagination(meta), showPerPageOptions: false }}
|
||||
tableLayout="auto"
|
||||
tableLayout="fixed"
|
||||
loading={isLoading}
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue