-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Fleet] Allow some agent actions for managed policies #155923
[Fleet] Allow some agent actions for managed policies #155923
Conversation
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@elasticmachine merge upstream |
@nchaulet Sorry to expand the scope, I didn't see this PR was already up, but would you mind incorporating my feedback here?: #155294 (comment) 🙏 |
…quest-diagnostics-managed-policy
…hub.com:nchaulet/kibana into feature-show-request-diagnostics-managed-policy
@jen-huang just updated my PR with that changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small suggestion, otherwise LGTM. Thanks for the tests!
@@ -67,7 +67,7 @@ export const AgentDetailsActionMenu: React.FunctionComponent<{ | |||
onClick={() => { | |||
setIsReassignFlyoutOpen(true); | |||
}} | |||
disabled={!agent.active} | |||
disabled={!agent.active || agentPolicy?.is_managed} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the UX would be less confusing if we hid these options instead of disabling them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I will make the change
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @nchaulet |
(cherry picked from commit f06e55f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…#156007) # Backport This will backport the following commits from `main` to `8.8`: - [[Fleet] Allow some agent actions for managed policies (#155923)](#155923) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-04-27T13:14:09Z","message":"[Fleet] Allow some agent actions for managed policies (#155923)","sha":"f06e55f500d84df9b281e912e68338e83ee9b3bc","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.8.0","v8.9.0"],"number":155923,"url":"https://github.com/elastic/kibana/pull/155923","mergeCommit":{"message":"[Fleet] Allow some agent actions for managed policies (#155923)","sha":"f06e55f500d84df9b281e912e68338e83ee9b3bc"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155923","number":155923,"mergeCommit":{"message":"[Fleet] Allow some agent actions for managed policies (#155923)","sha":"f06e55f500d84df9b281e912e68338e83ee9b3bc"}}]}] BACKPORT--> Co-authored-by: Nicolas Chaulet <[email protected]>
Summary
Resolve #155294
That PR allow agent actions for managed policy:
UI Changes
Tests
I added a unit test to cover that
You can manually test that by enrolling an agent into a managed policy and check the button is enabled