File tree Expand file tree Collapse file tree 5 files changed +23
-16
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 5 files changed +23
-16
lines changed Original file line number Diff line number Diff line change @@ -111,14 +111,14 @@ qx.Class.define("osparc.data.Job", {
111111 members : {
112112 __subJobs : null ,
113113
114- addSubJob : function ( subJobData ) {
114+ addSubJob : function ( collectionRunId , subJobData ) {
115115 const subJobFound = this . __subJobs . find ( subJb => subJb . getNodeId ( ) === subJobData [ "nodeId" ] ) ;
116116 if ( subJobFound ) {
117117 subJobFound . updateSubJob ( subJobData ) ;
118118 return subJobFound ;
119119 }
120120
121- const subJob = new osparc . data . SubJob ( subJobData ) ;
121+ const subJob = new osparc . data . SubJob ( collectionRunId , subJobData ) ;
122122 this . __subJobs . push ( subJob ) ;
123123 return subJob ;
124124 } ,
Original file line number Diff line number Diff line change 1818qx . Class . define ( "osparc.data.SubJob" , {
1919 extend : qx . core . Object ,
2020
21- construct : function ( subJobData ) {
21+ construct : function ( collectionRunId , subJobData ) {
2222 this . base ( arguments ) ;
2323
2424 this . set ( {
25+ collectionRunId,
2526 projectUuid : subJobData [ "projectUuid" ] ,
2627 nodeId : subJobData [ "nodeId" ] ,
2728 } ) ;
@@ -30,6 +31,12 @@ qx.Class.define("osparc.data.SubJob", {
3031 } ,
3132
3233 properties : {
34+ collectionRunId : {
35+ check : "String" ,
36+ nullable : false ,
37+ init : null ,
38+ } ,
39+
3340 projectUuid : {
3441 check : "String" ,
3542 nullable : false ,
@@ -42,7 +49,7 @@ qx.Class.define("osparc.data.SubJob", {
4249 init : null ,
4350 } ,
4451
45- nodeName : {
52+ name : {
4653 check : "String" ,
4754 nullable : false ,
4855 init : null ,
@@ -94,7 +101,7 @@ qx.Class.define("osparc.data.SubJob", {
94101 members : {
95102 updateSubJob : function ( subJobData ) {
96103 this . set ( {
97- nodeName : subJobData [ "nodeName " ] ,
104+ name : subJobData [ "name " ] ,
98105 state : subJobData [ "state" ] ,
99106 progress : subJobData [ "progress" ] ,
100107 startedAt : subJobData [ "startedAt" ] ? new Date ( subJobData [ "startedAt" ] ) : null ,
Original file line number Diff line number Diff line change @@ -62,10 +62,10 @@ qx.Class.define("osparc.jobs.SubRunsTable", {
6262 label : qx . locale . Manager . tr ( "Node Id" ) ,
6363 width : 200
6464 } ,
65- NODE_NAME : {
66- id : "nodeName " ,
65+ NAME : {
66+ id : "name " ,
6767 column : 2 ,
68- label : qx . locale . Manager . tr ( "Node " ) ,
68+ label : qx . locale . Manager . tr ( "Name " ) ,
6969 width : 100
7070 } ,
7171 APP : {
@@ -162,7 +162,7 @@ qx.Class.define("osparc.jobs.SubRunsTable", {
162162 }
163163 const jobInfo = new osparc . jobs . Info ( subJob . getImage ( ) ) ;
164164 const win = osparc . jobs . Info . popUpInWindow ( jobInfo ) ;
165- win . setCaption ( rowData [ "nodeName " ] ) ;
165+ win . setCaption ( rowData [ "name " ] ) ;
166166 break ;
167167 }
168168 case "logs" : {
@@ -176,7 +176,7 @@ qx.Class.define("osparc.jobs.SubRunsTable", {
176176 }
177177 const logDownloadLink = subJob . getLogDownloadLink ( )
178178 if ( logDownloadLink ) {
179- osparc . utils . Utils . downloadLink ( logDownloadLink , "GET" , rowData [ "nodeName " ] + ".zip" ) ;
179+ osparc . utils . Utils . downloadLink ( logDownloadLink , "GET" , rowData [ "name " ] + ".zip" ) ;
180180 } else {
181181 osparc . FlashMessenger . logAs ( this . tr ( "No logs available" ) , "WARNING" ) ;
182182 }
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ qx.Class.define("osparc.jobs.SubRunsTableModel", {
113113 data . push ( {
114114 [ subJobsCols . COLLECTION_RUN_ID . id ] : subJob . getCollectionRunId ( ) ,
115115 [ subJobsCols . NODE_ID . id ] : subJob . getNodeId ( ) ,
116- [ subJobsCols . NODE_NAME . id ] : subJob . getNodeName ( ) ,
116+ [ subJobsCols . NAME . id ] : subJob . getName ( ) ,
117117 [ subJobsCols . APP . id ] : appName + ":" + displayVersion ,
118118 [ subJobsCols . STATE . id ] : osparc . data . Job . STATUS_LABELS [ subJob . getState ( ) ] || subJob . getState ( ) ,
119119 [ subJobsCols . PROGRESS . id ] : subJob . getProgress ( ) * 100 + "%" ,
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ qx.Class.define("osparc.store.Jobs", {
127127 . then ( subJobsData => {
128128 const subJobs = [ ] ;
129129 subJobsData . forEach ( subJobData => {
130- subJobs . push ( this . addSubJob ( subJobData ) ) ;
130+ subJobs . push ( this . addSubJob ( collectionRunId , subJobData ) ) ;
131131 } ) ;
132132 return subJobs ;
133133 } )
@@ -146,16 +146,16 @@ qx.Class.define("osparc.store.Jobs", {
146146 return job ;
147147 } ,
148148
149- addSubJob : function ( subJobData ) {
150- let job = this . getJob ( subJobData [ " collectionRunId" ] ) ;
149+ addSubJob : function ( collectionRunId , subJobData ) {
150+ let job = this . getJob ( collectionRunId ) ;
151151 if ( ! job ) {
152152 const jobs = this . getJobs ( ) ;
153153 job = new osparc . data . Job ( {
154- " collectionRunId" : subJobData [ "collectionRunId" ] ,
154+ collectionRunId,
155155 } ) ;
156156 jobs . push ( job ) ;
157157 }
158- const subJob = job . addSubJob ( subJobData ) ;
158+ const subJob = job . addSubJob ( collectionRunId , subJobData ) ;
159159 return subJob ;
160160 } ,
161161
You can’t perform that action at this time.
0 commit comments