mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Place 'Delete' row action button last in Remote Clusters and Autofollow Pattern tables, for consistency with other ES UI apps. (#42805) (#42920)
This commit is contained in:
parent
cc53b0fbe9
commit
6826993ca6
2 changed files with 48 additions and 48 deletions
|
@ -131,6 +131,28 @@ export class AutoFollowPatternTable extends PureComponent {
|
|||
}
|
||||
),
|
||||
actions: [
|
||||
{
|
||||
render: ({ name }) => {
|
||||
const label = i18n.translate('xpack.crossClusterReplication.autoFollowPatternList.table.actionEditDescription', {
|
||||
defaultMessage: 'Edit auto-follow pattern',
|
||||
});
|
||||
|
||||
return (
|
||||
<EuiToolTip
|
||||
content={label}
|
||||
delay="long"
|
||||
>
|
||||
<EuiButtonIcon
|
||||
aria-label={label}
|
||||
iconType="pencil"
|
||||
color="primary"
|
||||
href={routing.getAutoFollowPatternPath(name)}
|
||||
data-test-subj="editButton"
|
||||
/>
|
||||
</EuiToolTip>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
render: ({ name }) => {
|
||||
const label = i18n.translate(
|
||||
|
@ -160,28 +182,6 @@ export class AutoFollowPatternTable extends PureComponent {
|
|||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
render: ({ name }) => {
|
||||
const label = i18n.translate('xpack.crossClusterReplication.autoFollowPatternList.table.actionEditDescription', {
|
||||
defaultMessage: 'Edit auto-follow pattern',
|
||||
});
|
||||
|
||||
return (
|
||||
<EuiToolTip
|
||||
content={label}
|
||||
delay="long"
|
||||
>
|
||||
<EuiButtonIcon
|
||||
aria-label={label}
|
||||
iconType="pencil"
|
||||
color="primary"
|
||||
href={routing.getAutoFollowPatternPath(name)}
|
||||
data-test-subj="editButton"
|
||||
/>
|
||||
</EuiToolTip>
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
width: '100px',
|
||||
}];
|
||||
|
|
|
@ -152,6 +152,32 @@ export class RemoteClusterTable extends Component {
|
|||
}),
|
||||
width: '100px',
|
||||
actions: [{
|
||||
render: ({ name, isConfiguredByNode }) => {
|
||||
const label = isConfiguredByNode
|
||||
? i18n.translate('xpack.remoteClusters.remoteClusterList.table.actionBlockedEditDescription', {
|
||||
defaultMessage: `Remote clusters defined in elasticsearch.yml can't be edited`,
|
||||
}) : i18n.translate('xpack.remoteClusters.remoteClusterList.table.actionEditDescription', {
|
||||
defaultMessage: 'Edit remote cluster',
|
||||
});
|
||||
|
||||
return (
|
||||
<EuiToolTip
|
||||
content={label}
|
||||
delay="long"
|
||||
>
|
||||
<EuiButtonIcon
|
||||
data-test-subj="remoteClusterTableRowEditButton"
|
||||
aria-label={label}
|
||||
iconType="pencil"
|
||||
color="primary"
|
||||
isDisabled={isConfiguredByNode}
|
||||
{...getRouterLinkProps(`${CRUD_APP_BASE_PATH}/edit/${name}`)}
|
||||
disabled={isConfiguredByNode}
|
||||
/>
|
||||
</EuiToolTip>
|
||||
);
|
||||
},
|
||||
}, {
|
||||
render: ({ name, isConfiguredByNode }) => {
|
||||
const label = isConfiguredByNode
|
||||
? i18n.translate('xpack.remoteClusters.remoteClusterList.table.actionBlockedDeleteDescription', {
|
||||
|
@ -180,32 +206,6 @@ export class RemoteClusterTable extends Component {
|
|||
</EuiToolTip>
|
||||
);
|
||||
},
|
||||
}, {
|
||||
render: ({ name, isConfiguredByNode }) => {
|
||||
const label = isConfiguredByNode
|
||||
? i18n.translate('xpack.remoteClusters.remoteClusterList.table.actionBlockedEditDescription', {
|
||||
defaultMessage: `Remote clusters defined in elasticsearch.yml can't be edited`,
|
||||
}) : i18n.translate('xpack.remoteClusters.remoteClusterList.table.actionEditDescription', {
|
||||
defaultMessage: 'Edit remote cluster',
|
||||
});
|
||||
|
||||
return (
|
||||
<EuiToolTip
|
||||
content={label}
|
||||
delay="long"
|
||||
>
|
||||
<EuiButtonIcon
|
||||
data-test-subj="remoteClusterTableRowEditButton"
|
||||
aria-label={label}
|
||||
iconType="pencil"
|
||||
color="primary"
|
||||
isDisabled={isConfiguredByNode}
|
||||
{...getRouterLinkProps(`${CRUD_APP_BASE_PATH}/edit/${name}`)}
|
||||
disabled={isConfiguredByNode}
|
||||
/>
|
||||
</EuiToolTip>
|
||||
);
|
||||
},
|
||||
}],
|
||||
}];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue