Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

wizardCloneVM.html 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!--
  2. Panes for clone virtual machine wizard. Logic in vboxWizard()
  3. Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)
  4. $Id: wizardCloneVM.html 595 2015-04-17 09:50:36Z imoore76 $
  5. -->
  6. <!-- Step 1 -->
  7. <div id='wizardCloneVMStep1' title='New machine name' style='display: none'>
  8. <span id='vboxWizCloneMessage1'></span>
  9. <div class='vboxOptions' style='padding: 6px'>
  10. <input type='text' class='vboxText' name='machineCloneName' style='width: 95%' />
  11. <p><label><input type='checkbox' class='vboxCheckbox' name='vboxCloneReinitNetwork' checked='checked' />
  12. <span class='translate'>Reinitialize the MAC address of all network cards</span></label>
  13. </p>
  14. </div>
  15. </div>
  16. <!-- Step 2 -->
  17. <div id='wizardCloneVMStep2' title='Clone type' style='display: none'>
  18. <span class='translate'>&lt;p&gt;Please choose the type of clone you wish to create.&lt;/p&gt;&lt;p&gt;If you choose &lt;b&gt;Full clone&lt;/b&gt;, an exact copy (including all virtual hard disk files) of the original virtual machine will be created.&lt;/p&gt;&lt;p&gt;If you choose &lt;b&gt;Linked clone&lt;/b&gt;, a new machine will be created, but the virtual hard disk files will be tied to the virtual hard disk files of original machine and you will not be able to move the new virtual machine to a different computer without moving the original as well.&lt;/p&gt;</span>
  19. <span class='translate' id='vboxCloneVMNewSnap'>&lt;p&gt;If you create a &lt;b&gt;Linked clone&lt;/b&gt; then a new snapshot will be created in the original virtual machine as part of the cloning process.&lt;/p&gt;</span>
  20. <div class='vboxOptions'>
  21. <table>
  22. <tr style='vertical-align: bottom;'>
  23. <td><label><input type='radio' class='vboxRadio' name='vboxCloneType' value='Full' onclick='vboxCloneVMUpdateSteps(this.value)' /> <span class='translate'>Full Clone</span></label></td>
  24. </tr>
  25. <tr style='vertical-align: bottom;'>
  26. <td><label><input type='radio' class='vboxRadio' checked='checked' name='vboxCloneType' value='Linked' onclick='vboxCloneVMUpdateSteps(this.value)' /> <span class='translate'>Linked Clone</span></label></td>
  27. </tr>
  28. </table>
  29. </div>
  30. </div>
  31. <!-- Step 3 -->
  32. <div id='wizardCloneVMStep3' title='Snapshots' style='display: none'>
  33. <span class='translate'>&lt;p&gt;Please choose which parts of the snapshot tree should be cloned with the machine.&lt;/p&gt;</span>
  34. <p><span class='translate'>&lt;p&gt;If you choose &lt;b&gt;Current machine state&lt;/b&gt;, the new machine will reflect the current state of the original machine and will have no snapshots.&lt;/p&gt;</span>
  35. <span class='translate' id='wizardCloneVMCurrentAll' style='display: none;'>&lt;p&gt;If you choose &lt;b&gt;Current snapshot tree branch&lt;/b&gt;, the new machine will reflect the current state of the original machine and will have matching snapshots for all snapshots in the tree branch starting at the current state in the original machine.&lt;/p&gt;</span>
  36. <span class='translate'>&lt;p&gt;If you choose &lt;b&gt;Everything&lt;/b&gt;, the new machine will reflect the current state of the original machine and will have matching snapshots for all snapshots in the original machine.&lt;/p&gt;</span>
  37. </p>
  38. <div class='vboxOptions'>
  39. <table>
  40. <tr style='vertical-align: bottom;'>
  41. <td><label><input type='radio' class='vboxRadio' checked='checked' name='vmState' value='MachineState' /> <span class='translate'>Current machine state</span></label></td>
  42. </tr>
  43. <tr style='vertical-align: bottom; display:none;' id='vboxCloneCurrentAll'>
  44. <td><label><input type='radio' class='vboxRadio' name='vmState' value='MachineAndChildStates' /> <span class='translate'>Current snapshot tree branch</span></label></td>
  45. </tr>
  46. <tr style='vertical-align: bottom;'>
  47. <td><label><input type='radio' class='vboxRadio' name='vmState' value='AllStates' /> <span class='translate'>Everything</span></label></td>
  48. </tr>
  49. </table>
  50. </div>
  51. </div>
  52. <script type='text/javascript'>
  53. $('#wizardCloneVMStep1').on('show',function(e,wiz){
  54. // Already initialized?
  55. if($('#wizardCloneVMStep1').data('init') || !wiz.args) return;
  56. $('#wizardCloneVMStep1').data('init',1);
  57. // Hold wizard
  58. $('#wizardCloneVMStep1').data('wiz',wiz);
  59. // Hold wizard original steps
  60. $('#wizardCloneVMStep1').data('wizSteps',wiz.steps);
  61. // Hide "new snapshot" message if we're cloning a snapshot
  62. if(wiz.args && wiz.args.snapshot)
  63. $('#vboxCloneVMNewSnap').hide();
  64. $('#vboxWizCloneMessage1').html(trans('<p>Please choose a name for the new virtual machine. The new machine will be a clone of the machine <b>%1</b>.</p>','UIWizardCloneVM').replace('%1',wiz.args.vm.name));
  65. if((wiz.args.snapshot && wiz.args.snapshot.children && wiz.args.snapshot.children.length)) {
  66. $('#wizardCloneVMCurrentAll').show();
  67. $('#vboxCloneCurrentAll').show();
  68. }
  69. $(document.forms['frmwizardCloneVM'].elements.machineCloneName).focus();
  70. document.forms['frmwizardCloneVM'].elements.machineCloneName.value = trans('%1 Clone','UIWizardCloneVMPage1').replace('%1',wiz.args.vm.name);
  71. var inputBox = $('#wizardCloneVMStep1').find('input.vboxText').select();
  72. setTimeout(inputBox.focus.bind(inputBox),10);
  73. });
  74. /* When going to step2, make sure a name is entered */
  75. $('#wizardCloneVMStep2').on('show',function(e,wiz){
  76. document.forms['frmwizardCloneVM'].elements.machineCloneName.value = jQuery.trim(document.forms['frmwizardCloneVM'].elements.machineCloneName.value);
  77. if(!document.forms['frmwizardCloneVM'].elements.machineCloneName.value) {
  78. // Go back
  79. wiz.displayStep(1);
  80. }
  81. });
  82. function vboxCloneVMUpdateSteps(cval) {
  83. if(cval == 'Linked') {
  84. $('#wizardCloneVMStep1').data('wiz').setLast();
  85. } else if($('#wizardCloneVMStep1').data('wizSteps') != $('#wizardCloneVMStep1').data('wiz').steps) {
  86. $('#wizardCloneVMStep1').data('wiz').unsetLast();
  87. }
  88. }
  89. </script>