Fixes#594. This adds pagination to the bottom of the images list so the user doesn't have to scroll up to use it.
Tests were also updated to reflect the change.
In order to help people transition from using GUI to use the API directly,
it's helpful to give them an easy way to inspect the whole raw compose
request.
This commit adds a new button next to each compose that simply downloads
the original compose request in a json format. This request can then be
directly piped into the IB API to build a new image.
Original idea by Troy Dawson
Co-authored-by: Lucas Garfield <lucas@redhat.com>
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
Add error information for failed image
builds. The error details are only displayed
for failed builds and the error highest up
the error chain is displayed in the expandable
section of the image.
This commit displays the UUID in an expandable details row. This is
necessary because if an image was named, the UUID was not displayed.
It is important that a user know the UUID for troubleshooting, for
example in the case of requesting help with an image.
To facilitate this, the original Table component was converted to a
TableComposable component. TableComposable is newer and recommended over
the older Table by PatternFly.
When recreating an image navigate to the review step instead of the
initial step. This requires forming the step history to enable a
functional sidebar.
If a user has specified an image name the name will appear. Otherwise
the image's UUID will appear.
The test needed to be modified to search for the compose in the store
with either the image name or the id
The "guest-image", "image-installer", and "vsphere" image types now
display proper labels in the ImagesTable target column. Also, the upload
component is renamed to Target for consistency.
When a gcp image is successfully uploaded the user needs to know the
project id, image name, and account the image is shared with. These are
now displayed in a popover accessible from the status section of the
images table.
Remove excessive status elements since there only needs to be one status
statement for each image in the list. Also, replace the pending spinner
with a pending icon.
Remove unnecessary styling on the rows in the images list. Reorder the
columns to put the target and status next to each other. Use upload_type
instead of upload_status. Stop storing columns in state since they are a
constant.
The list of composes is now paginated. The default is 10 composes per
page. This quantity can be changed. When the page or the quantity per
page is changed then the next set of composes will be fetched.
The composeGetAll action is refactored to composesGet. It now uses
passes limit and offset as params so that pagination can be used. Also,
the COMPOSE_ADDED reducer case only adds new compose ids to allIds if
the id is new/unique.
The ImagesTable will now trigger a thunk to fetch all of users composes
on load. The response of the /composes api call does not include status
so we currently only fetch the first 10 composes and fetch the status
for each of them.
Updating a composes status is no longer done from the ImagesTable
component. Instead the composeGetStatus thunk is used to make the api
call and dispatch the COMPOSE_UPDATED_STATUS action. The polling still
occurs from the component.
The compose object should have the initial compose request stored in a
field called request. The id and image_status are independent of the
request so should not be set within it.