0001-Bug-499-Fix-not-fetching-usernames-from-user-dataTab.patch
| src/sunstone/public/js/one-ui_views.js | ||
|---|---|---|
| 79 | 79 |
tableCheckboxesListener(dataTable_hosts); |
| 80 | 80 |
tableCheckboxesListener(dataTable_vMachines); |
| 81 | 81 |
tableCheckboxesListener(dataTable_vNetworks); |
| 82 |
if (uid == 0){
|
|
| 83 |
tableCheckboxesListener(dataTable_users); |
|
| 84 |
} |
|
| 82 |
tableCheckboxesListener(dataTable_users); |
|
| 85 | 83 |
tableCheckboxesListener(dataTable_images); |
| 86 | 84 | |
| 87 | 85 |
$(".ui-widget-overlay").live("click", function (){
|
| ... | ... | |
| 1903 | 1901 |
}); |
| 1904 | 1902 | |
| 1905 | 1903 |
$('button#create_vm_form_manual').click(function(){
|
| 1906 |
template = $('#textarea_vm_template').val();
|
|
| 1904 |
template = $('#vm_template').val();
|
|
| 1907 | 1905 | |
| 1908 | 1906 |
//wrap it in the "vm" object |
| 1909 |
template = {"vm": {"vm_raw": template}};
|
|
| 1907 |
template = {vm: {vm_raw: template}};
|
|
| 1910 | 1908 | |
| 1911 | 1909 |
OpenNebula.VM.create({data: template,
|
| 1912 | 1910 |
success: addVMachineElement, |
| ... | ... | |
| 2180 | 2178 |
//Crawls the user dataTable for that. If such user is not found, |
| 2181 | 2179 |
//we return the uid. |
| 2182 | 2180 |
function getUserName(uid){
|
| 2183 |
nodes = dataTable_users.fnGetData(); |
|
| 2184 | 2181 |
user = "uid "+uid; |
| 2185 |
$.each(nodes,function(){
|
|
| 2186 |
if (uid == this[1]) {
|
|
| 2187 |
user = this[2]; |
|
| 2188 |
return false; |
|
| 2189 |
} |
|
| 2190 |
}); |
|
| 2182 |
if (dataTable_users != null){
|
|
| 2183 |
nodes = dataTable_users.fnGetData(); |
|
| 2184 |
$.each(nodes,function(){
|
|
| 2185 |
if (uid == this[1]) {
|
|
| 2186 |
user = this[2]; |
|
| 2187 |
return false; |
|
| 2188 |
} |
|
| 2189 |
}); |
|
| 2190 |
}; |
|
| 2191 |
|
|
| 2191 | 2192 |
return user; |
| 2192 | 2193 | |
| 2193 | 2194 |
} |
| 2194 |
- |
|