In the context of HMS-parity with edge management, fixes the current behavior when using browser history back and forward.
- When selecting a tab and then push the browser history back/forward, the tab of the current url is selected.
FIXES: https://issues.redhat.com/browse/THEEDGE-3460
These changes were introduced in #1079 to ensure that quickstarts stay visible even after opening a Wizard modal as they are both top-most components.
`ModalProps` which were used for this purpose were introduced in version 3.20.6 of `@data-driven-forms/pf4-component-mapper`. Since then we had to regress the version to 3.20.5 as it was crashing the application on closing of a modal. The issue linked to this can be found here: https://github.com/data-driven-forms/react-forms/issues/1389
As we are now using mapper version that does not allow to use `ModalProps` the functionality of the workaround was lost and it was causing following console.error: `Warning: React does not recognize the `ModalProps` prop on a DOM element.`
This adds validation of an image name based on a pattern, which was chosen as an intersection of the naming constrains of hyperscalers.
The pattern is based on the one for naming GCP images as those naming guidelines are the most restrictive. With added minimal length restriction of AWS.
In the context of HMS-parity with edge management, fixes the current behavior when selecting tabs and navigating in edge image details view:
- when selecting a tabs the corresponding url is shown (the url can be copied , and when pasted we return the selected tab)
- when returning back from edge management details view, the user return back to the last tab (e.g ostree tab)
FIXES: THEEDGE-3445
This commit adds the edge images table as a federated module, gated behind a feature flag.
the configuration is for dev environment to work with federation modules locally
Unleash is being used to determine whether or not to use the Launch
wizard for Azure and GCP images. Unleash is not yet supported in our
ephemeral environments, but we want our ephemeral environments to have
parity with beta. This commit ensures that the Launch wizard opens for
Azure and GCP images in ephemeral.
Related to HMS-1886: Clicking the recreate button on a build with a lot
of packages results in the user being rate limited.
Package summaries are obtained by querying the Content Sources API. A
large number of packages requires a large number of requests and leads
to the rate limiting problem when using the 'Recreate image' function.
This commit fixes the problem by not requesting or displaying package
summaries when 'Recreate image' is used. (Note that newly added packages
will still request and display a summary.)
The 'Recreate image' function will soon be replaced by
blueprints. This hotfix should carry us forward until then.
By using the standard HTML property name, PF4 considered the Radio
uncontrolled. This causes warnings in the console.
By using the correct property names, PF4 correctly considers the
component controlled.
If an image does not contain a subscription_id property, the link to
view the image in Azure will be malformed. This happens when a user
creates an Azure image in beta/preview using sources, and then clicks
the 'View uploaded image' link in stable.
Now, if an Azure image was created using sources (as evidenced by presence
of a source_id in request's upload options), the Launch button appears
and its popover has a link to Preview.
If an image does not contain a share_with_accounts property, launch
links do not appear in the launch popover. This happens when a user
creates an AWS image in beta/preview, and then clicks Launch in stable.
A message is now displayed that explains the image was created using
Preview features, and the link to Preview has been clarified to be more
explicit.
This disables sharing to new regions in case of failed build of the parent image.
The regions that always end in failure were also disabled in the `ShareImageModal`.
This makes the wizard feel much 'faster' for a better user experience.
The implementation uses RTK Query for prefetching. For most API
requests, prefetching is done when the 'next' button is hovered over on
the previous step.
This adds a temporary value of current date to `created_at` for newly created images.
This is not the most elegant solution and will be reworked after the ImagesTable refactor.
There is a bug in Patternfly that causes 'pop out' selects (those that
use the menuAppendTo="parent" prop) to be rendered underneat the wizard
footer.
Until this is patched in Patternfly, we will have to live with
suboptimal select menus that scroll inside the modal.
This disables the "Add all" button in the `DualListSelectorControl` on the Packages step when there's too many results to display, even if there's an exact match.
Users may visit the Repositories service to add or modify repositories
while they are on the repositories step in the wizard. This commit adds
a 'Refresh' button that will refetch the repositories and update the
table so that the user does not have to restart the wizard to view their
modifications.
This commit adds filtering based on architecture and version to the
repositories table in the wizard.
Apart from filtering, this commit now shows *all* repositories,
regardless of their status. Previously, invalid repositories were not
displayed. A future PR will add a status column and edge case handling
(how to handle an invalid repo, etc...). For now, invalid repos are
displayed and can be selected.
RTK Query is now used to manage the state of the repositories.
Previously, the repositories were fetched in a useEffect hook upon
opening the wizard.
MSW is now used instead of jest mocking for the tests involving
repositories. The repositories test fixture now contains a function that
mimics the content sources API.
With our quickstarts now merged to prod we can
start using the quickstart API to invoke them.
Also change all Beta user facing text to Preview
Signed-off-by: Pavel Odvody <pavel@redhat.com>
This updates spacing between the description and buttons as shown in mocks.
Nesting of the `<p>` tags was also removed to eliminate `Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>` from the console logs.
To avoid confusion between custom and payload repositories.
Custom repositories will be embedded in the yum config, payload
repositories are used for installing packages.
This commit replaces all calls to the insights.chrome global with calls
to the useChrome() hook (or the useGetEnvironment() custom hook that
wraps useChrome()).
The use of chrome.isBeta is deprecated, the useChrome hook should be
used instead to obtain an isBeta() function. Using the deprecrated
chrome.isBeta pollutes the browser console with warning messages.
This commit replaces the isBeta() helper function with a new custom
hook, useGetEnvironment().
We still sometimes need to know which environment is running outside of
React components, where we cannot call the useChrome() or
useGetEnvironment() hooks. For instance, in the json used to define a
wizard step. Therefore a new isBeta variable has been added to the
form's initialState for use in these cases.
This removes unnecessary sentences from the description of Packages and Additional Red Hat packages steps. The min and max height of the `DualListSelector` was also updated.