File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed
services/static-webserver/client/source/class/osparc/jobs Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -132,17 +132,35 @@ qx.Class.define("osparc.jobs.RunsTable", {
132132 } ,
133133
134134 __handleButtonClick : function ( action , row ) {
135+ this . resetSelection ( ) ;
135136 const rowData = this . getTableModel ( ) . getRowData ( row ) ;
136137 switch ( action ) {
137138 case "info" : {
138- this . fireDataEvent ( "runSelected" , rowData ) ;
139+ const job = osparc . store . Jobs . getInstance ( ) . getJob ( rowData [ "projectUuid" ] ) ;
140+ if ( ! job ) {
141+ return ;
142+ }
143+ const allInfo = {
144+ "image" : job . getInfo ( ) ? osparc . utils . Utils . deepCloneObject ( job . getInfo ( ) ) : { } ,
145+ "customMetadata" : job . getCustomMetadata ( ) ? osparc . utils . Utils . deepCloneObject ( job . getCustomMetadata ( ) ) : { } ,
146+ }
147+ const runInfo = new osparc . jobs . Info ( allInfo ) ;
148+ const win = osparc . jobs . Info . popUpInWindow ( runInfo ) ;
149+ win . setCaption ( rowData [ "projectName" ] ) ;
139150 break ;
140151 }
141- case "run" :
142- case "stop" :
143- case "logs" : {
144- const msg = `I wish I could ${ action } the job ${ rowData [ "projectUuid" ] } ` ;
145- osparc . FlashMessenger . logAs ( msg , "WARNING" ) ;
152+ case "cancel" : {
153+ const params = {
154+ url : {
155+ "studyId" : rowData [ "projectUuid" ] ,
156+ } ,
157+ } ;
158+ osparc . data . Resources . fetch ( "runPipeline" , "stopPipeline" , params )
159+ . then ( ( ) => {
160+ const msg = qx . locale . Manager . tr ( "Stopping pipeline {0}" , rowData [ "projectName" ] ) ;
161+ osparc . FlashMessenger . logAs ( msg , "INFO" ) ;
162+ } )
163+ . catch ( err => osparc . FlashMessenger . logError ( err ) ) ;
146164 break ;
147165 }
148166 default :
You can’t perform that action at this time.
0 commit comments