Commit graph

139 commits

Author SHA1 Message Date
Cockpit Project
49ff7eaaa0 package.json: Update @patternfly/patternfly, @patternfly/react-table, @patternfly/react-core
Closes #158
2021-04-26 12:00:40 +02:00
Cockpit Project
96ebb3dfd8 package.json: Update redux
Closes #160
2021-04-26 12:00:28 +02:00
Cockpit Project
39c1e81342 package.json: Update react-redux
Closes #159
2021-04-26 12:00:16 +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
Cockpit Project
84f66d8e57 package.json: Update @patternfly/react-table, @patternfly/patternfly, @patternfly/react-core
Closes #156
2021-04-22 10:45:36 +02:00
Sanne Raymaekers
1b9cf6df7b src: Remove SmartComponents/PresentationalComponents split
Just have a directory per component.
2021-04-22 10:23:51 +02:00
Cockpit Project
01963bf877 package.json: Update classnames
Closes #151
2021-04-21 11:56:59 +02:00
Cockpit Project
8d0f0afd0c package.json: Update @babel/runtime
Closes #154
2021-04-21 11:54:54 +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
Cockpit Project
04aac0d7f0 package.json: Update react-redux
Closes #149
2021-04-19 11:16:36 +02:00
Cockpit Project
7bf15f40b4 package.json: Update @babel/runtime
Closes #148
2021-04-19 10:58:30 +02:00
Cockpit Project
a24015882e package.json: Update @redhat-cloud-services/frontend-components-utilities
Closes #146
2021-04-19 10:57:55 +02:00
Cockpit Project
a47956c1f2 package.json: Update react
Closes #145
2021-04-19 10:57:10 +02:00
Cockpit Project
e04a3b1eda package.json: Update @redhat-cloud-services/frontend-components
Closes #144
2021-04-19 10:37:14 +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
Cockpit Project
3906f822a1 package.json: Update @patternfly/react-table, @patternfly/patternfly, @patternfly/react-core
Closes #143
2021-04-14 10:41:16 +02:00
Cockpit Project
92abf57180 package.json: Update @redhat-cloud-services/frontend-components-notifications
Closes #137
2021-04-14 10:35:14 +02:00
Cockpit Project
3fba1903a8 package.json: Update react-router-dom
Closes #142
2021-04-14 10:26:15 +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
Cockpit Project
f8cbbf9ed7 package.json: Update react-dom
Closes #133
2021-04-13 11:54:44 +02:00
Sanne Raymaekers
2e5eaa85d9 package.json: Pin exact versions 2021-04-12 15:58:58 +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
Sanne Raymaekers
c6c616a9dc travis: Fork main to prod-beta
Let the prod-beta branch instead of the main branch push to the
prod-beta branch in the -build repository.
2021-03-19 11:15:52 +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
Sanne Raymaekers
f3887a1d42 CreateImageWizard: Fix google image type
Image type gcp doesn't exist, it should be vhd.
2021-03-05 16:54:40 +00:00
Sanne Raymaekers
76108cb701 CreateImageWizard: Fix google share options
This needs to be an array of strings.
2021-03-05 16:38:36 +00:00
Jacob Kozol
22385fd5ea CreateImageWizard: add google upload step
The user can now specify their authentication settings for Google Cloud
Platform. These can be either a Google account, Service account, Google
group, or a domain.
2021-03-05 16:21:08 +01:00
Sanne Raymaekers
6adab8bd3b CreateImageWizard: Fix review step
The wizard crashed in the review step when registering the system later
was selected.
2021-03-03 12:36:53 +01:00
Sanne Raymaekers
971399aaeb App: Wait for user active session before checking permission 2021-03-02 16:28:28 +01:00