diff --git a/consoles/my-joy-instances/src/components/__tests__/__snapshots__/menu.spec.js.snap b/consoles/my-joy-instances/src/components/__tests__/__snapshots__/menu.spec.js.snap index 16944213..f6740201 100644 --- a/consoles/my-joy-instances/src/components/__tests__/__snapshots__/menu.spec.js.snap +++ b/consoles/my-joy-instances/src/components/__tests__/__snapshots__/menu.spec.js.snap @@ -21,11 +21,9 @@ exports[`renders without throwing 1`] = ` .c6 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c6:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c1 { @@ -57,10 +55,10 @@ exports[`renders without throwing 1`] = ` position: relative; } -.c5.active:after { +.c5:after { width: 100%; height: 0.0625rem; - background: rgb(73,73,73); + background: rgb(216,216,216); content: ''; position: absolute; bottom: 0; @@ -68,6 +66,14 @@ exports[`renders without throwing 1`] = ` z-index: 2; } +.c5.active:after { + background: rgb(73,73,73); +} + +.c5.active { + font-weight: 600; +} + .c3 { background: rgb(250,250,250); list-style-type: none; diff --git a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/list.spec.js.snap b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/list.spec.js.snap index a1e93cb6..ffe17897 100644 --- a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/list.spec.js.snap +++ b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/list.spec.js.snap @@ -54,11 +54,9 @@ exports[`renders without throwing 1`] = ` .c21 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c21:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c11 { @@ -798,11 +796,9 @@ exports[`renders without throwing 1`] = ` .c21 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c21:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c11 { @@ -1542,11 +1538,9 @@ exports[`renders without throwing 1`] = ` .c21 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c21:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c12 { @@ -2286,11 +2280,9 @@ exports[`renders without throwing 1`] = ` .c21 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c21:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c12 { @@ -3030,11 +3022,9 @@ exports[`renders without throwing 1`] = ` .c21 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c21:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c11 { @@ -3774,11 +3764,9 @@ exports[`renders {children} without throwing 1`] = .c21 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c21:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c11 { @@ -4512,11 +4500,9 @@ exports[`renders without throwing 1`] = ` .c11 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c11:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c12 { @@ -5039,11 +5025,9 @@ exports[`renders without throwing 1`] = ` .c11 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c11:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c12 { @@ -5568,11 +5552,9 @@ exports[`renders without throwing 1`] = ` .c11 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c11:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c12 { @@ -6095,11 +6077,9 @@ exports[`renders without throwing 1`] = ` .c11 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; -} - -.c11:hover { - -webkit-text-decoration: none; - text-decoration: none; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; } .c13 { diff --git a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/metadata.spec.js.snap b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/metadata.spec.js.snap index b8ac1df2..48c4b63c 100644 --- a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/metadata.spec.js.snap +++ b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/metadata.spec.js.snap @@ -691,8 +691,8 @@ exports[`renders without throwing 1`] = ` .c23 { box-sizing: border-box; width: 18.75rem; - height: 6rem; - min-height: 6rem; + height: 12rem; + min-height: 12rem; padding: 0.8125rem 0.75rem; border-radius: 0.25rem; background-color: rgb(255,255,255); @@ -706,6 +706,7 @@ exports[`renders without throwing 1`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -1760,8 +1761,8 @@ exports[`renders without throwing 1`] = ` .c23 { box-sizing: border-box; width: 18.75rem; - height: 6rem; - min-height: 6rem; + height: 12rem; + min-height: 12rem; padding: 0.8125rem 0.75rem; border-radius: 0.25rem; background-color: rgb(255,255,255); @@ -1775,6 +1776,7 @@ exports[`renders without throwing 1`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; diff --git a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/snapshots.spec.js.snap b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/snapshots.spec.js.snap index be955b0d..983b7d38 100644 --- a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/snapshots.spec.js.snap +++ b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/snapshots.spec.js.snap @@ -497,7 +497,7 @@ Array [ .c6 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.625rem; font-size: 1.3125rem; } @@ -2401,7 +2401,7 @@ Array [ .c6 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.625rem; font-size: 1.3125rem; } @@ -3289,7 +3289,7 @@ Array [ .c6 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.625rem; font-size: 1.3125rem; } @@ -4177,7 +4177,7 @@ Array [ .c6 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.625rem; font-size: 1.3125rem; } @@ -5065,7 +5065,7 @@ Array [ .c6 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.625rem; font-size: 1.3125rem; } @@ -5953,7 +5953,7 @@ Array [ .c6 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.625rem; font-size: 1.3125rem; } diff --git a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/summary.spec.js.snap b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/summary.spec.js.snap index df263450..3df51641 100644 --- a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/summary.spec.js.snap +++ b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/summary.spec.js.snap @@ -231,15 +231,13 @@ exports[`renders without throwing 1`] = ` .c36 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; color: rgb(255,255,255); -webkit-text-fill-color: currentcolor; } -.c36:hover { - -webkit-text-decoration: none; - text-decoration: none; -} - .c29 { min-width: 7.5rem; } @@ -885,7 +883,7 @@ exports[`renders without throwing 1`] = ` .c9 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.875rem; font-size: 1.5rem; } @@ -952,6 +950,7 @@ exports[`renders without throwing 1`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -1031,6 +1030,7 @@ exports[`renders without throwing 1`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -2087,15 +2087,13 @@ exports[`renders without throwing 1`] = ` .c35 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; color: rgb(255,255,255); -webkit-text-fill-color: currentcolor; } -.c35:hover { - -webkit-text-decoration: none; - text-decoration: none; -} - .c29 { min-width: 7.5rem; } @@ -2580,7 +2578,7 @@ exports[`renders without throwing 1`] = ` .c9 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.875rem; font-size: 1.5rem; } @@ -2647,6 +2645,7 @@ exports[`renders without throwing 1`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -4020,15 +4019,13 @@ exports[`renders without throwing 2`] = ` .c35 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; color: rgb(255,255,255); -webkit-text-fill-color: currentcolor; } -.c35:hover { - -webkit-text-decoration: none; - text-decoration: none; -} - .c29 { min-width: 7.5rem; } @@ -4513,7 +4510,7 @@ exports[`renders without throwing 2`] = ` .c9 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.875rem; font-size: 1.5rem; } @@ -4580,6 +4577,7 @@ exports[`renders without throwing 2`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -5949,15 +5947,13 @@ exports[`renders without throwi .c39 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; color: rgb(255,255,255); -webkit-text-fill-color: currentcolor; } -.c39:hover { - -webkit-text-decoration: none; - text-decoration: none; -} - .c32 { fill: rgb(59,70,204); stroke: rgb(59,70,204); @@ -6648,7 +6644,7 @@ exports[`renders without throwi .c9 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.875rem; font-size: 1.5rem; } @@ -6715,6 +6711,7 @@ exports[`renders without throwi -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -6794,6 +6791,7 @@ exports[`renders without throwi -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -7874,15 +7872,13 @@ exports[`renders without throwing 1`] = ` .c35 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; color: rgb(255,255,255); -webkit-text-fill-color: currentcolor; } -.c35:hover { - -webkit-text-decoration: none; - text-decoration: none; -} - .c29 { min-width: 7.5rem; } @@ -8367,7 +8363,7 @@ exports[`renders without throwing 1`] = ` .c9 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.875rem; font-size: 1.5rem; } @@ -8434,6 +8430,7 @@ exports[`renders without throwing 1`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -8513,6 +8510,7 @@ exports[`renders without throwing 1`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -9569,15 +9567,13 @@ exports[`renders without throwing 2`] = ` .c35 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; color: rgb(255,255,255); -webkit-text-fill-color: currentcolor; } -.c35:hover { - -webkit-text-decoration: none; - text-decoration: none; -} - .c29 { min-width: 7.5rem; } @@ -10062,7 +10058,7 @@ exports[`renders without throwing 2`] = ` .c9 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.875rem; font-size: 1.5rem; } @@ -10129,6 +10125,7 @@ exports[`renders without throwing 2`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -10208,6 +10205,7 @@ exports[`renders without throwing 2`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -11264,15 +11262,13 @@ exports[`renders without throwing 3`] = ` .c36 { color: rgb(59,70,204); -webkit-text-fill-color: currentcolor; + cursor: pointer; + -webkit-text-decoration: underline; + text-decoration: underline; color: rgb(255,255,255); -webkit-text-fill-color: currentcolor; } -.c36:hover { - -webkit-text-decoration: none; - text-decoration: none; -} - .c29 { min-width: 7.5rem; } @@ -11919,7 +11915,7 @@ exports[`renders without throwing 3`] = ` .c9 { margin: 0; color: rgb(73,73,73); - font-weight: normal; + font-weight: 400; line-height: 1.875rem; font-size: 1.5rem; } @@ -11986,6 +11982,7 @@ exports[`renders without throwing 3`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; @@ -12065,6 +12062,7 @@ exports[`renders without throwing 3`] = ` -moz-appearance: none; appearance: none; outline: 0; + white-space: pre-wrap; font-family: "Roboto Mono",monospace; width: 100%; min-width: 100%; diff --git a/consoles/my-joy-instances/src/components/instances/footer.js b/consoles/my-joy-instances/src/components/instances/footer.js index 3723ae4e..8bf8d1ef 100644 --- a/consoles/my-joy-instances/src/components/instances/footer.js +++ b/consoles/my-joy-instances/src/components/instances/footer.js @@ -24,7 +24,7 @@ export default ({ onReboot, onRemove }) => ( - + diff --git a/consoles/my-joy-instances/src/constants.js b/consoles/my-joy-instances/src/constants.js index d06c2c34..892e1dd2 100644 --- a/consoles/my-joy-instances/src/constants.js +++ b/consoles/my-joy-instances/src/constants.js @@ -18,6 +18,7 @@ export const Forms = { }; export const Values = { + IC_SHOW_CLI: 'INSTANCE_CREATION_SHOW_CLI', IC_AFF_V_ADD_OPEN: 'INSTANCE_CREATION_AFFINITY_VALUE_ADD_OPEN', IC_AFF_V_EDIT_OPEN: 'INSTANCE_CREATION_AFFINITY_VALUE_EDIT_OPEN', IC_AFF_V_AFF: 'INSTANCE_CREATION_AFFINITY_VALUE_AFFINITY', diff --git a/consoles/my-joy-instances/src/containers/create.js b/consoles/my-joy-instances/src/containers/create.js index b87ba73b..3cbe6b2d 100644 --- a/consoles/my-joy-instances/src/containers/create.js +++ b/consoles/my-joy-instances/src/containers/create.js @@ -1,15 +1,14 @@ -import React, { Component } from 'react'; +import React, { Component, Fragment } from 'react'; import { Margin, Padding } from 'styled-components-spacing'; import { graphql, compose } from 'react-apollo'; import ReduxForm from 'declarative-redux-form'; import { connect } from 'react-redux'; import { SubmissionError, destroy } from 'redux-form'; import { set, destroyAll } from 'react-redux-values'; +import Flex, { FlexItem } from 'styled-flex-component'; import intercept from 'apr-intercept'; import get from 'lodash.get'; - -import { H3, ViewContainer, Button } from 'joyent-ui-toolkit'; -import { Provider as ResourceSteps } from 'joyent-ui-resource-step'; +import styled from 'styled-components'; import { Name, @@ -22,14 +21,20 @@ import { Firewall, CNS, Affinity, - generatePayload + generatePayload, + Footer } from 'joyent-ui-instance-steps'; -import { Forms } from '@root/constants'; +import { Provider as ResourceSteps } from 'joyent-ui-resource-step'; +import { Anchor, H3, ViewContainer, Button } from 'joyent-ui-toolkit'; + +import { Forms, Values } from '@root/constants'; import parseError from '@state/parse-error'; import CreateInstanceMutation from '@graphql/create-instance.gql'; const { IC_F } = Forms; +const { IC_SHOW_CLI } = Values; + const names = { name: 'IC_NAME', image: 'IC_IMAGE', @@ -86,7 +91,16 @@ class CreateInstance extends Component { }; render() { - const { match, steps, handleDefocus, handleSubmit, disabled } = this.props; + const { + match, + steps, + showCli = false, + handleDefocus, + handleToggleShowCli, + handleSubmit, + disabled + } = this.props; + const { params } = match; const { step } = params; @@ -102,6 +116,16 @@ class CreateInstance extends Component { affinity } = steps; + const Mask = styled.div` + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.25); + position: absolute; + display: ${showCli ? 'block' : 'none'}; + `; + return ( @@ -218,20 +242,43 @@ class CreateInstance extends Component { - - {({ handleSubmit, submitting }) => ( -
- +
+ )} +
+ + + + handleToggleShowCli(!showCli)} > - Deploy - - - )} - + View CLI Details + + + +
+ {showCli ? ( + +