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

[NO-ISSUE] refactor how we login to jolokia #265

Merged
merged 1 commit into from
Aug 14, 2024

Commits on Aug 14, 2024

  1. [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>
      );
    }
    ```
    lavocatt committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    ef75fa9 View commit details
    Browse the repository at this point in the history