Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Index Management] Update the columns width in the index templates and component templates tables #175337

Merged
merged 5 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const ComponentTable: FunctionComponent<Props> = ({
const [selection, setSelection] = useState<ComponentTemplateListItem[]>([]);

const tableProps: EuiInMemoryTableProps<ComponentTemplateListItem> = {
tableLayout: 'auto',
itemId: 'name',
isSelectable: true,
'data-test-subj': 'componentTemplatesTable',
Expand Down Expand Up @@ -154,9 +155,9 @@ export const ComponentTable: FunctionComponent<Props> = ({
defaultMessage: 'Name',
}),
sortable: true,
width: '20%',
width: '45%',
render: (name: string, item: ComponentTemplateListItem) => (
<>
<span>
<EuiLink
{...reactRouterNavigate(
history,
Expand All @@ -171,15 +172,15 @@ export const ComponentTable: FunctionComponent<Props> = ({
</EuiLink>
{item.isManaged && (
<>
&nbsp;
{' '}
<EuiBadge color="hollow" data-test-subj="isManagedBadge">
{i18n.translate('xpack.idxMgmt.componentTemplatesList.table.managedBadgeLabel', {
defaultMessage: 'Managed',
})}
</EuiBadge>
</>
)}
</>
</span>
),
},
{
Expand Down Expand Up @@ -211,6 +212,7 @@ export const ComponentTable: FunctionComponent<Props> = ({
defaultMessage: 'Mappings',
}),
truncateText: true,
align: 'center',
sortable: true,
render: (hasMappings: boolean) => (hasMappings ? <EuiIcon type="check" /> : null),
},
Expand All @@ -220,6 +222,7 @@ export const ComponentTable: FunctionComponent<Props> = ({
defaultMessage: 'Settings',
}),
truncateText: true,
align: 'center',
sortable: true,
render: (hasSettings: boolean) => (hasSettings ? <EuiIcon type="check" /> : null),
},
Expand All @@ -229,6 +232,7 @@ export const ComponentTable: FunctionComponent<Props> = ({
defaultMessage: 'Aliases',
}),
truncateText: true,
align: 'center',
sortable: true,
render: (hasAliases: boolean) => (hasAliases ? <EuiIcon type="check" /> : null),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,21 @@ export const TemplateTable: React.FunctionComponent<Props> = ({
name: i18n.translate('xpack.idxMgmt.templateList.table.nameColumnTitle', {
defaultMessage: 'Name',
}),
truncateText: true,
sortable: true,
width: '30%',
render: (name: TemplateListItem['name'], item: TemplateListItem) => {
return (
<>
<span>
<EuiLink
{...reactRouterNavigate(history, getTemplateDetailsLink(name), () =>
uiMetricService.trackMetric(METRIC_TYPE.CLICK, UIM_TEMPLATE_SHOW_DETAILS_CLICK)
)}
data-test-subj="templateDetailsLink"
>
{name}
</EuiLink>
&nbsp;
</EuiLink>{' '}
<TemplateTypeIndicator templateType={item._kbnMeta.type} />
</>
</span>
);
},
},
Expand All @@ -72,8 +71,8 @@ export const TemplateTable: React.FunctionComponent<Props> = ({
name: i18n.translate('xpack.idxMgmt.templateList.table.indexPatternsColumnTitle', {
defaultMessage: 'Index patterns',
}),
truncateText: true,
sortable: true,
width: '20%',
render: (indexPatterns: string[]) => <strong>{indexPatterns.join(', ')}</strong>,
},
{
Expand All @@ -83,12 +82,15 @@ export const TemplateTable: React.FunctionComponent<Props> = ({
}),
truncateText: true,
sortable: true,
width: '20%',
render: (composedOf: string[] = []) => <span>{composedOf.join(', ')}</span>,
},
{
name: i18n.translate('xpack.idxMgmt.templateList.table.dataStreamColumnTitle', {
defaultMessage: 'Data stream',
}),
width: '90px',
align: 'center',
truncateText: true,
render: (template: TemplateListItem) =>
template._kbnMeta.hasDatastream ? <EuiIcon type="check" /> : null,
Expand Down