-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
349 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 0 additions & 88 deletions
88
services/static-webserver/client/source/class/osparc/desktop/preferences/pages/TesterPage.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
services/static-webserver/client/source/class/osparc/tester/Statics.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* ************************************************************************ | ||
osparc - the simcore frontend | ||
https://osparc.io | ||
Copyright: | ||
2024 IT'IS Foundation, https://itis.swiss | ||
License: | ||
MIT: https://opensource.org/licenses/MIT | ||
Authors: | ||
* Odei Maiz (odeimaiz) | ||
************************************************************************ */ | ||
|
||
qx.Class.define("osparc.tester.Statics", { | ||
extend: osparc.po.BaseView, | ||
|
||
members: { | ||
_createChildControlImpl: function(id) { | ||
let control; | ||
switch (id) { | ||
case "statics-container": | ||
control = osparc.ui.window.TabbedView.createSectionBox(this.tr("Statics")); | ||
this._add(control, { | ||
flex: 1 | ||
}); | ||
break; | ||
case "statics-content": { | ||
const statics = osparc.store.Store.getInstance().get("statics"); | ||
const form = new qx.ui.form.Form(); | ||
for (let [key, value] of Object.entries(statics)) { | ||
const textField = new qx.ui.form.TextField().set({ | ||
value: typeof value === "object" ? JSON.stringify(value) : value.toString(), | ||
readOnly: true | ||
}); | ||
form.add(textField, key, null, key); | ||
} | ||
const renderer = new qx.ui.form.renderer.Single(form); | ||
control = new qx.ui.container.Scroll(renderer); | ||
this.getChildControl("statics-container").add(control); | ||
break; | ||
} | ||
case "local-storage-container": | ||
control = osparc.ui.window.TabbedView.createSectionBox(this.tr("Local Storage")); | ||
this._add(control); | ||
break; | ||
case "local-storage-content": { | ||
const items = { | ||
...window.localStorage | ||
}; | ||
const form = new qx.ui.form.Form(); | ||
for (let [key, value] of Object.entries(items)) { | ||
const textField = new qx.ui.form.TextField().set({ | ||
value: typeof value === "object" ? JSON.stringify(value) : value.toString(), | ||
readOnly: true | ||
}); | ||
form.add(textField, key, null, key); | ||
} | ||
control = new qx.ui.form.renderer.Single(form); | ||
this.getChildControl("local-storage-container").add(control); | ||
break; | ||
} | ||
} | ||
return control || this.base(arguments, id); | ||
}, | ||
|
||
_buildLayout: function() { | ||
this.getChildControl("statics-content"); | ||
this.getChildControl("local-storage-content"); | ||
}, | ||
} | ||
}); |
48 changes: 48 additions & 0 deletions
48
services/static-webserver/client/source/class/osparc/tester/TesterCenter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* ************************************************************************ | ||
osparc - the simcore frontend | ||
https://osparc.io | ||
Copyright: | ||
2024 IT'IS Foundation, https://itis.swiss | ||
License: | ||
MIT: https://opensource.org/licenses/MIT | ||
Authors: | ||
* Odei Maiz (odeimaiz) | ||
************************************************************************ */ | ||
|
||
qx.Class.define("osparc.tester.TesterCenter", { | ||
extend: osparc.ui.window.TabbedView, | ||
|
||
construct: function() { | ||
this.base(arguments); | ||
|
||
const miniProfile = osparc.desktop.account.MyAccount.createMiniProfileView().set({ | ||
paddingRight: 10 | ||
}); | ||
this.addWidgetOnTopOfTheTabs(miniProfile); | ||
|
||
this.__addSocketMessagesPage(); | ||
this.__addStaticsPage(); | ||
}, | ||
|
||
members: { | ||
__addSocketMessagesPage: function() { | ||
const title = this.tr("Socket Messages"); | ||
const iconSrc = "@FontAwesome5Solid/exchange-alt/22"; | ||
const maintenance = new osparc.tester.WebSocketMessages(); | ||
this.addTab(title, iconSrc, maintenance); | ||
}, | ||
|
||
__addStaticsPage: function() { | ||
const title = this.tr("Statics"); | ||
const iconSrc = "@FontAwesome5Solid/wrench/22"; | ||
const maintenance = new osparc.tester.Statics(); | ||
this.addTab(title, iconSrc, maintenance); | ||
}, | ||
} | ||
}); |
43 changes: 43 additions & 0 deletions
43
services/static-webserver/client/source/class/osparc/tester/TesterCenterWindow.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* ************************************************************************ | ||
osparc - the simcore frontend | ||
https://osparc.io | ||
Copyright: | ||
2024 IT'IS Foundation, https://itis.swiss | ||
License: | ||
MIT: https://opensource.org/licenses/MIT | ||
Authors: | ||
* Odei Maiz (odeimaiz) | ||
************************************************************************ */ | ||
|
||
qx.Class.define("osparc.tester.TesterCenterWindow", { | ||
extend: osparc.ui.window.TabbedWindow, | ||
|
||
construct: function() { | ||
this.base(arguments, "tester-center", this.tr("Tester Center")); | ||
|
||
const width = 800; | ||
const maxHeight = 800; | ||
this.set({ | ||
width, | ||
maxHeight, | ||
}); | ||
|
||
const testerCenter = new osparc.tester.TesterCenter(); | ||
this._setTabbedView(testerCenter); | ||
}, | ||
|
||
statics: { | ||
openWindow: function() { | ||
const accountWindow = new osparc.tester.TesterCenterWindow(); | ||
accountWindow.center(); | ||
accountWindow.open(); | ||
return accountWindow; | ||
} | ||
} | ||
}); |
Oops, something went wrong.