mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
bug #1905: Add refresh button to panel info
This commit is contained in:
1 parent
4b5ce41d5a
commit
a41ef58410
12 files changed
+74
-2
No files matched your search
@@ -1425,6 +1425,11 @@ function updateClusterInfo(request,cluster){
|
||||
|
||||
Sunstone.popUpInfoPanel("cluster_info_panel", "clusters-tab");
|
||||
|
||||
$("#cluster_info_panel_refresh", $("#cluster_info_panel")).click(function(){
|
||||
$(this).html(spinner);
|
||||
Sunstone.runAction('Cluster.showinfo', cluster_info.ID);
|
||||
})
|
||||
|
||||
// Hosts datatable
|
||||
|
||||
dataTable_cluster_hosts_panel = $("#datatable_cluster_hosts_info_panel").dataTable({
|
||||
|
||||
@@ -756,6 +756,13 @@ 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
|
||||
|
||||
|
||||
@@ -642,6 +642,11 @@ function updateFileInfo(request,img){
|
||||
Sunstone.updateInfoPanelTab("file_info_panel","file_info_tab",info_tab);
|
||||
Sunstone.popUpInfoPanel("file_info_panel", "files-tab");
|
||||
|
||||
$("#file_info_panel_refresh", $("#file_info_panel")).click(function(){
|
||||
$(this).html(spinner);
|
||||
Sunstone.runAction('File.showinfo', img_info.ID);
|
||||
})
|
||||
|
||||
setPermissionsTable(img_info,'');
|
||||
|
||||
}
|
||||
|
||||
@@ -561,8 +561,14 @@ function updateGroupInfo(request,group){
|
||||
Sunstone.updateInfoPanelTab("group_info_panel","group_quotas_tab",quotas_tab);
|
||||
Sunstone.popUpInfoPanel("group_info_panel", 'groups-tab');
|
||||
|
||||
|
||||
$("#group_info_panel_refresh", $("#group_info_panel")).click(function(){
|
||||
$(this).html(spinner);
|
||||
Sunstone.runAction('Group.showinfo', info.ID);
|
||||
})
|
||||
|
||||
//preload acct
|
||||
loadAccounting('Group', info.ID, group_acct_graphs);
|
||||
//loadAccounting('Group', info.ID, group_acct_graphs);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1020,6 +1020,11 @@ 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
|
||||
|
||||
@@ -798,6 +798,11 @@ function updateImageInfo(request,img){
|
||||
|
||||
setPermissionsTable(img_info,'');
|
||||
|
||||
$("#image_info_panel_refresh", $("#image_info_panel")).click(function(){
|
||||
$(this).html(spinner);
|
||||
Sunstone.runAction('Image.showinfo', img_info.ID);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function enable_all_datastores()
|
||||
|
||||
@@ -237,6 +237,11 @@ 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){
|
||||
|
||||
@@ -1487,6 +1487,11 @@ function updateTemplateInfo(request,template){
|
||||
|
||||
// Populate permissions grid
|
||||
setPermissionsTable(template_info,'');
|
||||
|
||||
$("#template_info_panel_refresh", $("#template_info_panel")).click(function(){
|
||||
$(this).html(spinner);
|
||||
Sunstone.runAction('Template.showinfo', template_info.ID);
|
||||
})
|
||||
}
|
||||
|
||||
//Given the JSON of a VM template (or of a section of it), it crawls
|
||||
|
||||
@@ -781,6 +781,11 @@ 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.showinfo', info.ID);
|
||||
})
|
||||
};
|
||||
|
||||
// Prepare the user creation dialog
|
||||
|
||||
@@ -1536,6 +1536,11 @@ function updateVMInfo(request,vm){
|
||||
|
||||
// Populate permissions grid
|
||||
setPermissionsTable(vm_info,'');
|
||||
|
||||
$("#vm_info_panel_refresh", $("#vm_info_panel")).click(function(){
|
||||
$(this).html(spinner);
|
||||
Sunstone.runAction('VM.showinfo', vm_info.ID);
|
||||
})
|
||||
}
|
||||
|
||||
function updateVMDisksInfo(request,vm){
|
||||
|
||||
@@ -843,6 +843,10 @@ function updateVNetworkInfo(request,vn){
|
||||
|
||||
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
|
||||
|
||||
@@ -120,7 +120,22 @@ var Sunstone = {
|
||||
//Generates and returns the HTML div element for an info panel, with
|
||||
//Jquery tabs.
|
||||
"getInfoPanelHTML" : function(panel_name,selected_tab){
|
||||
var dl_tabs = $('<br><div id="'+panel_name+'" class="row"><div class="twelve columns"><dl class="tabs"></dl></div><ul class="tabs-content"></ul></div>');
|
||||
var active_tab = $("dd.active a", $("#"+panel_name));
|
||||
if (active_tab) {
|
||||
var active_tab_href = active_tab.attr('href');
|
||||
}
|
||||
|
||||
var dl_tabs = $('<br><div id="'+panel_name+'" class="row">\
|
||||
<div class="twelve columns">\
|
||||
<dl class="tabs">\
|
||||
<div id="refresh_div">\
|
||||
<button type="button" style="float:left; margin-right:5px" class="button secondary tiny radius" id="'+panel_name+'_refresh"><span class="icon-refresh"></span></button>\
|
||||
</div>\
|
||||
</dl>\
|
||||
</div>\
|
||||
<ul class="tabs-content"></ul>\
|
||||
</div>');
|
||||
|
||||
var tabs = SunstoneCfg["info_panels"][panel_name];
|
||||
var tab=null;
|
||||
var active=false;
|
||||
|
||||
Reference in new issue
Block a user