1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

Bug #3608: Fix acct tables in user dashboard

This commit is contained in:
Carlos Martín 2015-02-19 14:32:49 +01:00
parent 6240380f97
commit 9532292930
2 changed files with 5 additions and 10 deletions

View File

@ -249,7 +249,7 @@ var widgets = {
</div>\
</div>',
"accounting" : '<h5 class="subheader"><i class="fa fa-fw fa-lg fa-bar-chart-o"></i> '+tr("Accounting")+'</h5>\
<div id="dashboard_vm_accounting" class="row dashboard-widget-footer">\
<div class="row dashboard-widget-footer">\
<div id="user_dashboard_info_acct_div" class="large-12 columns columns">\
</div>\
</div>'
@ -545,10 +545,10 @@ $(document).ready(function(){
popUpCreateUserDialog();
return false;
})
accountingGraphs(
$("#user_dashboard_info_acct_div"),
{ no_table: true,
fixed_user: config["user_id"],
{ fixed_user: config["user_id"],
fixed_group_by: "vm"
}
);

View File

@ -5425,15 +5425,10 @@ function accountingGraphs(div, opt){
}
}
var no_table = false;
if (opt["no_table"] == true) {
no_table = true;
}
OpenNebula.VM.accounting({
// timeout: true,
success: function(req, response){
fillAccounting(div, req, response, no_table);
fillAccounting(div, req, response, false);
},
error: onError,
data: options
@ -5718,7 +5713,7 @@ function fillAccounting(div, req, response, no_table) {
//--------------------------------------------------------------------------
if (no_table) {
$(".acct_table").hide();
$(".acct_table",div).hide();
} else {
$("#acct_cpu_datatable",div).dataTable().fnClearTable();
$("#acct_cpu_datatable",div).dataTable().fnDestroy();