diff --git a/src/sunstone/public/js/plugins/clusters-tab.js b/src/sunstone/public/js/plugins/clusters-tab.js index bb812091d3..ac99ae6ebf 100644 --- a/src/sunstone/public/js/plugins/clusters-tab.js +++ b/src/sunstone/public/js/plugins/clusters-tab.js @@ -937,8 +937,13 @@ var cluster_actions = { "Cluster.refresh" : { type: "custom", call: function(){ + var tab = dataTable_clusters.parents(".tab"); + if (Sunstone.rightInfoVisible(tab)) { + Sunstone.runAction("Cluster.showinfo", Sunstone.rightInfoResourceId(tab)) + } else { waitingNodes(dataTable_clusters); Sunstone.runAction("Cluster.list"); + } }, error: onError }, @@ -1069,8 +1074,7 @@ var cluster_buttons = { "Cluster.update_dialog" : { type : "action", layout: "main", - text : tr("Update"), - alwaysActive: true + text : tr("Update") }, "Cluster.delete" : { type: "confirm", diff --git a/src/sunstone/public/js/plugins/datastores-tab.js b/src/sunstone/public/js/plugins/datastores-tab.js index ab30f5549f..fc497100e5 100644 --- a/src/sunstone/public/js/plugins/datastores-tab.js +++ b/src/sunstone/public/js/plugins/datastores-tab.js @@ -365,8 +365,13 @@ var datastore_actions = { "Datastore.refresh" : { type: "custom", call: function(){ + var tab = dataTable_datastores.parents(".tab"); + if (Sunstone.rightInfoVisible(tab)) { + Sunstone.runAction("Datastore.showinfo", Sunstone.rightInfoResourceId(tab)) + } else { waitingNodes(dataTable_datastores); Sunstone.runAction("Datastore.list"); + } }, error: onError }, diff --git a/src/sunstone/public/js/plugins/files-tab.js b/src/sunstone/public/js/plugins/files-tab.js index 2d7b539861..4e8fde3567 100644 --- a/src/sunstone/public/js/plugins/files-tab.js +++ b/src/sunstone/public/js/plugins/files-tab.js @@ -170,8 +170,13 @@ var file_actions = { "File.refresh" : { type: "custom", call: function () { + var tab = dataTable_files.parents(".tab"); + if (Sunstone.rightInfoVisible(tab)) { + Sunstone.runAction("File.showinfo", Sunstone.rightInfoResourceId(tab)) + } else { waitingNodes(dataTable_files); Sunstone.runAction("File.list"); + } } }, diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js index 49e7a83803..3c261a06f7 100644 --- a/src/sunstone/public/js/plugins/groups-tab.js +++ b/src/sunstone/public/js/plugins/groups-tab.js @@ -228,8 +228,13 @@ var group_actions = { "Group.refresh" : { type: "custom", call: function() { + var tab = dataTable_groups.parents(".tab"); + if (Sunstone.rightInfoVisible(tab)) { + Sunstone.runAction("Group.showinfo", Sunstone.rightInfoResourceId(tab)) + } else { waitingNodes(dataTable_groups); Sunstone.runAction("Group.list"); + } }, error: onError }, diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index ae743f7f33..b57d6a6389 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -177,8 +177,13 @@ var host_actions = { "Host.refresh" : { type: "custom", call: function(){ + var tab = dataTable_hosts.parents(".tab"); + if (Sunstone.rightInfoVisible(tab)) { + Sunstone.runAction("Host.showinfo", Sunstone.rightInfoResourceId(tab)) + } else { waitingNodes(dataTable_hosts); Sunstone.runAction("Host.list"); + } }, error: onError }, @@ -251,41 +256,6 @@ var host_actions = { }, error: hostMonitorError }, -/* - "Host.pool_monitor" : { - type: "monitor_global", - call : OpenNebula.Host.pool_monitor, - callback: function(req,response) { - var host_dashboard_graphs = [ - { - monitor_resources : "HOST_SHARE/CPU_USAGE,HOST_SHARE/USED_CPU,HOST_SHARE/MAX_CPU", - labels : tr("Allocated")+","+tr("Real")+","+tr("Total"), - humanize_figures : false, - div_graph : $("#dash_host_cpu_graph", $dashboard) - //div_legend : $("#dash_host_cpu_legend", $dashboard) - }, - { - monitor_resources : "HOST_SHARE/MEM_USAGE,HOST_SHARE/USED_MEM,HOST_SHARE/MAX_MEM", - labels : tr("Allocated")+","+tr("Real")+","+tr("Total"), - humanize_figures : true, - div_graph : $("#dash_host_mem_graph", $dashboard) - } - ]; - - for(var i=0; i