diff --git a/packages/images/src/containers/list.js b/packages/images/src/containers/list.js index 73d594a4..26ba5dec 100644 --- a/packages/images/src/containers/list.js +++ b/packages/images/src/containers/list.js @@ -77,7 +77,7 @@ export const List = ({ - {images.map((image) => ( + {images.map(image => ( handleRemove(image.id)} /> @@ -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(`/`); } } diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png index 23d05a9e..a4d49ced 100644 Binary files a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/list-ui-js-item-mutating-1-snap.png b/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/list-ui-js-item-mutating-1-snap.png index d2e4fdea..9e26276d 100644 Binary files a/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/list-ui-js-item-mutating-1-snap.png and b/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/list-ui-js-item-mutating-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/snapshots-ui-js-item-mutating-1-snap.png b/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/snapshots-ui-js-item-mutating-1-snap.png index 55d52b09..b584e8d2 100644 Binary files a/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/snapshots-ui-js-item-mutating-1-snap.png and b/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/snapshots-ui-js-item-mutating-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png b/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png index 8c50751b..5849c0f6 100644 Binary files a/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png and b/packages/my-joy-beta/src/components/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/create-instance/image.js b/packages/my-joy-beta/src/containers/create-instance/image.js index 498b3627..5abd2a49 100644 --- a/packages/my-joy-beta/src/containers/create-instance/image.js +++ b/packages/my-joy-beta/src/containers/create-instance/image.js @@ -36,7 +36,7 @@ const ImageContainer = ({ } > diff --git a/packages/my-joy-beta/src/containers/create-instance/name.js b/packages/my-joy-beta/src/containers/create-instance/name.js index 3a81584a..72a75dd9 100644 --- a/packages/my-joy-beta/src/containers/create-instance/name.js +++ b/packages/my-joy-beta/src/containers/create-instance/name.js @@ -38,7 +38,7 @@ const NameContainer = ({ <Fragment> <Title id={step} - onClick={!expanded && !name && handleEdit} + onClick={!expanded && !proceeded && handleEdit} collapsed={!expanded && !proceeded} icon={<NameIcon />} > diff --git a/packages/my-joy-beta/src/containers/create-instance/networks.js b/packages/my-joy-beta/src/containers/create-instance/networks.js index 245e56c2..8449d245 100644 --- a/packages/my-joy-beta/src/containers/create-instance/networks.js +++ b/packages/my-joy-beta/src/containers/create-instance/networks.js @@ -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), diff --git a/packages/my-joy-beta/src/containers/create-instance/package.js b/packages/my-joy-beta/src/containers/create-instance/package.js index 85d3d321..7076c93d 100644 --- a/packages/my-joy-beta/src/containers/create-instance/package.js +++ b/packages/my-joy-beta/src/containers/create-instance/package.js @@ -49,7 +49,7 @@ const PackageContainer = ({ <Fragment> <Title id={step} - onClick={!expanded && !selected.id && handleEdit} + onClick={!expanded && !proceeded && handleEdit} collapsed={!expanded && !proceeded} icon={<PackageIcon />} > diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/cns-ui-js-cns-loading-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/cns-ui-js-cns-loading-1-snap.png index 92b6af88..cc883c5c 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/cns-ui-js-cns-loading-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/cns-ui-js-cns-loading-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/firewall-ui-js-firewall-loading-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/firewall-ui-js-firewall-loading-1-snap.png index eabce65a..b8185b68 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/firewall-ui-js-firewall-loading-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/firewall-ui-js-firewall-loading-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/list-ui-js-list-loading-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/list-ui-js-list-loading-1-snap.png index b7f76f4c..b0c67065 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/list-ui-js-list-loading-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/list-ui-js-list-loading-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/metadata-ui-js-metadata-loading-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/metadata-ui-js-metadata-loading-1-snap.png index 3d412556..063815ce 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/metadata-ui-js-metadata-loading-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/metadata-ui-js-metadata-loading-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/metadata-ui-js-metadata-metadata-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/metadata-ui-js-metadata-metadata-1-snap.png index 56ae4c34..238b3883 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/metadata-ui-js-metadata-metadata-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/metadata-ui-js-metadata-metadata-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/networks-ui-js-networks-loading-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/networks-ui-js-networks-loading-1-snap.png index b57541ca..18f02c89 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/networks-ui-js-networks-loading-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/networks-ui-js-networks-loading-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-1-snap.png index 217b0c57..f4b18e28 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-loading-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-loading-1-snap.png index 217b0c57..a141971c 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-loading-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-loading-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-loading-error-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-loading-error-1-snap.png index 217b0c57..a141971c 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-loading-error-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-loading-error-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-mutation-error-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-mutation-error-1-snap.png index c672f70e..31737473 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-mutation-error-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-mutation-error-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png index bed2681b..29443b7b 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/summary-ui-js-summary-starting-stopping-rebooting-removing-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/tags-ui-js-tags-editing-removing-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/tags-ui-js-tags-editing-removing-1-snap.png index 3ff08028..13bb6643 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/tags-ui-js-tags-editing-removing-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/tags-ui-js-tags-editing-removing-1-snap.png differ diff --git a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/tags-ui-js-tags-loading-1-snap.png b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/tags-ui-js-tags-loading-1-snap.png index 81e7d0fe..4c7042f6 100644 Binary files a/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/tags-ui-js-tags-loading-1-snap.png and b/packages/my-joy-beta/src/containers/instances/__tests__/__image_snapshots__/tags-ui-js-tags-loading-1-snap.png differ