fix(my-joy-beta): consisten onClick on create-instance headers
@ -77,7 +77,7 @@ export const List = ({
|
||||
</ReduxForm>
|
||||
</Margin>
|
||||
<Row>
|
||||
{images.map((image) => (
|
||||
{images.map(image => (
|
||||
<Col sm={4}>
|
||||
<Image {...image} onRemove={() => handleRemove(image.id)} />
|
||||
</Col>
|
||||
@ -128,22 +128,24 @@ export default compose(
|
||||
: images;
|
||||
|
||||
return {
|
||||
images: filtered.filter(image => {
|
||||
switch (typeValue) {
|
||||
case 'all':
|
||||
return true;
|
||||
case 'hardware-virtual-machine':
|
||||
return virtual.includes(image.type);
|
||||
case 'infrastructure-container':
|
||||
return container.includes(image.type);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}).map(({ id, ...image }) => ({
|
||||
...image,
|
||||
id,
|
||||
removing: get(values, `remove-mutation-${id}-loading`, false)
|
||||
})),
|
||||
images: filtered
|
||||
.filter(image => {
|
||||
switch (typeValue) {
|
||||
case 'all':
|
||||
return true;
|
||||
case 'hardware-virtual-machine':
|
||||
return virtual.includes(image.type);
|
||||
case 'infrastructure-container':
|
||||
return container.includes(image.type);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
})
|
||||
.map(({ id, ...image }) => ({
|
||||
...image,
|
||||
id,
|
||||
removing: get(values, `remove-mutation-${id}-loading`, false)
|
||||
})),
|
||||
allImages: images,
|
||||
mutationError,
|
||||
typeValue
|
||||
@ -169,7 +171,9 @@ export default compose(
|
||||
}
|
||||
|
||||
if (res) {
|
||||
dispatch([set({ name: `remove-mutation-${id}-loading`, value: false })]);
|
||||
dispatch([
|
||||
set({ name: `remove-mutation-${id}-loading`, value: false })
|
||||
]);
|
||||
history.push(`/`);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@ -36,7 +36,7 @@ const ImageContainer = ({
|
||||
<Fragment>
|
||||
<Title
|
||||
id={step}
|
||||
onClick={!expanded && !image.id && handleEdit}
|
||||
onClick={!expanded && !proceeded && handleEdit}
|
||||
collapsed={!expanded && !proceeded}
|
||||
icon={<InstanceTypeIcon />}
|
||||
>
|
||||
|
@ -38,7 +38,7 @@ const NameContainer = ({
|
||||
<Fragment>
|
||||
<Title
|
||||
id={step}
|
||||
onClick={!expanded && !name && handleEdit}
|
||||
onClick={!expanded && !proceeded && handleEdit}
|
||||
collapsed={!expanded && !proceeded}
|
||||
icon={<NameIcon />}
|
||||
>
|
||||
|
@ -127,32 +127,31 @@ export default compose(
|
||||
const selected = get(form, `${FORM_NAME}.values`, {});
|
||||
const empty = id => !includes(Object.keys(selected), id);
|
||||
|
||||
const _networks = networks
|
||||
.map(({ id, name, ...network }) => {
|
||||
if (empty(id) && name === 'Joyent-SDC-Public') {
|
||||
selected[id] = true;
|
||||
}
|
||||
const _networks = networks.map(({ id, name, ...network }) => {
|
||||
if (empty(id) && name === 'Joyent-SDC-Public') {
|
||||
selected[id] = true;
|
||||
}
|
||||
|
||||
return {
|
||||
...network,
|
||||
name,
|
||||
selected:
|
||||
empty(id) && name === 'Joyent-SDC-Public'
|
||||
? true
|
||||
: Boolean(selected[id]),
|
||||
infoExpanded: get(
|
||||
values,
|
||||
`create-instance-networks-${id}-info-expanded`,
|
||||
false
|
||||
),
|
||||
machinesExpanded: get(
|
||||
values,
|
||||
`create-instance-networks-${id}-machines-expanded`,
|
||||
false
|
||||
),
|
||||
id
|
||||
};
|
||||
});
|
||||
return {
|
||||
...network,
|
||||
name,
|
||||
selected:
|
||||
empty(id) && name === 'Joyent-SDC-Public'
|
||||
? true
|
||||
: Boolean(selected[id]),
|
||||
infoExpanded: get(
|
||||
values,
|
||||
`create-instance-networks-${id}-info-expanded`,
|
||||
false
|
||||
),
|
||||
machinesExpanded: get(
|
||||
values,
|
||||
`create-instance-networks-${id}-machines-expanded`,
|
||||
false
|
||||
),
|
||||
id
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
proceeded: get(values, 'create-instance-networks-proceeded', false),
|
||||
|
@ -49,7 +49,7 @@ const PackageContainer = ({
|
||||
<Fragment>
|
||||
<Title
|
||||
id={step}
|
||||
onClick={!expanded && !selected.id && handleEdit}
|
||||
onClick={!expanded && !proceeded && handleEdit}
|
||||
collapsed={!expanded && !proceeded}
|
||||
icon={<PackageIcon />}
|
||||
>
|
||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |