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

Fix Snapshots Policies Alignment Issue in IE11 #54866

Merged
merged 3 commits into from
Jan 16, 2020
Merged
Changes from 2 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 @@ -199,99 +199,93 @@ export const PolicyTable: React.FunctionComponent<Props> = ({
render: ({ name, inProgress, isManagedPolicy }: SlmPolicy) => {
return (
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
alisonelizabeth marked this conversation as resolved.
Show resolved Hide resolved
<PolicyExecuteProvider>
{executePolicyPrompt => {
return (
<EuiToolTip
content={
Boolean(inProgress)
? i18n.translate(
'xpack.snapshotRestore.policyList.table.actionExecuteDisabledTooltip',
{ defaultMessage: 'Policy is running' }
)
: i18n.translate(
'xpack.snapshotRestore.policyList.table.actionExecuteTooltip',
{ defaultMessage: 'Run now' }
)
}
>
<EuiButtonIcon
aria-label={i18n.translate(
'xpack.snapshotRestore.policyList.table.actionExecuteAriaLabel',
{
defaultMessage: `Run '{name}' immediately`,
values: { name },
}
)}
iconType="play"
color="primary"
data-test-subj="executePolicyButton"
onClick={() => executePolicyPrompt(name, onPolicyExecuted)}
disabled={Boolean(inProgress)}
/>
</EuiToolTip>
);
}}
</PolicyExecuteProvider>
</EuiFlexItem>
<EuiFlexItem>
<EuiToolTip
content={i18n.translate(
'xpack.snapshotRestore.policyList.table.actionEditTooltip',
{ defaultMessage: 'Edit' }
)}
>
<EuiButtonIcon
aria-label={i18n.translate(
'xpack.snapshotRestore.policyList.table.actionEditAriaLabel',
{
defaultMessage: `Edit policy '{name}'`,
values: { name },
<PolicyExecuteProvider>
{executePolicyPrompt => {
return (
<EuiToolTip
content={
Boolean(inProgress)
? i18n.translate(
'xpack.snapshotRestore.policyList.table.actionExecuteDisabledTooltip',
{ defaultMessage: 'Policy is running' }
)
: i18n.translate(
'xpack.snapshotRestore.policyList.table.actionExecuteTooltip',
{ defaultMessage: 'Run now' }
)
}
)}
iconType="pencil"
color="primary"
href={linkToEditPolicy(name)}
data-test-subj="editPolicyButton"
/>
</EuiToolTip>
</EuiFlexItem>
<EuiFlexItem>
<PolicyDeleteProvider>
{deletePolicyPrompt => {
const label = !isManagedPolicy
? i18n.translate(
'xpack.snapshotRestore.policyList.table.actionDeleteTooltip',
{ defaultMessage: 'Delete' }
)
: i18n.translate(
'xpack.snapshotRestore.policyList.table.deleteManagedPolicyTableActionTooltip',
>
<EuiButtonIcon
aria-label={i18n.translate(
'xpack.snapshotRestore.policyList.table.actionExecuteAriaLabel',
{
defaultMessage: `Run '{name}' immediately`,
values: { name },
}
)}
iconType="play"
color="primary"
data-test-subj="executePolicyButton"
onClick={() => executePolicyPrompt(name, onPolicyExecuted)}
disabled={Boolean(inProgress)}
/>
</EuiToolTip>
);
}}
</PolicyExecuteProvider>
<EuiToolTip
content={i18n.translate(
'xpack.snapshotRestore.policyList.table.actionEditTooltip',
{ defaultMessage: 'Edit' }
)}
>
<EuiButtonIcon
aria-label={i18n.translate(
'xpack.snapshotRestore.policyList.table.actionEditAriaLabel',
{
defaultMessage: `Edit policy '{name}'`,
values: { name },
}
)}
iconType="pencil"
color="primary"
href={linkToEditPolicy(name)}
data-test-subj="editPolicyButton"
/>
</EuiToolTip>
<PolicyDeleteProvider>
{deletePolicyPrompt => {
const label = !isManagedPolicy
? i18n.translate(
'xpack.snapshotRestore.policyList.table.actionDeleteTooltip',
{ defaultMessage: 'Delete' }
)
: i18n.translate(
'xpack.snapshotRestore.policyList.table.deleteManagedPolicyTableActionTooltip',
{
defaultMessage: 'You cannot delete a managed policy.',
}
);
return (
<EuiToolTip content={label}>
<EuiButtonIcon
aria-label={i18n.translate(
'xpack.snapshotRestore.policyList.table.actionDeleteAriaLabel',
{
defaultMessage: 'You cannot delete a managed policy.',
defaultMessage: `Delete policy '{name}'`,
values: { name },
}
);
return (
<EuiToolTip content={label}>
<EuiButtonIcon
aria-label={i18n.translate(
'xpack.snapshotRestore.policyList.table.actionDeleteAriaLabel',
{
defaultMessage: `Delete policy '{name}'`,
values: { name },
}
)}
iconType="trash"
color="danger"
data-test-subj="deletePolicyButton"
onClick={() => deletePolicyPrompt([name], onPolicyDeleted)}
isDisabled={isManagedPolicy}
/>
</EuiToolTip>
);
}}
</PolicyDeleteProvider>
</EuiFlexItem>
)}
iconType="trash"
color="danger"
data-test-subj="deletePolicyButton"
onClick={() => deletePolicyPrompt([name], onPolicyDeleted)}
isDisabled={isManagedPolicy}
/>
</EuiToolTip>
);
}}
</PolicyDeleteProvider>
</EuiFlexGroup>
);
},
Expand Down