Skip to content

Commit df05655

Browse files
committed
info column
1 parent 63df19d commit df05655

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

services/static-webserver/client/source/class/osparc/jobs/JobsTable.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,17 @@ qx.Class.define("osparc.jobs.JobsTable", {
3535
columnModel.setColumnVisible(this.self().COLS.JOB_ID.column, true);
3636

3737
Object.values(this.self().COLS).forEach(col => columnModel.setColumnWidth(col.column, col.width));
38+
39+
const imageRenderer = new qx.ui.table.cellrenderer.Image();
40+
columnModel.setDataCellRenderer(this.self().COLS.INFO.column, imageRenderer);
3841
},
3942

4043
statics: {
4144
COLS: {
4245
JOB_ID: {
4346
id: "jobId",
4447
column: 0,
45-
label: qx.locale.Manager.tr("JobId"),
48+
label: qx.locale.Manager.tr("Job Id"),
4649
width: 150
4750
},
4851
SOLVER: {
@@ -55,31 +58,37 @@ qx.Class.define("osparc.jobs.JobsTable", {
5558
id: "status",
5659
column: 2,
5760
label: qx.locale.Manager.tr("Status"),
58-
width: 150
61+
width: 160
5962
},
6063
PROGRESS: {
6164
id: "progress",
6265
column: 3,
6366
label: qx.locale.Manager.tr("Progress"),
64-
width: 100
67+
width: 80
6568
},
6669
SUBMIT: {
6770
id: "submit",
6871
column: 4,
6972
label: qx.locale.Manager.tr("Submitted"),
70-
width: 150
73+
width: 130
7174
},
7275
START: {
7376
id: "start",
7477
column: 5,
7578
label: qx.locale.Manager.tr("Started"),
76-
width: 150
79+
width: 130
7780
},
7881
INSTANCE: {
7982
id: "instance",
8083
column: 6,
8184
label: qx.locale.Manager.tr("Instance"),
82-
width: 150
85+
width: 100
86+
},
87+
INFO: {
88+
id: "info",
89+
column: 7,
90+
label: qx.locale.Manager.tr("Info"),
91+
width: 40
8392
},
8493
}
8594
}

services/static-webserver/client/source/class/osparc/jobs/JobsTableModel.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ qx.Class.define("osparc.jobs.JobsTableModel", {
8989
const options = {
9090
resolveWResponse: true
9191
};
92-
const jobsStore = osparc.store.Jobs.getInstance();
93-
jobsStore.fetchJobs(urlParams, options)
92+
osparc.store.Jobs.getInstance().fetchJobs(urlParams, options)
9493
.then(jobs => {
9594
this._onRowCountLoaded(jobs.length);
9695
})
@@ -114,8 +113,7 @@ qx.Class.define("osparc.jobs.JobsTableModel", {
114113
null,
115114
orderBy: JSON.stringify(this.getOrderBy())
116115
};
117-
const jobsStore = osparc.store.Jobs.getInstance();
118-
jobsStore.fetchJobs(urlParams)
116+
return osparc.store.Jobs.getInstance().fetchJobs(urlParams)
119117
.then(jobs => {
120118
const data = [];
121119
const jobsCols = osparc.jobs.JobsTable.COLS;
@@ -124,10 +122,11 @@ qx.Class.define("osparc.jobs.JobsTableModel", {
124122
[jobsCols.JOB_ID.id]: job.getJobId(),
125123
[jobsCols.SOLVER.id]: job.getSolver(),
126124
[jobsCols.STATUS.id]: job.getStatus(),
127-
[jobsCols.PROGRESS.id]: job.getProgress(),
128-
[jobsCols.SUBMIT.id]: job.getSubmittedAt(),
129-
[jobsCols.START.id]: job.getStartedAt(),
125+
[jobsCols.PROGRESS.id]: job.getProgress() ? (job.getProgress() + "%") : "-",
126+
[jobsCols.SUBMIT.id]: job.getSubmittedAt() ? osparc.utils.Utils.formatDateAndTime(job.getSubmittedAt()) : "-",
127+
[jobsCols.START.id]: job.getStartedAt() ? osparc.utils.Utils.formatDateAndTime(job.getStartedAt()) : "-",
130128
[jobsCols.INSTANCE.id]: job.getInstance(),
129+
[jobsCols.INFO.id]: "@FontAwesome5Solid/copy/14",
131130
});
132131
});
133132
return data;
@@ -151,7 +150,9 @@ qx.Class.define("osparc.jobs.JobsTableModel", {
151150
.finally(() => this.setIsFetching(false));
152151
} else {
153152
getFetchPromise(firstRow, reqLimit)
154-
.then(data => this._onRowDataLoaded(data))
153+
.then(data => {
154+
this._onRowDataLoaded(data);
155+
})
155156
.catch(err => {
156157
console.error(err)
157158
this._onRowDataLoaded(null);

0 commit comments

Comments
 (0)