@@ -24,6 +24,8 @@ qx.Class.define("osparc.jobs.RunsBrowser", {
2424
2525 this . _setLayout ( new qx . ui . layout . VBox ( 10 ) ) ;
2626
27+ const reloadButton = this . getChildControl ( "reload-button" ) ;
28+ reloadButton . addListener ( "execute" , ( ) => this . reloadRuns ( ) ) ;
2729 this . getChildControl ( "intro-label" ) ;
2830 const jobsFilter = this . getChildControl ( "jobs-filter" ) ;
2931 const runningCB = this . getChildControl ( "running-only-cb" ) ;
@@ -35,27 +37,27 @@ qx.Class.define("osparc.jobs.RunsBrowser", {
3537 } ) ;
3638
3739 runningCB . bind ( "value" , runsTable , "runningOnly" ) ;
38-
39- this . __reloadInterval = setInterval ( ( ) => this . reloadRuns ( ) , 10 * 1000 ) ;
4040 } ,
4141
4242 events : {
4343 "runSelected" : "qx.event.type.Data" ,
4444 } ,
4545
4646 members : {
47- __reloadInterval : null ,
48-
4947 _createChildControlImpl : function ( id ) {
5048 let control ;
5149 switch ( id ) {
52- case "header-filter " :
50+ case "header-toolbar " :
5351 control = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( 5 ) ) ;
5452 this . _add ( control ) ;
5553 break ;
54+ case "reload-button" :
55+ control = new qx . ui . form . Button ( this . tr ( "Reload" ) , "@FontAwesome5Solid/sync-alt/14" ) ;
56+ this . getChildControl ( "header-toolbar" ) . add ( control ) ;
57+ break ;
5658 case "intro-label" :
5759 control = new qx . ui . basic . Label ( this . tr ( "Select a Run to check the details" ) ) ;
58- this . getChildControl ( "header-filter " ) . add ( control ) ;
60+ this . getChildControl ( "header-toolbar " ) . add ( control ) ;
5961 break ;
6062 case "jobs-filter" :
6163 control = new osparc . filter . TextFilter ( "text" , "jobsList" ) . set ( {
@@ -66,7 +68,7 @@ qx.Class.define("osparc.jobs.RunsBrowser", {
6668 placeholder : qx . locale . Manager . tr ( "Filter by name or ID" ) ,
6769 } ) ;
6870 control . hide ( ) ; // @matusdrobuliak 66: remove this when the backend is ready
69- this . getChildControl ( "header-filter " ) . add ( control , {
71+ this . getChildControl ( "header-toolbar " ) . add ( control , {
7072 flex : 1
7173 } ) ;
7274 break ;
@@ -75,7 +77,7 @@ qx.Class.define("osparc.jobs.RunsBrowser", {
7577 value : true ,
7678 label : qx . locale . Manager . tr ( "Active only" ) ,
7779 } ) ;
78- this . getChildControl ( "header-filter " ) . add ( control ) ;
80+ this . getChildControl ( "header-toolbar " ) . add ( control ) ;
7981 break ;
8082 case "runs-table" : {
8183 const projectUuid = null ;
@@ -95,11 +97,5 @@ qx.Class.define("osparc.jobs.RunsBrowser", {
9597 const runsTable = this . getChildControl ( "runs-table" ) ;
9698 runsTable . reloadRuns ( ) ;
9799 } ,
98-
99- stopInterval : function ( ) {
100- if ( this . __reloadInterval ) {
101- clearInterval ( this . __reloadInterval ) ;
102- }
103- } ,
104100 }
105101} )
0 commit comments