Make API_BASE_PATH, UI_BASE_PATH, UI_EXTERNAL_LOGIN_URI configurable at load-time #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #93
The UI builds produced by
npm run build
can be further configured by serving a/pulp-ui-config.json
alongside the built UI. (Note it has to be mapped at/
, not just whereverindex.html
is served from.)API_BASE_PATH
- defaults to/pulp/api/v3/
- change when using domains or a different pathUI_BASE_PATH
- defaults to/ui/
- change when only serving index in a subdirectory, or want different browser path prefixUI_EXTERNAL_LOGIN_URI
- defaults to nothing - set to something like/login/
when using an SSOEXTRA_VERSION
- an extra version string to display in about modalAlso documents
API_PROXY
in dev mode, and restore SSO logic whenUI_EXTERNAL_LOGIN_URI
is set.default config in
pulp-ui/pulp-ui-config.json
gets copied byCopyWebpackPlugin
todist/
,and must be served from
/pulp-ui-config.json
in the webserver config for this to work.src/ui-config.ts
(imported fromsrc/entrypoint.tsx
) then loads it and populates aconfig
export on success.entrypoint then ensures we wait for the promise before rendering anything that would need to use that config
Cc @gerrod3