diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/_home.scss b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/_home.scss index c714222daa98b..741ee76985937 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/_home.scss +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/_home.scss @@ -28,4 +28,19 @@ .euiToolTipAnchor { display: flex; } -} \ No newline at end of file +} + +/* + * Wraps long snapshot name with ellipsis when it is rendered with an icon + */ +.snapshotRestorePolicyTableSnapshotFailureContainer { + max-width: 200px; + > .euiFlexItem:last-child { + min-width: 0; + .euiText { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } +} diff --git a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_table/policy_table.tsx b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_table/policy_table.tsx index a47b670177ca8..19239a282eb29 100644 --- a/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_table/policy_table.tsx +++ b/x-pack/legacy/plugins/snapshot_restore/public/app/sections/home/policy_list/policy_table/policy_table.tsx @@ -14,6 +14,8 @@ import { EuiToolTip, EuiButtonIcon, EuiLoadingSpinner, + EuiText, + EuiIcon, } from '@elastic/eui'; import { SlmPolicy } from '../../../../../../common/types'; @@ -94,8 +96,40 @@ export const PolicyTable: React.FunctionComponent = ({ name: i18n.translate('xpack.snapshotRestore.policyList.table.snapshotNameColumnTitle', { defaultMessage: 'Snapshot name', }), - truncateText: true, sortable: true, + render: ( + snapshotName: SlmPolicy['snapshotName'], + { lastFailure, lastSuccess }: SlmPolicy + ) => { + // Alert user if last snapshot failed + if (lastSuccess && lastFailure && lastFailure.time > lastSuccess.time) { + return ( + + + + + + + + {snapshotName} + + + ); + } + return snapshotName; + }, }, { field: 'repository',