xcpweb

changeset 12:696f0228e887

Files
author Nikola Nikov <nikolanikov@webconnect.bg>
date Sun Aug 01 14:32:59 2010 +0300 (2010-08-01)
parents 5c39c6cef4b4
children 3f3d1227676b
files XenServerConsole.jar interface/XenServerConsole.jar interface/img/close.png interface/img/close_grey.png interface/img/corner.png interface/img/menu_missing.png libxen/libxen_task.js
line diff
     1.1 Binary file XenServerConsole.jar has changed
     2.1 Binary file interface/XenServerConsole.jar has changed
     3.1 Binary file interface/img/close.png has changed
     4.1 Binary file interface/img/close_grey.png has changed
     5.1 Binary file interface/img/corner.png has changed
     6.1 Binary file interface/img/menu_missing.png has changed
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/libxen/libxen_task.js	Sun Aug 01 14:32:59 2010 +0300
     7.3 @@ -0,0 +1,44 @@
     7.4 +function xen_task_get_list()
     7.5 +{
     7.6 +
     7.7 +var pool=new Array();
     7.8 +
     7.9 + for ( var task_id in xen_db['task'] )
    7.10 + {
    7.11 +	pool[task_id] = xen_task_get_details(task_id);
    7.12 + }
    7.13 +
    7.14 + return pool;
    7.15 +}
    7.16 +
    7.17 +function xen_task_get_details(task_id)
    7.18 +{
    7.19 +var pool = new Array();
    7.20 +	
    7.21 +	pool['name_label']=xen_db['task'][task_id]['name_label'];
    7.22 +	pool['name_description']=xen_db['task'][task_id]['name_description'];
    7.23 +	pool['progress']=xen_db['task'][task_id]['progress'];
    7.24 +	pool['status']=xen_db['task'][task_id]['status'];
    7.25 +return pool;
    7.26 +}
    7.27 +
    7.28 +function xen_task_get_allowed_operations(ref)
    7.29 +{
    7.30 +return xen_db['task'][ref]['allowed_operations'];
    7.31 +}
    7.32 +
    7.33 +function xen_task_cancel(ref)
    7.34 +{
    7.35 +var params=new Array();
    7.36 +params[0]=xen_db['session_id'];
    7.37 +params[1]=ref;
    7.38 +return ApiCall('task.cancel',params,false,0,0,0,0);;
    7.39 +}
    7.40 +
    7.41 +function xen_task_destroy(ref)
    7.42 +{
    7.43 +var params=new Array();
    7.44 +params[0]=xen_db['session_id'];
    7.45 +params[1]=ref;
    7.46 +return ApiCall('task.destroy',params,false,0,0,0,0);;
    7.47 +}