1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Fix missing totals in sunstone tabs

This commit is contained in:
Carlos Martín 2015-09-01 18:55:49 +02:00
parent 87bdaa5a67
commit edbf465c83
2 changed files with 16 additions and 0 deletions

View File

@ -77,6 +77,8 @@ define(function(require) {
*/
function _elementArray(element_json) {
this.totalGroups++;
var element = element_json[XML_ROOT];
var users_str = "0";

View File

@ -57,12 +57,16 @@ define(function(require) {
"you_selected_multiple": Locale.tr("You selected the following VDCs:")
};
this.totalElements = 0;
TabDataTable.call(this);
}
Table.prototype = Object.create(TabDataTable.prototype);
Table.prototype.constructor = Table;
Table.prototype.elementArray = _elementArray;
Table.prototype.preUpdateView = _preUpdateView;
Table.prototype.postUpdateView = _postUpdateView;
return Table;
@ -71,6 +75,8 @@ define(function(require) {
*/
function _elementArray(element_json) {
this.totalElements++;
var element = element_json[XML_ROOT];
return [
@ -96,4 +102,12 @@ define(function(require) {
return l;
}
function _preUpdateView() {
this.totalElements = 0;
}
function _postUpdateView() {
$(".total_vdcs").text(this.totalElements);
}
});