File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11210,11 +11210,20 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
1121011210 background-position : -168px -31px ;
1121111211}
1121211212
11213+ .reset .icon {
11214+ background-position : -168px -31px ;
11215+ }
11216+
1121311217.restoreVM : hover .icon ,
1121411218.restore : hover .icon {
1121511219 background-position : -168px -613px ;
1121611220}
1121711221
11222+
11223+ .reset : hover .icon {
11224+ background-position : -168px -613px ;
11225+ }
11226+
1121811227.enableVPN .icon {
1121911228 background-position : -198px -3px ;
1122011229}
Original file line number Diff line number Diff line change 475475 }
476476 } ,
477477
478+ reset : {
479+ label : 'Reset VM' ,
480+ messages :{
481+ confirm :function ( args ) {
482+ return 'Do you want to restore the VM ?' ;
483+ } ,
484+ notification :function ( args ) {
485+ return 'Reset VM' ;
486+ }
487+ } ,
488+
489+ action :function ( args ) {
490+ $ . ajax ( {
491+ url : createURL ( "restoreVirtualMachine&virtualmachineid=" + args . context . instances [ 0 ] . id ) ,
492+ dataType : "json" ,
493+ async : true ,
494+ success : function ( json ) {
495+ var item = json . restorevmresponse ;
496+ args . response . success ( { data :item } ) ;
497+ }
498+ } ) ;
499+
500+ } ,
501+
502+ notification : {
503+ poll : function ( args ) {
504+ args . complete ( { data : { state : 'Stopped' } } ) ;
505+ }
506+ }
507+
508+ } ,
509+
510+
478511 edit : {
479512 label : 'label.edit' ,
480513 action : function ( args ) {
12011234 allowedActions . push ( "restart" ) ;
12021235 allowedActions . push ( "destroy" ) ;
12031236 allowedActions . push ( "changeService" ) ;
1237+ allowedActions . push ( "reset" ) ;
12041238
12051239 if ( isAdmin ( ) )
12061240 allowedActions . push ( "migrate" ) ;
12221256 allowedActions . push ( "edit" ) ;
12231257 allowedActions . push ( "start" ) ;
12241258 allowedActions . push ( "destroy" ) ;
1259+ allowedActions . push ( "reset" ) ;
12251260
12261261 if ( isAdmin ( ) )
12271262 allowedActions . push ( "migrateToAnotherStorage" ) ;
You can’t perform that action at this time.
0 commit comments