Skip to content

Is730/serve studies #747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 60 commits into from
May 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
58fbf08
Using /me API to authenticate the user if he has a valid token.
ignapas Apr 29, 2019
7cd0a9d
Removed unusued method.
ignapas Apr 29, 2019
238b753
Code refactor and JSDoc added to validateToken function.
ignapas Apr 29, 2019
03821b1
Added browser environment variables to eslint to avoid errors when us…
ignapas Apr 29, 2019
b5db575
Make eslint happy.
ignapas Apr 29, 2019
901a154
Added routing.
ignapas Apr 29, 2019
3288e55
Small code refactor.
ignapas Apr 29, 2019
f3e28e1
Defined separated page (template) and view (widget) concepts. Done so…
ignapas Apr 29, 2019
f8b6cce
MainView -> LoginPage. LayoutManager -> MainPage.
ignapas Apr 29, 2019
d2e6f26
Redone secondary buttons in the login view.
ignapas Apr 29, 2019
3423e68
Secondary buttons in login view, restyled.
ignapas Apr 29, 2019
3c4896b
Typo crete -> create.
ignapas Apr 29, 2019
43a6b6d
Merge branch 'master' into is730/direct-link
ignapas Apr 30, 2019
6813188
Propagation of studyId possibly coming from the URL all down to Study…
ignapas Apr 30, 2019
f568c5f
Added some utils to create random users
May 3, 2019
9741da5
Doc
May 3, 2019
64bf833
WIP: First prototype of subsystem that adds a handler to share studie…
May 3, 2019
231c63f
Fix for client side generated URLs
ignapas May 3, 2019
5f101cd
Cleanup
May 5, 2019
81c2d60
Minor fixes and cleanup
May 5, 2019
f04e4dc
Adds utils for projects db
May 5, 2019
2fa3009
Anonymous user in test_access_to_studies pass
May 5, 2019
a1a8166
Cleanup pdbs
May 5, 2019
7273b76
Logged user tests pass
May 5, 2019
234222d
Activates subsystem in application
May 5, 2019
30c45fc
Merge branch 'master' into is730/direct-link
pcrespov May 5, 2019
50e0c43
Merge branch 'ignapas-is730/direct-link' into is730/serve-studies
May 5, 2019
946f528
Adds demo page
May 6, 2019
6ed1fa6
Pinned pip==19.0.3
May 6, 2019
e799d0e
updates vscode-template/settings.json
May 6, 2019
635d578
Workaround limitations
May 6, 2019
418d5ab
Merge branch 'master' into is730/direct-link
ignapas May 7, 2019
621eca8
Added beta routing from the URL's pathname.
ignapas May 7, 2019
346a507
updated pip~=19.1.1
May 7, 2019
edecef2
Fixes tests
May 7, 2019
9e64aaf
Merge branch 'ignapas-is730/direct-link' into is730/serve-studies
May 7, 2019
b2a592f
WIP: ongoing
May 8, 2019
44fb970
Merge branch 'master' into is730/direct-link
ignapas May 9, 2019
5075982
Make eslint happy.
ignapas May 9, 2019
49b5c10
Merge branch 'master' into is730/serve-studies
sanderegg May 9, 2019
310175d
Fixes replacement of ids. Tests run
May 9, 2019
701a2c7
Moved samples->sandbox
May 9, 2019
180cf7a
Merge branch 'is730/serve-studies' of github.com:pcrespov/osparc-simc…
May 9, 2019
d80b05c
Redirects to fragment with correct study id
May 9, 2019
aefc279
Merge branch 'master' into is730/serve-studies
May 9, 2019
7f12fe6
Forgot revert to correct fixture
May 9, 2019
3895c93
Merge branch 'master' into is730/serve-studies
May 9, 2019
e22923e
fix fixtures
May 9, 2019
b9e434f
Fixes linter
May 9, 2019
2fc729f
Qx reads url fragments
May 9, 2019
2e3e80a
SAN review: undo pip version freeze
May 9, 2019
31e898f
After reviews from SAN
May 9, 2019
bcd6739
Comments from SAN
May 9, 2019
7f798d8
Regex more strict
May 9, 2019
9b3024e
Merge branch 'master' into is730/direct-link
ignapas May 13, 2019
873eeea
Merge branch 'pcrespov-is730/serve-studies' into is730/direct-link
ignapas May 13, 2019
8030890
Modified compile.json. Gone back to name: qxapp, as we will use fragm…
ignapas May 13, 2019
c37e6d9
Merge branch 'master' into is730/serve-studies
pcrespov May 13, 2019
fe531dc
Merge branch 'is730/serve-studies' of github.com:pcrespov/osparc-simc…
May 13, 2019
e1aaf43
Merge branch 'ignapas-is730/direct-link' into is730/serve-studies
May 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode-template/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"python.formatting.autopep8Args": [
"-max-line-length", "140"
"--max-line-length 140"
],
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
Expand All @@ -26,5 +26,6 @@
"[makefile]": {
"editor.insertSpaces": false
},
"python.testing.pyTestEnabled": true,
"autoDocstring.docstringFormat": "sphinx"
}
2 changes: 1 addition & 1 deletion scripts/openapi/oas_resolver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /src

# update pip
RUN pip install --no-cache-dir --upgrade \
pip \
pip~=19.1.1 \
wheel \
setuptools

Expand Down
2 changes: 1 addition & 1 deletion services/director/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RUN apk add --no-cache \
git

RUN $SC_PIP install --upgrade \
pip \
pip~=19.1.1 \
wheel \
setuptools

Expand Down
4 changes: 2 additions & 2 deletions services/dy-3dvis/simcoreparaviewweb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ COPY scripts/docker/healthcheck_curl_host.py /healthcheck/healthcheck_curl_host.
# set up oSparc env variables
ENV SIMCORE_NODE_UUID="-1" \
SIMCORE_USER_ID="-1" \
STORAGE_ENDPOINT="=1" \
STORAGE_ENDPOINT="=1" \
S3_ENDPOINT="=1" \
S3_ACCESS_KEY="-1" \
S3_SECRET_KEY="-1" \
Expand Down Expand Up @@ -101,4 +101,4 @@ RUN export PATH="${PYENV_ROOT}/bin:$PATH" && \
pip install /home/root/services/storage/client-sdk/python
# copy script to get the inputs inside the local file system
COPY services/dy-3dvis/simcoreparaviewweb/cgi_scripts /home/root/cgi_scripts
ENTRYPOINT [ "/bin/bash", "docker/boot.sh" ]
ENTRYPOINT [ "/bin/bash", "docker/boot.sh" ]
2 changes: 1 addition & 1 deletion services/dy-modeling/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ COPY services/dy-modeling/server/source /home/node/source
COPY services/dy-modeling/server/docker /home/node/docker
RUN npm install -y

ENTRYPOINT [ "/bin/bash", "/home/node/docker/boot.sh" ]
ENTRYPOINT [ "/bin/bash", "/home/node/docker/boot.sh" ]
2 changes: 1 addition & 1 deletion services/sidecar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN apk add --no-cache \
libc-dev

RUN $SC_PIP install --upgrade \
pip \
pip~=19.1.1 \
wheel \
setuptools

Expand Down
2 changes: 1 addition & 1 deletion services/sidecar/src/sidecar/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def postprocess(self):

def inspect(self, celery_task, user_id, project_id, node_id):
log.debug("ENTERING inspect pipeline:node %s: %s", project_id, node_id)
# import pdb; pdb.set_trace()

next_task_nodes = []
do_run = False

Expand Down
2 changes: 1 addition & 1 deletion services/storage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN apk add --no-cache \
linux-headers

RUN $SC_PIP install --upgrade \
pip \
pip~=19.1.1 \
wheel \
setuptools

Expand Down
1 change: 0 additions & 1 deletion services/storage/tests/test_dsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import io
import json
import os
import pdb
import urllib
import uuid
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion services/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUN apk add --no-cache \
libffi-dev

RUN $SC_PIP install --upgrade \
pip \
pip~=19.1.1 \
wheel \
setuptools

Expand Down
3 changes: 3 additions & 0 deletions services/web/client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
}
],
"no-warning-comments": "off"
},
"env": {
"browser": true
}
}
10 changes: 5 additions & 5 deletions services/web/client/compile.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"targets": [
{
"type": "source",
"outputPath": "source-output",
"outputPath": "source-output"
},
{
"type": "build",
"outputPath": "build-output",
"bundle": {
"include": [
"qx.*"
]
}
},
{
"type": "build",
"outputPath": "build-output"
}
],
"defaultTarget": "source",
Expand Down
43 changes: 29 additions & 14 deletions services/web/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 39 additions & 25 deletions services/web/client/source/class/qxapp/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,19 @@ qx.Class.define("qxapp.Application", {
this.__restart();
}, this);

this.__restart();
this.__initRouting();
},

__initRouting: function() {
// Route: /#/study/{id}
// TODO: PC -> IP consider regex for uuid, i.e. /[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}/ ???
let result = /#\/study\/([0-9a-zA-Z\-]+)/.exec(window.location.hash);
if (result) {
qxapp.utils.Utils.cookie.deleteCookie("user");
qxapp.auth.Manager.getInstance().validateToken(() => this.__loadMainPage(result[1]), this.__loadLoginPage, this);
} else {
this.__restart();
}
},

__restart: function() {
Expand All @@ -80,35 +92,37 @@ qx.Class.define("qxapp.Application", {
isLogged = true;
}

let view = null;
let options = null;

if (isLogged) {
this.__connectWebSocket();
view = new qxapp.desktop.LayoutManager();
options = {
top: 0,
bottom: 0,
left: 0,
right: 0
};
this.__loadView(view, options);
this.__loadMainPage();
} else {
this.__disconnectWebSocket();
view = new qxapp.auth.MainView();
view.addListener("done", function(msg) {
this.__restart();
}, this);
options = {
top: "10%",
bottom: 0,
left: 0,
right: 0
};
this.__loadView(view, options);
qxapp.auth.Manager.getInstance().validateToken(this.__loadMainPage, this.__loadLoginPage, this);
}
},

__loadLoginPage: function() {
this.__disconnectWebSocket();
const view = new qxapp.auth.LoginPage();
view.addListener("done", function(msg) {
this.__restart();
}, this);
this.__loadView(view, {
top: "10%",
bottom: 0,
left: 0,
right: 0
});
},

__loadMainPage: function(studyId) {
this.__connectWebSocket();
this.__loadView(new qxapp.desktop.MainPage(studyId), {
top: 0,
bottom: 0,
left: 0,
right: 0
});
},

__loadView: function(view, options) {
this.assert(view!==null);
// Update root document and currentness
Expand Down
10 changes: 8 additions & 2 deletions services/web/client/source/class/qxapp/auth/Data.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ qx.Class.define("qxapp.auth.Data", {
auth: {
init: null,
nullable: true,
check: "qx.io.request.authentication.Basic"
check: "qxapp.io.request.authentication.Token"
},

/**
Expand All @@ -48,14 +48,20 @@ qx.Class.define("qxapp.auth.Data", {

setToken: function(token) {
if (token) {
this.setAuth(new qx.io.request.authentication.Basic(token, null));
qxapp.utils.Utils.cookie.setCookie("user", token);
this.setAuth(new qxapp.io.request.authentication.Token(token));
}
},

resetToken: function() {
qxapp.utils.Utils.cookie.setCookie("user", "logout");
this.resetAuth();
},

isLogout: function() {
return qxapp.utils.Utils.cookie.getCookie("user") === "logout";
},

getUserName: function() {
const email = qxapp.auth.Data.getInstance().getEmail();
if (email) {
Expand Down
Loading