Skip to content

Commit 4a70eae

Browse files
committed
JsonTreeViewer
1 parent afe3750 commit 4a70eae

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ qx.Class.define("osparc.jobs.Info", {
4242
let control;
4343
switch (id) {
4444
case "job-info-viewer": {
45-
control = new osparc.ui.basic.JsonTreeWidget();
45+
control = new osparc.ui.basic.JsonTreeViewer();
4646
const container = new qx.ui.container.Scroll();
4747
container.add(control);
4848
this._add(container);
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.ui.basic.JsonTreeViewer", {
20+
extend: qx.ui.core.Widget,
21+
22+
/**
23+
* @param data {Object} Json object to be displayed by JsonTreeViewer
24+
*/
25+
construct: function(data) {
26+
this.base(arguments);
27+
28+
this._setLayout(new qx.ui.layout.VBox());
29+
30+
if (data) {
31+
this.setJson(data);
32+
}
33+
},
34+
35+
members: {
36+
setJson(data) {
37+
osparc.wrapper.JsonTreeViewer.getInstance().print(data, this.getContentElement());
38+
},
39+
}
40+
});

0 commit comments

Comments
 (0)