Skip to content

Commit 23dad29

Browse files
authored
✨ Frontend: S4L-Academic (#4729)
1 parent e7018c7 commit 23dad29

File tree

23 files changed

+108
-23
lines changed

23 files changed

+108
-23
lines changed

services/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ services:
254254
- traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.interval=2000ms
255255
- traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.timeout=1000ms
256256
- traefik.http.middlewares.${SWARM_STACK_NAME}_static_webserver_retry.retry.attempts=2
257-
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+}`) && (Path(`/osparc`,`/s4l`,`/s4llite`,`/tis`,`/transpiled`,`/resource`) || PathPrefix(`/osparc/`,`/s4l/`,`/s4llite/`,`/tis/`,`/transpiled/`,`/resource/`))
257+
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+}`) && (Path(`/osparc`,`/s4l`,`/s4llite`,`/s4lacad`,`/tis`,`/transpiled`,`/resource`) || PathPrefix(`/osparc/`,`/s4l/`,`/s4llite/`,`/s4lacad/`,`/tis/`,`/transpiled/`,`/resource/`))
258258
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.service=${SWARM_STACK_NAME}_static_webserver
259259
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.entrypoints=http
260260
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.priority=2

services/static-webserver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ Used for static content serving.
66

77
In the future will fully serve all static content. Currently the `webserver` is still serving the following routes:
88

9-
- `/` resolves to one of the three index.html pages inside the 4 products (osparc, tis, s4l, s4llite)
9+
- `/` resolves to one of the three index.html pages inside the 4 products (osparc, tis, s4l, s4llite, s4lacad)
1010
- `/static-frontend-data.json` contains information required by the fronted

services/static-webserver/client/compile.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@
6868
"addTimestampsToUrls": true,
6969
"bootPath": "source/boot"
7070
},
71+
{
72+
"class": "osparc.Application",
73+
"theme": "osparc.theme.products.s4l.ThemeDark",
74+
"name": "s4lacad",
75+
"title": "S4L Academic",
76+
"include": [
77+
"iconfont.material.Load",
78+
"iconfont.fontawesome5.Load",
79+
"osparc.theme.products.s4l.ThemeLight"
80+
],
81+
"environment": {
82+
"product.name": "s4lacad"
83+
},
84+
"addTimestampsToUrls": true,
85+
"bootPath": "source/boot"
86+
},
7187
{
7288
"class": "osparc.Application",
7389
"theme": "osparc.theme.products.tis.ThemeDark",

services/static-webserver/client/source/class/osparc/Application.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ qx.Class.define("osparc.Application", {
342342
switch (qx.core.Environment.get("product.name")) {
343343
case "s4l":
344344
case "s4llite":
345+
case "s4lacad":
345346
if (landingPage) {
346347
view = new osparc.product.landingPage.s4llite.Page();
347348
view.addListener("loginPressed", () => {

services/static-webserver/client/source/class/osparc/auth/LoginPageS4L.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,20 @@ qx.Class.define("osparc.auth.LoginPageS4L", {
4343
this._setLayout(layout);
4444

4545
this.setBackgroundColor("#025887");
46+
let backgroundImage = "";
47+
switch (osparc.product.Utils.getProductName()) {
48+
case "s4llite":
49+
backgroundImage = "url(resource/osparc/s4llite_splitimage.png)";
50+
break;
51+
case "s4lacad":
52+
backgroundImage = "url(resource/osparc/s4lacad_splitimage.png)";
53+
break;
54+
default:
55+
backgroundImage = "url(resource/osparc/s4l_splitimage.jpeg)";
56+
break;
57+
}
4658
this.getContentElement().setStyles({
47-
"background-image": osparc.product.Utils.isProduct("s4llite") ? "url(resource/osparc/s4llite_splitimage.png)" : "url(resource/osparc/s4l_splitimage.jpeg)",
59+
"background-image": backgroundImage,
4860
"background-repeat": "no-repeat",
4961
"background-size": "auto 100%"
5062
});

services/static-webserver/client/source/class/osparc/auth/LoginPageTI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ qx.Class.define("osparc.auth.LoginPageTI", {
4343
this._setLayout(layout);
4444

4545
this.getContentElement().setStyles({
46-
"background-image": "url(resource/osparc/ti_splitimage.png)",
46+
"background-image": "url(resource/osparc/tip_splitimage.png)",
4747
"background-repeat": "no-repeat",
4848
"background-size": "contain"
4949
});

services/static-webserver/client/source/class/osparc/component/share/NewCollaboratorsManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ qx.Class.define("osparc.component.share.NewCollaboratorsManager", {
8787
} else {
8888
includeEveryone = osparc.data.Permissions.getInstance().canDo("study.everyone.share");
8989
}
90-
osparc.store.Store.getInstance().getPotentialCollaborators(includeEveryone)
90+
osparc.store.Store.getInstance().getPotentialCollaborators(false, includeEveryone)
9191
.then(potentialCollaborators => {
9292
this.__visibleCollaborators = potentialCollaborators;
9393
this.__addCollaborators();

services/static-webserver/client/source/class/osparc/dashboard/ResourceBrowserBase.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ qx.Class.define("osparc.dashboard.ResourceBrowserBase", {
208208
tagByGroup.addListener("execute", () => this._groupByChanged("tags"));
209209
groupByMenu.add(tagByGroup);
210210
groupOptions.add(tagByGroup);
211-
if (osparc.product.Utils.isProduct("s4l") || osparc.product.Utils.isProduct("s4llite")) {
211+
if (
212+
osparc.product.Utils.isProduct("s4l") ||
213+
osparc.product.Utils.isProduct("s4llite") ||
214+
osparc.product.Utils.isProduct("s4lacad")
215+
) {
212216
tagByGroup.execute();
213217
}
214218
}

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
447447
this.__addTIPPlusButtons();
448448
break;
449449
case "s4l":
450+
case "s4lacad":
450451
this.__addS4LPlusButtons();
451452
break;
452453
case "s4llite":

services/static-webserver/client/source/class/osparc/data/Permissions.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,16 @@ qx.Class.define("osparc.data.Permissions", {
140140
};
141141
let fromUserToTester = [];
142142
if (osparc.product.Utils.isProduct("tis")) {
143+
// "templates" and "services" tabs only for testers
144+
// start/stop/edit app mode only for testers
143145
fromUserToTester = [
144146
"dashboard.templates.read",
145147
"dashboard.services.read",
146148
"study.slides.edit",
147149
"study.slides.stop"
148150
];
149151
} else if (osparc.product.Utils.isProduct("s4llite")) {
152+
// "services" and "data" tabs only for testers
150153
fromUserToTester = [
151154
"dashboard.services.read",
152155
"dashboard.data.read"

0 commit comments

Comments
 (0)