Commit graph

3365 commits

Author SHA1 Message Date
Tom Gundersen
46fbb53e46 travis: upgrade to npm 12
This is what the starter app uses, and what most of us use locally,
so let's stay consistent.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2021-05-21 19:23:14 +02:00
Cockpit Project
f629e38a65 package.json: Update @redhat-cloud-services/frontend-components
Closes #205
2021-05-21 12:25:21 +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
Cockpit Project
5d670b18ff package.json: Update @patternfly/react-core, @patternfly/react-table, @patternfly/patternfly
Closes #197
2021-05-19 14:24:58 +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
Cockpit Project
5261dae56b package.json: Update @redhat-cloud-services/frontend-components
Closes #180
2021-05-17 10:03:38 +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
cff45e5948 Revert "config: Skip chrome2 until the configuration is in place in csc"
This reverts commit 688291386a.
2021-05-11 14:11:49 +02:00
Sanne Raymaekers
688291386a config: Skip chrome2 until the configuration is in place in csc 2021-05-10 14:08:18 +02:00
Tom Gundersen
bbf5bf8642 README: split frontend and backend instructions
Spinning up the frontend is a lot simpler than the backend, so have dedicated
instructions to just do that.
2021-05-08 22:27:51 +02:00
Cockpit Project
9a29e4dd32 package.json: Update @redhat-cloud-services/frontend-components
Closes #172
2021-05-07 11:20:55 +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
Cockpit Project
122c392ca3 package.json: Update @babel/runtime
Closes #166
2021-04-30 14:09:38 +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
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