Skip to content

Commit 4dc863c

Browse files
committed
manual reload of runs
1 parent b1a14b6 commit 4dc863c

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ qx.Class.define("osparc.jobs.ActivityCenterWindow", {
7272
});
7373

7474
this.addListener("close", () => {
75-
runsBrowser.stopInterval();
7675
subRunsBrowser.stopInterval();
7776
});
7877
},

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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(); // @matusdrobuliak66: 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
})

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ qx.Class.define("osparc.jobs.RunsTableModel", {
119119
_loadRowData(firstRow, qxLastRow) {
120120
this.setIsFetching(true);
121121

122+
qxLastRow = osparc.store.Jobs; // Default to 2 rows for testing purposes
122123
const lastRow = Math.min(qxLastRow, this._rowCount - 1);
123124
// Returns a request promise with given offset and limit
124125
const getFetchPromise = (offset, limit) => {

services/static-webserver/client/source/class/osparc/store/Jobs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ qx.Class.define("osparc.store.Jobs", {
3333
},
3434

3535
statics: {
36-
SERVER_MAX_LIMIT: 49,
36+
SERVER_MAX_LIMIT: 2, // Default to 2 rows for testing purposes
3737
},
3838

3939
members: {

0 commit comments

Comments
 (0)