[Fleet] Show Fleet Server instructions when user wants to add another Fleet Server after the first#97681
Conversation
… same token and command steps from fleet server onboarding UI
bacc7d3 to
f20fbbe
Compare
|
Pinging @elastic/fleet (Team:Fleet) |
| withKeySelection={setSelectedAPIKeyId ? true : false} | ||
| onKeyChange={setSelectedAPIKeyId} | ||
| onAgentPolicyChange={setSelectedPolicyId} | ||
| onAgentPolicyChange={async (policyID) => { |
There was a problem hiding this comment.
maybe a useCallack for that callback here will be good? or better what do you think of moving this logic in an useEffect with policyId as a dependency in the parent component?
There was a problem hiding this comment.
for the sake of time, I'll move this to a useCallback
|
Does it make sense to show the fleet server policy in the standalone tab? |
Hmm, good question, probably not right? I'll file an issue for this. Edit: filed #97707 |
nchaulet
left a comment
There was a problem hiding this comment.
🚀 it works as expected, (not for that PR but this component looks like to be a good candidate to have unit testing so we could refactor it without breaking it)
|
@jen-huang thanks for the quick turnaround! I can't see it in your screenshot, but you fill the token into the command the user copies? Lastly, what do you think about including a link to the troubleshooting docs at the bottom?
|
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @jen-huang |
… Fleet Server after the first (elastic#97681) * In add agent flyout, when selected policy contains fleet server, show same token and command steps from fleet server onboarding UI * Fix types * Move policy change handler to useCallback
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
That's right, after the user clicks Generate token we fill in the token and ES URL into the commands. I'll add a troubleshoot doc link in a follow up PR. |
Summary
Resolves #96295. Follow up to #97585.
This PR adjusts the Add agent flyout so that if a user chooses selects an agent policy that contains
fleet_serverpackage, we show the same service token and command steps in the Fleet Server onboarding UI. This will allow the user to enroll more than one Fleet Server.The copy for Step 3 (command step) was also adjusted to have more information about quick start vs production-ready deployment options, inspired by @mostlyjason's designs in #96295 (comment). This is reflected in both the flyout and onboarding UI since the same component is used.