Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
13ae909
Add a dark theme for the browser UI.
sampsapenna Aug 14, 2019
b41b387
Begin refactor to use npm.
sampsapenna Aug 16, 2019
d98be5a
Fix routing after changing to npm
sampsapenna Aug 22, 2019
e23aa6c
Finish migration from static web content to build with npm.
sampsapenna Aug 22, 2019
90be2a6
Change webpack built UI to be the actual UI.
sampsapenna Aug 22, 2019
cc095c5
Add styles after migrating to webpack
sampsapenna Aug 22, 2019
849aae0
Improve folder structure.
sampsapenna Aug 22, 2019
b270368
Fix tests after refactor
sampsapenna Aug 22, 2019
b53a040
Add theme css files, to use in the future.
sampsapenna Sep 4, 2019
441a61e
Add frontend html/js build to travis.yml.
sampsapenna Sep 4, 2019
a4adf8a
Update README after changing installation behaviour
sampsapenna Sep 4, 2019
d875c13
Remove old dark theme css from routes.
sampsapenna Sep 17, 2019
b3e9ff8
Fix incorrect folder in setd patch
sampsapenna Sep 17, 2019
b3130bf
Improve tests
sampsapenna Sep 17, 2019
ded14ff
refactor tests folders
blankdots Sep 18, 2019
24317e7
change tox config
blankdots Sep 18, 2019
0d08eac
small update in docs
blankdots Sep 18, 2019
632a65a
remove gitlab ci, as not supported anymore
blankdots Sep 18, 2019
616b461
misses in tox for docs and pydocstyle
blankdots Sep 19, 2019
5dc0ad3
Merge pull request #27 from CSCfi/refactor/tests-folders
sampsapenna Sep 19, 2019
5316cb3
Fix linter errors in JS.
sampsapenna Sep 19, 2019
3f0ccf6
Bump package.json to correct version.
sampsapenna Sep 19, 2019
b10d44c
Remove old frontend folder.
sampsapenna Sep 19, 2019
f0c9a63
Improve language used in the UI
sampsapenna Sep 19, 2019
bc7f858
docker stage for frontend node.js build
blankdots Sep 19, 2019
70be0e5
Merge pull request #28 from CSCfi/feature/docker-update
blankdots Sep 19, 2019
f99b40e
add travis npm stage
blankdots Sep 19, 2019
a454c81
package-lock version
blankdots Sep 19, 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
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ omit =
# omit everything in /usr
/usr/*
# omit this single file
s3browser/__init__.py
swift_browser_ui/__init__.py

[report]
# Regexes for lines to exclude from consideration
Expand Down
93 changes: 0 additions & 93 deletions .gitlab-ci.yml

This file was deleted.

29 changes: 28 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,46 @@ stages:
jobs:
include:
- stage: tests
name: "Code Style Check"
name: "Code Style Check Python"
python: 3.6
before_script:
- pip install tox-travis
script: tox -e flake8
- stage: tests
name: "Code Style Check Javascript"
node_js: "12"
before_script:
- cd swift_browser_ui_frontend
- npm install
script: npm run lint
- stage: tests
name: "Unit Tests Python 3.6"
python: 3.6
before_script:
- cd swift_browser_ui_frontend
- npm install
- npm run build
- cd ..
- pip install tox-travis
script: tox -e pytest
- stage: tests
name: "Unit Tests Python 3.7"
python: 3.7
before_script:
- cd swift_browser_ui_frontend
- npm install
- npm run build
- cd ..
- pip install tox-travis
script: tox -e pytest
- stage: tests
name: "Documentation Tests"
python: 3.6
before_script:
- cd swift_browser_ui_frontend
- npm install
- npm run build
- cd ..
- pip install tox-travis
- wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
- tar -xvzf geckodriver-v0.24.0-linux64.tar.gz
Expand All @@ -65,6 +84,10 @@ jobs:
name: "Firefox UI Tests"
python: 3.6
before_script:
- cd swift_browser_ui_frontend
- npm install
- npm run build
- cd ..
- pip install tox-travis
- wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
- tar -xvzf geckodriver-v0.24.0-linux64.tar.gz
Expand All @@ -80,6 +103,10 @@ jobs:
name: "Chrome UI Tests"
python: 3.6
before_script:
- cd swift_browser_ui_frontend
- npm install
- npm run build
- cd ..
- pip install tox-travis
- curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add
- echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/google-chrome.list
Expand Down
22 changes: 17 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
FROM python:3.7-alpine3.9 as BUILD
FROM node:12.10-alpine as FRONTEND

RUN apk add --update \
&& apk add --no-cache build-base curl-dev linux-headers bash git\
&& rm -rf /var/cache/apk/*

COPY swift_browser_ui_frontend /root/swift_ui/swift_browser_ui_frontend

RUN cd /root/swift_ui/swift_browser_ui_frontend \\
&& npm install \\
&& npm run build

FROM python:3.7-alpine3.9 as BACKEND

RUN apk add --update \
&& apk add --no-cache build-base curl-dev linux-headers bash git\
Expand All @@ -8,7 +20,7 @@ RUN apk add --update \
COPY requirements.txt /root/swift_ui/requirements.txt
COPY setup.py /root/swift_ui/setup.py
COPY swift_browser_ui /root/swift_ui/swift_browser_ui
COPY swift_browser_ui_frontend /root/swift_ui/swift_browser_ui_frontend
COPY --from=FRONTEND /root/swift_ui/swift_browser_ui_frontend/dist /root/swift_ui/swift_browser_ui_frontend/dist

RUN pip install --upgrade pip && \
pip install -r /root/swift_ui/requirements.txt && \
Expand All @@ -22,11 +34,11 @@ LABEL maintainer "CSC Developers"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.vcs-url="https://github.com/CSCFI/swift-browser-ui"

COPY --from=BUILD usr/local/lib/python3.7/ usr/local/lib/python3.7/
COPY --from=BACKEND usr/local/lib/python3.7/ usr/local/lib/python3.7/

COPY --from=BUILD /usr/local/bin/gunicorn /usr/local/bin/
COPY --from=BACKEND /usr/local/bin/gunicorn /usr/local/bin/

COPY --from=BUILD /usr/local/bin/swift-browser-ui /usr/local/bin/
COPY --from=BACKEND /usr/local/bin/swift-browser-ui /usr/local/bin/

RUN mkdir -p /app

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ Getting started:
```
git clone git@gitlab.csc.fi:CSCCSDP/swift_browser_ui.git
cd swift_browser_ui
cd swift_browser_ui_frontend
npm install
npm run build
cd ..
pip install -r requirements.txt
pip install .
```
Expand Down
2 changes: 1 addition & 1 deletion docs/source/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ implemented in the UI testing scenarios. The utility can be run using:

.. code-block:: console

$ python -m ui_tests.ui_take_screenshots
$ python -m tests.ui.ui_take_screenshots
2 changes: 1 addition & 1 deletion swift_browser_ui/static
66 changes: 66 additions & 0 deletions swift_browser_ui_frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:vue/essential",
"plugin:vue/base",
"plugin:vue/strongly-recommended",
"plugin:vue/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"vue"
],
"rules": {
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"comma-dangle": [
"error",
"always-multiline"
],
"max-len": ["error", {
"code": 80,
"comments": 75,
"ignoreTemplateLiterals": true,
"ignoreUrls": true
}],
// Vue rules here
"vue/html-closing-bracket-newline": ["error", {
"singleline": "never",
"multiline": "always"
}],
"vue/mustache-interpolation-spacing": ["error", "always"],
"vue/script-indent": ["error", 2, {
"baseIndent": 0,
"switchCase": 1
}],
"vue/require-prop-types": [0]
}
}
Loading