diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js
index 7078915440..4968358b6d 100644
--- a/src/sunstone/public/js/plugins/groups-tab.js
+++ b/src/sunstone/public/js/plugins/groups-tab.js
@@ -31,6 +31,9 @@ var groups_tab_content = '\
'+tr("ID")+' | \
'+tr("Name")+' | \
'+tr("Users")+' | \
+ '+tr("VMs")+' | \
+ '+tr("Memory used")+' | \
+ '+tr("CPU used")+' | \
\
\
\
@@ -293,11 +296,25 @@ function groupElementArray(group_json){
users_str=getUserName(group.USERS.ID);
};
+ var vms = "-";
+ var memory = "-";
+ var cpu = "-";
+
+ if (!$.isEmptyObject(group.VM_QUOTA)){
+ vms = group.VM_QUOTA.VM.VMS_USED;
+ memory = group.VM_QUOTA.VM.MEMORY_USED;
+ cpu = group.VM_QUOTA.VM.CPU_USED;
+ }
+
return [
'',
group.ID,
group.NAME,
- users_str ];
+ users_str,
+ vms,
+ memory,
+ cpu
+ ];
}
function updateGroupSelect(){
@@ -405,7 +422,7 @@ $(document).ready(function(){
"aoColumnDefs": [
{ "bSortable": false, "aTargets": ["check"] },
{ "sWidth": "60px", "aTargets": [0] },
- { "sWidth": "35px", "aTargets": [1] }
+ { "sWidth": "35px", "aTargets": [1,4,5,6] }
],
"oLanguage": (datatable_lang != "") ?
{
@@ -416,7 +433,7 @@ $(document).ready(function(){
dataTable_groups.fnClearTable();
addElement([
spinner,
- '','',''],dataTable_groups);
+ '','','','','',''],dataTable_groups);
Sunstone.runAction("Group.list");
setupCreateGroupDialog();
diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js
index 1884ed5b46..93e634e809 100644
--- a/src/sunstone/public/js/plugins/users-tab.js
+++ b/src/sunstone/public/js/plugins/users-tab.js
@@ -34,6 +34,9 @@ var users_tab_content = '\
'+tr("Name")+' | \
'+tr("Group")+' | \
'+tr("Authentication driver")+' | \
+ '+tr("VMs")+' | \
+ '+tr("Memory used")+' | \
+ '+tr("CPU used")+' | \
'+tr("Group ID")+' | \
\
\
@@ -490,12 +493,26 @@ function userElements(){
function userElementArray(user_json){
var user = user_json.USER;
+ var vms = "-";
+ var memory = "-";
+ var cpu = "-";
+
+ if (!$.isEmptyObject(user.VM_QUOTA)){
+ vms = user.VM_QUOTA.VM.VMS_USED;
+ memory = user.VM_QUOTA.VM.MEMORY_USED;
+ cpu = user.VM_QUOTA.VM.CPU_USED;
+ }
+
+
return [
'',
user.ID,
user.NAME,
user.GNAME,
user.AUTH_DRIVER,
+ vms,
+ memory,
+ cpu,
user.GID
]
};
@@ -722,9 +739,9 @@ $(document).ready(function(){
"aoColumnDefs": [
{ "bSortable": false, "aTargets": ["check"] },
{ "sWidth": "60px", "aTargets": [0] },
- { "sWidth": "35px", "aTargets": [1,5] },
+ { "sWidth": "35px", "aTargets": [1,5,6,7,8] },
{ "sWidth": "150px", "aTargets": [4] },
- { "bVisible": false, "aTargets": [5]}
+ { "bVisible": false, "aTargets": [8]}
],
"oLanguage": (datatable_lang != "") ?
{
@@ -734,7 +751,7 @@ $(document).ready(function(){
dataTable_users.fnClearTable();
addElement([
spinner,
- '','','','',''],dataTable_users);
+ '','','','','','','',''],dataTable_users);
Sunstone.runAction("User.list");