fix(instances): s/userScript/user-script
This commit is contained in:
parent
429ad17262
commit
e321c20906
@ -38,7 +38,7 @@ const names = {
|
|||||||
networks: 'IC_NETWORKS',
|
networks: 'IC_NETWORKS',
|
||||||
tags: 'IC_TAGS',
|
tags: 'IC_TAGS',
|
||||||
metadata: 'IC_METADATA',
|
metadata: 'IC_METADATA',
|
||||||
userScript: 'IC_USERSCRIPT',
|
'user-script': 'IC_USERSCRIPT',
|
||||||
firewall: 'IC_FIREWALL',
|
firewall: 'IC_FIREWALL',
|
||||||
cns: 'IC_CNS',
|
cns: 'IC_CNS',
|
||||||
affinity: 'IC_AFFINITY'
|
affinity: 'IC_AFFINITY'
|
||||||
@ -98,7 +98,6 @@ class CreateInstance extends Component {
|
|||||||
networks,
|
networks,
|
||||||
tags,
|
tags,
|
||||||
metadata,
|
metadata,
|
||||||
userScript,
|
|
||||||
firewall,
|
firewall,
|
||||||
cns,
|
cns,
|
||||||
affinity
|
affinity
|
||||||
@ -176,12 +175,12 @@ class CreateInstance extends Component {
|
|||||||
</Margin>
|
</Margin>
|
||||||
<Margin bottom="5">
|
<Margin bottom="5">
|
||||||
<UserScript
|
<UserScript
|
||||||
ref={this.setIsValid('userScript')}
|
ref={this.setIsValid('user-script')}
|
||||||
expanded={step === 'user-script'}
|
expanded={step === 'user-script'}
|
||||||
next="firewall"
|
next="firewall"
|
||||||
saved={steps.userScript && steps.userScript.lines}
|
saved={get(steps, 'user-script.lines', false)}
|
||||||
onDefocus={handleDefocus('user-script')}
|
onDefocus={handleDefocus('user-script')}
|
||||||
preview={userScript}
|
preview={steps['user-script']}
|
||||||
optional
|
optional
|
||||||
/>
|
/>
|
||||||
</Margin>
|
</Margin>
|
||||||
@ -250,7 +249,7 @@ export default compose(
|
|||||||
networks: values[names.networks],
|
networks: values[names.networks],
|
||||||
tags: values[names.tags],
|
tags: values[names.tags],
|
||||||
metadata: values[names.metadata],
|
metadata: values[names.metadata],
|
||||||
userScript: values[names.userScript],
|
'user-script': values[names['user-script']],
|
||||||
firewall: values[names.firewall],
|
firewall: values[names.firewall],
|
||||||
cns: values[names.cns],
|
cns: values[names.cns],
|
||||||
affinity: values[names.affinity]
|
affinity: values[names.affinity]
|
||||||
@ -329,8 +328,8 @@ export default compose(
|
|||||||
network => steps.networks[network]
|
network => steps.networks[network]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (steps.userScript && steps.userScript.length) {
|
if (steps['user-script'] && steps['user-script'].length) {
|
||||||
_metadata.push({ name: 'user-script', value: steps.userScript });
|
_metadata.push({ name: 'user-script', value: steps['user-script'] });
|
||||||
}
|
}
|
||||||
|
|
||||||
steps.tags &&
|
steps.tags &&
|
||||||
|
@ -32,7 +32,7 @@ const UserScript = ({
|
|||||||
handleEdit,
|
handleEdit,
|
||||||
...props
|
...props
|
||||||
}) => (
|
}) => (
|
||||||
<Step name="userScript" getValue={handleGetValue} {...props}>
|
<Step name="user-script" getValue={handleGetValue} {...props}>
|
||||||
<StepHeader icon={<ScriptIcon />}>User script</StepHeader>
|
<StepHeader icon={<ScriptIcon />}>User script</StepHeader>
|
||||||
<StepDescription href="https://docs.joyent.com/private-cloud/instances/using-mdata#UsingtheMetadataAPI-ListofMetadataKeys">
|
<StepDescription href="https://docs.joyent.com/private-cloud/instances/using-mdata#UsingtheMetadataAPI-ListofMetadataKeys">
|
||||||
Insert code to execute when the machine starts (first boot only for KVM,
|
Insert code to execute when the machine starts (first boot only for KVM,
|
||||||
|
@ -43,11 +43,6 @@ export default ({ theme }) => css`
|
|||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.CodeMirror,
|
|
||||||
.ReactCodeMirror {
|
|
||||||
height: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CodeMirror {
|
.CodeMirror {
|
||||||
border: solid ${remcalc(1)} ${theme.grey};
|
border: solid ${remcalc(1)} ${theme.grey};
|
||||||
margin: ${remcalc(8)} 0 ${remcalc(8)} 0;
|
margin: ${remcalc(8)} 0 ${remcalc(8)} 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user