The AWS regions indicator that is currently baked into each row
containing an AWS image is currently off by one due to incorrect
parentheses in the code.
This is now fixed, so it displays '(1)' when there is one region (which
is the default, us-east-1) instead of '(0)' which was both wrong and
confusing.
Since the implementation of the cockpitApi and imageBuilderApi are different,
we should make sure to export the correct one depending on the environment
we are in.
The filtering was defaulting to version '1', making images of other versions not appear when selecting a blueprint.
How to reproduce:
1. create a blueprint
2. build an image
3. edit the blueprint to get it to version 2
4. build another image
Current behaviour:
- only image with version 1 is visible
After fix:
- both image for version 1 and image for version 2 of the blueprint should be visible when the blueprint is selected
Set sane defaults for some types rather than setting them to `undefined`.
This is so that we can set `exactOptionalPropertyTypes` to true in our
tsconfig.
Set the option to generate union undefined types for objects that have
optional items. This will allow us to enable `exactOptionalPropertyTypes`
in our tsconfig [1].
[1] This is a recommended setting, see:
https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes
Add the v5 slug to the status colors as the unversioned colors don't
seem to be defined in PatternFly anymore. I haven't looked at the
history, but I presume this was done at some point during v6
development, as the upstream colors now contain the v6 slug:
https://www.patternfly.org/components/banner/design-guidelines/#usageFixes#2611
Export a dynamic query hook depending on which backend is
being used (service or on-prem). This means we can just import
a query from the new `backendApi` and it will work for both
on-prem and the service.
The tests output contained following warning:
```
console.warn
Th: Table headers must have an accessible name. If the Th is intended to be visually empty, pass in screenReaderText. If the Th contains only non-text, interactive content such as a checkbox or expand toggle, pass in an aria-label.
```
This fixes the warning by adding an `aria-label` to every empty table heading cell.
Fixes#933
This applies `isWidthLimited` to the section containing ImagesTable, ensuring the table doesn't get stretched out too much.
The were also two sets of empty tags around ImagesTable return, this removes one of them.