diff --git a/src/sunstone/public/css/application.css b/src/sunstone/public/css/application.css index 1f995c3d9b..81a21ae8dc 100644 --- a/src/sunstone/public/css/application.css +++ b/src/sunstone/public/css/application.css @@ -186,66 +186,15 @@ form.create_form{ margin:0; padding:0;} -fieldset{ - margin:0 0; - border:none; - border-top:1px solid #ccc; - padding: 10px 5px;} -fieldset div{ - margin-bottom:.5em; - padding:0; - display:block; -} - - -fieldset input, -fieldset textarea{ - width:180px; - /*border-top:1px solid #555; - border-left:1px solid #555; - border-bottom:1px solid #ccc; - border-right:1px solid #ccc;*/ - padding:1px;color:#333; - vertical-align: top; - margin: 0 2px; - margin-bottom: 4px; -} - -fieldset select{ - width:184px; - /*border-top:1px solid #555; - border-left:1px solid #555; - border-bottom:1px solid #ccc; - border-right:1px solid #ccc;*/ - padding:1px; - color:#333; - vertical-align: top; - margin: 0 2px; - margin-bottom: 4px; -} /*Chrome hack*/ input[type="radio"],input[type="checkbox"] { width:20px; } -legend{ - margin-top:0; - margin-bottom: 5px; - padding:0 .5em; - color:#036; - background:transparent; - font-size:1.0em; - font-weight:bold; -} -label{ - float: left; - width:120px; - padding:0 1em; - text-align:left; -} + .dataTables_wrapper { min-height: 0; @@ -307,9 +256,7 @@ div.show_hide { clear:both; } -.vm_param label{ - float:left; -} + fieldset div.vm_section { margin-top:-8px; @@ -693,4 +640,11 @@ div.current_quotas ul{ .padding2 { padding-left: 55px!important; +} + +div.wizard_tab { + overflow: auto; + height: 480px; + overflow-x: hidden; + width: auto; } \ No newline at end of file diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index d5b30674c5..1534f64b0a 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -24,7 +24,7 @@ var templates_tab_content = '\ \ \ \ - \ + \ \ \ \ @@ -47,64 +47,24 @@ var templates_tab_content = '\ '; -var capacity_tab = - '
'+ - '
'+ - ''+ - ''+ - '
'+tr("Name that the VM will get for description purposes. If NAME is not supplied a name generated by one will be in the form of one-<VID>.")+'
'+ - '
'+ - '
'+ - ''+ - ''+ - ''+ - '
'+tr("Amount of RAM required for the VM, in Megabytes.")+'
'+ - '
'+ - '
'+ - '
'+ - ''+ - ''+ - '
'+tr("Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.")+'
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '

'+tr("Advanced options")+'

'+ - '
'+ - '
'+ - '
'+ - ''+ - ''+ - '
'+tr("Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.")+'
'+ - '
'+ - '
'+ - '
'+ - '
'+ - ''+ - '
' + -var create_template_tmpl = '
'+ - '
'+tr("All")+''+tr("ID")+''+tr("Owner")+''+tr("Group")+'
'+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - '
'+tr("All")+''+tr("ID")+''+tr("Owner")+''+tr("Group")+''+tr("Name")+''+tr("Datastore")+''+tr("Size")+''+tr("Type")+''+tr("Registration time")+''+tr("Persistent")+''+tr("Status")+''+tr("#VMS")+''+tr("Target")+'
'+ - '
'+ + ''+tr("Please select an image from the list")+''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
'+tr("ID")+''+tr("Owner")+''+tr("Group")+''+tr("Name")+''+tr("Datastore")+''+tr("Size")+''+tr("Type")+''+tr("Registration time")+''+tr("Persistent")+''+tr("Status")+''+tr("#VMS")+''+tr("Target")+'
'+ '
'+ '

You selected the following image: '+ ''+ - '

'+ + '

'+ ''+ - '
'+ + ''+ '
'+ '
'+ '

'+tr("Advanced options")+'

'+ '
'+ - '
'+ - '
'+ - ''+ - ''+ - '
'+tr("Device to map image disk. If set, it will overwrite the default device mapping")+'
'+ + '
'+ + '
'+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + '
'+tr("Device to map image disk. If set, it will overwrite the default device mapping")+'
'+ + '
'+ + '
'+ '
'+ - '
'+ - ''+ - ''+ - '
'+tr("Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported")+'
'+ + '
'+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + '
'+tr("Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported")+'
'+ + '
'+ + '
'+ '
'+ - '
'+ + ''+ ''+ ''+ - '
'+ - ''+ - ''+ + ''+ + '
'+ ''+ '' @@ -1716,18 +1791,18 @@ function setupCreateTemplateDialog(){ }); // Hide image advanced options - $('.image fieldset.advanced', $('div#' + str_disk_tab_id)).hide(); + $('.image .advanced', $('div#' + str_disk_tab_id)).hide(); $('#advanced_image', $('div#' + str_disk_tab_id)).click(function(){ - $('.image fieldset.advanced', $('div#' + str_disk_tab_id)).toggle(); + $('.image .advanced', $('div#' + str_disk_tab_id)).toggle(); return false; }); // Hide volatile advanced options - $('.volatile fieldset.advanced', $('div#' + str_disk_tab_id)).hide(); + $('.volatile .advanced', $('div#' + str_disk_tab_id)).hide(); $('#advanced_volatile', $('div#' + str_disk_tab_id)).click(function(){ - $('.volatile fieldset.advanced', $('div#' + str_disk_tab_id)).toggle(); + $('.volatile .advanced', $('div#' + str_disk_tab_id)).toggle(); return false; }); @@ -1747,13 +1822,13 @@ function setupCreateTemplateDialog(){ var nics_index = 0; var add_nics_tab = function() { - var html_tab_content = '
'+ + var html_tab_content = '
'+ ''+ '
'; - tabs.append(html_tab_content).tabs('add', '#template_create_nics_tabs', 'NETWORK', 2); + tabs.append(html_tab_content).tabs('add', '#template_create_nics_tabs', 'Network', 2); var nic_tabs = $( "#template_create_nics_tabs", dialog).tabs({ tabTemplate: "
  • #{label}Remove Tab
  • ", @@ -1762,6 +1837,9 @@ function setupCreateTemplateDialog(){ } }); + + nic_tabs.tabs("refresh"); + // close icon: removing the tab on click $( "#template_create_nics_tabs span.ui-icon-close" ).live( "click", function() { var parent = $( this ).parent(); @@ -1779,6 +1857,7 @@ function setupCreateTemplateDialog(){ $("#tf_btn_nics").bind("click", function(){ add_nic_tab(nic_tabs); + nic_tabs.tabs("refresh"); }); } @@ -1787,10 +1866,13 @@ function setupCreateTemplateDialog(){ var str_datatable_id = 'datatable_template_networks' + number_of_nics; var html_tab_content = '
    '+ + '
    '+ + '
    '+ + ''+tr("Please select a network from the list")+''+ ''+ ''+ ''+ - ''+ + ''+ ''+ ''+ ''+ @@ -1804,57 +1886,113 @@ function setupCreateTemplateDialog(){ ''+ ''+ '
    '+tr("All")+''+tr("ID")+''+tr("Owner")+''+tr("Group")+'
    '+ - '
    '+ - '
    '+ - '

    You selected the following image: '+ - ''+ - '

    '+ - ''+ - '
    '+ - '
    '+ - '
    '+ - ''+tr("TCP Firewall")+''+ - ' Whitelist '+ - ' Blacklist'+ - '
    '+ - ''+ - ''+ - '
    '+tr("A list of ports separated by commas or a ranges separated by semilocolons, e.g.: 22,80,5900:6000")+'
    '+ + '
    '+ + '

    You selected the following image: '+ + ''+ + '

    '+ + ''+ '
    '+ - '
    '+ - '
    '+ - ''+tr("UDP Firewall")+''+ - ' Whitelist '+ - ' Blacklist'+ - '
    '+ - ''+ - ''+ - '
    '+tr("A list of ports separated by commas or a ranges separated by semilocolons, e.g.: 22,80,5900:6000")+'
    '+ - '
    '+ - '
    '+ - '
    '+ - ''+tr("ICMP Firewall")+''+ - ' Drop '+ - '
    '+ + '
    '+ '
    '+ '

    '+tr("Advanced options")+'

    '+ '
    '+ - '
    '+ - '
    '+ - ''+ - ''+ - '
    '+tr("Request an specific IP from the Network")+'
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+tr("TCP Firewall")+''+ + '
    '+ + '
    '+ + ' Whitelist '+ + '
    '+ + '
    '+ + ' Blacklist'+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+tr("A list of ports separated by commas or a ranges separated by semilocolons, e.g.: 22,80,5900:6000")+'
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+tr("UDP Firewall")+''+ + '
    '+ + '
    '+ + ' Whitelist '+ + '
    '+ + '
    '+ + ' Blacklist'+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+tr("A list of ports separated by commas or a ranges separated by semilocolons, e.g.: 22,80,5900:6000")+'
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+tr("Request an specific IP from the Network")+'
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+tr("Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.")+'
    '+ + '
    '+ + '
    '+ + '
    '+ '
    '+ - '
    '+ - ''+ - ''+ - '
    '+tr("Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.")+'
    '+ - '
    '+ - '
    '+ - '
    '+ - ''+ - ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ' Drop '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ '
    '+ + '
    '+ + '
    '+ '
    ' // Append the new div containing the tab and add the tab to the list @@ -1931,10 +2069,10 @@ function setupCreateTemplateDialog(){ }); - $('fieldset.advanced', $('div#' + str_nic_tab_id)).hide(); + $('.advanced', $('div#' + str_nic_tab_id)).hide(); $('#advanced', $('div#' + str_nic_tab_id)).click(function(){ - $('fieldset.advanced', $('div#' + str_nic_tab_id)).toggle(); + $('.advanced', $('div#' + str_nic_tab_id)).toggle(); return false; }); @@ -1979,137 +2117,197 @@ function setupCreateTemplateDialog(){ **************************************************************************/ var add_os_tab = function(temp_index) { - var html_tab_content = '
    '+ + var html_tab_content = '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+tr("CPU architecture to virtualization")+'
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+tr("Boot device type")+'
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+tr("Device to be mounted as root")+'
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+tr("Arguments for the booting kernel")+'
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+tr("Path to the bootloader executable")+'
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ '
    '+ - ' Select a registered KERNEL '+ - ' Specify the KERNEL path in the remote Host'+ - '
    '+ - '
    '+ - '
    '+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - '
    '+tr("All")+''+tr("ID")+''+tr("Owner")+''+tr("Group")+''+tr("Name")+''+tr("Datastore")+''+tr("Size")+''+tr("Type")+''+tr("Registration time")+''+tr("Persistent")+''+tr("Status")+''+tr("#VMS")+''+tr("Target")+'
    '+ - '
    '+ - '
    '+ - '

    You selected the following KERNEL: '+ - ''+ - '

    '+ - ''+ - '
    '+ - '
    '+ - '
    '+ - ''+ + ''+ '
    ' // Append the new div containing the tab and add the tab to the list - tabs.append(html_tab_content).tabs('add', '#os_tab', 'OS BOOTING', temp_index); + tabs.append(html_tab_content).tabs('add', '#os_tab', 'OS Booting', temp_index); $( "#template_create_tabs a[href='#os_tab']").parent().remove("span") // Select Image or Volatile disk. The div is hidden depending on the selection, and the @@ -2148,7 +2346,7 @@ function setupCreateTemplateDialog(){ "bJQueryUI": true, "bSortClasses": false, "bAutoWidth":false, - "sDom" : '<"H"frC>t<"F"ip>', + "sDom" : '<"H"fr>t<"F"p>', "iDisplayLength": 4, "oColVis": { "aiExclude": [ 0 ] @@ -2160,7 +2358,7 @@ function setupCreateTemplateDialog(){ { "sWidth": "35px", "aTargets": [1,6,11,12] }, { "sWidth": "100px", "aTargets": [5,7] }, { "sWidth": "150px", "aTargets": [8] }, - { "bVisible": false, "aTargets": [0,2,3,6,7,9,8,12]} + { "bVisible": false, "aTargets": [0,3,2,5,6,7,9,8,11,12,10]} ], "oLanguage": (datatable_lang != "") ? { @@ -2219,7 +2417,7 @@ function setupCreateTemplateDialog(){ "bSortClasses": false, "bAutoWidth":false, "iDisplayLength": 4, - "sDom" : '<"H"frC>t<"F"ip>', + "sDom" : '<"H"fr>t<"F"p>', "oColVis": { "aiExclude": [ 0 ] }, @@ -2230,7 +2428,7 @@ function setupCreateTemplateDialog(){ { "sWidth": "35px", "aTargets": [1,6,11,12] }, { "sWidth": "100px", "aTargets": [5,7] }, { "sWidth": "150px", "aTargets": [8] }, - { "bVisible": false, "aTargets": [0,2,3,6,7,9,8,12]} + { "bVisible": false, "aTargets": [0,2,3,5,6,7,9,8,10,11,12]} ], "oLanguage": (datatable_lang != "") ? { @@ -2256,6 +2454,7 @@ function setupCreateTemplateDialog(){ error: onError }); + datTable_template_initrd.fnFilter("RAMDISK", 6) // TBD Add refresh button for the datatable // When a row is selected the background color is updated. If a previous row @@ -2300,58 +2499,102 @@ function setupCreateTemplateDialog(){ **************************************************************************/ var add_io_tab = function(temp_index) { - var html_tab_content = '
    '+ - '
    '+ - '
    '+ - ''+tr("Graphics")+''+ - ' VNC '+ - ' SDL'+ - ' SPICE'+ - '
    '+ - ''+ + var html_tab_content = '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+tr("Graphics")+''+ + '
    '+ + ' VNC '+ + ' SDL'+ + ' SPICE'+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ ''+ + '
    '+ + '
    '+ '
    '+tr("IP to listen on")+'
    '+ - '
    '+ - '
    '+ - ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ ''+ + '
    '+ + '
    '+ '
    '+tr("Port for the VNC/SPICE server")+'
    '+ - '
    '+ - '
    '+ - ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ ''+ + '
    '+ + '
    '+ '
    '+tr("Password for the VNC/SPICE server")+'
    '+ - '
    '+ - '
    '+ - ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ ''+ + '
    '+ + '
    '+ '
    '+tr("Keyboard configuration locale to use in the VNC/SPICE display")+'
    '+ - '
    '+ - '
    '+ - '
    '+ - '
    '+ - '
    '+ - ''+tr("Inputs")+''+ - '
    '+ - ''+ - ''+ - '
    '+ - '
    '+ - '
    '+ - ''+ - ''+ - '
    '+ - '
    '+ - ''+ - '
    '+ - ''+ + ''+ + ''+ + ''+ + ''+ + '
    '+ + '
    '+ + ''+tr("Inputs")+''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ ''+ ''+ ''+ @@ -2362,17 +2605,16 @@ function setupCreateTemplateDialog(){ ''+ ''+ '
    '+tr("TYPE")+'
    '+ - '
    '+ - '
    '+ - '
    '+ - '
    '+ - ''+ - ''+ - '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ '
    ' // Append the new div containing the tab and add the tab to the list - tabs.append(html_tab_content).tabs('add', '#io_tab', 'INPUT/OUTPUT', temp_index); + tabs.append(html_tab_content).tabs('add', '#io_tab', 'Input/Output', temp_index); $("input[name='graphics_type']").change(function(){ $("#LISTEN", $('div#io_tab')).val("0.0.0.0") @@ -2417,53 +2659,86 @@ function setupCreateTemplateDialog(){ **************************************************************************/ var add_context_tab = function(temp_index) { - var html_tab_content = '
    '+ - '
    '+ - ''+tr("SSH")+''+ - ''+ tr("Add SSH contextualization")+ - '
    '+ - ''+ - ''+ - '
    '+ - '
    '+ - ''+tr("Network")+''+ - ''+ tr("Add Network contextualization")+ - '
    '+ - '
    '+ - ''+tr("Custom CONTEXT")+''+ - '
    '+ - ''+ - ''+ - '
    '+ + var html_tab_content = '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+tr("SSH")+''+ + '
    '+ + ''+ tr("Add SSH contextualization")+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+tr("Network")+''+ + '
    '+ + ''+ tr("Add Network contextualization")+ + '
    '+ + '
    '+ + '
    '+ '
    '+ - '
    '+ - ''+ - ''+ - '
    '+ + '
    '+ + '
    '+ + ''+tr("Custom CONTEXT")+''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
    '+tr("KEY")+''+tr("VALUE")+'
    '+ + '
    '+ + '
    '+ + '
    '+ '
    '+ - ''+ - '
    '+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - '
    '+tr("KEY")+''+tr("VALUE")+'
    '+ - '
    '+ - '
    '+ - '
    '+ - ''+ - ''+ - '
    '+ - '
    ' + '
    '+ + ''+ + '
    ' // Append the new div containing the tab and add the tab to the list - tabs.append(html_tab_content).tabs('add', '#context_tab', 'CONTEXT', temp_index); + tabs.append(html_tab_content).tabs('add', '#context_tab', 'Context', temp_index); $('#add_context', $('div#context_tab')).click(function() { var table = $('#context_table', $('div#context_tab'))[0]; @@ -2503,70 +2778,101 @@ function setupCreateTemplateDialog(){ **************************************************************************/ var add_placement_tab = function(temp_index) { - var html_tab_content = '
    '+ + var html_tab_content = '
    '+ + '
    '+ '
    '+ '
    '+ ''+tr("REQUIREMENTS")+''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - '
    ' + tr("All") + '' + tr("ID") + '' + tr("Name") + '' + tr("Cluster") + '' + tr("Running VMs") + '' + tr("Real CPU") + '' + tr("Allocated CPU") + '' + tr("Real MEM") + '' + tr("Allocated MEM") + '' + tr("Status") + '' + tr("IM MAD") + '' + tr("VM MAD") + '' + tr("Last monitored on") + '
    '+ - '
    '+ - '
    '+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - '
    ' + tr("All") + '' + tr("ID") + '' + tr("Name") + '' + tr("Hosts") + '' + tr("Virtual Networks") + '' + tr("Datastores") + '
    '+ - '
    '+ - '
    '+ - ''+ + '
    '+ + '
    '+ + ' Select Hosts '+ + '
    '+ + '
    '+ + ' Select Clusters '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
    ' + tr("ID") + '' + tr("Name") + '' + tr("Cluster") + '' + tr("Running VMs") + '' + tr("Real CPU") + '' + tr("Allocated CPU") + '' + tr("Real MEM") + '' + tr("Allocated MEM") + '' + tr("Status") + '' + tr("IM MAD") + '' + tr("VM MAD") + '' + tr("Last monitored on") + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ ''+ + '
    '+ + '
    '+ '
    '+ '
    '+ '
    '+ - '
    '+ - '
    '+ - ''+ - ''+ + ''+ + '
    '+ + ''+tr("RANK")+''+ + '
    '+ + '
    '+ + ''+ '
    '+ - '
    ' + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    ' // Append the new div containing the tab and add the tab to the list - tabs.append(html_tab_content).tabs('add', '#placement_tab', 'PLACEMENT', temp_index); + tabs.append(html_tab_content).tabs('add', '#placement_tab', 'Placement', temp_index); // hOSTS TABLE dataTable_template_hosts = $("#datatable_template_hosts",dialog).dataTable({ "bJQueryUI": true, "bSortClasses": false, "iDisplayLength": 4, - "sDom" : '<"H"frC>t<"F"ip>', + "sDom" : '<"H"fr>t<"F"ip>', "oColVis": { //exclude checkbox column "aiExclude": [ 0 ] }, @@ -2578,7 +2884,7 @@ function setupCreateTemplateDialog(){ { "sWidth": "35px", "aTargets": [1] }, { "sWidth": "100px", "aTargets": [9,3,10,11,12] }, { "sWidth": "150", "aTargets": [5,6,7,8] }, - { "bVisible": false, "aTargets": [0,5,7,10,11,12]} + { "bVisible": false, "aTargets": [0,3,5,7,10,11,12]} ], "oLanguage": (datatable_lang != "") ? { @@ -2651,7 +2957,7 @@ function setupCreateTemplateDialog(){ "bJQueryUI": true, "bSortClasses": false, "iDisplayLength": 4, - "sDom" : '<"H"frC>t<"F"ip>', + "sDom" : '<"H"fr>t<"F"ip>', "oColVis": { "aiExclude": [ 0 ] }, @@ -2729,6 +3035,23 @@ function setupCreateTemplateDialog(){ generate_requirements(); }); + // Select Image or Volatile disk. The div is hidden depending on the selection, and the + // vm_param class is included to be computed when the template is generated. + $("input[name='req_select']").change(function(){ + if ($("input[name='req_select']:checked").val() == "host_select") { + $("div.host_select", $('div#placement_tab')).toggle(); + $("div.host_select", $('div#placement_tab')).addClass('vm_param'); + $("div.cluster_select", $('div#placement_tab')).hide(); + $("div.cluster_select", $('div#placement_tab')).removeClass('vm_param'); + } + else { + $("div.host_select", $('div#placement_tab')).hide(); + $("div.host_select", $('div#placement_tab')).removeClass('vm_param'); + $("div.cluster_select", $('div#placement_tab')).toggle(); + $("div.cluster_select", $('div#placement_tab')).addClass('vm_param'); + } + }); + var generate_requirements = function() { var req_string=[]; @@ -2751,7 +3074,7 @@ function setupCreateTemplateDialog(){ **************************************************************************/ var add_other_tab = function(temp_index) { - var html_tab_content = '
    '+ + var html_tab_content = '
    '+ '
    '+ '
    '+ '

    You selected the following image: '+ @@ -2760,13 +3083,10 @@ function setupCreateTemplateDialog(){ ''+ '

    '+ '
    '+ - '
    '+ - ''+ - '
    '+ '
    ' // Append the new div containing the tab and add the tab to the list - tabs.append(html_tab_content).tabs('add', '#other_tab', 'OTHER', temp_index); + tabs.append(html_tab_content).tabs('add', '#other_tab', 'Other', temp_index); } //Sets up the OS_BOOT section @@ -3240,7 +3560,7 @@ function setupCreateTemplateDialog(){ //Prepare jquery dialog - var height = Math.floor($(window).height()*0.8); //set height to a percentage of the window + var height = Math.floor($(window).height()*0.9); //set height to a percentage of the window dialog.dialog({ autoOpen: false, modal: true, @@ -3254,11 +3574,40 @@ function setupCreateTemplateDialog(){ $(".ui-tabs-vertical .ui-tabs-nav", dialog).removeClass("ui-tabs-nav").addClass("ui-tabs-nav-vert") $('.next-tab, .prev-tab').live("click", function() { - console.log($(this).attr("rel")) tabs.tabs('select', parseInt($(this).attr("rel"))); return false; }); + $('#wizard_next').click(function(){ + var selected = tabs.tabs('option', 'selected'); + tabs.tabs('select', selected+1); + }); + + $('#wizard_previous').click(function(){ + var selected = tabs.tabs('option', 'selected'); + tabs.tabs('select', selected-1); + }); + + add_capacity_tab(); + + add_disks_tab(); + add_nics_tab(); + + var temp_index = 3 + add_os_tab(temp_index); + + temp_index++; + add_io_tab(temp_index); + + temp_index++; + add_context_tab(temp_index); + + temp_index++; + add_placement_tab(temp_index); + + temp_index++; + add_other_tab(temp_index); + // Re-Setup tips setupTips(dialog); @@ -3266,7 +3615,7 @@ function setupCreateTemplateDialog(){ iconToggle(); //toogle +/- buttons //Sections, used to stay within their scope - var section_capacity = $('div#tab-capacity',dialog); + var section_capacity = $('div#capacity_tab',dialog); var section_os_boot = $('div#os_boot_opts',dialog); var section_features = $('div#features',dialog); var section_disks = $('div#disk1',dialog); @@ -3300,7 +3649,6 @@ function setupCreateTemplateDialog(){ foldUnfoldToggle(); //initialise all sections - capacity_setup(); os_boot_setup(); features_setup(); disks_setup(); @@ -3463,7 +3811,7 @@ function setupCreateTemplateDialog(){ // PLACEMENT // - addSectionJSON(vm_json,$('div#placement_tab .requirements',dialog)); + addSectionJSON(vm_json,$('div#placement_tab',dialog)); console.log(vm_json) ////process nics -> fetch from box diff --git a/src/sunstone/views/index.erb b/src/sunstone/views/index.erb index c94dc0c360..fe6a4512d2 100644 --- a/src/sunstone/views/index.erb +++ b/src/sunstone/views/index.erb @@ -26,9 +26,17 @@ + @@ -143,4 +346,4 @@
    - + \ No newline at end of file