File tree Expand file tree Collapse file tree 3 files changed +80
-2
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 3 files changed +80
-2
lines changed Original file line number Diff line number Diff line change 1+ /* ************************************************************************
2+
3+ osparc - the simcore frontend
4+
5+ https://osparc.io
6+
7+ Copyright:
8+ 2025 IT'IS Foundation, https://itis.swiss
9+
10+ License:
11+ MIT: https://opensource.org/licenses/MIT
12+
13+ Authors:
14+ * Odei Maiz (odeimaiz)
15+
16+ ************************************************************************ */
17+
18+ qx . Class . define ( "osparc.data.Job" , {
19+ extend : qx . core . Object ,
20+
21+ construct : function ( jobData ) {
22+ this . base ( arguments ) ;
23+
24+ this . set ( {
25+ jobId : jobData [ "job_id" ] ,
26+ solver : jobData [ "solver" ] ,
27+ status : jobData [ "status" ] ,
28+ progress : jobData [ "progress" ] ,
29+ submittedAt : jobData [ "submitted_at" ] ? new Date ( jobData [ "submitted_at" ] ) : null ,
30+ startedAt : jobData [ "started_at" ] ? new Date ( jobData [ "started_at" ] ) : null ,
31+ instance : jobData [ "instance" ] ,
32+ } ) ;
33+ } ,
34+
35+ properties : {
36+ jobId : {
37+ check : "String" ,
38+ nullable : false ,
39+ init : null ,
40+ } ,
41+
42+ solver : {
43+ check : "String" ,
44+ nullable : false ,
45+ init : null ,
46+ } ,
47+
48+ status : {
49+ check : "String" ,
50+ nullable : false ,
51+ init : null ,
52+ } ,
53+
54+ progress : {
55+ check : "Number" ,
56+ init : null ,
57+ nullable : true ,
58+ } ,
59+
60+ submittedAt : {
61+ check : "Date" ,
62+ init : null ,
63+ nullable : true ,
64+ } ,
65+
66+ startedAt : {
67+ check : "Date" ,
68+ init : null ,
69+ nullable : true ,
70+ } ,
71+
72+ instance : {
73+ check : "String" ,
74+ nullable : false ,
75+ init : null ,
76+ } ,
77+ } ,
78+ } ) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ qx.Class.define("osparc.jobs.JobsButton", {
3232 } ) ;
3333
3434 const jobsStore = osparc . store . Jobs . getInstance ( ) ;
35- jobsStore . getJobs ( ) . addListener ( "change " , e => this . __updateJobsButton ( ) , this ) ;
35+ jobsStore . addListener ( "changeJobs " , e => this . __updateJobsButton ( ) , this ) ;
3636 this . addListener ( "tap" , ( ) => console . log ( "Pop up jobs table" ) , this ) ;
3737 } ,
3838
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ qx.Class.define("osparc.store.Jobs", {
3838 . then ( jobsData => {
3939 const jobs = [ ] ;
4040 if ( "jobs" in jobsData ) {
41- jobsData . forEach ( jobData => {
41+ jobsData [ "jobs" ] . forEach ( jobData => {
4242 const job = this . addJob ( jobData ) ;
4343 if ( job ) {
4444 jobs . push ( job ) ;
You can’t perform that action at this time.
0 commit comments