Skip to content

Commit 4fd2e09

Browse files
committed
JobsAndClusters
1 parent 667c60f commit 4fd2e09

File tree

3 files changed

+62
-14
lines changed

3 files changed

+62
-14
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
19+
qx.Class.define("osparc.jobs.JobsAndClusters", {
20+
extend: qx.ui.tabview.TabView,
21+
22+
construct() {
23+
this.base(arguments);
24+
25+
this.set({
26+
contentPadding: 5,
27+
barPosition: "top",
28+
});
29+
30+
const jobsPage = new qx.ui.tabview.Page(this.tr("Jobs")).set({
31+
layout: new qx.ui.layout.VBox(10)
32+
});
33+
const jobsBrowser = new osparc.jobs.JobsBrowser();
34+
const scroller1 = new qx.ui.container.Scroll();
35+
scroller1.add(jobsBrowser);
36+
jobsPage.add(scroller1);
37+
this.add(jobsPage);
38+
39+
const clustersPage = new qx.ui.tabview.Page(this.tr("Clusters")).set({
40+
layout: new qx.ui.layout.VBox(10)
41+
});
42+
const clustersBrowser = new osparc.jobs.JobsBrowser();
43+
const scroller2 = new qx.ui.container.Scroll();
44+
scroller2.add(clustersBrowser);
45+
clustersPage.add(scroller2);
46+
this.add(clustersPage);
47+
},
48+
49+
statics: {
50+
popUpInWindow: function(jobsAndClusters) {
51+
if (!jobsAndClusters) {
52+
jobsAndClusters = new osparc.jobs.JobsAndClusters();
53+
}
54+
const title = qx.locale.Manager.tr("Jobs and Clusters");
55+
const win = osparc.ui.window.Window.popUpInWindow(jobsAndClusters, title, 1100, 500);
56+
win.open();
57+
return win;
58+
}
59+
},
60+
});

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,6 @@ qx.Class.define("osparc.jobs.JobsBrowser", {
3636
});
3737
},
3838

39-
statics: {
40-
popUpInWindow: function(jobsBrowser) {
41-
if (!jobsBrowser) {
42-
jobsBrowser = new osparc.jobs.JobsBrowser();
43-
}
44-
const title = qx.locale.Manager.tr("Jobs");
45-
const win = osparc.ui.window.Window.popUpInWindow(jobsBrowser, title, 1100, 500);
46-
win.open();
47-
return win;
48-
}
49-
},
50-
5139
members: {
5240
_createChildControlImpl: function(id) {
5341
let control;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ qx.Class.define("osparc.jobs.JobsButton", {
2828
alignX: "center",
2929
cursor: "pointer",
3030
visibility: "excluded",
31-
toolTipText: this.tr("Jobs"),
31+
toolTipText: this.tr("Jobs and Clusters"),
3232
});
3333

3434
const jobsStore = osparc.store.Jobs.getInstance();
3535
jobsStore.addListener("changeJobs", e => this.__updateJobsButton(), this);
36-
this.addListener("tap", () => osparc.jobs.JobsBrowser.popUpInWindow(), this);
36+
this.addListener("tap", () => osparc.jobs.JobsAndClusters.popUpInWindow(), this);
3737
},
3838

3939
members: {

0 commit comments

Comments
 (0)