mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Ingest Manager] Disable unenroll from listing for inactive agent (#73348)
This commit is contained in:
parent
f6a53f6805
commit
c8bb0782ea
2 changed files with 3 additions and 2 deletions
|
@ -53,6 +53,7 @@ export const AgentDetailsActionMenu: React.FunctionComponent<{
|
|||
onClick={() => {
|
||||
setIsReassignFlyoutOpen(true);
|
||||
}}
|
||||
disabled={!agent.active}
|
||||
key="reassignConfig"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
|
|
@ -90,6 +90,7 @@ const RowActions = React.memo<{ agent: Agent; onReassignClick: () => void; refre
|
|||
onClick={() => {
|
||||
onReassignClick();
|
||||
}}
|
||||
disabled={!agent.active}
|
||||
key="reassignConfig"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -97,11 +98,10 @@ const RowActions = React.memo<{ agent: Agent; onReassignClick: () => void; refre
|
|||
defaultMessage="Assign new agent config"
|
||||
/>
|
||||
</EuiContextMenuItem>,
|
||||
|
||||
<AgentUnenrollProvider forceUnenroll={isUnenrolling}>
|
||||
{(unenrollAgentsPrompt) => (
|
||||
<EuiContextMenuItem
|
||||
disabled={!hasWriteCapabilites}
|
||||
disabled={!hasWriteCapabilites || !agent.active}
|
||||
icon="cross"
|
||||
onClick={() => {
|
||||
unenrollAgentsPrompt([agent.id], 1, () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue