Skip to content

Commit

Permalink
Merge branch 'master' into app-quick-load
Browse files Browse the repository at this point in the history
  • Loading branch information
sbeck14 authored Dec 6, 2021
2 parents fbb4dae + 54f8112 commit cae5639
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/ConfigVars/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const style = {
...GlobalStyles.Subtle,
...GlobalStyles.Text,
overflow: 'auto',
whiteSpace: 'nowrap',
// whiteSpace: 'nowrap',
},
},
refresh: {
Expand Down
6 changes: 3 additions & 3 deletions src/scenes/Collections/NewSpace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default class NewApp extends BaseComponent {
category: 'SPACES',
action: 'Created new space',
});
History.get().push('/collections');
History.get().push('/spaces');
} catch (error) {
if (!this.isCancel(error)) {
this.setState({
Expand Down Expand Up @@ -355,8 +355,8 @@ export default class NewApp extends BaseComponent {
<MenuItem
className={stack.name}
key={stack.id}
value={stack.name}
>{stack.name}</MenuItem>
value={`${stack.name}`}
>{stack.name} ({stack.region.name})</MenuItem>
));
}

Expand Down
19 changes: 15 additions & 4 deletions src/scenes/Sites/NewSite.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const style = {
div: {
display: 'flex',
flexDirection: 'column',
height: '360px',
height: '420px',
},
contentStyle: {
margin: '0 94px',
Expand Down Expand Up @@ -79,6 +79,12 @@ const style = {
description: { width: '600px' },
domain: { minWidth: '50%' },
},
regionRadioGroup: {
display: 'flex',
flexWrap: 'wrap',
flexDirection: 'column',
maxHeight: '180px',
},
};

export default class NewSite extends BaseComponent {
Expand Down Expand Up @@ -116,6 +122,10 @@ export default class NewSite extends BaseComponent {
getRegions = async () => {
try {
const { data: regions } = await this.api.getRegions();
const { data: stacks } = await this.api.getStacks();
regions.forEach((region, idx) => {
regions[idx].stack = stacks.find(stack => stack.region.id === region.id).name;
});
this.setState({ regions, loading: false, region: regions[0].name });
} catch (err) {
if (!this.isCancel(err)) {
Expand Down Expand Up @@ -232,11 +242,12 @@ export default class NewSite extends BaseComponent {
className="region-radio-group"
value={region}
onChange={this.handleRegionChange}
style={style.regionRadioGroup}
>
{this.renderRegions()}
</RadioGroup>
</FormControl>
{errorText !== '' && (
{errorText && errorText !== '' && (
<p style={style.error}>{errorText}</p>
)}
</div>
Expand Down Expand Up @@ -292,7 +303,7 @@ export default class NewSite extends BaseComponent {
className={region.name}
key={region.name}
value={region.name}
label={region.name}
label={`${region.name} (${region.stack})`}
control={<Radio />}
/>
));
Expand Down Expand Up @@ -347,7 +358,7 @@ export default class NewSite extends BaseComponent {
<Tooltip title="Documentation" placement="top">
<IconButton
role="link"
tabindex="0"
tabIndex="0"
onClick={() => window.open('https://docs.akkeris.io/architecture/sites-and-routes.html')}
>
<DocumentationIcon />
Expand Down
5 changes: 3 additions & 2 deletions webpack-dev-server.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const webpack = require('webpack');
const path = require('path');// eslint-disable-line no-unused-vars

const CLIENT_URI = process.env.CLIENT_URI || 'http://localhost:3000';

const config = {
mode: 'development',
Expand All @@ -21,7 +22,7 @@ const config = {
output: {
path: __dirname, // Path of output file
filename: 'app.js',
publicPath: 'http://localhost:3000/',
publicPath: `${CLIENT_URI}/`,
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
Expand Down

0 comments on commit cae5639

Please sign in to comment.