import React, { Fragment } from 'react'; import styled from 'styled-components'; import remcalc from 'remcalc'; import { Margin, Padding } from 'styled-components-spacing'; import Flex, { FlexItem } from 'styled-flex-component'; import { Field } from 'redux-form'; import { P, H3, Input, Small, Button, FormGroup, FormLabel, PublicIcon, PrivateIcon } from 'joyent-ui-toolkit'; const SmallBordered = styled(Small)` padding-right: ${remcalc(12)}; margin-right: ${remcalc(12)}; border-right: ${remcalc(1)} solid ${props => props.theme.grey}; `; export const Header = () => (

Hostnames

Default hostnames are automatically generated from both the instance name and any attached networks.

); export const HostnamesHeader = () => (

CNS service hostnames

CNS service hostnames are created by attaching a CNS service name to one or more instances. You can serve multiple instances under the same hostname by assigning them to a matching CNS service name.

); export const AddServiceForm = ({ handleSubmit, pristine }) => (
Attach to new CNS service name
); export const Hostname = ({ values, network, service, ...hostname }) => ( {values.length ? ( {network && service ? 'Network CNS service' : network ? 'Network' : service ? 'CNS service' : 'Instance name'}{' '} hostname{values.length === 1 ? '' : 's'} {hostname.public ? : } {hostname.public ? 'Public' : 'Private'} {values.map(value => )} ) : null} );