Skip to content

Commit eb660be

Browse files
authored
Merge branch 'master' into is1752/sleepers-fail
2 parents ecfcbd8 + 86a6a6c commit eb660be

File tree

3 files changed

+68
-1
lines changed

3 files changed

+68
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ qx.Class.define("osparc.data.Permissions", {
165165
"user.organizations.create",
166166
"study.nodestree.uuid.read",
167167
"study.filestree.uuid.read",
168-
"study.logger.debug.read"
168+
"study.logger.debug.read",
169+
"statics.read"
169170
],
170171
"admin": []
171172
};

services/web/client/source/class/osparc/desktop/preferences/PreferencesWindow.js

+5
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ qx.Class.define("osparc.desktop.preferences.PreferencesWindow", {
7676
}
7777
});
7878

79+
if (osparc.data.Permissions.getInstance().canDo("statics.read")) {
80+
const testerPage = new osparc.desktop.preferences.pages.TesterPage();
81+
tabView.add(testerPage);
82+
}
83+
7984
this.add(tabView);
8085
}
8186
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/* ************************************************************************
2+
3+
osparc - the simcore frontend
4+
5+
https://osparc.io
6+
7+
Copyright:
8+
2020 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+
* Tester Misc in preferences dialog
20+
*/
21+
22+
qx.Class.define("osparc.desktop.preferences.pages.TesterPage", {
23+
extend: osparc.desktop.preferences.pages.BasePage,
24+
25+
construct: function() {
26+
const iconSrc = "@FontAwesome5Solid/user-md/24";
27+
const title = this.tr("Tester");
28+
this.base(arguments, title, iconSrc);
29+
30+
const staticsLayout = this.__createStaticsLayout();
31+
this.add(staticsLayout);
32+
},
33+
34+
members: {
35+
__createStaticsLayout: function() {
36+
// layout
37+
const box = this._createSectionBox("Statics settings");
38+
39+
const label = this._createHelpLabel(this.tr(
40+
"This is a list of the 'statics' resources"
41+
));
42+
box.add(label);
43+
44+
osparc.data.Resources.get("statics")
45+
.then(statics => {
46+
console.log("statics", statics);
47+
48+
const form = new qx.ui.form.Form();
49+
for (let [key, value] of Object.entries(statics)) {
50+
const textField = new qx.ui.form.TextField(value).set({
51+
readOnly: true
52+
});
53+
form.add(textField, key, null, key);
54+
}
55+
box.add(new qx.ui.form.renderer.Single(form));
56+
});
57+
58+
return box;
59+
}
60+
}
61+
});

0 commit comments

Comments
 (0)