Skip to content

Commit 29746ef

Browse files
authored
✨ S4L Lite: 11.08 meeting feedback (⚠️ devops) (ITISFoundation#3534)
1 parent 767860c commit 29746ef

File tree

27 files changed

+155
-89
lines changed

27 files changed

+155
-89
lines changed

services/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ services:
170170
- traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.interval=2000ms
171171
- traefik.http.services.${SWARM_STACK_NAME}_static_webserver.loadbalancer.healthcheck.timeout=1000ms
172172
- traefik.http.middlewares.${SWARM_STACK_NAME}_static_webserver_retry.retry.attempts=2
173-
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=hostregexp(`{host:.+}`) && (Path(`/osparc`,`/s4l`,`/s4llight`,`/tis`,`/transpiled`,`/resource`) || PathPrefix(`/osparc/`,`/s4l/`,`/s4llight/`,`/tis/`,`/transpiled/`,`/resource/`))
173+
- 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/`))
174174
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.service=${SWARM_STACK_NAME}_static_webserver
175175
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.entrypoints=http
176176
- 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, s4llight)
9+
- `/` resolves to one of the three index.html pages inside the 4 products (osparc, tis, s4l, s4llite)
1010
- `/static-frontend-data.json` contains information required by the fronted

services/static-webserver/client/compile.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@
5353
{
5454
"class": "osparc.Application",
5555
"theme": "osparc.theme.zmt.ThemeDark",
56-
"name": "s4llight",
57-
"title": "Sim4Life Light - ZMT",
56+
"name": "s4llite",
57+
"title": "Sim4Life Lite - ZMT",
5858
"include": [
5959
"iconfont.material.Load",
6060
"iconfont.fontawesome5.Load",
6161
"osparc.theme.zmt.ThemeLight"
6262
],
6363
"environment": {
64-
"product.name": "s4llight"
64+
"product.name": "s4llite"
6565
},
6666
"bootPath": "source/boot"
6767
},

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ qx.Class.define("osparc.Application", {
280280
if (!osparc.CookiePolicy.areCookiesAccepted()) {
281281
const cookiePolicy = new osparc.CookiePolicy();
282282
const title = this.tr("Cookie Policy");
283-
const height = osparc.utils.Utils.isProduct("tis") ? 180 : 145;
283+
// "tis" and "s4llite" include the license agreement
284+
const height = (osparc.utils.Utils.isProduct("tis") || osparc.utils.Utils.isProduct("s4llite")) ? 180 : 145;
284285
const win = osparc.ui.window.Window.popUpInWindow(cookiePolicy, title, 400, height).set({
285286
clickAwayClose: false,
286287
resizable: false,
@@ -328,7 +329,7 @@ qx.Class.define("osparc.Application", {
328329
let view = null;
329330
switch (qx.core.Environment.get("product.name")) {
330331
case "s4l":
331-
case "s4llight":
332+
case "s4llite":
332333
view = new osparc.auth.LoginPageS4L();
333334
this.__loadView(view);
334335
break;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ qx.Class.define("osparc.CookiePolicy", {
136136
const acceptCookie = this.getChildControl("accept-cookie");
137137
checkButtons.push(acceptCookie);
138138

139-
if (osparc.utils.Utils.isProduct("tis")) {
139+
if (osparc.utils.Utils.isProduct("tis") || osparc.utils.Utils.isProduct("s4llite")) {
140140
this.getChildControl("license-text");
141141
const acceptLicense = this.getChildControl("accept-license");
142142
checkButtons.push(acceptLicense);

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,20 @@ qx.Class.define("osparc.auth.LoginPage", {
198198
versionLink.setValue(text);
199199
});
200200

201-
const organizationLink = new osparc.ui.basic.LinkLabel(${new Date().getFullYear()} IT'IS Foundation`, "https://itis.swiss").set({
201+
const organizationLink = new osparc.ui.basic.LinkLabel().set({
202202
textColor: "text-darker"
203203
});
204+
if (osparc.utils.Utils.isProduct("s4l") || osparc.utils.Utils.isProduct("s4llite")) {
205+
organizationLink.set({
206+
value: ${new Date().getFullYear()} Zurich MedTech`,
207+
url: "https://zmt.swiss"
208+
});
209+
} else {
210+
organizationLink.set({
211+
value: ${new Date().getFullYear()} IT'IS Foundation`,
212+
url: "https://itis.swiss"
213+
});
214+
}
204215
versionLinkLayout.add(organizationLink);
205216

206217
if (osparc.utils.Utils.isProduct("tis")) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ qx.Class.define("osparc.auth.LoginPageS4L", {
4444

4545
this.setBackgroundColor("#025887");
4646
this.getContentElement().setStyles({
47-
"background-image": osparc.utils.Utils.isProduct("s4llight") ? "url(resource/osparc/s4l-light_splitimage.png)" : "url(resource/osparc/s4l_splitimage.jpeg)",
47+
"background-image": osparc.utils.Utils.isProduct("s4llite") ? "url(resource/osparc/s4llite_splitimage.png)" : "url(resource/osparc/s4l_splitimage.jpeg)",
4848
"background-repeat": "no-repeat",
4949
"background-size": "auto 100%"
5050
});

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,25 +89,25 @@ qx.Class.define("osparc.dashboard.Dashboard", {
8989
const permissions = osparc.data.Permissions.getInstance();
9090
const tabs = [{
9191
id: "studiesTabBtn",
92-
label: osparc.utils.Utils.isProduct("s4llight") ? this.tr("PROJECTS") : this.tr("STUDIES"),
92+
label: osparc.utils.Utils.isProduct("s4llite") ? this.tr("PROJECTS") : this.tr("STUDIES"),
9393
buildLayout: this.__createStudyBrowser
9494
}];
9595
if (permissions.canDo("dashboard.templates.read")) {
9696
const templatesTab = {
9797
id: "templatesTabBtn",
98-
label: osparc.utils.Utils.isProduct("s4llight") ? this.tr("TUTORIALS") : this.tr("TEMPLATES"),
98+
label: osparc.utils.Utils.isProduct("s4llite") ? this.tr("TUTORIALS") : this.tr("TEMPLATES"),
9999
buildLayout: this.__createTemplateBrowser
100100
};
101101
tabs.push(templatesTab);
102102
}
103-
if (!osparc.utils.Utils.isProduct("s4llight") && permissions.canDo("dashboard.services.read")) {
103+
if (!osparc.utils.Utils.isProduct("s4llite") && permissions.canDo("dashboard.services.read")) {
104104
tabs.push({
105105
id: "servicesTabBtn",
106106
label: this.tr("SERVICES"),
107107
buildLayout: this.__createServiceBrowser
108108
});
109109
}
110-
if (!osparc.utils.Utils.isProduct("s4llight")) {
110+
if (!osparc.utils.Utils.isProduct("s4llite")) {
111111
tabs.push({
112112
id: "dataTabBtn",
113113
label: this.tr("DATA"),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
153153
this.__addNewPlanButton(mode);
154154
} else if (osparc.utils.Utils.isProduct("s4l")) {
155155
this.__addNewS4LServiceButtons(mode);
156-
} else if (osparc.utils.Utils.isProduct("s4llight")) {
156+
} else if (osparc.utils.Utils.isProduct("s4llite")) {
157157
this.__removeNewStudyButtons();
158-
this.__addNewS4LLightServiceButtons(mode);
158+
this.__addNewS4LLiteServiceButtons(mode);
159159
}
160160
},
161161

@@ -230,7 +230,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
230230
});
231231
},
232232

233-
__addNewS4LLightServiceButtons: function(mode) {
233+
__addNewS4LLiteServiceButtons: function(mode) {
234234
const store = osparc.store.Store.getInstance();
235235
store.getServicesOnly(false)
236236
.then(services => {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ qx.Class.define("osparc.data.model.Node", {
999999
},
10001000

10011001
__initLoadingPage: function() {
1002-
const showZoomMaximizeButton = !osparc.utils.Utils.isProduct("s4llight");
1002+
const showZoomMaximizeButton = !osparc.utils.Utils.isProduct("s4llite");
10031003
const loadingPage = new osparc.ui.message.Loading(this.__getLoadingPageHeader(), this.__getExtraMessages(), showZoomMaximizeButton);
10041004
this.addListener("changeLabel", () => loadingPage.setHeader(this.__getLoadingPageHeader()), this);
10051005
this.getStatus().addListener("changeInteractive", () => {
@@ -1026,7 +1026,7 @@ qx.Class.define("osparc.data.model.Node", {
10261026
this.__initLoadingPage();
10271027

10281028
const iframe = new osparc.component.widget.PersistentIframe();
1029-
if (osparc.utils.Utils.isProduct("s4llight")) {
1029+
if (osparc.utils.Utils.isProduct("s4llite")) {
10301030
iframe.setShowZoomButton(false);
10311031
}
10321032
iframe.addListener("restart", () => this.__restartIFrame(), this);

0 commit comments

Comments
 (0)