From 6e40da3f7af5f48e5b33b794453ce48d31ec5684 Mon Sep 17 00:00:00 2001 From: Zacharias Zacharodimos Date: Mon, 7 Oct 2019 16:24:40 +0200 Subject: [PATCH] ui: prepare ui to be deployed as spa --- .../templates/invenio_app_ils/index.html | 21 - invenio_app_ils/ui/.env | 6 + invenio_app_ils/ui/public/index.html | 1 - .../authentication/services/SessionManager.js | 5 +- .../common/config/invenioConfig.js | 205 +++++++++- invenio_app_ils/views.py | 379 ------------------ setup.py | 5 +- tests/ui/conftest.py | 28 -- tests/ui/test_views.py | 18 - 9 files changed, 210 insertions(+), 458 deletions(-) delete mode 100644 invenio_app_ils/templates/invenio_app_ils/index.html create mode 100644 invenio_app_ils/ui/.env delete mode 100644 invenio_app_ils/views.py delete mode 100644 tests/ui/conftest.py delete mode 100644 tests/ui/test_views.py diff --git a/invenio_app_ils/templates/invenio_app_ils/index.html b/invenio_app_ils/templates/invenio_app_ils/index.html deleted file mode 100644 index a8457e4e8..000000000 --- a/invenio_app_ils/templates/invenio_app_ils/index.html +++ /dev/null @@ -1,21 +0,0 @@ -{# -*- coding: utf-8 -*- - - Copyright (C) 2018 CERN. - - invenio-app-ils is free software; you can redistribute it and/or modify it - under the terms of the MIT License; see LICENSE file for more details. -#} - - - - {%- block css %} - {%-endblock %} - - -
-
- {{ jwt() }} - {%- block javascript %} - {%- endblock %} - - diff --git a/invenio_app_ils/ui/.env b/invenio_app_ils/ui/.env new file mode 100644 index 000000000..b1409b9ba --- /dev/null +++ b/invenio_app_ils/ui/.env @@ -0,0 +1,6 @@ +REACT_APP_JWT_TOKEN='token' +REACT_APP_USER_ID=1 +REACT_APP_LOCATION_ID=1 +REACT_APP_USER_ROLE=librarian +REACT_APP_JWT_TOKEN_EXPIRATION=11111111111111111111111 +REACT_APP_JWT_USERNAME=librarian diff --git a/invenio_app_ils/ui/public/index.html b/invenio_app_ils/ui/public/index.html index 48c90281a..5df46268e 100644 --- a/invenio_app_ils/ui/public/index.html +++ b/invenio_app_ils/ui/public/index.html @@ -27,7 +27,6 @@ -