diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index d031f17108..685d8a6b8c 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -630,7 +630,7 @@ function updateImageInfo(request,img){
\ \ \ - \ + \ \ \ \ diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index f06d5cf81b..81cbd3e775 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -2992,7 +2992,7 @@ function setupCreateTemplateDialog(){ vm_json["DISK"] = []; - $('div.disk div#disk_type.vm_param ',dialog).each(function(){ + $('.disk div#disk_type.vm_param ',dialog).each(function(){ var hash = {}; addSectionJSON(hash, this); vm_json["DISK"].push(hash); @@ -3004,7 +3004,7 @@ function setupCreateTemplateDialog(){ vm_json["NIC"] = []; - $('div.nic',dialog).each(function(){ + $('.nic',dialog).each(function(){ var hash = {}; addSectionJSON(hash, this); diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js index 58ae3150ed..89997e3f18 100644 --- a/src/sunstone/public/js/plugins/users-tab.js +++ b/src/sunstone/public/js/plugins/users-tab.js @@ -691,9 +691,9 @@ function updateUserInfo(request,user){
'+tr("Image")+' "'+img_info.NAME+'
'+tr("Image")+' - '+img_info.NAME+'
'+tr("ID")+'
\ \ \ - \ - \ - \ + \ + \ + \ \ \ '; @@ -1037,8 +1037,7 @@ function popUpUpdatePasswordDialog(){ function setUserAutorefresh(){ setInterval(function(){ var checked = $('input.check_item:checked',dataTable_users); - var filter = $("#datatable_users_filter input", - dataTable_users.parents("#datatable_users_wrapper")).attr('value'); + var filter = $("#user_search").attr('value'); if (!checked.length && !filter.length){ Sunstone.runAction("User.autorefresh"); } diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 0bc852f6d4..d3e70f1a8a 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -114,32 +114,52 @@ var vms_tab_content = '\ \ '; -var create_vm_tmpl ='\ -
\ -
\ -
\ - \ - \ -
'+tr("Defaults to template name when emtpy")+'.
\ -
\ -
\ - \ - \ -
\ -
\ - \ - \ -
'+tr("You can use the wildcard %i. When creating several VMs, %i will be replaced with a different number starting from 0 in each of them")+'.
\ -
\ +var create_vm_tmpl ='\ +
\ +

\ + '+tr("Create Virtual Network")+'\ +

\
\ -
\ -
\ + \ +
\ +
\ + \ +
\ +
\ + \ +
\ +
\ +
'+tr("Defaults to template name when emtpy")+'.
\ +
\ +
\ +
\ +
\ + \ +
\ +
\ + \ +
\ +
\ +
\ +
\ +
\ +
\ +
\ + \ +
\ +
\ + \ +
\ +
\ +
'+tr("You can use the wildcard %i. When creating several VMs, %i will be replaced with a different number starting from 0 in each of them")+'.
\ +
\ +
\ +
\
\ - \ - \ + \ + \
\ -
\ ×\ '; @@ -963,58 +983,54 @@ function updateVMInfo(request,vm){ var info_tab = { title : tr("Information"), content: - '
'+tr("Datastore ID")+''+tr("Images")+''+tr("Size")+''+tr("Datastore ID")+''+tr("Images")+''+tr("Size")+'
\ + '
\ +
\ +
\ \ - \ + \ \ \ \ \ \ + \ \ \ \ \ \ \ \ \ \ + \ \ \ \ \ + \ \ \ \ \ + \ \ \ \ \ + \ \ \ \ \ + \ \ \ -
'+tr("Virtual Machine information")+' - '+vm_info.NAME+'
'+tr("Virtual Machine information")+' - '+vm_info.NAME+'
'+tr("ID")+''+vm_info.ID+'
'+tr("Name")+''+vm_info.NAME+'
\ - e\ + \
\
'+tr("State")+''+tr(vm_state)+'
'+tr("LCM State")+''+tr(OpenNebula.Helper.resource_state("vm_lcm",vm_info.LCM_STATE))+'
'+tr("Host")+''+ hostname +'
'+tr("Start time")+''+pretty_time(vm_info.STIME)+'
'+tr("Deploy ID")+''+(typeof(vm_info.DEPLOY_ID) == "object" ? "-" : vm_info.DEPLOY_ID)+'
' + - - insert_extended_template_table(stripped_vm_template, - "VM", - vm_info.ID, - unshown_values) + - insert_permissions_table("VM", - vm_info.ID, - vm_info.UNAME, - vm_info.GNAME, - vm_info.UID, - vm_info.GID) + - - '\ +
\ + \ \ \ \ @@ -1040,7 +1056,22 @@ function updateVMInfo(request,vm){ \ \ \ -
'+tr("Monitoring information")+'
'+vncIcon(vm_info)+'
' + \ +
\ +
' + + insert_permissions_table("VM", + vm_info.ID, + vm_info.UNAME, + vm_info.GNAME, + vm_info.UID, + vm_info.GID) + + insert_extended_template_table(stripped_vm_template, + "VM", + vm_info.ID, + unshown_values) + + + '
\ + ' }; var hotplugging_tab = { @@ -1510,10 +1541,10 @@ function vncIcon(vm){ if (graphics && graphics.TYPE == "vnc" && $.inArray(state, VNCstates)!=-1){ gr_icon = ''; - gr_icon += '\"'+tr("Open'; + gr_icon += '\"'+tr("Open'; } else { - gr_icon = '\"'+tr("VNC'; + gr_icon = '\"'+tr("VNC'; } return gr_icon; } diff --git a/src/sunstone/public/js/plugins/vnets-tab.js b/src/sunstone/public/js/plugins/vnets-tab.js index ae2cf6319f..089aba3671 100644 --- a/src/sunstone/public/js/plugins/vnets-tab.js +++ b/src/sunstone/public/js/plugins/vnets-tab.js @@ -870,10 +870,8 @@ function printLeases(vn_info){ if (!leases) //empty { - html+='\ + html+='\ '+tr("No leases to show")+'\ - \ - \ '; html += ''; return html; @@ -1149,7 +1147,7 @@ function setupCreateVNetDialog() { break; }; - var type = $('input:checked',dialog).val(); + var type = $('input[name="fixed_ranged"]:checked',dialog).val(); network_json['type']=type; //TODO: Name and bridge provided?! @@ -1159,7 +1157,7 @@ function setupCreateVNetDialog() { //for each specified lease we prepare the JSON object $.each(leases,function(){ - var lease_str = $(dialog).val().split(","); + var lease_str = $(this).val().split(","); if (lease_str[1]) leases_obj.push({"ip": lease_str[0], "mac": lease_str[1]}); @@ -1199,8 +1197,8 @@ function setupCreateVNetDialog() { //Time to add custom attributes $('#custom_var_vnet_box option',$create_vn_dialog).each(function(){ - var attr_name = $(dialog).attr('name'); - var attr_value = $(dialog).val(); + var attr_name = $(this).attr('name'); + var attr_value = $(this).val(); network_json[attr_name] = attr_value; }); @@ -1233,7 +1231,7 @@ function popUpCreateVnetDialog() { // extended information panel. function setupLeasesOps(){ $('button#panel_add_lease_button').live("click",function(){ - var lease = $(this).prev().val(); + var lease = $('input#panel_add_lease', dialog).val(); //var mac = $(this).previous().val(); var id = $(this).parents('form').attr('vnid'); if (lease.length){ @@ -1245,7 +1243,7 @@ function setupLeasesOps(){ //ranged networks hold lease $('button#panel_hold_lease_button').live("click",function(){ - var lease = $(this).prev().val(); + var lease = $('input#panel_hold_lease', dialog).val(); //var mac = $(this).previous().val(); var id = $(this).parents('form').attr('vnid'); if (lease.length){