fix(my-joy-beta): mark optional sections as proceeded onEdit

This commit is contained in:
Sérgio Ramos 2018-02-27 15:08:33 +00:00
parent 25c2735bf4
commit 584c8b2028
47 changed files with 48 additions and 21 deletions

View File

@ -11,6 +11,8 @@
<title>My Joyent Images &beta;</title>
</head>
<body>
<div id="header"></div>
<div id="root"></div>
<script src="/nav-static/main.js"></script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -104,7 +104,9 @@ export const Filters = ({ onResetFilters }) => (
</FormGroup>
<FormGroup type="checkbox" name="ssd" field={Field}>
<Checkbox>
<FormLabel noMargin actionable>SSD</FormLabel>
<FormLabel noMargin actionable>
SSD
</FormLabel>
</Checkbox>
</FormGroup>
</Flex>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -171,6 +171,10 @@ export default compose(
dispatch(set({ name: `${CNS_FORM}-proceeded`, value: true }));
return history.push(`/~create/affinity${history.location.search}`);
},
handleEdit: () => {
dispatch(set({ name: `${CNS_FORM}-proceeded`, value: true }));
history.push(`/~create/cns${history.location.search}`);
},
shouldAsyncValidate: ({ trigger }) => trigger === 'change',
handleAsyncValidate: async ({ name = '', value = '' }) => {
const isNameValid = /^[a-zA-Z_.-]{1,16}$/.test(name);
@ -185,7 +189,6 @@ export default compose(
value: isValueValid ? null : fieldError
};
},
handleEdit: () => history.push(`/~create/cns${history.location.search}`),
handleToggleCnsEnabled: ({ target }) =>
dispatch(set({ name: `${CNS_FORM}-enabled`, value: !cnsEnabled })),
handleAddService: ({ name }) => {

View File

@ -168,6 +168,10 @@ export default compose(
return history.push(`/~create/cns${history.location.search}`);
},
handleEdit: () => {
dispatch(
set({ name: 'create-instance-firewall-proceeded', value: true })
);
return history.push(`/~create/firewall${history.location.search}`);
}
})

View File

@ -170,6 +170,10 @@ export default compose(
return history.push(`/~create/user-script${history.location.search}`);
},
handleEdit: () => {
dispatch(
set({ name: 'create-instance-metadata-proceeded', value: true })
);
return history.push(`/~create/metadata${history.location.search}`);
},
shouldAsyncValidate: ({ trigger }) => {

View File

@ -116,6 +116,17 @@ export default compose(
};
},
(dispatch, { history, query }) => ({
handleNext: () => {
dispatch(set({ name: 'create-instance-name-proceeded', value: true }));
return history.push(
`/~create/${query.image ? 'package' : 'image'}${
history.location.search
}`
);
},
handleEdit: () => {
history.push(`/~create/name${history.location.search}`);
},
shouldAsyncValidate: ({ trigger }) => trigger === 'change',
handleAsyncValidation: async ({ name }) => {
const sanitized = punycode.encode(name).replace(/-$/, '');
@ -159,15 +170,6 @@ export default compose(
};
}
},
handleNext: () => {
dispatch(set({ name: 'create-instance-name-proceeded', value: true }));
return history.push(
`/~create/${query.image ? 'package' : 'image'}${
history.location.search
}`
);
},
handleEdit: () => history.push(`/~create/name${history.location.search}`),
handleRandomize: async () => {
dispatch(
set({ name: 'create-instance-name-randomizing', value: true })

View File

@ -186,6 +186,10 @@ export default compose(
return history.push(`/~create/firewall${history.location.search}`);
},
handleEdit: () => {
dispatch(
set({ name: 'create-instance-networks-proceeded', value: true })
);
return history.push(`/~create/networks${history.location.search}`);
},
setInfoExpanded: (id, expanded) => {

View File

@ -234,8 +234,9 @@ export default compose(
return history.push(`/~create/tags${history.location.search}`);
},
handleEdit: () =>
history.push(`/~create/package${history.location.search}`),
handleEdit: () => {
return history.push(`/~create/package${history.location.search}`);
},
handleResetFilters: () => {
dispatch(destroy(`${FORM_NAME}-filters`));
},

View File

@ -145,10 +145,10 @@ export default compose(
connect(null, (dispatch, { tags = [], history }) => ({
handleNext: () => {
dispatch(set({ name: 'create-instance-tags-proceeded', value: true }));
return history.push(`/~create/metadata${history.location.search}`);
},
handleEdit: () => {
dispatch(set({ name: 'create-instance-tags-proceeded', value: true }));
return history.push(`/~create/tags${history.location.search}`);
},
shouldAsyncValidate: ({ trigger }) => trigger === 'submit',

View File

@ -116,8 +116,6 @@ export default compose(
};
},
(dispatch, { history }) => ({
handleEdit: () =>
history.push(`/~create/user-script${history.location.search}`),
handleNext: () => {
dispatch(
set({ name: 'create-instance-user-script-proceeded', value: true })
@ -125,6 +123,13 @@ export default compose(
return history.push(`/~create/networks${history.location.search}`);
},
handleEdit: () => {
dispatch(
set({ name: 'create-instance-user-script-proceeded', value: true })
);
return history.push(`/~create/user-script${history.location.search}`);
},
handleChangeOpenForm: value => {
return dispatch([
set({ name: `create-instance-user-script-open`, value })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -27,7 +27,7 @@ const StyledLabel = Label.extend`
font-weight: ${props => props.theme.font.weight.normal};
`};
${is('noMargin')`
${is('noMargin')`
margin: 0;
`};
`;

View File

@ -63,8 +63,8 @@ const Meta = props => {
const hasSuccess = Boolean(props.success || meta.success || value.success);
const isRight = !props.left;
return (
msg ? <StyledLabel
return msg ? (
<StyledLabel
{...meta}
{...props}
error={hasError}
@ -73,8 +73,8 @@ const Meta = props => {
right={isRight}
>
{msg}
</StyledLabel> : null
);
</StyledLabel>
) : null;
};
return <Subscriber channel="input-group">{render}</Subscriber>;