mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-24 21:34:01 +03:00
feature #2358: Display list of VM using an image
This commit is contained in:
parent
7af448791f
commit
47420d809d
@ -36,7 +36,7 @@ tabs:
|
||||
actions:
|
||||
users-tab:
|
||||
panel_tabs:
|
||||
user_info_panel: true
|
||||
user_info_tab: true
|
||||
user_quotas_tab: true
|
||||
table_columns:
|
||||
- 0 # Checkbox
|
||||
@ -187,7 +187,8 @@ tabs:
|
||||
other: true
|
||||
images-tab:
|
||||
panel_tabs:
|
||||
image_info_panel: true
|
||||
image_info_tab: true
|
||||
image_vms_tab: true
|
||||
table_columns:
|
||||
- 0 # Checkbox
|
||||
- 1 # ID
|
||||
@ -216,7 +217,7 @@ tabs:
|
||||
Image.delete: true
|
||||
files-tab:
|
||||
panel_tabs:
|
||||
file_info_panel: true
|
||||
file_info_tab: true
|
||||
table_columns:
|
||||
- 0 # Checkbox
|
||||
- 1 # ID
|
||||
@ -413,7 +414,7 @@ tabs:
|
||||
Service.delete: true
|
||||
oneflow-templates:
|
||||
panel_tabs:
|
||||
service_template_info_panel: true
|
||||
service_template_info_tab: true
|
||||
service_template_roles_tab: true
|
||||
table_columns:
|
||||
- 0 # Checkbox
|
||||
|
@ -37,7 +37,7 @@ tabs:
|
||||
actions:
|
||||
users-tab:
|
||||
panel_tabs:
|
||||
user_info_panel: true
|
||||
user_info_tab: true
|
||||
user_quotas_tab: true
|
||||
table_columns:
|
||||
- 0 # Checkbox
|
||||
@ -187,7 +187,8 @@ tabs:
|
||||
scheduling: false
|
||||
images-tab:
|
||||
panel_tabs:
|
||||
image_info_panel: true
|
||||
image_info_tab: true
|
||||
image_vms_tab: true
|
||||
table_columns:
|
||||
- 0 # Checkbox
|
||||
- 1 # ID
|
||||
@ -216,7 +217,7 @@ tabs:
|
||||
Image.delete: true
|
||||
files-tab:
|
||||
panel_tabs:
|
||||
file_info_panel: true
|
||||
file_info_tab: true
|
||||
table_columns:
|
||||
- 0 # Checkbox
|
||||
- 1 # ID
|
||||
@ -414,7 +415,7 @@ tabs:
|
||||
Service.delete: true
|
||||
oneflow-templates:
|
||||
panel_tabs:
|
||||
service_template_info_panel: true
|
||||
service_template_info_tab: true
|
||||
service_template_roles_tab: true
|
||||
table_columns:
|
||||
- 0 # Checkbox
|
||||
|
@ -850,9 +850,72 @@ function updateImageInfo(request,img){
|
||||
|
||||
});
|
||||
|
||||
|
||||
var vms_info_tab = {
|
||||
title: tr("VMs"),
|
||||
content : '<div id="datatable_image_vms_info_div" class="twelve columns">\
|
||||
<table id="datatable_image_vms" class="datatable twelve">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
<th class="check"><input type="checkbox" class="check_all" value=""></input></th>\
|
||||
<th>'+tr("ID")+'</th>\
|
||||
<th>'+tr("Owner")+'</th>\
|
||||
<th>'+tr("Group")+'</th>\
|
||||
<th>'+tr("Name")+'</th>\
|
||||
<th>'+tr("Status")+'</th>\
|
||||
<th>'+tr("Used CPU")+'</th>\
|
||||
<th>'+tr("Used Memory")+'</th>\
|
||||
<th>'+tr("Host")+'</th>\
|
||||
<th>'+tr("IPs")+'</th>\
|
||||
<th>'+tr("Start Time")+'</th>\
|
||||
<th>'+tr("VNC")+'</th>\
|
||||
</tr>\
|
||||
</thead>\
|
||||
<tbody id="tbodyvmachines">\
|
||||
</tbody>\
|
||||
</table>\
|
||||
</div>'
|
||||
}
|
||||
|
||||
Sunstone.updateInfoPanelTab("image_info_panel","image_info_tab",info_tab);
|
||||
Sunstone.updateInfoPanelTab("image_info_panel","image_vms_tab",vms_info_tab);
|
||||
Sunstone.popUpInfoPanel("image_info_panel", "images-tab");
|
||||
|
||||
|
||||
dataTable_vMachines = $("#datatable_image_vms", $("#image_info_panel")).dataTable({
|
||||
"aoColumnDefs": [
|
||||
{ "bSortable": false, "aTargets": ["check",6,7,11] },
|
||||
{ "sWidth": "35px", "aTargets": [0] },
|
||||
{ "bVisible": false, "aTargets": [0]},
|
||||
{ "bVisible": true, "aTargets": Config.tabTableColumns("vms-tab")},
|
||||
{ "bVisible": false, "aTargets": ['_all']},
|
||||
]
|
||||
});
|
||||
|
||||
if (img_info.VMS) {
|
||||
OpenNebula.VM.list({
|
||||
timeout: true,
|
||||
success: function (request, vm_list){
|
||||
var vm_list_array = [];
|
||||
|
||||
$.each(vm_list,function(){
|
||||
//Grab table data from the vm_list
|
||||
vm_list_array.push(vMachineElementArray(this));
|
||||
});
|
||||
|
||||
updateView(vm_list_array, dataTable_vMachines);
|
||||
},
|
||||
error: onError
|
||||
});
|
||||
|
||||
var vm_ids = img_info.VMS.ID;
|
||||
if (vm_ids instanceof Array) {
|
||||
dataTable_vMachines.fnFilter(vm_ids.join('|'), 1, true)
|
||||
} else {
|
||||
dataTable_vMachines.fnFilter(vm_ids, 1)
|
||||
}
|
||||
}
|
||||
|
||||
setPermissionsTable(img_info,'');
|
||||
|
||||
$("#image_info_panel_refresh", $("#image_info_panel")).click(function(){
|
||||
|
Loading…
Reference in New Issue
Block a user