File tree Expand file tree Collapse file tree 3 files changed +17
-33
lines changed
services/static-webserver/client/source/class/osparc/jobs Expand file tree Collapse file tree 3 files changed +17
-33
lines changed Original file line number Diff line number Diff line change @@ -26,27 +26,12 @@ qx.Class.define("osparc.jobs.SubRunsBrowser", {
2626
2727 const titleLayout = this . __createTitleLayout ( ) ;
2828 this . _add ( titleLayout ) ;
29-
30- const subRunsTable = new osparc . jobs . SubRunsTable ( ) ;
31- this . _add ( subRunsTable , {
32- flex : 1
33- } ) ;
34-
35- this . bind ( "projectUuid" , subRunsTable , "projectUuid" ) ;
3629 } ,
3730
3831 events : {
3932 "backToRuns" : "qx.event.type.Event" ,
4033 } ,
4134
42- properties : {
43- projectUuid : {
44- check : "String" ,
45- nullable : true ,
46- event : "changeProjectUuid"
47- } ,
48- } ,
49-
5035 members : {
5136 __createTitleLayout : function ( ) {
5237 const titleLayout = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( 5 ) ) ;
@@ -61,5 +46,17 @@ qx.Class.define("osparc.jobs.SubRunsBrowser", {
6146
6247 return titleLayout ;
6348 } ,
49+
50+ setProjectUuid : function ( projectUuid ) {
51+ if ( this . __subRunsTable ) {
52+ this . _remove ( this . __subRunsTable ) ;
53+ this . __subRunsTable = null ;
54+ }
55+
56+ const subRunsTable = this . __subRunsTable = new osparc . jobs . SubRunsTable ( projectUuid ) ;
57+ this . _add ( subRunsTable , {
58+ flex : 1
59+ } ) ;
60+ }
6461 }
6562} )
Original file line number Diff line number Diff line change 1919qx . Class . define ( "osparc.jobs.SubRunsTable" , {
2020 extend : qx . ui . table . Table ,
2121
22- construct : function ( ) {
22+ construct : function ( projectUuid ) {
2323 this . base ( arguments ) ;
2424
25- const model = new osparc . jobs . SubRunsTableModel ( ) ;
25+ const model = new osparc . jobs . SubRunsTableModel ( projectUuid ) ;
2626 this . setTableModel ( model ) ;
2727
2828 this . set ( {
@@ -42,16 +42,6 @@ qx.Class.define("osparc.jobs.SubRunsTable", {
4242 columnModel . setDataCellRenderer ( this . self ( ) . COLS . IMAGE . column , fontButtonRendererInfo ) ;
4343
4444 this . __attachHandlers ( ) ;
45-
46- this . bind ( "projectUuid" , model , "projectUuid" ) ;
47- } ,
48-
49- properties : {
50- projectUuid : {
51- check : "String" ,
52- nullable : true ,
53- event : "changeProjectUuid"
54- } ,
5545 } ,
5646
5747 statics : {
Original file line number Diff line number Diff line change 1919qx . Class . define ( "osparc.jobs.SubRunsTableModel" , {
2020 extend : qx . ui . table . model . Remote ,
2121
22- construct ( ) {
22+ construct ( projectUuid ) {
2323 this . base ( arguments ) ;
2424
2525 const subJobsCols = osparc . jobs . SubRunsTable . COLS ;
@@ -32,13 +32,14 @@ qx.Class.define("osparc.jobs.SubRunsTableModel", {
3232 Object . values ( subJobsCols ) . forEach ( col => {
3333 this . setColumnSortable ( col . column , false ) ;
3434 } ) ;
35+
36+ this . setProjectUuid ( projectUuid ) ;
3537 } ,
3638
3739 properties : {
3840 projectUuid : {
3941 check : "String" ,
4042 nullable : true ,
41- apply : "__applyProjectUuid"
4243 } ,
4344
4445 isFetching : {
@@ -49,10 +50,6 @@ qx.Class.define("osparc.jobs.SubRunsTableModel", {
4950 } ,
5051
5152 members : {
52- __applyProjectUuid : function ( ) {
53- // this.updateContent();
54- } ,
55-
5653 // overridden
5754 _loadRowCount ( ) {
5855 osparc . store . Jobs . getInstance ( ) . fetchSubJobs ( this . getProjectUuid ( ) )
You can’t perform that action at this time.
0 commit comments