Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
dc77030
intro
matusdrobuliak66 Apr 16, 2025
d47f6a6
revert
matusdrobuliak66 Apr 16, 2025
756b22a
fix test in director-v2
matusdrobuliak66 Apr 16, 2025
8b51296
fix
matusdrobuliak66 Apr 16, 2025
b13813c
fix
matusdrobuliak66 Apr 16, 2025
d7ece07
adding tests:
matusdrobuliak66 Apr 16, 2025
f82840e
Merge branch 'master' into add-listing-of-comp-runs
matusdrobuliak66 Apr 17, 2025
5eea03a
adding tests
matusdrobuliak66 Apr 17, 2025
840462a
adding tests to webserver
matusdrobuliak66 Apr 17, 2025
b2dc367
Merge branch 'master' into add-listing-of-comp-runs
matusdrobuliak66 Apr 17, 2025
b739492
remove comment
matusdrobuliak66 Apr 17, 2025
ee472d8
small cleanup
matusdrobuliak66 Apr 17, 2025
72f289e
add db indexes
matusdrobuliak66 Apr 17, 2025
243c5dc
fix
matusdrobuliak66 Apr 17, 2025
726df98
resources
odeimaiz Apr 17, 2025
fb2a8d1
update open api specs
matusdrobuliak66 Apr 17, 2025
d786c64
review @pcrespov
matusdrobuliak66 Apr 17, 2025
f552f42
fix
matusdrobuliak66 Apr 17, 2025
9a33acb
Merge branch 'add-listing-of-comp-runs' of github.com:matusdrobuliak6…
odeimaiz Apr 21, 2025
a9fb226
new model
odeimaiz Apr 21, 2025
bb5afbe
list working
odeimaiz Apr 21, 2025
95cfd6b
complete list
odeimaiz Apr 21, 2025
f024910
order_by
odeimaiz Apr 21, 2025
930cc96
get tasks
odeimaiz Apr 21, 2025
7ebbe4b
col.sortable
odeimaiz Apr 21, 2025
2e85a83
Sub tasks
odeimaiz Apr 21, 2025
ad97f27
all info exposed
odeimaiz Apr 21, 2025
7b26568
minors
odeimaiz Apr 21, 2025
a565c4a
change icon
odeimaiz Apr 21, 2025
9ea0290
not needed
odeimaiz Apr 21, 2025
93bb5ef
Merge branch 'master' into add-listing-of-comp-runs
matusdrobuliak66 Apr 22, 2025
cddeda5
Merge branch 'master' into add-listing-of-comp-runs
matusdrobuliak66 Apr 22, 2025
59cad66
Merge branch 'master' into feature/connect-jobs
odeimaiz Apr 22, 2025
e790a3c
Merge branch 'master' into feature/connect-jobs
odeimaiz Apr 22, 2025
9e58ce3
review @sanderegg
matusdrobuliak66 Apr 22, 2025
d9ce804
Merge branch 'master' into add-listing-of-comp-runs
matusdrobuliak66 Apr 22, 2025
871f262
update open api specs
matusdrobuliak66 Apr 22, 2025
8db4e63
update open api specs
matusdrobuliak66 Apr 22, 2025
0ddce71
Merge branch 'master' into add-listing-of-comp-runs
matusdrobuliak66 Apr 22, 2025
cfc7164
Merge branch 'master' into add-listing-of-comp-runs
matusdrobuliak66 Apr 22, 2025
5f964b4
Merge branch 'add-listing-of-comp-runs' of github.com:matusdrobuliak6…
odeimaiz Apr 22, 2025
6d339b5
Jobs -> Runs
odeimaiz Apr 22, 2025
1a468f6
more renaming
odeimaiz Apr 22, 2025
c6ad9a0
Stack like
odeimaiz Apr 22, 2025
7a1738b
[skip ci] minor
odeimaiz Apr 22, 2025
4cbd2d0
workflow running
odeimaiz Apr 22, 2025
33d0175
Merge branch 'master' into feature/connect-jobs
odeimaiz Apr 23, 2025
8348317
Merge branch 'master' into feature/connect-jobs
odeimaiz Apr 23, 2025
fb38a64
minor
odeimaiz Apr 23, 2025
49ea719
[skip ci] minor
odeimaiz Apr 23, 2025
56be07c
minor
odeimaiz Apr 23, 2025
24556c9
open on click
odeimaiz Apr 23, 2025
a36e765
updateSubTask
odeimaiz Apr 23, 2025
7140857
reloadRuns
odeimaiz Apr 23, 2025
2081ecb
stopInterval
odeimaiz Apr 23, 2025
e812e29
stopIntervals
odeimaiz Apr 23, 2025
92f3087
iconPathRun
odeimaiz Apr 23, 2025
82b9f2f
minor
odeimaiz Apr 23, 2025
bb90350
Merge branch 'master' into feature/connect-jobs
odeimaiz Apr 23, 2025
eb953b7
Merge branch 'master' into feature/connect-jobs
mergify[bot] Apr 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 51 additions & 19 deletions services/static-webserver/client/source/class/osparc/data/Job.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,40 @@ qx.Class.define("osparc.data.Job", {
this.base(arguments);

this.set({
jobId: jobData["job_id"],
solver: jobData["solver"],
status: jobData["status"],
progress: jobData["progress"],
submittedAt: jobData["submitted_at"] ? new Date(jobData["submitted_at"]) : null,
startedAt: jobData["started_at"] ? new Date(jobData["started_at"]) : null,
instance: jobData["instance"],
projectUuid: jobData["projectUuid"],
state: jobData["state"],
submittedAt: jobData["submittedAt"] ? new Date(jobData["submittedAt"]) : null,
startedAt: jobData["startedAt"] ? new Date(jobData["startedAt"]) : null,
endedAt: jobData["endedAt"] ? new Date(jobData["endedAt"]) : null,
info: jobData["info"] || null,
});

if (jobData["info"] && jobData["info"]["project_name"]) {
this.setProjectName(jobData["info"]["project_name"]);
}

this.__subJobs = [];
},

properties: {
jobId: {
projectUuid: {
check: "String",
nullable: false,
init: null,
},

solver: {
projectName: {
check: "String",
nullable: false,
init: null,
},

status: {
state: {
check: "String",
nullable: false,
init: null,
},

progress: {
check: "Number",
init: null,
nullable: true,
},

submittedAt: {
check: "Date",
init: null,
Expand All @@ -69,10 +68,10 @@ qx.Class.define("osparc.data.Job", {
nullable: true,
},

instance: {
check: "String",
nullable: false,
endedAt: {
check: "Date",
init: null,
nullable: true,
},

info: {
Expand All @@ -81,4 +80,37 @@ qx.Class.define("osparc.data.Job", {
init: null,
},
},

members: {
__subJobs: null,

addSubJob: function(subJobData) {
const subJobFound = this.__subJobs.find(subJb => subJb.getNodeId() === subJobData["nodeId"]);
if (subJobFound) {
subJobFound.updateSubJob(subJobData);
return subJobFound;
}

const subJob = new osparc.data.SubJob(subJobData);
this.__subJobs.push(subJob);
return subJob;
},

updateJob: function(jobData) {
this.set({
state: jobData["state"],
submittedAt: jobData["submittedAt"] ? new Date(jobData["submittedAt"]) : null,
startedAt: jobData["startedAt"] ? new Date(jobData["startedAt"]) : null,
endedAt: jobData["endedAt"] ? new Date(jobData["endedAt"]) : null,
});
},

getSubJobs: function() {
return this.__subJobs;
},

getSubJob: function(nodeId) {
return this.__subJobs.find(subJb => subJb.getNodeId() === nodeId);
},
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,25 @@ qx.Class.define("osparc.data.Resources", {
}
}
},
"jobs": {
useCache: false, // handled in osparc.store.Jobs
endpoints: {
getPage: {
method: "GET",
// url: statics.API + "/computations/-/iterations/latest?offset={offset}&limit={limit}&order_by={orderBy}"
url: statics.API + "/computations/-/iterations/latest?offset={offset}&limit={limit}&order_by=%7B%22field%22:%22submitted_at%22,%22direction%22:%22desc%22%7D"
},
}
},
"subJobs": {
useCache: false, // handled in osparc.store.Jobs
endpoints: {
getPage: {
method: "GET",
url: statics.API + "/computations/{studyId}/iterations/latest/tasks?offset={offset}&limit={limit}"
},
}
},
"folders": {
useCache: true,
idField: "uuid",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/* ************************************************************************

osparc - the simcore frontend

https://osparc.io

Copyright:
2025 IT'IS Foundation, https://itis.swiss

License:
MIT: https://opensource.org/licenses/MIT

Authors:
* Odei Maiz (odeimaiz)

************************************************************************ */

qx.Class.define("osparc.data.SubJob", {
extend: qx.core.Object,

construct: function(subJobData) {
this.base(arguments);

this.set({
projectUuid: subJobData["projectUuid"],
nodeId: subJobData["nodeId"],
nodeName: subJobData["nodeId"],
state: subJobData["state"],
progress: subJobData["progress"],
startedAt: subJobData["startedAt"] ? new Date(subJobData["startedAt"]) : null,
endedAt: subJobData["endedAt"] ? new Date(subJobData["endedAt"]) : null,
image: subJobData["image"] || {},
});
},

properties: {
projectUuid: {
check: "String",
nullable: false,
init: null,
},

nodeId: {
check: "String",
nullable: false,
init: null,
},

nodeName: {
check: "String",
nullable: false,
init: null,
},

state: {
check: "String",
nullable: true,
init: null,
},

progress: {
check: "Number",
nullable: true,
init: null,
},

startedAt: {
check: "Date",
init: null,
nullable: true,
},

endedAt: {
check: "Date",
init: null,
nullable: true,
},

image: {
check: "Object",
nullable: false,
init: null,
},
},

members: {
updateSubJob: function(subJobData) {
this.set({
state: subJobData["state"],
progress: subJobData["progress"],
startedAt: subJobData["startedAt"] ? new Date(subJobData["startedAt"]) : null,
endedAt: subJobData["endedAt"] ? new Date(subJobData["endedAt"]) : null,
});
},
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@
************************************************************************ */


qx.Class.define("osparc.jobs.JobInfo", {
qx.Class.define("osparc.jobs.Info", {
extend: qx.ui.core.Widget,

construct(jobId) {
construct(info) {
this.base(arguments);

this._setLayout(new qx.ui.layout.VBox());

const jobInfoViewer = this.getChildControl("job-info-viewer");
osparc.store.Jobs.getInstance().fetchJobInfo(jobId)
.then(info => {
jobInfoViewer.setJson(info);
});
jobInfoViewer.setJson(info);
},

statics: {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ qx.Class.define("osparc.jobs.JobsButton", {
alignX: "center",
cursor: "pointer",
visibility: "excluded",
toolTipText: this.tr("Jobs and Clusters"),
toolTipText: this.tr("Runs and Clusters"),
});

this.addListener("tap", () => osparc.jobs.RunsWindow.openWindow(), this);

const jobsStore = osparc.store.Jobs.getInstance();
jobsStore.addListener("changeJobs", e => this.__updateJobsButton(), this);
this.addListener("tap", () => osparc.jobs.JobsAndClusters.popUpInWindow(), this);
},

members: {
_createChildControlImpl: function(id) {
let control;
switch (id) {
case "icon": {
control = new qx.ui.basic.Image("@FontAwesome5Solid/cog/22");
osparc.utils.Utils.addClass(control.getContentElement(), "rotateSlow");
control = new qx.ui.basic.Image("@FontAwesome5Solid/tasks/22");

const logoContainer = new qx.ui.container.Composite(new qx.ui.layout.HBox().set({
alignY: "middle"
Expand Down Expand Up @@ -76,7 +76,7 @@ qx.Class.define("osparc.jobs.JobsButton", {
const number = this.getChildControl("number");

const jobsStore = osparc.store.Jobs.getInstance();
const nJobs = jobsStore.getJobs().length;
const nJobs = jobsStore.getJobs().length > 20 ? "20+" : jobsStore.getJobs().length;
number.setValue(nJobs.toString());
nJobs ? this.show() : this.exclude();
},
Expand Down
Loading
Loading