Add the Userdata setting to the UI on VM creation step

This commit is contained in:
Jean-Francois Vincent 2014-12-08 16:50:29 +01:00 committed by Axel Delahaye
parent 76bb54b777
commit 068e508e3b
3 changed files with 18 additions and 0 deletions

View File

@ -352,6 +352,7 @@ label.add.system.service.offering=Add System Service Offering
label.add.template=Add Template
label.add.to.group=Add to group
label.add.user=Add User
label.add.userdata=Userdata
label.add.vlan=Add VLAN
label.add.vxlan=Add VXLAN
label.add.VM.to.tier=Add VM to tier

View File

@ -534,6 +534,16 @@
<a href="6"><fmt:message key="label.edit"/></a>
</div>
</div>
<!-- userdata -->
<div class="select">
<div class="select">
<span><fmt:message key="label.add.userdata"/> (<fmt:message key="label.optional"/>)</span>
</div>
<div class="value">
<textarea name="userdata" class="disallowSpecialCharacters"></textarea>
</div>
</div>
</div>
</div>
</div>

View File

@ -981,6 +981,13 @@
hostid : g_hostid
});
}
var userdata = args.data.userdata;
if (userdata != null && userdata.length > 0) {
$.extend(deployVmData, {
userdata : todb(btoa(userdata))
});
}
$(window).trigger('cloudStack.deployVirtualMachine', {
deployVmData: deployVmData,