feature #1664: Autofill VNC parameters

This commit is contained in:
Daniel Molina committed 2012-12-13 10:51:50 +01:00
1 parent ca4fd31dff
commit 3c773bbf3e
1 file changed
+31 -1
@@ -2325,6 +2325,10 @@ function setupCreateTemplateDialog(){
// 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);
$("input[name='graphics_type']").change(function(){
$("#LISTEN", $('div#io_tab')).val("0.0.0.0")
});
$('#add_input', $('div#io_tab')).click(function() {
var table = $('#input_table', $('div#io_tab'))[0];
console.log(table)
@@ -3267,7 +3271,9 @@ function setupCreateTemplateDialog(){
var vm_json = {};
var name,value,boot_method;
//process capacity options
//
// CAPACITY
//
var scope = section_capacity;
if (!mandatory_filter(scope)){
@@ -3290,6 +3296,10 @@ function setupCreateTemplateDialog(){
// notifyError(tr("There are mandatory fields missing in the OS Boot options section"));
// return false;
//};
//
// OS
//
vm_json["OS"] = {};
addSectionJSON(vm_json["OS"],$('div#os_tab',dialog));
//
@@ -3299,6 +3309,10 @@ function setupCreateTemplateDialog(){
//addSectionJSON(vm_json["FEATURES"],scope);
//
////process disks -> fetch from box
//
// DISK
//
vm_json["DISK"] = [];
$('div.disk div#disk_type.vm_param',dialog).each(function(){
@@ -3307,6 +3321,10 @@ function setupCreateTemplateDialog(){
vm_json["DISK"].push(hash);
});
//
// NIC
//
vm_json["NIC"] = [];
$('div.nic',dialog).each(function(){
@@ -3315,9 +3333,17 @@ function setupCreateTemplateDialog(){
vm_json["NIC"].push(hash);
});
//
// GRAPHICS
//
vm_json["GRAPHICS"] = {};
addSectionJSON(vm_json["GRAPHICS"],$('div#io_tab .graphics',dialog));
//
// INPUT
//
vm_json["INPUT"] = [];
$('#input_table tr', $('div#io_tab')).each(function(){
var hash = {};
@@ -3367,6 +3393,10 @@ function setupCreateTemplateDialog(){
});
};
//
// PLACEMENT
//
addSectionJSON(vm_json,$('div#placement_tab .requirements',dialog));
console.log(vm_json)