From 2f92462be4859ebc30c0f24ac3cd6cf94ec68964 Mon Sep 17 00:00:00 2001 From: Sara Vieira Date: Tue, 9 Jan 2018 18:14:20 +0000 Subject: [PATCH] feat(my-joy-beta): image section in create instance --- package.json | 2 +- packages/my-joy-beta/package.json | 12 +- packages/my-joy-beta/src/assets/alpine.svg | 1 + packages/my-joy-beta/src/assets/apache.svg | 1 + packages/my-joy-beta/src/assets/brocade.svg | 1 + packages/my-joy-beta/src/assets/cassandra.svg | 1 + packages/my-joy-beta/src/assets/centos.svg | 1 + packages/my-joy-beta/src/assets/couchbase.svg | 1 + packages/my-joy-beta/src/assets/debian.svg | 1 + packages/my-joy-beta/src/assets/fedora.svg | 1 + packages/my-joy-beta/src/assets/freebsd.svg | 1 + packages/my-joy-beta/src/assets/ghost.svg | 1 + packages/my-joy-beta/src/assets/java.svg | 1 + packages/my-joy-beta/src/assets/mariadb.svg | 1 + packages/my-joy-beta/src/assets/mongodb.svg | 1 + packages/my-joy-beta/src/assets/multiarch.svg | 1 + packages/my-joy-beta/src/assets/mysql.svg | 1 + packages/my-joy-beta/src/assets/nginx.svg | 1 + packages/my-joy-beta/src/assets/node.svg | 1 + packages/my-joy-beta/src/assets/openbsd.svg | 1 + packages/my-joy-beta/src/assets/percona.svg | 1 + .../my-joy-beta/src/assets/placeholder.svg | 1 + .../my-joy-beta/src/assets/postgresql.svg | 1 + packages/my-joy-beta/src/assets/redis.svg | 1 + packages/my-joy-beta/src/assets/scylladb.svg | 1 + packages/my-joy-beta/src/assets/smart.svg | 1 + packages/my-joy-beta/src/assets/ubuntu.svg | 1 + packages/my-joy-beta/src/assets/windows.svg | 1 + .../__snapshots__/images.spec.js.snap | 442 ++++++++ .../__tests__/__snapshots__/name.spec.js.snap | 760 +++----------- .../__snapshots__/title.spec.js.snap | 8 +- .../create-instance/__tests__/images.spec.js | 90 ++ .../src/components/create-instance/image.js | 186 ++++ .../src/components/create-instance/name.js | 4 - .../src/components/create-instance/title.js | 4 +- .../src/containers/create-instance/image.js | 113 +++ .../src/containers/create-instance/index.js | 8 +- .../src/containers/create-instance/name.js | 38 +- packages/my-joy-beta/src/data/images-map.json | 70 ++ packages/my-joy-beta/src/data/prices.json | 952 ++++++++++++++++++ .../src/graphql/create-snapshot.gql | 1 + .../my-joy-beta/src/graphql/get-images.gql | 9 + .../src/graphql/remove-snapshot.gql | 1 + packages/my-joy-beta/src/router.js | 20 +- .../__tests__/__snapshots__/form.spec.js.snap | 33 +- yarn.lock | 672 +------------ 46 files changed, 2142 insertions(+), 1309 deletions(-) create mode 100644 packages/my-joy-beta/src/assets/alpine.svg create mode 100644 packages/my-joy-beta/src/assets/apache.svg create mode 100644 packages/my-joy-beta/src/assets/brocade.svg create mode 100644 packages/my-joy-beta/src/assets/cassandra.svg create mode 100644 packages/my-joy-beta/src/assets/centos.svg create mode 100644 packages/my-joy-beta/src/assets/couchbase.svg create mode 100644 packages/my-joy-beta/src/assets/debian.svg create mode 100644 packages/my-joy-beta/src/assets/fedora.svg create mode 100644 packages/my-joy-beta/src/assets/freebsd.svg create mode 100644 packages/my-joy-beta/src/assets/ghost.svg create mode 100644 packages/my-joy-beta/src/assets/java.svg create mode 100644 packages/my-joy-beta/src/assets/mariadb.svg create mode 100644 packages/my-joy-beta/src/assets/mongodb.svg create mode 100644 packages/my-joy-beta/src/assets/multiarch.svg create mode 100644 packages/my-joy-beta/src/assets/mysql.svg create mode 100644 packages/my-joy-beta/src/assets/nginx.svg create mode 100644 packages/my-joy-beta/src/assets/node.svg create mode 100644 packages/my-joy-beta/src/assets/openbsd.svg create mode 100644 packages/my-joy-beta/src/assets/percona.svg create mode 100644 packages/my-joy-beta/src/assets/placeholder.svg create mode 100644 packages/my-joy-beta/src/assets/postgresql.svg create mode 100644 packages/my-joy-beta/src/assets/redis.svg create mode 100644 packages/my-joy-beta/src/assets/scylladb.svg create mode 100644 packages/my-joy-beta/src/assets/smart.svg create mode 100644 packages/my-joy-beta/src/assets/ubuntu.svg create mode 100644 packages/my-joy-beta/src/assets/windows.svg create mode 100644 packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/images.spec.js.snap create mode 100644 packages/my-joy-beta/src/components/create-instance/__tests__/images.spec.js create mode 100644 packages/my-joy-beta/src/components/create-instance/image.js create mode 100644 packages/my-joy-beta/src/containers/create-instance/image.js create mode 100644 packages/my-joy-beta/src/data/images-map.json create mode 100644 packages/my-joy-beta/src/data/prices.json create mode 100644 packages/my-joy-beta/src/graphql/get-images.gql diff --git a/package.json b/package.json index 967676e2..789950db 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "staged-git-files": "0.0.4", "yargs": "^10.0.3" }, - "workspaces": ["packages/*", "prototypes/*"], + "workspaces": ["packages/*"], "resolutions": { "graphql": "0.12.3", "hoist-non-react-statics": "2.3.1", diff --git a/packages/my-joy-beta/package.json b/packages/my-joy-beta/package.json index b023f267..62dcda86 100644 --- a/packages/my-joy-beta/package.json +++ b/packages/my-joy-beta/package.json @@ -6,11 +6,14 @@ "repository": "github:yldio/joyent-portal", "main": "build/", "scripts": { - "dev": "REACT_APP_GQL_PORT=4000 PORT=3069 REACT_APP_GQL_PROTOCOL=http joyent-react-scripts start", + "dev": + "REACT_APP_GQL_PORT=4000 PORT=3069 REACT_APP_GQL_PROTOCOL=http joyent-react-scripts start", "start": "PORT=3069 joyent-react-scripts start", "build": "NODE_ENV=production joyent-react-scripts build", - "lint-ci": "eslint . --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", - "lint": "eslint . --fix --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", + "lint-ci": + "eslint . --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", + "lint": + "eslint . --fix --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", "test": "NODE_ENV=test joyent-react-scripts test --env=jsdom", "test-ci": "npm run test", "prepublish": "echo 0" @@ -22,8 +25,8 @@ "clipboard-copy": "^1.2.0", "date-fns": "^1.29.0", "declarative-redux-form": "^1.0.4", - "joyent-ui-toolkit": "^4.0.0", "joyent-manifest-editor": "^1.4.0", + "joyent-ui-toolkit": "^4.0.0", "lodash.find": "^4.6.0", "lodash.get": "^4.4.2", "lodash.isstring": "^4.0.1", @@ -44,6 +47,7 @@ "redux-form": "^7.2.0", "remcalc": "^1.0.9", "styled-components": "^2.3.0", + "styled-components-spacing": "^2.1.3", "styled-flex-component": "^2.1.0", "title-case": "^2.1.1" }, diff --git a/packages/my-joy-beta/src/assets/alpine.svg b/packages/my-joy-beta/src/assets/alpine.svg new file mode 100644 index 00000000..7c17576d --- /dev/null +++ b/packages/my-joy-beta/src/assets/alpine.svg @@ -0,0 +1 @@ +Artboard 1 copy 6 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/apache.svg b/packages/my-joy-beta/src/assets/apache.svg new file mode 100644 index 00000000..c86491ed --- /dev/null +++ b/packages/my-joy-beta/src/assets/apache.svg @@ -0,0 +1 @@ +Artboard 1 copy 13 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/brocade.svg b/packages/my-joy-beta/src/assets/brocade.svg new file mode 100644 index 00000000..905287f5 --- /dev/null +++ b/packages/my-joy-beta/src/assets/brocade.svg @@ -0,0 +1 @@ +Artboard 1 copy 14 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/cassandra.svg b/packages/my-joy-beta/src/assets/cassandra.svg new file mode 100644 index 00000000..811cb510 --- /dev/null +++ b/packages/my-joy-beta/src/assets/cassandra.svg @@ -0,0 +1 @@ +Artboard 1 copy 15 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/centos.svg b/packages/my-joy-beta/src/assets/centos.svg new file mode 100644 index 00000000..a73f2240 --- /dev/null +++ b/packages/my-joy-beta/src/assets/centos.svg @@ -0,0 +1 @@ +Artboard 1 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/couchbase.svg b/packages/my-joy-beta/src/assets/couchbase.svg new file mode 100644 index 00000000..d5522aa9 --- /dev/null +++ b/packages/my-joy-beta/src/assets/couchbase.svg @@ -0,0 +1 @@ +Artboard 1 copy 7 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/debian.svg b/packages/my-joy-beta/src/assets/debian.svg new file mode 100644 index 00000000..765fea07 --- /dev/null +++ b/packages/my-joy-beta/src/assets/debian.svg @@ -0,0 +1 @@ +Artboard 1 copy \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/fedora.svg b/packages/my-joy-beta/src/assets/fedora.svg new file mode 100644 index 00000000..79022386 --- /dev/null +++ b/packages/my-joy-beta/src/assets/fedora.svg @@ -0,0 +1 @@ +Artboard 1 copy 2 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/freebsd.svg b/packages/my-joy-beta/src/assets/freebsd.svg new file mode 100644 index 00000000..d3133098 --- /dev/null +++ b/packages/my-joy-beta/src/assets/freebsd.svg @@ -0,0 +1 @@ +Artboard 1 copy 3 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/ghost.svg b/packages/my-joy-beta/src/assets/ghost.svg new file mode 100644 index 00000000..1877dfb0 --- /dev/null +++ b/packages/my-joy-beta/src/assets/ghost.svg @@ -0,0 +1 @@ +Artboard 1 copy 16 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/java.svg b/packages/my-joy-beta/src/assets/java.svg new file mode 100644 index 00000000..0df674be --- /dev/null +++ b/packages/my-joy-beta/src/assets/java.svg @@ -0,0 +1 @@ +Artboard 1 copy 17 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/mariadb.svg b/packages/my-joy-beta/src/assets/mariadb.svg new file mode 100644 index 00000000..ee5018cb --- /dev/null +++ b/packages/my-joy-beta/src/assets/mariadb.svg @@ -0,0 +1 @@ +Artboard 1 copy 18 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/mongodb.svg b/packages/my-joy-beta/src/assets/mongodb.svg new file mode 100644 index 00000000..666da605 --- /dev/null +++ b/packages/my-joy-beta/src/assets/mongodb.svg @@ -0,0 +1 @@ +Artboard 1 copy 8 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/multiarch.svg b/packages/my-joy-beta/src/assets/multiarch.svg new file mode 100644 index 00000000..2c69011d --- /dev/null +++ b/packages/my-joy-beta/src/assets/multiarch.svg @@ -0,0 +1 @@ +Artboard 1 copy 43 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/mysql.svg b/packages/my-joy-beta/src/assets/mysql.svg new file mode 100644 index 00000000..0cf2aa5a --- /dev/null +++ b/packages/my-joy-beta/src/assets/mysql.svg @@ -0,0 +1 @@ +Artboard 1 copy 19 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/nginx.svg b/packages/my-joy-beta/src/assets/nginx.svg new file mode 100644 index 00000000..7450dca1 --- /dev/null +++ b/packages/my-joy-beta/src/assets/nginx.svg @@ -0,0 +1 @@ +Artboard 1 copy 9 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/node.svg b/packages/my-joy-beta/src/assets/node.svg new file mode 100644 index 00000000..cc086e14 --- /dev/null +++ b/packages/my-joy-beta/src/assets/node.svg @@ -0,0 +1 @@ +Artboard 1 copy 10 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/openbsd.svg b/packages/my-joy-beta/src/assets/openbsd.svg new file mode 100644 index 00000000..546bf941 --- /dev/null +++ b/packages/my-joy-beta/src/assets/openbsd.svg @@ -0,0 +1 @@ +Artboard 1 copy 46 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/percona.svg b/packages/my-joy-beta/src/assets/percona.svg new file mode 100644 index 00000000..bd3f5312 --- /dev/null +++ b/packages/my-joy-beta/src/assets/percona.svg @@ -0,0 +1 @@ +Artboard 1 copy 11 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/placeholder.svg b/packages/my-joy-beta/src/assets/placeholder.svg new file mode 100644 index 00000000..5f0d674d --- /dev/null +++ b/packages/my-joy-beta/src/assets/placeholder.svg @@ -0,0 +1 @@ +Artboard 1 copy 45 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/postgresql.svg b/packages/my-joy-beta/src/assets/postgresql.svg new file mode 100644 index 00000000..21eeef84 --- /dev/null +++ b/packages/my-joy-beta/src/assets/postgresql.svg @@ -0,0 +1 @@ +Artboard 1 copy 12 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/redis.svg b/packages/my-joy-beta/src/assets/redis.svg new file mode 100644 index 00000000..40132c4a --- /dev/null +++ b/packages/my-joy-beta/src/assets/redis.svg @@ -0,0 +1 @@ +Artboard 1 copy 20 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/scylladb.svg b/packages/my-joy-beta/src/assets/scylladb.svg new file mode 100644 index 00000000..3b9ad821 --- /dev/null +++ b/packages/my-joy-beta/src/assets/scylladb.svg @@ -0,0 +1 @@ +Artboard 1 copy 44 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/smart.svg b/packages/my-joy-beta/src/assets/smart.svg new file mode 100644 index 00000000..2c69011d --- /dev/null +++ b/packages/my-joy-beta/src/assets/smart.svg @@ -0,0 +1 @@ +Artboard 1 copy 43 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/ubuntu.svg b/packages/my-joy-beta/src/assets/ubuntu.svg new file mode 100644 index 00000000..cd1f9f2c --- /dev/null +++ b/packages/my-joy-beta/src/assets/ubuntu.svg @@ -0,0 +1 @@ +Artboard 1 copy 4 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/windows.svg b/packages/my-joy-beta/src/assets/windows.svg new file mode 100644 index 00000000..3fa437fb --- /dev/null +++ b/packages/my-joy-beta/src/assets/windows.svg @@ -0,0 +1 @@ +Artboard 1 copy 5 \ No newline at end of file diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/images.spec.js.snap b/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/images.spec.js.snap new file mode 100644 index 00000000..2222835a --- /dev/null +++ b/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/images.spec.js.snap @@ -0,0 +1,442 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders without throwing 1`] = ` +
+`; + +exports[`renders without throwing 1`] = ` + +`; + +exports[`renders without throwing 1`] = ` +.c0 { + margin-bottom: 1rem; +} + +.c2 { + margin-bottom: 2rem; +} + +.c10 { + margin-top: 2rem; +} + +.c4 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-align-content: stretch; + -ms-flex-line-pack: stretch; + align-content: stretch; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.c9 { + box-sizing: border-box; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex: 0 1 auto; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -0.5rem; + margin-left: -0.5rem; +} + +.c1 { + color: rgba(73,73,73,1); + line-height: 1.5rem; + font-size: 0.9375rem; + margin: 0; +} + +.c1 + p, +.c1 + small, +.c1 + h1, +.c1 + h2, +.c1 + label, +.c1 + h3, +.c1 + h4, +.c1 + h5, +.c1 + div, +.c1 + span { + padding-bottom: 2.25rem; +} + +.c13 { + font-family: sans-serif; + font-size: 100%; + line-height: 1.15; + margin: 0; + overflow: visible; + text-transform: none; + -webkit-appearance: button; + -moz-appearance: button; + appearance: button; + min-width: 7.5rem; +} + +.c13::-moz-focus-inner, +.c13[type='button']::-moz-focus-inner, +.c13[type='reset']::-moz-focus-inner, +.c13[type='submit']::-moz-focus-inner { + border-style: none; + padding: 0; +} + +.c13:-moz-focusring, +.c13[type='button']:-moz-focusring, +.c13[type='reset']:-moz-focusring, +.c13[type='submit']:-moz-focusring { + outline: 0.0625rem dotted ButtonText; +} + +.c13 + button { + margin-left: 0.375rem; +} + +.c12 { + display: inline-block; +} + +.c11 { + box-sizing: border-box; + display: inline-block; + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + min-height: 3rem; + height: 3rem; + min-width: 7.5rem; + margin-bottom: 0.5rem; + margin-top: 0.5rem; + padding: 0.9375rem 1.125rem; + position: relative; + font-size: 0.9375rem; + text-align: center; + font-style: normal; + font-stretch: normal; + line-height: normal; + -webkit-letter-spacing: normal; + -moz-letter-spacing: normal; + -ms-letter-spacing: normal; + letter-spacing: normal; + text-decoration: none; + white-space: nowrap; + vertical-align: middle; + touch-action: manipulation; + cursor: pointer; + color: rgb(255,255,255); + -webkit-text-fill-color: currentcolor; + background-image: none; + background-color: rgb(59,70,204); + border-radius: 0.25rem; + border: solid 0.0625rem rgb(45,56,132); + cursor: not-allowed; + pointer-events: none; + color: rgb(216,216,216); + background-color: rgb(250,250,250); + border-color: rgb(216,216,216); +} + +.c11:focus { + outline: 0; + text-decoration: none; + background-color: rgb(59,70,204); + border-color: rgb(45,56,132); +} + +.c11:hover { + background-color: rgb(72,83,217); + border: solid 0.0625rem rgb(45,56,132); +} + +.c11:active, +.c11:active:hover, +.c11:active:focus { + background-image: none; + outline: 0; + background-color: rgb(45,56,132); + border-color: rgb(45,56,132); +} + +.c11[disabled] { + cursor: not-allowed; + pointer-events: none; +} + +.c11:focus { + background-color: rgb(250,250,250); + border-color: rgb(216,216,216); +} + +.c11:hover { + background-color: rgb(250,250,250); + border-color: rgb(250,250,250); +} + +.c11:active, +.c11:active:hover, +.c11:active:focus { + background-color: rgb(250,250,250); + border-color: rgb(250,250,250); +} + +.c3 { + display: inline-block; + margin: 0; + padding: 0; + border: none; + overflow: hidden; + height: auto; + -webkit-margin-start: 0; + -webkit-margin-end: 0; + -webkit-padding-before: 0; + -webkit-padding-start: 0; + -webkit-padding-end: 0; + -webkit-padding-after: 0; +} + +.c5 { + font-size: 0.9375rem; + font-style: normal; + font-stretch: normal; + display: block; + color: rgb(70,70,70); + text-align: left; + margin-right: 0.75rem; + font-weight: bold; + white-space: pre; + font-size: 0.8125rem; +} + +.c6 { + position: relative; + vertical-align: text-bottom; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.c7 { + display: none; +} + +.c7:checked + label { + background: #3B46CC; + border: 0.0625rem solid rgb(59,70,204); +} + +.c7:checked + label:after { + left: 50%; + box-shadow: 0 0 0 0.0625rem rgb(59,70,204); +} + +.c7:checked + label:active { + box-shadow: none; +} + +.c7:checked + label:active:after { + margin-left: -00.75rem; +} + +.c8 { + outline: 0; + display: block; + width: 2.875rem; + height: 1.5rem; + position: relative; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + box-sizing: border-box; + background: rgb(250,250,250); + border-radius: 1.4375rem; + -webkit-transition: all 0.3s ease; + transition: all 0.3s ease; + border: 0.0625rem solid rgb(216,216,216); + margin-right: 0.375rem; +} + +.c8::selection { + background: none; +} + +.c8:active { + box-shadow: inset 0 0 0 1.5rem rgb(216,216,216); +} + +.c8:active:after { + padding-right: 0.75rem; +} + +.c8:hover { + border: 0.0625rem solid rgb(59,70,204); +} + +.c8:hover:after { + box-shadow: 0 0 0 0.0625rem rgb(59,70,204); +} + +.c8:after, +.c8:before { + position: relative; + display: block; + content: ''; + width: 50%; + height: 100%; +} + +.c8:after { + left: 0; + border-radius: 2em; + background: rgb(255,255,255); + -webkit-transition: left 0.3s cubic-bezier(0.175,0.885,0.32,1.275),padding 0.3s ease,margin 0.3s ease,box-shadow 0.3s ease; + transition: left 0.3s cubic-bezier(0.175,0.885,0.32,1.275),padding 0.3s ease,margin 0.3s ease,box-shadow 0.3s ease; + box-shadow: 0 0 0 0.0625rem rgb(216,216,216); +} + +.c8:active { + box-shadow: inset 0 0 0 2em rgb(216,216,216); +} + +.c8:active:after { + padding-right: 0.75rem; +} + +.c8:before { + display: none; +} + + +
+

+ Hardware virtual machines are generally used for non-containerized applications. Infrastructure containers are generally for running any Linux image on secure, bare metal containers. Read the docs +

+
+
+
+
+ +
+ +
+
+
+
+
+
+ +
+ +`; + +exports[`renders without throwing 1`] = ` +
+`; + +exports[`renders without throwing 1`] = ` + +`; + +exports[`renders without throwing 1`] = ` + +`; + +exports[`renders without throwing 1`] = ` + +`; diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/name.spec.js.snap b/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/name.spec.js.snap index a786f2ba..4b976e91 100644 --- a/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/name.spec.js.snap +++ b/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/name.spec.js.snap @@ -1,41 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders without throwing 1`] = ` -.c1 { - margin-right: 0.25rem; -} - -.c3 { - margin-top: 0.25rem; - margin-bottom: 1rem; -} - -.c6 { +.c0 { margin-top: 1rem; margin-bottom: 0.5rem; } -.c2 { - color: rgba(73,73,73,1); - line-height: 1.5rem; - font-size: 0.9375rem; - margin: 0; -} - -.c2 + p, -.c2 + small, -.c2 + h1, -.c2 + h2, -.c2 + label, -.c2 + h3, -.c2 + h4, -.c2 + h5, -.c2 + div, -.c2 + span { - padding-bottom: 2.25rem; -} - -.c10 { +.c4 { font-family: sans-serif; font-size: 100%; line-height: 1.15; @@ -48,30 +19,30 @@ exports[`renders without throwing 1`] = ` min-width: 7.5rem; } -.c10::-moz-focus-inner, -.c10[type='button']::-moz-focus-inner, -.c10[type='reset']::-moz-focus-inner, -.c10[type='submit']::-moz-focus-inner { +.c4::-moz-focus-inner, +.c4[type='button']::-moz-focus-inner, +.c4[type='reset']::-moz-focus-inner, +.c4[type='submit']::-moz-focus-inner { border-style: none; padding: 0; } -.c10:-moz-focusring, -.c10[type='button']:-moz-focusring, -.c10[type='reset']:-moz-focusring, -.c10[type='submit']:-moz-focusring { +.c4:-moz-focusring, +.c4[type='button']:-moz-focusring, +.c4[type='reset']:-moz-focusring, +.c4[type='submit']:-moz-focusring { outline: 0.0625rem dotted ButtonText; } -.c10 + button { +.c4 + button { margin-left: 0.375rem; } -.c9 { +.c3 { display: inline-block; } -.c8 { +.c2 { box-sizing: border-box; display: inline-block; -webkit-box-pack: center; @@ -115,69 +86,50 @@ exports[`renders without throwing 1`] = ` border-color: rgb(216,216,216); } -.c8:focus { +.c2:focus { outline: 0; text-decoration: none; background-color: rgb(59,70,204); border-color: rgb(45,56,132); } -.c8:hover { +.c2:hover { background-color: rgb(72,83,217); border: solid 0.0625rem rgb(45,56,132); } -.c8:active, -.c8:active:hover, -.c8:active:focus { +.c2:active, +.c2:active:hover, +.c2:active:focus { background-image: none; outline: 0; background-color: rgb(45,56,132); border-color: rgb(45,56,132); } -.c8[disabled] { +.c2[disabled] { cursor: not-allowed; pointer-events: none; } -.c8:focus { +.c2:focus { background-color: rgb(255,255,255); border-color: rgb(216,216,216); } -.c8:hover { +.c2:hover { background-color: rgb(247,247,247); border-color: rgb(216,216,216); } -.c8:active, -.c8:active:hover, -.c8:active:focus { +.c2:active, +.c2:active:hover, +.c2:active:focus { background-color: rgb(230,230,230); border-color: rgb(216,216,216); } -.c5 { - box-sizing: border-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 0 1 auto; - -ms-flex: 0 1 auto; - flex: 0 1 auto; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -0.5rem; - margin-left: -0.5rem; -} - -.c7 { +.c1 { color: rgba(73,73,73,1); font-weight: normal; line-height: 1.625rem; @@ -185,97 +137,31 @@ exports[`renders without throwing 1`] = ` margin: 0; } -.c7 + p, -.c7 + small, -.c7 + h1, -.c7 + h2, -.c7 + label, -.c7 + h3, -.c7 + h4, -.c7 + h5, -.c7 + div, -.c7 + span { +.c1 + p, +.c1 + small, +.c1 + h1, +.c1 + h2, +.c1 + label, +.c1 + h3, +.c1 + h4, +.c1 + h5, +.c1 + div, +.c1 + span { margin-top: 1.5rem; } -.c4 { - background-color: rgb(216,216,216); - margin: 0; - height: 0.0625rem; -} - -.c0 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; -} -
-
- - - -
-

- Instance name -

-
-
-
-
-

, .c2 { box-sizing: border-box; @@ -387,9 +385,7 @@ Array [ />

- Test -

+ />
, .c2 { box-sizing: border-box; diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/images.spec.js b/packages/my-joy-beta/src/components/create-instance/__tests__/images.spec.js new file mode 100644 index 00000000..93523b55 --- /dev/null +++ b/packages/my-joy-beta/src/components/create-instance/__tests__/images.spec.js @@ -0,0 +1,90 @@ +import React from 'react'; +import renderer from 'react-test-renderer'; +import 'jest-styled-components'; + +import Images from '../image'; +import Theme from '@mocks/theme'; + +it('renders without throwing', () => { + expect( + renderer + .create( + + + + ) + .toJSON() + ).toMatchSnapshot(); +}); + +it('renders without throwing', () => { + expect( + renderer + .create( + + + + ) + .toJSON() + ).toMatchSnapshot(); +}); + +it('renders without throwing', () => { + expect( + renderer + .create( + + + + ) + .toJSON() + ).toMatchSnapshot(); +}); + +it('renders without throwing', () => { + expect( + renderer + .create( + + + + ) + .toJSON() + ).toMatchSnapshot(); +}); + +it('renders without throwing', () => { + expect( + renderer + .create( + + + + ) + .toJSON() + ).toMatchSnapshot(); +}); + +it('renders without throwing', () => { + expect( + renderer + .create( + + + + ) + .toJSON() + ).toMatchSnapshot(); +}); + +it('renders without throwing', () => { + expect( + renderer + .create( + + + + ) + .toJSON() + ).toMatchSnapshot(); +}); diff --git a/packages/my-joy-beta/src/components/create-instance/image.js b/packages/my-joy-beta/src/components/create-instance/image.js new file mode 100644 index 00000000..7e5d7ed8 --- /dev/null +++ b/packages/my-joy-beta/src/components/create-instance/image.js @@ -0,0 +1,186 @@ +import React, { Fragment } from 'react'; +import styled, { keyframes } from 'styled-components'; +import { Field } from 'redux-form'; +import { Margin } from 'styled-components-spacing'; +import Flex from 'styled-flex-component'; +import remcalc from 'remcalc'; +import { Row, Col } from 'react-styled-flexboxgrid'; +import titleCase from 'title-case'; +import is from 'styled-is'; + +import { + H3, + P, + FormGroup, + FormLabel, + Button, + Toggle, + H4, + Select, + StatusLoader +} from 'joyent-ui-toolkit'; + +const fadeIn = keyframes` + from { + opacity: 0; + } + + to { + opacity: 1; + } +`; + +const Card = styled.div` + width: ${remcalc(144)}; + height: ${remcalc(144)}; + background: ${props => props.theme.white}; + border: ${remcalc(1)} solid ${props => props.theme.grey}; + border-radius: ${remcalc(4)}; + box-sizing: border-box; + padding-top: ${remcalc(12)}; + align-items: center; + justify-content: space-between; + flex-direction: column; + display: flex; + margin-bottom: ${remcalc(20)}; + animation: ${fadeIn} 0.2s ease-in-out; + + ${is('selected')` + border: 1px solid ${props => props.theme.primaryActive}; + + + select { + border-color: ${props => props.theme.primaryActive}; + } + `}; +`; + +const Version = styled(Select)` + min-width: 100%; + width: ${remcalc(144)}; + + select { + margin: 0; + border-bottom-width: 0; + border-radius: 0; + } +`; + +const getImage = name => { + try { + return require(`../../assets/${name}.svg`); + } catch (e) { + return require(`../../assets/placeholder.svg`); + } +}; + +const getImageByID = (id, images) => { + const image = images + .map(image => ({ + ...image, + versions: image.versions.filter(version => version.id === id) + })) + .filter(e => e.versions.length)[0]; + return image + ? { + imageName: image.imageName, + name: image.versions[0].name, + version: image.versions[0].version + } + : {}; +}; + +export default ({ + handleSubmit, + pristine, + expanded, + imageID, + onCancel, + loading, + images, + isVmSelected +}) => ( + + {expanded && ( + + +

+ Hardware virtual machines are generally used for non-containerized + applications. Infrastructure containers are generally for running + any Linux image on secure, bare metal containers. Read the docs +

+
+ {loading ? ( + + ) : ( + + + + + Infrastructure Container + Hardware Virtual Machine + + + + + {images && + images.map(image => ( + + + {image.imageName} +

{titleCase(image.imageName)}

+ + + + {image.versions.map(version => ( + + ))} + + +
+ + ))} +
+ + + +
+ )} +
+ )} + {!expanded && + imageID && ( + + +

+ {titleCase(getImageByID(imageID, images).name)} -{' '} + {getImageByID(imageID, images).version} +

+

+ {isVmSelected + ? 'Hardware Virtual Machine' + : 'Infrastructure Container'}{' '} +

+
+ +
+ )} + +); diff --git a/packages/my-joy-beta/src/components/create-instance/name.js b/packages/my-joy-beta/src/components/create-instance/name.js index d4fd58c2..62b8b8c2 100644 --- a/packages/my-joy-beta/src/components/create-instance/name.js +++ b/packages/my-joy-beta/src/components/create-instance/name.js @@ -3,7 +3,6 @@ import { Field } from 'redux-form'; import { Margin } from 'styled-components-spacing'; import { - NameIcon, H3, P, FormGroup, @@ -13,11 +12,8 @@ import { Button } from 'joyent-ui-toolkit'; -import Title from './title'; - export default ({ handleSubmit, pristine, expanded, name, onCancel }) => (
- } label="Instance name" /> {expanded ? ( <Fragment> <Margin bottom={3}> diff --git a/packages/my-joy-beta/src/components/create-instance/title.js b/packages/my-joy-beta/src/components/create-instance/title.js index e5ffda64..60572980 100644 --- a/packages/my-joy-beta/src/components/create-instance/title.js +++ b/packages/my-joy-beta/src/components/create-instance/title.js @@ -5,11 +5,11 @@ import remcalc from 'remcalc'; import { Divider, P } from 'joyent-ui-toolkit'; -export default ({ icon, label }) => ( +export default ({ icon, children }) => ( <Fragment> <Flex> <Margin right={1}>{icon}</Margin> - <P>{label}</P> + <P>{children}</P> </Flex> <Margin top={1} bottom={3}> <Divider height={remcalc(1)} /> diff --git a/packages/my-joy-beta/src/containers/create-instance/image.js b/packages/my-joy-beta/src/containers/create-instance/image.js new file mode 100644 index 00000000..4e87e0d9 --- /dev/null +++ b/packages/my-joy-beta/src/containers/create-instance/image.js @@ -0,0 +1,113 @@ +import React, { Fragment } from 'react'; +import { withRouter } from 'react-router'; +import { compose, graphql } from 'react-apollo'; +import ReduxForm from 'declarative-redux-form'; +import { connect } from 'react-redux'; +import get from 'lodash.get'; + +import { InstanceTypeIcon } from 'joyent-ui-toolkit'; +import Image from '@components/create-instance/image'; +import Title from '@components/create-instance/title'; +import imageData from '../../data/images-map.json'; + +import getImages from '../../graphql/get-images.gql'; + +const ImageContainer = ({ + expanded, + image, + handleSubmit, + handleCancel, + loading, + images, + vms +}) => ( + <Fragment> + <Title icon={<InstanceTypeIcon />}>Instance type and image + + {props => ( + + )} + + +); + +export default compose( + withRouter, + connect( + (state, ownProps) => { + return { + ...ownProps, + vms: get(state, 'form.create-instance-image.values.vms', false), + image: get(state, 'form.create-instance-image.values.image', null) + }; + }, + (dispatch, { history }) => ({ + handleSubmit: () => history.push(`/instances/~create/package`), + handleCancel: () => history.push(`/instances/~create/image`) + }) + ), + graphql(getImages, { + props: ({ ownProps: { vms = false }, data: { loading, images = [] } }) => ({ + loading, + images: images.reduce((accumulator, image) => { + const isVm = !image.type.includes('DATASET'); + + if (isVm && !vms) { + return accumulator; + } + + const name = + imageData[ + image.name + .split('-')[0] + .split(' ')[0] + .toLowerCase() + ]; + + const exists = Boolean( + accumulator.filter(e => e.imageName === name && isVm === e.isVm) + .length + ); + + if (!exists) { + return accumulator.concat([ + { + imageName: name, + versions: [ + { + name: image.name, + version: image.version, + id: image.id + } + ], + isVm + } + ]); + } + + return accumulator.map(({ versions, ...rest }) => ({ + ...rest, + versions: + rest.imageName === name && rest.isVm === isVm + ? versions.concat([ + { name: image.name, version: image.version, id: image.id } + ]) + : versions + })); + }, []) + }) + }) +)(ImageContainer); diff --git a/packages/my-joy-beta/src/containers/create-instance/index.js b/packages/my-joy-beta/src/containers/create-instance/index.js index 8807315f..95b1d3a3 100644 --- a/packages/my-joy-beta/src/containers/create-instance/index.js +++ b/packages/my-joy-beta/src/containers/create-instance/index.js @@ -4,12 +4,18 @@ import { Margin } from 'styled-components-spacing'; import { ViewContainer, H2 } from 'joyent-ui-toolkit'; import Name from '@containers/create-instance/name'; +import Image from '@containers/create-instance/image'; export default ({ step }) => (

Create Instances

- + + + + + +
); 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 4c6afaa3..537dc71e 100644 --- a/packages/my-joy-beta/src/containers/create-instance/name.js +++ b/packages/my-joy-beta/src/containers/create-instance/name.js @@ -1,28 +1,34 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import { withRouter } from 'react-router'; import { compose } from 'react-apollo'; import ReduxForm from 'declarative-redux-form'; import { connect } from 'react-redux'; import get from 'lodash.get'; +import { NameIcon } from 'joyent-ui-toolkit'; + import Name from '@components/create-instance/name'; +import Title from '@components/create-instance/title'; const NameContainer = ({ expanded, name, handleSubmit, handleCancel }) => ( - - {props => ( - - )} - + + }>Instance name + + {props => ( + + )} + + ); export default compose( diff --git a/packages/my-joy-beta/src/data/images-map.json b/packages/my-joy-beta/src/data/images-map.json new file mode 100644 index 00000000..9d24fdb4 --- /dev/null +++ b/packages/my-joy-beta/src/data/images-map.json @@ -0,0 +1,70 @@ +{ + "apache": "apache", + "brocade": "brocade", + "cassandra": "cassandra", + "couchdb": "couchbase", + "couchbase": "couchbase", + "brocade": "brocade", + "alpine": "alpine", + "dtrace": "dtrace", + "elasticsearch": "elasticsearch", + "ghost": "ghost", + "hadoop": "hadoop", + "openbsd": "openbsd", + "java": "java", + "kirke": "kirke", + "kirke-trial": "kirke", + "magento": "magento", + "manta": "manta", + "mariadb": "mariadb", + "triton": "multiarch", + "memcached": "memcached", + "mongodb": "mongodb", + "mysql-cluster": "mysql", + "neo4j": "neo4j", + "nginx": "nginx", + "node": "node", + "nodejs": "node", + "nodejs-4": "node", + "nodejs-6": "node", + "percona": "percona", + "pkgbuild": "smart", + "postgresql": "postgresql", + "rails": "rails", + "redis": "redis", + "riak": "riak", + "scylladb": "scylladb", + "scylladb-trial": "scylladb", + "steelapp": "brocade", + "stm": "stingray", + "wordpress": "wordpress", + "mysql": "mysql", + "alpine-3": "alpine", + "arch-demo": "arch", + "base": "smart", + "centos": "centos", + "centos-6": "centos", + "centos-7": "centos", + "debian": "debian", + "fedora": "fedora", + "freebsd": "freebsd", + "multiarch": "smart", + "smartos": "smart", + "sngl": "smart", + "base": "smart", + "standard64": "smart", + "standard": "smart", + "base64": "smart", + "minimal": "smart", + "minimal-32": "smart", + "minimal-64": "smart", + "minimal-32-lts": "smart", + "minimal-64-lts": "smart", + "ssc": "ubuntu", + "standard": "smart", + "ubuntu": "ubuntu", + "ubuntu-certified-12.04": "ubuntu", + "ws20": "windows", + "ws2016std": "windows", + "ws2012std": "windows" +} diff --git a/packages/my-joy-beta/src/data/prices.json b/packages/my-joy-beta/src/data/prices.json new file mode 100644 index 00000000..b0de665d --- /dev/null +++ b/packages/my-joy-beta/src/data/prices.json @@ -0,0 +1,952 @@ +[ + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "General Purpose KVM - 3.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.0838", + "UOM": "k4-general-kvm-3.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "General Purpose KVM - 7.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.1663", + "UOM": "k4-general-kvm-7.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "General Purpose KVM - 15.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.3325", + "UOM": "k4-general-kvm-15.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "General Purpose KVM - 31.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.665", + "UOM": "k4-general-kvm-31.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Memory Optimized KVM - 15.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.2594", + "UOM": "k4-highram-kvm-15.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Memory Optimized KVM - 31.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.5203", + "UOM": "k4-highram-kvm-31.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Memory Optimized KVM - 63.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "1.0391", + "UOM": "k4-highram-kvm-63.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Fast Disk KVM - 63.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "2.1313", + "UOM": "k4-fastdisk-kvm-63.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Compute Optimized KVM - 250M", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.0163", + "UOM": "k4-highcpu-kvm-250M" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Compute Optimized KVM - 750M", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.0325", + "UOM": "k4-highcpu-kvm-750M" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Compute Optimized KVM - 1.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.0663", + "UOM": "k4-highcpu-kvm-1.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Compute Optimized KVM - 3.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.1313", + "UOM": "k4-highcpu-kvm-3.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Compute Optimized KVM - 7.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.2625", + "UOM": "k4-highcpu-kvm-7.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Compute Optimized KVM - 15.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.525", + "UOM": "k4-highcpu-kvm-15.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Fast Disk KVM - 31.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "1.0663", + "UOM": "k4-fastdisk-kvm-31.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Big Disk KVM - 31.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.825", + "UOM": "k4-bigdisk-kvm-31.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Big Disk KVM - 63.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "1.725", + "UOM": "k4-bigdisk-kvm-63.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Compute Service", + "EffectiveStartDate": "2016-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "k4-kvm", + "RatePlanChargeName": "Big Disk KVM - 15.75G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.4125", + "UOM": "k4-bigdisk-kvm-15.75G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "General Purpose - 4G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.067", + "UOM": "g4-general-4G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "General Purpose - 8G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.133", + "UOM": "g4-general-8G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "General Purpose - 16G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.266", + "UOM": "g4-general-16G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "General Purpose - 32G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.532", + "UOM": "g4-general-32G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Memory Optimized - 16G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.2075", + "UOM": "g4-highram-16G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Memory Optimized - 32G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.4163", + "UOM": "g4-highram-32G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Memory Optimized - 64G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.8313", + "UOM": "g4-highram-64G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Memory Optimized - 110G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "1.6625", + "UOM": "g4-highram-110G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Memory Optimized - 222G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "3.325", + "UOM": "g4-highram-222G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 8G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.21", + "UOM": "g4-highcpu-8G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 96G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "2.496", + "UOM": "g4-highcpu-96G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Fast Disk - 32G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.853", + "UOM": "g4-fastdisk-32G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Fast Disk - 64G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "1.705", + "UOM": "g4-fastdisk-64G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Fast Disk - 110G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "3.41", + "UOM": "g4-fastdisk-110G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Fast Disk - 222G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "5.52", + "UOM": "g4-fastdisk-222G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 128M", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.003", + "UOM": "g4-highcpu-128M" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 256M", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.007", + "UOM": "g4-highcpu-256M" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 512M", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.013", + "UOM": "g4-highcpu-512M" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 1G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.026", + "UOM": "g4-highcpu-1G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 2G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.053", + "UOM": "g4-highcpu-2G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 4G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.105", + "UOM": "g4-highcpu-4G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 16G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.42", + "UOM": "g4-highcpu-16G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 32G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.84", + "UOM": "g4-highcpu-32G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 64G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "1.68", + "UOM": "g4-highcpu-64G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 110G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "3.328", + "UOM": "g4-highcpu-110G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 160G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "4.16", + "UOM": "g4-highcpu-160G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 192G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "4.992", + "UOM": "g4-highcpu-192G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Compute Optimized - 222G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "5.772", + "UOM": "g4-highcpu-222G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Big Disk - 64G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "1.38", + "UOM": "g4-bigdisk-64G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Big Disk - 16G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.345", + "UOM": "g4-bigdisk-16G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Big Disk - 32G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "0.69", + "UOM": "g4-bigdisk-32G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + }, + { + "Sku": "SKU-00000009", + "SkuName": "Compute", + "Productname": "Triton Container Service", + "EffectiveStartDate": "2015-01-01", + "EffectiveEndDate": "2100-01-01", + "BillingTag": "t4-triton", + "RatePlanChargeName": "Big Disk - 110G", + "RatePlanChargeType": "Usage", + "RatePlanChargeModel": "PerUnit", + "RatePlanChargePriceSummary": [ + { + "cost": "2.76", + "UOM": "g4-bigdisk-110G" + } + ], + "RatePlanId": "2c92a0f93f413172013f4409a0466d19", + "Status": "Active" + } +] diff --git a/packages/my-joy-beta/src/graphql/create-snapshot.gql b/packages/my-joy-beta/src/graphql/create-snapshot.gql index 82bb96cf..44917938 100644 --- a/packages/my-joy-beta/src/graphql/create-snapshot.gql +++ b/packages/my-joy-beta/src/graphql/create-snapshot.gql @@ -1,5 +1,6 @@ mutation createInstanceSnapshot($id: ID!, $name: String) { createMachineSnapshot(id: $id, name: $name) { + id name } } diff --git a/packages/my-joy-beta/src/graphql/get-images.gql b/packages/my-joy-beta/src/graphql/get-images.gql new file mode 100644 index 00000000..f3e0f5e4 --- /dev/null +++ b/packages/my-joy-beta/src/graphql/get-images.gql @@ -0,0 +1,9 @@ +query Images { + images { + id + name + os + version + type + } +} diff --git a/packages/my-joy-beta/src/graphql/remove-snapshot.gql b/packages/my-joy-beta/src/graphql/remove-snapshot.gql index 8c430fcb..0b6ad61b 100644 --- a/packages/my-joy-beta/src/graphql/remove-snapshot.gql +++ b/packages/my-joy-beta/src/graphql/remove-snapshot.gql @@ -1,5 +1,6 @@ mutation deleteMachineSnapshot($id: ID!, $snapshot: ID!) { deleteMachineSnapshot(id: $id, snapshot: $snapshot) { + id name } } diff --git a/packages/my-joy-beta/src/router.js b/packages/my-joy-beta/src/router.js index d4bd8638..8bc11783 100644 --- a/packages/my-joy-beta/src/router.js +++ b/packages/my-joy-beta/src/router.js @@ -104,52 +104,52 @@ export default () => ( } + component={props => } /> } + component={props => } /> } + component={props => } /> } + component={props => } /> } + component={props => } /> } + component={props => } /> } + component={props => } /> } + component={props => } /> } + component={props => } /> } + component={props => } />