-
-
Notifications
You must be signed in to change notification settings - Fork 21
client auto-provisioning #627
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
Conversation
src/shared/hooks/useAddInstance.ts
Outdated
enrollment: { start, networkInfo }, | ||
} = useEnrollmentApi(); | ||
|
||
const handleAddInstance = async (payload: AddInstancePayload, rawLink?: string) => { |
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.
this is exposed outside via hook so should be in useCallback
src/pages/client/ClientPage.tsx
Outdated
refetchOnWindowFocus: false, | ||
}); | ||
|
||
const handleProvisioning = async (config: ProvisioningConfig) => { |
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.
Maybe move this new logic to an component so it will be incapsulated on it's own rather then in ClientPage
306e3b3
This adds the ability to trigger the enrollment process for uninitialized clients by providing the enrollment config through a file.
A client is assumed to be uninitialized if there are no instances configured in the DB. Only then do we check for the existence of the enrollment config.
Partially resolves #598