-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NO-ISSUE] refactor how we login to jolokia
To minimize code duplication, extract the jolokia login to a new component JolokiaAuthentification. This component does the login and creates a context for its children components. Now a developer can use this pattern to ensure the component someComponent will get in a logged in context. ```typescript const AuthenticatedComponent: FC = () => { const brokerName = 'someName'; const namespace = 'someNamespace'; const podOrdinal = 0; const { brokerCr } = UseGetBrokerCR(brokerName, namespace); return ( <JolokiaAuthentification brokerCR={brokerCr} podOrdinal={podOrdinal}> <SomeComponent /> </JolokiaAuthentification> ); } ```
- Loading branch information
Showing
10 changed files
with
339 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.