various fixes

This commit is contained in:
Olivier Lambert
2015-12-13 11:24:02 +01:00
parent 40ebb7ba75
commit b76f9513ba
2 changed files with 5 additions and 5 deletions

View File

@@ -20,7 +20,6 @@ module.exports = angular.module 'xoWebApp.newVm', [
notify
) ->
{get} = xoApi
removeItems = do ->
splice = Array::splice.call.bind Array::splice
(array, index, n) -> splice array, index, n ? 1
@@ -285,7 +284,8 @@ module.exports = angular.module 'xoWebApp.newVm', [
xo.docker.register id
if $scope.cloudConfigSshKey
$scope.cloudContent = '#cloud-config\nhostname: ' + name_label + '\nssh_authorized_keys:\n - ' + $scope.cloudConfigSshKey + '\n'
console.log 'CREATING CLOUD CONFIG DRIVE ON: ' + id
$scope.cloudContent = '#cloud-config\nhostname: ' + name_label + '\nusers:\n - name: olivier\n sudo: ALL=(ALL) NOPASSWD:ALL\n groups: sudo\n shell: /bin/bash\n ssh_authorized_keys:\n - ' + $scope.cloudConfigSshKey + '\n'
# The first SR for a template with an existing disk
$scope.firstSR = (get (get template.$VBDs[0]).VDI).$SR
# Use the generic CloudConfig creation

View File

@@ -2,11 +2,11 @@
.panel.panel-default
p.page-title
i.xo-icon-vm
| Create VM on 
| Create VM on
a(ng-if="'pool' === container.type", ui-sref="pools_view({id: container.id})")
| {{container.name_label}}
| {{container.name_label}}
a(ng-if="'host' === container.type", ui-sref="hosts_view({id: container.id})")
| {{container.name_label}}
| {{container.name_label}}
//- Add server panel
form.form-horizontal(ng-submit="createVM()")
.grid