File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,7 @@ qx.Class.define("osparc.jobs.JobsButton", {
3434
3535 this . addListener ( "tap" , ( ) => osparc . jobs . ActivityCenterWindow . openWindow ( ) , this ) ;
3636
37- const jobsStore = osparc . store . Jobs . getInstance ( ) ;
38- jobsStore . addListener ( "changeJobsActive" , e => this . __updateJobsButton ( e . getData ( ) ) , this ) ;
39- jobsStore . fetchJobsLatest ( ) ;
37+ this . fetchNJobs ( ) ;
4038 } ,
4139
4240 members : {
@@ -73,6 +71,12 @@ qx.Class.define("osparc.jobs.JobsButton", {
7371 return control || this . base ( arguments , id ) ;
7472 } ,
7573
74+ fetchNJobs : function ( ) {
75+ const jobsStore = osparc . store . Jobs . getInstance ( ) ;
76+ jobsStore . fetchJobsLatest ( )
77+ . then ( jobsResp => this . __updateJobsButton ( jobsResp [ "_meta" ] [ "total" ] ) )
78+ } ,
79+
7680 __updateJobsButton : function ( nActiveJobs ) {
7781 this . getChildControl ( "icon" ) ;
7882 const number = this . getChildControl ( "number" ) ;
Original file line number Diff line number Diff line change @@ -28,10 +28,6 @@ qx.Class.define("osparc.store.Jobs", {
2828 } ,
2929 } ,
3030
31- events : {
32- "changeJobsActive" : "qx.event.type.Data" ,
33- } ,
34-
3531 statics : {
3632 SERVER_MAX_LIMIT : 49 ,
3733 } ,
@@ -62,9 +58,6 @@ qx.Class.define("osparc.store.Jobs", {
6258 } ;
6359 return osparc . data . Resources . fetch ( "runs" , "getPageLatest" , params , options )
6460 . then ( jobsResp => {
65- if ( runningOnly ) {
66- this . fireDataEvent ( "changeJobsActive" , jobsResp [ "_meta" ] [ "total" ] ) ;
67- }
6861 const jobsActive = [ ] ;
6962 if ( "data" in jobsResp ) {
7063 jobsResp [ "data" ] . forEach ( jobActiveData => {
You can’t perform that action at this time.
0 commit comments