feat(ui): require organization selection before entering pages#63
feat(ui): require organization selection before entering pages#63Thorben-D wants to merge 1 commit into
Conversation
Before this commit, the "Content", "Execution Environment" and "Environments" pages would load incorrectly, if the user had selected "Any Organization". Management of these objects across organizations is currently not supported. To ensure the user has selected an organization, a new component, "ForceTaxonomy", is introduced, which requires the user to select an organization before proceeding. The ForceTaxonomy component is generalized and supports enforcement of: - Organization selection - Loction selection - Organization and Location selection Now, to access the "Content", "Execution Environments" and "Environments" pages, the user has to have a concrete organization selected.
|
I would prefer to re-use something from foreman. Is there already somthing like this available? Or can you send a PR to foreman to add such a component (without Typescript as they are using React only) |
Unfortunately, such a thing does not currently exist in Foreman. The Katello implementation is written in Angular, and can't be reused. |
Can you reach out to Ian and/or Maria to clarify if there is a need for this? Would be easier for everyone to have one component which can be re-used in plugins - and then I think, its necessary to have it Foreman itself. |
|
I can, but that is out of scope for this PR. |
Katello is currently moving forward with the transition to React. See: |
| addToast({ | ||
| type: 'success', | ||
| key: `UPDATE_CURRENT_${type.toUpperCase()}_SUCC`, | ||
| message: `Successfully updated the current ${type}!`, |
There was a problem hiding this comment.
The message needs a translation.
| addToast({ | ||
| type: 'danger', | ||
| key: `UPDATE_CURRENT_${type.toUpperCase()}_ERR`, | ||
| message: `Updating the current ${type} failed with error code "${ |
There was a problem hiding this comment.
The message needs a translation.
|
Looks like there's already some code duplication on HEAD of "main" too: |
| <CardTitle> | ||
| <TextContent> | ||
| <Text component={TextVariants.h2}> | ||
| {_('An organization is required to proceed.')} |
There was a problem hiding this comment.
| {_('An organization is required to proceed.')} | |
| {_('Select an organization.')} |
Please check if all of those texts end with a dot or not.
Same suggestion applies to line 173 and 131.
I don't see how you could improve that code much TBH. |
|
What is holding us back here except the strings? |
Before this commit, the "Content", "Execution Environment" and "Environments" pages would load incorrectly, if the user had selected "Any Organization".
Management of these objects across organizations is currently not supported.
To ensure the user has selected an organization, a new component, "ForceTaxonomy", is introduced, which requires the user to select an organization before proceeding.
The ForceTaxonomy component is generalized and supports enforcement of:
Now, to access the "Content", "Execution Environments" and "Environments" pages, the user has to have a concrete organization selected.
Screenshots:
For illustration of the location requirement ability, not currently used:
