File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ qx.Class.define("osparc.jobs.JobsTableModel", {
8585 [ jobsCols . STATE . id ] : job . getState ( ) ,
8686 [ jobsCols . SUBMIT . id ] : job . getSubmittedAt ( ) ? osparc . utils . Utils . formatDateAndTime ( job . getSubmittedAt ( ) ) : "-" ,
8787 [ jobsCols . START . id ] : job . getStartedAt ( ) ? osparc . utils . Utils . formatDateAndTime ( job . getStartedAt ( ) ) : "-" ,
88- [ jobsCols . START . id ] : job . getEndedAt ( ) ? osparc . utils . Utils . formatDateAndTime ( job . getEndedAt ( ) ) : "-" ,
88+ [ jobsCols . END . id ] : job . getEndedAt ( ) ? osparc . utils . Utils . formatDateAndTime ( job . getEndedAt ( ) ) : "-" ,
8989 } ) ;
9090 } ) ;
9191 return data ;
Original file line number Diff line number Diff line change @@ -95,20 +95,14 @@ qx.Class.define("osparc.store.Jobs", {
9595
9696 addJob : function ( jobData ) {
9797 const jobs = this . getJobs ( ) ;
98- const index = jobs . findIndex ( job => job . getProjectUuid ( ) === jobData [ "projectUuid" ] ) ;
99- if ( index === - 1 ) {
100- const job = new osparc . data . Job ( jobData ) ;
101- jobs . push ( job ) ;
102- this . fireDataEvent ( "changeJobs" ) ;
103- return job ;
98+ const jobFound = jobs . find ( job => job . getProjectUuid ( ) === jobData [ "projectUuid" ] ) ;
99+ if ( jobFound ) {
100+ return jobFound ;
104101 }
105- return null ;
106- } ,
107-
108- removeJobs : function ( ) {
109- const jobs = this . getJobs ( ) ;
110- jobs . forEach ( job => job . dispose ( ) ) ;
102+ const job = new osparc . data . Job ( jobData ) ;
103+ jobs . push ( job ) ;
111104 this . fireDataEvent ( "changeJobs" ) ;
105+ return job ;
112106 } ,
113107 }
114108} ) ;
You can’t perform that action at this time.
0 commit comments