diff --git a/src/sunstone/public/js/plugins/clusters-tab.js b/src/sunstone/public/js/plugins/clusters-tab.js index 2e38e7668b..5b36283bf0 100644 --- a/src/sunstone/public/js/plugins/clusters-tab.js +++ b/src/sunstone/public/js/plugins/clusters-tab.js @@ -929,13 +929,6 @@ var cluster_actions = { error: onError }, - "Cluster.showinfo" : { - type: "single", - call: OpenNebula.Cluster.show, - callback: updateClusterInfo, - error: onError - }, - "Cluster.show_to_update" : { type: "single", call: OpenNebula.Cluster.show, @@ -1447,7 +1440,7 @@ $(document).ready(function(){ initCheckAllBoxes(dataTable_clusters); tableCheckboxesListener(dataTable_clusters); - infoListener(dataTable_clusters, "Cluster.showinfo"); + infoListener(dataTable_clusters, "Cluster.show"); dataTable_clusters.fnSort( [ [1,config['user_config']['table_order']] ] ); } }); diff --git a/src/sunstone/public/js/plugins/datastores-tab.js b/src/sunstone/public/js/plugins/datastores-tab.js index d96e065baf..8e35d3d454 100644 --- a/src/sunstone/public/js/plugins/datastores-tab.js +++ b/src/sunstone/public/js/plugins/datastores-tab.js @@ -322,19 +322,12 @@ var datastore_actions = { error: onError }, - "Datastore.showinfo" : { - type: "single", - call: OpenNebula.Datastore.show, - callback: updateDatastoreInfo, - error: onError - }, - "Datastore.refresh" : { type: "custom", call: function(){ var tab = dataTable_datastores.parents(".tab"); if (Sunstone.rightInfoVisible(tab)) { - Sunstone.runAction("Datastore.showinfo", Sunstone.rightInfoResourceId(tab)) + Sunstone.runAction("Datastore.show", Sunstone.rightInfoResourceId(tab)) } else { waitingNodes(dataTable_datastores); Sunstone.runAction("Datastore.list"); @@ -756,13 +749,6 @@ function updateDatastoreInfo(request,ds){ Sunstone.updateInfoPanelTab("datastore_info_panel","datastore_image_tab",datastore_info_tab); Sunstone.popUpInfoPanel("datastore_info_panel", "datastores-tab"); - - - $("#datastore_info_panel_refresh", $("#datastore_info_panel")).click(function(){ - $(this).html(spinner); - Sunstone.runAction('Datastore.showinfo', info.ID); - }) - // Define datatables // Images datatable @@ -1172,7 +1158,7 @@ $(document).ready(function(){ initCheckAllBoxes(dataTable_datastores); tableCheckboxesListener(dataTable_datastores); - infoListener(dataTable_datastores,'Datastore.showinfo'); + infoListener(dataTable_datastores,'Datastore.show'); // Reset filter in case the view was filtered because it was accessed // from a single cluster. diff --git a/src/sunstone/public/js/plugins/files-tab.js b/src/sunstone/public/js/plugins/files-tab.js index 34f8236be7..b26bb5d7bd 100644 --- a/src/sunstone/public/js/plugins/files-tab.js +++ b/src/sunstone/public/js/plugins/files-tab.js @@ -173,13 +173,6 @@ var file_actions = { error: onError }, - "File.showinfo" : { - type: "single", - call: OpenNebula.Image.show, - callback: updateFileInfo, - error: onError - }, - "File.refresh" : { type: "custom", call: function () { diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js index 571104d90d..ab119ff63f 100644 --- a/src/sunstone/public/js/plugins/groups-tab.js +++ b/src/sunstone/public/js/plugins/groups-tab.js @@ -234,13 +234,6 @@ var group_actions = { error: onError }, - "Group.showinfo" : { - type: "single", - call: OpenNebula.Group.show, - callback: updateGroupInfo, - error: onError - }, - "Group.autorefresh" : { type: "custom", call: function () { diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 8592144aed..e5b4d05bdc 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -150,13 +150,6 @@ var host_actions = { error: onError }, - "Host.showinfo" : { - type: "single", - call: OpenNebula.Host.show, - callback: updateHostInfo, - error: onError - }, - "Host.refresh" : { type: "custom", call: function(){ @@ -810,11 +803,6 @@ function updateHostInfo(request,host){ Sunstone.popUpInfoPanel("host_info_panel", "hosts-tab"); - - $("#host_info_panel_refresh", $("#host_info_panel")).click(function(){ - $(this).html(spinner); - Sunstone.runAction('Host.showinfo', host_info.ID); - }) // TODO: re-use Host.pool_monitor data? //pop up panel while we retrieve the graphs @@ -956,7 +944,7 @@ $(document).ready(function(){ initCheckAllBoxes(dataTable_hosts); tableCheckboxesListener(dataTable_hosts); - infoListener(dataTable_hosts, "Host.showinfo"); + infoListener(dataTable_hosts, "Host.show"); // This listener removes any filter on hosts table when its menu item is // selected. The cluster plugins will filter hosts when the hosts diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index 9cf1aaa52b..ded69b3742 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -280,14 +280,6 @@ var image_actions = { error: onError }, - // TODO: only needed by insert_permissions_table in sunstone.js - "Image.showinfo" : { - type: "single", - call: OpenNebula.Image.show, - callback: updateImageInfo, - error: onError - }, - "Image.refresh" : { type: "custom", call: function () { diff --git a/src/sunstone/public/js/plugins/marketplace-tab.js b/src/sunstone/public/js/plugins/marketplace-tab.js index 8460b95f4d..54a23fa8d6 100644 --- a/src/sunstone/public/js/plugins/marketplace-tab.js +++ b/src/sunstone/public/js/plugins/marketplace-tab.js @@ -34,7 +34,7 @@ var market_actions = { call: function () { var tab = dataTable_marketplace.parents(".tab"); if (Sunstone.rightInfoVisible(tab)) { - Sunstone.runAction("Marketplace.showinfo", Sunstone.rightInfoResourceId(tab)) + Sunstone.runAction("Marketplace.show", Sunstone.rightInfoResourceId(tab)) } else { waitingNodes(dataTable_marketplace); Sunstone.runAction("Marketplace.list"); @@ -163,10 +163,16 @@ var market_actions = { }, error: onError }, - "Marketplace.showinfo" : { + + "Marketplace.show" : { type: "single", call: OpenNebula.Marketplace.show, - callback: updateMarketInfo, + callback: function(request, response) { +// updateMarketElement(request, response); + if (Sunstone.rightInfoVisible($("#marketplace-tab"))) { + updateMarketInfo(request, response); + } + }, error: onError } } @@ -315,11 +321,6 @@ function updateMarketInfo(request,app){ Sunstone.updateInfoPanelTab("marketplace_info_panel", "marketplace_info_tab", info_tab); Sunstone.popUpInfoPanel("marketplace_info_panel", "marketplace-tab"); - - $("#marketplace_info_panel_refresh", $("#marketplace_info_panel")).click(function(){ - $(this).html(spinner); - Sunstone.runAction('Marketplace.showinfo', app['_id']["$oid"]); - }) }; function infoListenerMarket(dataTable){ @@ -339,7 +340,7 @@ function updateMarketInfo(request,app){ } else { var context = $(this).parents(".tab"); popDialogLoading(); - Sunstone.runAction("Marketplace.showinfo",id); + Sunstone.runAction("Marketplace.show",id); $(".resource-id", context).html(id); $('.top_button, .list_button', context).attr('disabled', false); } diff --git a/src/sunstone/public/js/plugins/oneflow-services.js b/src/sunstone/public/js/plugins/oneflow-services.js index 662a731979..1d602d6ecf 100644 --- a/src/sunstone/public/js/plugins/oneflow-services.js +++ b/src/sunstone/public/js/plugins/oneflow-services.js @@ -911,13 +911,6 @@ var service_actions = { error: onError }, - "Service.showinfo" : { - type: "single", - call: Service.show, - callback: updateServiceInfo, - error: onError - }, - "Service.refresh" : { type: "custom", call: function () { diff --git a/src/sunstone/public/js/plugins/oneflow-templates.js b/src/sunstone/public/js/plugins/oneflow-templates.js index 7388435d7a..6d324aaf90 100644 --- a/src/sunstone/public/js/plugins/oneflow-templates.js +++ b/src/sunstone/public/js/plugins/oneflow-templates.js @@ -377,13 +377,6 @@ var service_template_actions = { error: onError }, - "ServiceTemplate.showinfo" : { - type: "single", - call: ServiceTemplate.show, - callback: updateServiceTemplateInfo, - error: onError - }, - "ServiceTemplate.instantiate" : { type: "multiple", call: ServiceTemplate.instantiate, diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index 62f495b6d4..872d491b11 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -270,14 +270,6 @@ var template_actions = { error: onError }, - // TODO: only needed by insert_permissions_table in sunstone.js - "Template.showinfo" : { - type: "single", - call: OpenNebula.Template.show, - callback: updateTemplateInfo, - error: onError - }, - "Template.refresh" : { type: "custom", call: function () { diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js index d06d7a44a7..567b071e83 100644 --- a/src/sunstone/public/js/plugins/users-tab.js +++ b/src/sunstone/public/js/plugins/users-tab.js @@ -377,13 +377,6 @@ var user_actions = { error: onError }, - "User.showinfo" : { - type: "single", - call: OpenNebula.User.show, - callback: updateUserInfo, - error: onError - }, - "User.delete" : { type: "multiple", call: OpenNebula.User.del, @@ -743,11 +736,6 @@ function updateUserInfo(request,user){ Sunstone.updateInfoPanelTab("user_info_panel","user_quotas_tab",quotas_tab); //Sunstone.updateInfoPanelTab("user_info_panel","user_acct_tab",acct_tab); Sunstone.popUpInfoPanel("user_info_panel", 'users-tab'); - - $("#user_info_panel_refresh", $("#user_info_panel")).click(function(){ - $(this).html(spinner); - Sunstone.runAction('User.show', info.ID); - }) }; // Used also from groups-tabs.js diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 007c1cc0dc..4fdaa05883 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -449,12 +449,6 @@ var vm_actions = { error: onError }, - "VM.showinfo" : { - type: "single", - call: OpenNebula.VM.show, - callback: updateVMInfo, - error: onError - }, "VM.refresh" : { type: "custom", call : function (){ diff --git a/src/sunstone/public/js/plugins/vnets-tab.js b/src/sunstone/public/js/plugins/vnets-tab.js index a89fe66678..05661027ae 100644 --- a/src/sunstone/public/js/plugins/vnets-tab.js +++ b/src/sunstone/public/js/plugins/vnets-tab.js @@ -355,14 +355,6 @@ var vnet_actions = { error: onError }, - "Network.showinfo" : { - type: "single", - call: OpenNebula.Network.show, - callback: updateVNetworkInfo, - error: onError - - }, - "Network.refresh" : { type: "custom", call: function(){ @@ -734,11 +726,6 @@ function updateVNetworkInfo(request,vn){ Sunstone.popUpInfoPanel("vnet_info_panel", "vnets-tab"); setPermissionsTable(vn_info,''); - - $("#vnet_info_panel_refresh", $("#vnet_info_panel")).click(function(){ - $(this).html(spinner); - Sunstone.runAction('Network.showinfo', vn_info.ID); - }) } // Prints the lis of leases depending on the Vnet TYPE @@ -1402,7 +1389,7 @@ $(document).ready(function(){ initCheckAllBoxes(dataTable_vNetworks); tableCheckboxesListener(dataTable_vNetworks); - infoListener(dataTable_vNetworks,'Network.showinfo'); + infoListener(dataTable_vNetworks,'Network.show'); // Reset list filter in case it was set because we were lookin // at a single cluster view diff --git a/src/sunstone/public/js/plugins/zones-tab.js b/src/sunstone/public/js/plugins/zones-tab.js index d57ab6a93e..a60191c41d 100644 --- a/src/sunstone/public/js/plugins/zones-tab.js +++ b/src/sunstone/public/js/plugins/zones-tab.js @@ -122,13 +122,6 @@ var zone_actions = { error: onError }, - "Zone.showinfo" : { - type: "single", - call: OpenNebula.Zone.show, - callback: updateZoneInfo, - error: onError - }, - "Zone.show_to_update" : { type: "single", call: OpenNebula.Zone.show, @@ -191,7 +184,7 @@ var zone_actions = { call: OpenNebula.Zone.rename, callback: function(request) { notifyMessage(tr("Zone renamed correctly")); - Sunstone.runAction('Zone.showinfo',request.request.data[0][0]); + Sunstone.runAction('Zone.show',request.request.data[0][0]); }, error: onError, notify: true diff --git a/src/sunstone/public/js/sunstone.js b/src/sunstone/public/js/sunstone.js index 5f514d2bec..c4a694f7b8 100644 --- a/src/sunstone/public/js/sunstone.js +++ b/src/sunstone/public/js/sunstone.js @@ -3245,9 +3245,7 @@ function insert_permissions_table(tab_name, resource_type, resource_id, owner, g var resource_struct = new Array(); resource_struct[0] = resource_id; - // TODO: race condition. Show can return before chown does Sunstone.runAction(resource_type+".chown",resource_struct,value_str); - Sunstone.runAction(resource_type+".showinfo",resource_id); } }); } @@ -3288,7 +3286,6 @@ function insert_permissions_table(tab_name, resource_type, resource_id, owner, g var resource_struct = new Array(); resource_struct[0] = resource_id; Sunstone.runAction(resource_type+".chgrp",resource_struct,value_str); - Sunstone.runAction(resource_type+".showinfo",resource_id); } }); } @@ -3367,7 +3364,6 @@ function insert_cluster_dropdown(resource_type, resource_id, cluster_value, clus var resource_struct = new Array(); resource_struct[0] = resource_id; Sunstone.runAction(resource_type+".addtocluster",resource_struct,value_str); - Sunstone.runAction(resource_type+".showinfo",resource_id); } }); @@ -3405,7 +3401,6 @@ function insert_group_dropdown(resource_type, resource_id, group_value, group_id var resource_struct = new Array(); resource_struct[0] = resource_id; Sunstone.runAction(resource_type+".chgrp",resource_struct,value_str); - Sunstone.runAction(resource_type+".showinfo",resource_id); } });