Skip to content

Commit e5d24f2

Browse files
committed
showing also nodesInStudy
1 parent 1c49681 commit e5d24f2

File tree

7 files changed

+34
-11
lines changed

7 files changed

+34
-11
lines changed

services/web/client/source/class/osparc/component/node/BaseNodeView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ qx.Class.define("osparc.component.node.BaseNodeView", {
180180
},
181181

182182
__openServiceDetails: function() {
183-
const serviceDetails = new osparc.servicecard.Large(this.getNode().getMetaData(), this.getNode().getNodeId());
183+
const serviceDetails = new osparc.servicecard.Large(this.getNode().getMetaData(), this.getNode().getNodeId(), this.getStudy());
184184
const title = this.tr("Service information");
185185
const width = 600;
186186
const height = 700;

services/web/client/source/class/osparc/component/widget/NodesTree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ qx.Class.define("osparc.component.widget.NodesTree", {
244244
osparc.ui.window.Window.popUpInWindow(studyDetails, title, width, height);
245245
} else {
246246
const node = study.getWorkbench().getNode(nodeId);
247-
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), nodeId);
247+
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), nodeId, study);
248248
const title = this.tr("Service information");
249249
const width = 600;
250250
const height = 700;

services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", {
16451645
__openNodeInfo: function(nodeId) {
16461646
if (nodeId) {
16471647
const node = this.getStudy().getWorkbench().getNode(nodeId);
1648-
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), nodeId);
1648+
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), nodeId, this.getStudy());
16491649
const title = this.tr("Service information");
16501650
const width = 600;
16511651
const height = 700;

services/web/client/source/class/osparc/dashboard/ResourceMoreOptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ qx.Class.define("osparc.dashboard.ResourceMoreOptions", {
200200
const title = this.tr("Information");
201201
const icon = "@FontAwesome5Solid/info";
202202
const resourceData = this.__resourceData;
203-
const infoCard = osparc.utils.Resources.isService(resourceData) ? new osparc.servicecard.Large(resourceData, null, false) : new osparc.studycard.Large(resourceData, false);
203+
const infoCard = osparc.utils.Resources.isService(resourceData) ? new osparc.servicecard.Large(resourceData, null, null, false) : new osparc.studycard.Large(resourceData, false);
204204
infoCard.addListener("openAccessRights", () => this.openAccessRights());
205205
infoCard.addListener("openClassifiers", () => this.openClassfiers());
206206
infoCard.addListener("openQuality", () => this.openQuality());

services/web/client/source/class/osparc/data/Resources.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,6 @@ qx.Class.define("osparc.data.Resources", {
142142
method: "DELETE",
143143
url: statics.API + "/projects/{studyId}/nodes/{nodeId}"
144144
},
145-
getNodeResources: {
146-
useCache: false,
147-
method: "GET",
148-
url: statics.API + "/projects/{studyId}/nodes/{nodeId}/resources"
149-
},
150145
addTag: {
151146
useCache: false,
152147
method: "PUT",
@@ -159,6 +154,20 @@ qx.Class.define("osparc.data.Resources", {
159154
}
160155
}
161156
},
157+
/*
158+
* NODES
159+
*/
160+
"nodesInStudy": {
161+
idField: "nodeId",
162+
useCache: false,
163+
endpoints: {
164+
getResources: {
165+
useCache: false,
166+
method: "GET",
167+
url: statics.API + "/projects/{studyId}/nodes/{nodeId}/resources"
168+
}
169+
}
170+
},
162171
/*
163172
* SNAPSHOTS
164173
*/

services/web/client/source/class/osparc/servicecard/Large.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ qx.Class.define("osparc.servicecard.Large", {
2424
* @param instanceUuid {String} uuid of the service instance
2525
* @param openOptions {Boolean} open edit options in new window or fire event
2626
*/
27-
construct: function(serviceData, instanceUuid = null, openOptions = true) {
27+
construct: function(serviceData, instanceUuid = null, study = null, openOptions = true) {
2828
this.base(arguments);
2929

3030
this.set({
@@ -39,6 +39,10 @@ qx.Class.define("osparc.servicecard.Large", {
3939
this.setInstanceUuid(instanceUuid);
4040
}
4141

42+
if (study) {
43+
this.setStudy(study);
44+
}
45+
4246
if (openOptions !== undefined) {
4347
this.setOpenOptions(openOptions);
4448
}
@@ -72,6 +76,12 @@ qx.Class.define("osparc.servicecard.Large", {
7276
nullable: true
7377
},
7478

79+
study: {
80+
check: "osparc.data.model.Study",
81+
init: null,
82+
nullable: true
83+
},
84+
7585
openOptions: {
7686
check: "Boolean",
7787
init: true,
@@ -296,7 +306,7 @@ qx.Class.define("osparc.servicecard.Large", {
296306
nodeId: this.getInstanceUuid()
297307
}
298308
};
299-
promise = osparc.data.Resources.fetch("studies", "getNodeResources", params);
309+
promise = osparc.data.Resources.fetch("nodesInStudy", "getResources", params);
300310
} else {
301311
const params = {
302312
url: osparc.data.Resources.getServiceUrl(

services/web/client/source/class/osparc/store/Store.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ qx.Class.define("osparc.store.Store", {
6262
check: "Array",
6363
init: []
6464
},
65+
nodesInStudy: {
66+
check: "Array",
67+
init: []
68+
},
6569
snapshots: {
6670
check: "Array",
6771
init: [],

0 commit comments

Comments
 (0)