1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

Feature #2976: Search user table in Sunstone by any attribute in the user template

This commit is contained in:
Jaime Melis 2014-07-14 16:28:54 +02:00
parent 2e25f11064
commit fbc9bfbe10
2 changed files with 16 additions and 1 deletions

View File

@ -56,6 +56,7 @@ tabs:
- 6 # Memory
- 7 # CPU
#- 8 # Group ID
#- 9 # Hidden User Data
actions:
User.refresh: true
User.create_dialog: true

View File

@ -531,6 +531,7 @@ var users_tab = {
<th>'+tr("Memory")+'</th>\
<th>'+tr("CPU")+'</th>\
<th>'+tr("Group ID")+'</th>\
<th>'+tr("Hidden User Data")+'</th>\
</tr>\
</thead>\
<tbody id="tbodyusers">\
@ -580,6 +581,18 @@ function userElementArray(user_json){
}
// Build hidden user template
var hidden_template = "";
for (var key in user.TEMPLATE){
switch (key){
// Don't copy unnecesary keys
case "SSH_PUBLIC_KEY":
case "TOKEN_PASSWORD":
break;
default:
hidden_template = hidden_template + key + "=" + user.TEMPLATE[key] + "\n";
}
}
return [
'<input class="check_item" type="checkbox" id="user_'+user.ID+'" name="selected_items" value="'+user.ID+'"/>',
@ -590,7 +603,8 @@ function userElementArray(user_json){
vms,
memory,
cpu,
user.GID
user.GID,
hidden_template
]
};