From 7f0658e24623869354941ad6043a50b892d80d7f Mon Sep 17 00:00:00 2001 From: Sara Vieira Date: Wed, 21 Mar 2018 17:35:51 +0000 Subject: [PATCH] feat(instances): route objects id fixes #1329 --- bundle/package.json | 2 +- .../my-joy-images/src/components/image.js | 29 ++++++---- .../my-joy-images/src/components/summary.js | 2 +- .../my-joy-images/src/containers/create.js | 15 ++--- packages/my-joy-images/src/containers/menu.js | 6 +- .../my-joy-images/src/containers/summary.js | 17 +++--- packages/my-joy-images/src/containers/tags.js | 11 +--- .../my-joy-images/src/graphql/get-image.gql | 4 +- .../src/graphql/get-instance.gql | 10 ++-- .../my-joy-images/src/graphql/get-tags.gql | 4 +- .../__tests__/__snapshots__/list.spec.js.snap | 34 +++++++---- .../__snapshots__/summary.spec.js.snap | 4 +- .../src/components/instances/list.js | 11 ++-- .../src/components/instances/summary.js | 2 +- .../__tests__/__snapshots__/menu.spec.js.snap | 2 +- .../src/containers/create-instance/image.js | 6 +- .../src/containers/create-instance/index.js | 2 +- .../__tests__/__snapshots__/list.spec.js.snap | 56 +++++++++++-------- .../__snapshots__/summary.spec.js.snap | 4 +- .../instances/__tests__/list.spec.js | 4 +- .../src/containers/instances/cns.js | 11 ++-- .../src/containers/instances/firewall.js | 13 ++--- .../src/containers/instances/list.js | 22 ++++---- .../src/containers/instances/metadata.js | 11 ++-- .../src/containers/instances/networks.js | 6 +- .../src/containers/instances/snapshots.js | 10 ++-- .../src/containers/instances/summary.js | 18 ++---- .../src/containers/instances/tags.js | 11 ++-- .../src/containers/instances/user-script.js | 11 ++-- .../__snapshots__/breadcrumb.spec.js.snap | 4 +- .../src/containers/navigation/menu.js | 6 +- .../src/graphql/get-instance.gql | 38 ++++++------- .../src/graphql/list-instance-fw-rules.gql | 24 ++++---- .../src/graphql/list-instance-networks.gql | 32 +++++------ .../src/graphql/list-metadata.gql | 14 ++--- .../src/graphql/list-snapshots.gql | 18 +++--- .../src/graphql/list-tags.gql | 14 ++--- packages/ui-toolkit/src/base/global.js | 2 +- .../__snapshots__/index.spec.js.snap | 2 +- packages/ui-toolkit/src/breadcrumb/index.js | 3 +- packages/ui-toolkit/src/button/group.js | 3 +- .../__snapshots__/section.spec.js.snap | 2 +- packages/ui-toolkit/src/section-list/index.js | 2 +- yarn.lock | 6 +- 44 files changed, 245 insertions(+), 263 deletions(-) diff --git a/bundle/package.json b/bundle/package.json index ac325efd..22f4d251 100644 --- a/bundle/package.json +++ b/bundle/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "brule": "^3.1.0", - "cloudapi-gql": "^7.1.1", + "cloudapi-gql": "^7.1.3", "hapi": "^17.2.0", "hapi-triton-auth": "^2.0.0", "inert": "^5.1.0", diff --git a/packages/my-joy-images/src/components/image.js b/packages/my-joy-images/src/components/image.js index 71ae676e..2baa3c94 100644 --- a/packages/my-joy-images/src/components/image.js +++ b/packages/my-joy-images/src/components/image.js @@ -1,10 +1,10 @@ import React, { Fragment } from 'react'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; -import remcalc from 'remcalc'; import { Field } from 'redux-form'; import Flex from 'styled-flex-component'; import { Padding, Margin } from 'styled-components-spacing'; +import remcalc from 'remcalc'; import { Card, @@ -50,7 +50,7 @@ const Type = styled(Margin)` `; const Content = styled(Padding)` - max-width: calc(100% - 48px); + max-width: calc(100% - ${remcalc(48)}); overflow: hidden; `; @@ -64,13 +64,19 @@ const DividerContainer = styled(Margin)` `; const Actions = styled(Flex)` - width: 48px; - height: 48px; - min-width: 48px; + width: ${remcalc(48)}; + height: ${remcalc(48)}; + min-width: ${remcalc(48)}; +`; + +const ActionsWrapper = styled(Flex)` + height: 100%; + border-left: ${remcalc(1)} solid ${props => props.theme.grey}; `; export const Image = ({ name, + id, os, version, type, @@ -79,7 +85,7 @@ export const Image = ({ onCreateInstance }) => ( - + {removing ? ( @@ -96,7 +102,7 @@ export const Image = ({ height: '24' })} - + {name} @@ -116,11 +122,10 @@ export const Image = ({ - - + + + + diff --git a/packages/my-joy-images/src/components/summary.js b/packages/my-joy-images/src/components/summary.js index fdfaee89..77532463 100644 --- a/packages/my-joy-images/src/components/summary.js +++ b/packages/my-joy-images/src/components/summary.js @@ -117,7 +117,7 @@ export default withTheme(({ theme = {}, onRemove, removing, ...image }) => (