Commit graph

119 commits

Author SHA1 Message Date
Jacob Kozol
ebdfbbf57d ImagesTable: add gcp info
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.
2021-06-02 15:44:38 +02:00
Jacob Kozol
3571a7b3c6 ImagesTable: add azure image link
When an azure image is successfully uploaded the user is provided a link
to view the image in the azure web portal.
2021-06-01 17:55:53 +02:00
Jacob Kozol
6cd58557c5 CreateImageWizard: improve packages step
Update the text description and replace "options" with "packages". Also,
add styling to increase the size of the available and chosen packages
list.
2021-05-26 17:02:31 +02:00
Jacob Kozol
cea9808c91 CreateImageWizard: add spacing before azure fields 2021-05-26 16:28:32 +02:00
Jacob Kozol
e624c9a1fe CreateImageWizard: improve google step
The Google Cloud Platform step's description is improved, the radio
fields have more space seperating them, and the text input is width
limited now.
2021-05-25 11:39:30 +02:00
Jacob Kozol
066c29128e CreateImageWizard: fix OAuth info link style 2021-05-20 20:16:21 +02:00
Sanne Raymaekers
c7e8fc57ec src: Update documentation links 2021-05-20 11:00:02 +02:00
Sanne Raymaekers
b11fbe42df CreateImageWizard: Pass organization as a number
This should be changed in the api. But will take some more work. For now
just pass it as a number, that is what the api expects at this point in time.
2021-05-20 10:49:37 +02:00
Jacob Kozol
564a875dd9 CreateImageWizard: fix target environment titles 2021-05-19 16:08:53 +02:00
Jacob Kozol
7cd775cfb3 ImagesTable: add link to launch uploaded aws image
The images list now contains a link to the ec2 launch wizard for a
successfully uploaded aws image.
2021-05-17 19:37:15 +02:00
Sanne Raymaekers
2e9352bcf9 src: Have separate AppEntry points for dev and prod
The production AppEntry shouldn't pass any middlewares to the store.
2021-05-12 17:20:45 +02:00
Yuxin Sun
0ca457715a
OAuth permissions text shortening
Fix #170 
Related: rhbz#1954598

Signed-off-by: Yuxin Sun <yuxisun@redhat.com>
2021-05-12 11:49:47 +02:00
Sanne Raymaekers
4658f59d0b src: Adapt to insights-chrome 2.0 2021-05-06 11:26:41 +02:00
Jacob Kozol
e85e51e574 ImagesTable: display date created
The date an image was created at should be displayed in the format:
Month Day, Year. i.e. Apr 28, 2021.
2021-05-03 13:58:25 +02:00
Jacob Kozol
3cf9f8c3a3 ImageBuildStatus: refactor image status
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.
2021-05-03 13:58:25 +02:00
Jacob Kozol
f8abe70004 ImagesTable: refactor list of images
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.
2021-05-03 13:58:25 +02:00
Yuxin Sun
a10e1746e5 Correct the text to match the button text label
Signed-off-by: Yuxin Sun <yuxisun@redhat.com>
2021-04-30 20:08:48 +02:00
Jacob Kozol
14a7c7e39d ImagesTable: add compose pagination
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.
2021-04-30 17:58:14 +02:00
Jacob Kozol
df39b6915c ImagesTable: switch to patternfly toolbar
Patternfly's toolbar component is now used. Also remove the ToolbarGroup
component since we do yet need to group our toolbar items.
2021-04-30 17:58:14 +02:00
Jacob Kozol
82c0615aab store: add compose count
When we get composes we also get the count of total composes stored in
image-builder. We now store this quantity in our store.
2021-04-30 17:58:14 +02:00
Jacob Kozol
4f58f6202a store: get composes using limit and offset
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.
2021-04-30 17:58:14 +02:00
Sanne Raymaekers
106f867e97 CreateImageWizard: Show previously selected packages
This should fix the bug where chosen packages would disappear from the
ui when switching steps and returning to the packages step.
2021-04-28 12:46:55 +02:00
Jacob Kozol
9b08788fd2 store: add get all composes api call
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.
2021-04-23 15:53:43 +02:00
Jacob Kozol
1f962b44ae store: move status polling to redux
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.
2021-04-23 15:53:43 +02:00
Jacob Kozol
29b684599b store: add request field to compose object
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.
2021-04-23 15:53:43 +02:00
Jacob Kozol
e8192ad3f7 CreateImageWizard: remove nested p tag
The patternfly Wizard component's description is wrapped in a p tag. The
patternfly Text component also uses a p tag. A p tag should not be
nested inside another p tag.
2021-04-22 11:19:53 +02:00
Sanne Raymaekers
1b9cf6df7b src: Remove SmartComponents/PresentationalComponents split
Just have a directory per component.
2021-04-22 10:23:51 +02:00
Jacob Kozol
fcc5b62def CreateImageWizard: add description
The wizard now contains a subtitle/description which includes a link to
documentation.
2021-04-20 16:24:50 +02:00
Jacob Kozol
f485cec690 ImagesTable: add documentation link to empty state 2021-04-20 16:24:50 +02:00
Jacob Kozol
8b9b03fb33 LandingPage: add documentation to header
The header now includes the proper title of Image Builder and a popover
including a description and link to documentation.
2021-04-20 16:24:50 +02:00
Jacob Kozol
f3eed9c28f store: implement compose start action/reducer
When a compose is started the api call is no longer handled by the
CreateImageWizard onSave function. Instead, the CreateImageWizard
calls the composeStart thunk. This function calls the api and handles
the response. If successful, the compose is added to the store.
Otherwise, an error is added to the store.

The store's compose object now has a list of the compose ids and an
object containing key/value pairs mapping a compose id to the compose
for all composes. This "normalized" state will allow more efficiency
when selecting individual composes or iterating through all composes.

The compose objects in the store now match the composeRequest object
instead of having a shape unique to the UI. This can be changed in the
future if image-builder's api returns compose objects of a different
format.

Tests are updated for new compose format and action/reducer types.
2021-04-19 15:04:26 +02:00
Jacob Kozol
8a8a7229a1 store: add redux-thunk
Redux thunks allow actions to pass functions. This will be helpful when
our api calls are moved into redux actions instead of being handled within
react components.
2021-04-19 15:04:26 +02:00
Jacob Kozol
fbada9d990 store: rename updatecompose to compose updated
Our compose actions will follow the naming convention of *name*_*event*.
Therefore, when we receive an updated compose from the api, the action
should be called COMPOSE_UPDATED.
2021-04-19 15:04:26 +02:00
Sanne Raymaekers
28cc248335 CreateImageWizard: Move steps into separate components 2021-04-14 17:34:30 +02:00
Sanne Raymaekers
c270991b85 test: Use the real redux store in testing also 2021-04-14 17:34:30 +02:00
Jacob Kozol
01c5a5f202 store: refactor redux hierarchy
The redux reducers and actions are moved to subdirectories within the
store directory. The goal of this is to improve the understandability of
the directory structure and to prepare for future scaling of the actions
and reducers.
2021-04-13 20:55:34 +02:00
Sanne Raymaekers
b43b938f28 app: Allow the IdentifyApp call to fail 2021-03-31 15:01:04 +01:00
Sanne Raymaekers
41f506219c routes: Remove root element mutation 2021-03-30 19:23:13 +01:00
Tomas Hozza
4777cdac76 Handle all valid image_status.status values
osbuild-composer and as a result also Image Builder are returning an
invalid `image_status.status` value "running" for composes which are in
progress.

Extend the front-end to handle all valid `image_status.status` values,
specifically also "building", "uploading" and "registering". Also keep
support for the invalid value "running" for some time to ensure backward
compatibility with older osbuild-composer versions.

Modify test cases in `ImagesTable.test.js` to verify all possible
`image_status.status` values. Also modify the `image_status` values used
for testing to what is actually returned by osbuild-composer Cloud API
and as a result also by Image Builder's API.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-03-25 16:45:23 +01:00
Tom Gundersen
782d6c684c ImagesTable: update empty-table message
Update the message now that we support CentOS Stream, Azure+GCP support as well as package selection.
2021-03-23 18:34:50 +01:00
Jacob Kozol
f00cf08506 CreateImageWizard: add registration validation
If register now is selected, an activation key is required. If no
activation key is entered the Next and Create buttons are disabled.
Also, if the activation key is empty an error message will appear to
prompt the user to enter an activation key.

The subscription errors variable is removed in favor of declaring the
error message directly in the registration step component. The
validateSubscription function is removed in favor of validating the
activation key field on change.
2021-03-23 18:34:27 +01:00
Jacob Kozol
6d147c95fc CreateImageWizard: default to register the image later 2021-03-23 18:34:27 +01:00
Chloe Kaubisch
a686fd970b CreateImageWizard: single upload_request
Change imageRequest to accept a single uploadRequest instead of
an array of uploadRequests.
2021-03-22 12:04:48 +01:00
Jacob Kozol
f268441d41 CreateImageWizard: validate upload destination
The user should not be able to continue without selecting an upload
destination. The uploadDestination fields are now checked to see if one
is selected before enabling the Next button in the footer. Also, the
onSaveInProgress variable is changed to isSaveInProgress to conform with
the other validation variables.
2021-03-15 14:37:27 +01:00
Sanne Raymaekers
b0614ae750 CreateImageWizard: Notification on successful compose response 2021-03-09 21:41:17 +00:00
Sanne Raymaekers
ef0f5e4a8d CreateImageWizard: Move footer to custom component
Adds an error message in some error cases.
2021-03-09 21:41:17 +00:00
Sanne Raymaekers
c325a310a2 ImagesTable: Instead of the image type show the upload target
Fixes #105
2021-03-08 13:33:46 +00:00
Ondřej Budai
afd0a81236 azure: fix the oauth link
Multi-tenant access needs the v2.0 route that requires:
- scope
- response_type

I also also added response_mode=form_post so the token isn't shown in
the address bar.
2021-03-08 11:48:09 +01:00
Ondřej Budai
6bbf141238 azure: open the login screen in a new window
my editor screamed at me that using target="_blank" without rel="noopener"
is dangerous so I added it as well.
2021-03-08 11:48:09 +01:00
Sanne Raymaekers
398eeb8cb2 CreateImageWizard: Add Azure upload step 2021-03-08 10:03:04 +00:00