From 37238548e63ea43b6d4d97ce49cc89d339285aad Mon Sep 17 00:00:00 2001 From: Felipe Morato Date: Wed, 22 Feb 2023 17:08:02 +0200 Subject: [PATCH 01/10] Add pre-commit configuration --- .github/config/.spellcheck.yml | 4 +- .github/config/.wordlist.txt | 1 + .pre-commit-config.yaml | 83 ++++++++++++++++++++++++++++++++++ README.md | 1 + pyproject.toml | 45 +++++++++++++++++- scripts/eslint.sh | 14 ++++++ 6 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100755 scripts/eslint.sh diff --git a/.github/config/.spellcheck.yml b/.github/config/.spellcheck.yml index 085e065cc..e595d3b8c 100644 --- a/.github/config/.spellcheck.yml +++ b/.github/config/.spellcheck.yml @@ -1,5 +1,5 @@ matrix: -- name: Markdown +- name: markdown aspell: lang: en ignore-case: true @@ -23,7 +23,7 @@ matrix: - 'docs/source/*.rst' - '**/*.md' default_encoding: utf-8 -- name: English Language spellcheck +- name: frontend aspell: lang: en ignore-case: true diff --git a/.github/config/.wordlist.txt b/.github/config/.wordlist.txt index 13eaa683b..f1492deab 100644 --- a/.github/config/.wordlist.txt +++ b/.github/config/.wordlist.txt @@ -21,6 +21,7 @@ cp cryptfiles csc cscfi +dev devel devenv Dockerfile diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..27eaf85bb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,83 @@ +repos: + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: no-commit-to-branch + args: [--branch, devel, --branch, master] + - id: check-toml + - id: check-yaml + exclude: swift_browser_ui_frontend/pnpm-lock.yaml + - id: check-ast + - id: check-docstring-first + - id: check-case-conflict + - id: check-merge-conflict + - id: end-of-file-fixer + - id: trailing-whitespace + + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.259 + hooks: + - id: ruff + args: [--fix, --exit-non-zero-on-fix] + files: ^swift_browser_ui/ + + - repo: https://github.com/psf/black + rev: 23.1.0 + hooks: + - id: black + args: [-l, "90"] + + - repo: https://github.com/PyCQA/bandit + rev: 1.7.5 + hooks: + - id: bandit + files: ^swift_browser_ui/ + + - repo: local + hooks: + - id: eslint + name: Lint frontend + entry: ./scripts/eslint.sh + args: [--prefix, swift_browser_ui_frontend, run, lint] + files: ^swift_browser_ui_frontend + language: system + pass_filenames: false + + - id: mypy + name: mypy + entry: mypy + language: system + types: [python] + files: ^swift_browser_ui/ + args: [--ignore-missing-imports, --no-namespace-packages] + require_serial: true + + - id: sort + name: sort dictionaries + entry: ./scripts/sort.sh + language: script + files: ^.github/config/.*.txt + require_serial: true + pass_filenames: false + + - id: pyspelling-docs + name: spellcheck markdown and documentation + entry: ./scripts/pyspelling.sh + language: script + args: [markdown] + types_or: [markdown, rst] + require_serial: true + + - id: pyspelling-frontend + name: spellcheck frontend strings + entry: ./scripts/pyspelling.sh + language: script + args: [frontend] + types: [javascript] + files: swift_browser_ui_frontend/src/common/lang.js + require_serial: true diff --git a/README.md b/README.md index ec0a1d048..008c3d2cf 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ Install python dependencies, optionally in a virtual environment. python3 -m venv venv --prompt swiftui # Optional step, creates python virtual environment source venv/bin/activate # activates virtual environment pip install -Ue .[docs,test,dev] +pre-commit install ``` Set up the environment variables diff --git a/pyproject.toml b/pyproject.toml index ef8b2dcff..fff8ccb28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ test = [ "coverage==7.2.1", "flake8-docstrings==1.7.0", "flake8==6.0.0", - "mypy==1.0.1", + "mypy==1.1.1", "pytest-cov==4.0.0", "pytest-xdist==3.2.0", "pytest==7.2.1", @@ -57,7 +57,12 @@ ui_test = [ ] dev = [ "honcho==1.1.0", + "pre-commit==3.2.1", "pyspelling==2.8.2", + "ruff==0.0.259", + "types-certifi", + "types-redis", + "types-requests", ] [project.scripts] @@ -72,3 +77,41 @@ Documentation = "https://swift-browser-ui.readthedocs.io" [tool.hatch.version] path = "swift_browser_ui/__init__.py" + +[tool.black] +line-length = 90 +target-version = ['py310'] + +[tool.isort] +atomic = true +profile = "black" +line_length = 90 +py_version=310 + +[tool.ruff] +line-length = 90 +target-version = "py310" + +# https://beta.ruff.rs/docs/rules/ +select = [ + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # pyflakes + "I", # isort + # "ANN", # flake8-annotations + "C", # flake8-comprehensions + "B", # flake8-bugbear + "D", # pydocstyle +# "UP", # pyupgrade + "S", # Bandit +] + +ignore = [ + "ANN101", # Missing type annotation for `self` in method + "E501", # line too long, handled by black + "B904", # do not perform function calls in argument defaults + "PLR2004", # magic value used in comparison + "S113", # Probable use of requests call without timeout + "D203", # one-blank-line-before-class + "D213", # multi-line-summary-second-line +] diff --git a/scripts/eslint.sh b/scripts/eslint.sh new file mode 100755 index 000000000..ed3700cf0 --- /dev/null +++ b/scripts/eslint.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# eslint for pre-commit. Skips run if `pnpm` or eslint are not installed + +if ! command -v pnpm > /dev/null 2>&1; then + echo "pnpm not installed, not running eslint as pre-commit hook" + exit 0 +fi + +if ! test -f swift_browser_ui_frontend/node_modules/.bin/eslint; then + echo "eslint is not installed, not running eslint as pre-commit hook" + exit 0 +fi + +pnpm --prefix swift_browser_ui_frontend run lint From 666c153b9a75a1d709e7d41bc21ed0698a29e022 Mon Sep 17 00:00:00 2001 From: Felipe Morato Date: Thu, 23 Mar 2023 14:03:24 +0200 Subject: [PATCH 02/10] pre-commit: fix end of file --- .github/config/.spellcheck.yml | 2 +- docs/_static/api.yml | 1 - docs/source/_static/style.css | 1 - docs/source/tech.rst | 1 - swift_browser_ui_frontend/src/common/globalFunctions.js | 3 --- swift_browser_ui_frontend/src/common/upload.js | 2 +- swift_browser_ui_frontend/src/components/BrowserMainNavbar.vue | 2 +- swift_browser_ui_frontend/src/components/CUploadButton.vue | 2 +- swift_browser_ui_frontend/src/components/DeleteModal.vue | 2 +- swift_browser_ui_frontend/src/components/SearchBox.vue | 2 +- swift_browser_ui_frontend/src/components/SharedOutTable.vue | 1 - swift_browser_ui_frontend/src/components/TagInput.vue | 2 +- tests/cypress/integration/browser.cy.js | 2 -- tests/cypress/integration/userInfo.cy.js | 2 +- tests/cypress/support/commands.js | 2 +- 15 files changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/config/.spellcheck.yml b/.github/config/.spellcheck.yml index e595d3b8c..f09f296d6 100644 --- a/.github/config/.spellcheck.yml +++ b/.github/config/.spellcheck.yml @@ -39,4 +39,4 @@ matrix: strings: true decode_escapes: false sources: - - swift_browser_ui_frontend/src/common/lang.js \ No newline at end of file + - swift_browser_ui_frontend/src/common/lang.js diff --git a/docs/_static/api.yml b/docs/_static/api.yml index d95e08f32..a150b1e7e 100644 --- a/docs/_static/api.yml +++ b/docs/_static/api.yml @@ -1523,4 +1523,3 @@ components: items: type: string example: database - diff --git a/docs/source/_static/style.css b/docs/source/_static/style.css index 674649fc8..00c4583fc 100644 --- a/docs/source/_static/style.css +++ b/docs/source/_static/style.css @@ -13,4 +13,3 @@ overflow: visible !important; } } - diff --git a/docs/source/tech.rst b/docs/source/tech.rst index 0104b0886..3958d5011 100644 --- a/docs/source/tech.rst +++ b/docs/source/tech.rst @@ -56,4 +56,3 @@ the API during normal usage. The api is documented in the api.yml file, that conforms to the OpenAPI specification (the file can be rendered with the `swagger editor `_): - diff --git a/swift_browser_ui_frontend/src/common/globalFunctions.js b/swift_browser_ui_frontend/src/common/globalFunctions.js index 79b5a6fd4..a8f369215 100644 --- a/swift_browser_ui_frontend/src/common/globalFunctions.js +++ b/swift_browser_ui_frontend/src/common/globalFunctions.js @@ -88,6 +88,3 @@ export function deleteTag (event, tag, currentTags) { event.preventDefault(); return currentTags.filter(el => el !== tag); } - - - diff --git a/swift_browser_ui_frontend/src/common/upload.js b/swift_browser_ui_frontend/src/common/upload.js index 95ded0a04..ddf37912e 100644 --- a/swift_browser_ui_frontend/src/common/upload.js +++ b/swift_browser_ui_frontend/src/common/upload.js @@ -346,4 +346,4 @@ export default class EncryptedUploadSession { this.handleMessage, {signal: this.signal}, ); } -} \ No newline at end of file +} diff --git a/swift_browser_ui_frontend/src/components/BrowserMainNavbar.vue b/swift_browser_ui_frontend/src/components/BrowserMainNavbar.vue index f431bba68..5b6637289 100644 --- a/swift_browser_ui_frontend/src/components/BrowserMainNavbar.vue +++ b/swift_browser_ui_frontend/src/components/BrowserMainNavbar.vue @@ -273,4 +273,4 @@ export default { } } - \ No newline at end of file + diff --git a/swift_browser_ui_frontend/src/components/CUploadButton.vue b/swift_browser_ui_frontend/src/components/CUploadButton.vue index ec76bf3ba..d3c2f144f 100644 --- a/swift_browser_ui_frontend/src/components/CUploadButton.vue +++ b/swift_browser_ui_frontend/src/components/CUploadButton.vue @@ -38,4 +38,4 @@ input { display: none; } - \ No newline at end of file + diff --git a/swift_browser_ui_frontend/src/components/DeleteModal.vue b/swift_browser_ui_frontend/src/components/DeleteModal.vue index fbd94f532..0735d48c7 100644 --- a/swift_browser_ui_frontend/src/components/DeleteModal.vue +++ b/swift_browser_ui_frontend/src/components/DeleteModal.vue @@ -158,4 +158,4 @@ export default { .delete-modal { padding: 0px; } - \ No newline at end of file + diff --git a/swift_browser_ui_frontend/src/components/SearchBox.vue b/swift_browser_ui_frontend/src/components/SearchBox.vue index 4cbd46c5f..b736e5433 100644 --- a/swift_browser_ui_frontend/src/components/SearchBox.vue +++ b/swift_browser_ui_frontend/src/components/SearchBox.vue @@ -226,4 +226,4 @@ export default { div[aria-selected='true'], div[slot="customMenu"]:hover { background-color: $csc-primary-lighter; } - \ No newline at end of file + diff --git a/swift_browser_ui_frontend/src/components/SharedOutTable.vue b/swift_browser_ui_frontend/src/components/SharedOutTable.vue index 7456e9a73..762baea88 100644 --- a/swift_browser_ui_frontend/src/components/SharedOutTable.vue +++ b/swift_browser_ui_frontend/src/components/SharedOutTable.vue @@ -10,4 +10,3 @@ export default { components: { Containers }, }; - diff --git a/swift_browser_ui_frontend/src/components/TagInput.vue b/swift_browser_ui_frontend/src/components/TagInput.vue index 47c3808e9..be8156c1f 100644 --- a/swift_browser_ui_frontend/src/components/TagInput.vue +++ b/swift_browser_ui_frontend/src/components/TagInput.vue @@ -86,4 +86,4 @@ span { overflow: hidden; text-overflow: ellipsis; } - \ No newline at end of file + diff --git a/tests/cypress/integration/browser.cy.js b/tests/cypress/integration/browser.cy.js index f3641c60f..137440bc9 100644 --- a/tests/cypress/integration/browser.cy.js +++ b/tests/cypress/integration/browser.cy.js @@ -185,5 +185,3 @@ describe("Browse containers and test operations", function () { }); }); }) - - diff --git a/tests/cypress/integration/userInfo.cy.js b/tests/cypress/integration/userInfo.cy.js index 089544202..fcba3a2b9 100644 --- a/tests/cypress/integration/userInfo.cy.js +++ b/tests/cypress/integration/userInfo.cy.js @@ -84,4 +84,4 @@ describe("Display mobile navigation on small resolution", function () { .find("label") .contains("Valitse projekti"); }) -}); \ No newline at end of file +}); diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index 75ad6ed6f..6787c5732 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -73,4 +73,4 @@ Cypress.Commands.add("navigateTableRowMenu", (index, menuItem) => { cy.get("c-menu").click() cy.get("c-menu").find("li").contains(menuItem).click() }) -}) \ No newline at end of file +}) From 9f13d995fbfbe89013ab45311fe71c5df6cdfddc Mon Sep 17 00:00:00 2001 From: Felipe Morato Date: Thu, 23 Mar 2023 14:04:19 +0200 Subject: [PATCH 03/10] pre-commit: fix trailing spaces --- .github/ISSUE_TEMPLATE/user_story.md | 8 +- README.md | 6 +- devproxy/nginx.conf | 2 +- docs/_static/api.yml | 80 +++++++++---------- docs/source/_static/style.css | 2 +- docs/source/deploy.rst | 4 +- docs/source/instructions.rst | 4 +- docs/source/testing.rst | 2 +- swift_browser_ui_frontend/src/common/db.js | 2 +- .../src/components/BrowserMainNavbar.vue | 2 +- .../src/components/CObjectTable.vue | 2 +- .../src/components/CUploadButton.vue | 4 +- .../src/components/ContainerTable.vue | 2 +- .../src/components/CopyFolderModal.vue | 2 +- .../src/components/ObjectTable.vue | 4 +- .../src/components/UploadNotification.vue | 4 +- swift_browser_ui_frontend/src/css/dark.scss | 2 +- swift_browser_ui_frontend/src/css/light.scss | 2 +- .../src/entries/index.js | 2 +- .../src/entries/index_app_factory.js | 2 +- .../src/entries/login.js | 6 +- .../src/entries/loginpassword.js | 2 +- swift_browser_ui_frontend/src/entries/main.js | 2 +- .../src/entries/select.js | 4 +- .../src/pages/IndexPage.vue | 6 +- swift_browser_ui_frontend/vite.config.js | 8 +- .../wasm/js/crypt-post.js | 2 +- .../wasm/src/streamingdownload.c | 2 +- .../wasm/src/streamingupload.c | 2 +- swift_browser_ui_frontend/wasm/src/upinit.c | 2 +- 30 files changed, 87 insertions(+), 87 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/user_story.md b/.github/ISSUE_TEMPLATE/user_story.md index 793b33e59..50c14e0aa 100644 --- a/.github/ISSUE_TEMPLATE/user_story.md +++ b/.github/ISSUE_TEMPLATE/user_story.md @@ -9,14 +9,14 @@ assignees: '' #### Describe the user story -List of tasks needed for this user story. Technical description is in the tasks. Additional information, for example a prototype, Figma files, pictures are linked here. +List of tasks needed for this user story. Technical description is in the tasks. Additional information, for example a prototype, Figma files, pictures are linked here. #### Tasks: -- [ ] +- [ ] -#### Testing -Description how the testing will be done. +#### Testing +Description how the testing will be done. #Definition of Done diff --git a/README.md b/README.md index 008c3d2cf..755e5f55c 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ The current frontend can be found at: `127.0.0.1:8080`. ### Development swift-browser-ui is composed of 4 components: `request`, `sharing`, `ui`, and `upload`. All of them must be run to have access to all features. -They depend on a Redis instance for session cache, Postgres database for the sharing and +They depend on a Redis instance for session cache, Postgres database for the sharing and request functionality, and the object storage backend. You will also need docker with Buildkit to build the keystone-swift docker image. @@ -155,7 +155,7 @@ This guide assumes you're using `devenv` as the domain name. Replace this with the domain you're certificate sings, and if necessary, add it to `/etc/hosts` so it's resolvable both in docker, and locally. -Additional setup is required in your environment file. You'll need to +Additional setup is required in your environment file. You'll need to configure the following keys to point to whatever hostname will be used to access the service. Additionally you should allow all hosts, assuming your machine is in a secure network when developing. In case you trust @@ -294,7 +294,7 @@ After following the development steps above, `cypress` should already be install cd swift_browser_ui_frontend You can run the tests in headless mode - + npx cypress run Or you can use the interactive version diff --git a/devproxy/nginx.conf b/devproxy/nginx.conf index b12106fb4..25b16f2f5 100644 --- a/devproxy/nginx.conf +++ b/devproxy/nginx.conf @@ -23,7 +23,7 @@ http { } client_max_body_size 0; - + server { listen 9443 ssl; ssl_certificate /etc/ssl/swiftui-proxy.crt; diff --git a/docs/_static/api.yml b/docs/_static/api.yml index a150b1e7e..107be6162 100644 --- a/docs/_static/api.yml +++ b/docs/_static/api.yml @@ -6,15 +6,15 @@ info: license: name: MIT tags: - - name: Frontend + - name: Frontend description: Endpoints for sharing request "Filtered proxied API from Openstack Swift used for a browser application" - - name: Sharing Request + - name: Sharing Request description: Endpoints for sharing request "Database and API for storing / querying Openstack Swift ACL share action request information." - - name: Sharing Account + - name: Sharing Account description: Endpoints for sharing request "Database and API for storing / querying Openstack Swift ACL information" - - name: Upload/Download + - name: Upload/Download description: Endpoints for uploading and downloading containers/objects - + paths: /health: get: @@ -33,7 +33,7 @@ paths: /request/user/{user}/{container}: post: tags: - - Sharing Request + - Sharing Request summary: Publish a new request for access to a container parameters: - name: user @@ -65,7 +65,7 @@ paths: $ref: "#/components/schemas/NewRequest" delete: tags: - - Sharing Request + - Sharing Request summary: Delete an existing request for access parameters: - name: user @@ -98,7 +98,7 @@ paths: example: OK options: tags: - - Sharing Request + - Sharing Request summary: Handle preflight for existing request for access parameters: - name: user @@ -136,7 +136,7 @@ paths: /request/user/{user}: get: tags: - - Sharing Request + - Sharing Request summary: List container share requests made by a user. parameters: - name: user @@ -156,7 +156,7 @@ paths: /request/owner/{user}: get: tags: - - Sharing Request + - Sharing Request summary: List the requests owned by the user (made for the user). parameters: - name: user @@ -176,7 +176,7 @@ paths: /request/container/{container}: get: tags: - - Sharing Request + - Sharing Request summary: List share requests made for a container. parameters: - name: container @@ -193,11 +193,11 @@ paths: application/json: schema: $ref: "#/components/schemas/ContainerRequests" - + /access/{user}: get: tags: - - Sharing Account + - Sharing Account summary: List container names that have been shared to the user. parameters: - name: user @@ -219,7 +219,7 @@ paths: /access/{user}/{container}: get: tags: - - Sharing Account + - Sharing Account summary: Get details of a container that has been shared to the user. parameters: - name: container @@ -255,7 +255,7 @@ paths: /share/{owner}: get: tags: - - Sharing Account + - Sharing Account summary: List container names that the user has shared to someone else. parameters: - name: owner @@ -277,7 +277,7 @@ paths: /share/{owner}/{container}: get: tags: - - Sharing Account + - Sharing Account summary: Get details of a container that the user has shared. parameters: - name: container @@ -305,7 +305,7 @@ paths: description: Client Error post: tags: - - Sharing Account + - Sharing Account summary: Give user / users access rights on a specified container. parameters: - name: container @@ -354,7 +354,7 @@ paths: description: Client Error patch: tags: - - Sharing Account + - Sharing Account summary: Edit specified user's access rights on a specified container. parameters: - name: container @@ -396,7 +396,7 @@ paths: description: Client Error delete: tags: - - Sharing Account + - Sharing Account summary: Revoke specified access to container from the user/users specified in the query. parameters: - name: container @@ -429,7 +429,7 @@ paths: description: Client Error options: tags: - - Sharing Account + - Sharing Account summary: Serve correct response headers to allowed DELETE preflight query. parameters: - name: container @@ -465,7 +465,7 @@ paths: schema: type: string example: 84600 - + /token/{project}/{id}: post: tags: @@ -572,7 +572,7 @@ paths: /api/username: get: tags: - - Frontend + - Frontend summary: Get Openstack username for the authenticated user. responses: 200: @@ -586,7 +586,7 @@ paths: /api/projects: get: tags: - - Frontend + - Frontend summary: Get Openstack projects available for the authenticated user. responses: 200: @@ -600,7 +600,7 @@ paths: /api/{project}/acl: get: tags: - - Frontend + - Frontend summary: Fetch a compilation of ACL information for sharing discovery. parameters: - name: project @@ -622,7 +622,7 @@ paths: /api/{project}/address: get: tags: - - Frontend + - Frontend summary: Get the project specific object storage address. parameters: - name: project @@ -645,7 +645,7 @@ paths: /api/meta/{project}: get: tags: - - Frontend + - Frontend summary: Get the filtered project metadata for the currently active project. parameters: - name: project @@ -669,7 +669,7 @@ paths: /api/{project}: get: tags: - - Frontend + - Frontend summary: Get the listing for containers for specified project parameters: - name: project @@ -702,7 +702,7 @@ paths: /api/{project}/{container}: get: tags: - - Frontend + - Frontend summary: Get the listing for objects in a given container. parameters: - name: project @@ -815,7 +815,7 @@ paths: /api/meta/{project}/{container}: get: tags: - - Frontend + - Frontend summary: Get container metadata. parameters: - name: project @@ -902,7 +902,7 @@ paths: /api/{project}/{container}/{object}: get: tags: - - Frontend + - Frontend summary: Download the object specified in the download link. parameters: - name: project @@ -1153,7 +1153,7 @@ paths: schema: type: string format: binary - + /{project}/{container}: post: tags: @@ -1289,7 +1289,7 @@ components: type: array items: $ref: "#/components/schemas/ListedRequest" - + ListedContainer: type: object properties: @@ -1344,7 +1344,7 @@ components: type: array items: $ref: "#/components/schemas/DetailedContainer" - + Username: type: string example: test_user_name @@ -1386,24 +1386,24 @@ components: type: integer example: 4294967296 description: The total amount of storage usage in bytes for the currently active project. - + ProjectAcl: type: object properties: - address: + address: type: string example: host access: type: object example: - containerName1: - ownerID1: + containerName1: + ownerID1: read: "*" write: "*" containerName2: - ownerID2: + ownerID2: read: "*" - + Container: type: object properties: @@ -1483,7 +1483,7 @@ components: type: array items: $ref: '#/components/schemas/MetaItem' - + Health: type: object required: diff --git a/docs/source/_static/style.css b/docs/source/_static/style.css index 00c4583fc..aba37f9bd 100644 --- a/docs/source/_static/style.css +++ b/docs/source/_static/style.css @@ -8,7 +8,7 @@ this as on RTD they are loaded after this stylesheet */ white-space: normal !important; } - + .wy-table-responsive { overflow: visible !important; } diff --git a/docs/source/deploy.rst b/docs/source/deploy.rst index 77718c6c3..84d28fb2b 100644 --- a/docs/source/deploy.rst +++ b/docs/source/deploy.rst @@ -35,7 +35,7 @@ for the database) Sharing functionality back-end ------------------------------ Sharing functionality should be run by running it in a container. Easiest -way to do this is to use the docker-compose fields provided in the +way to do this is to use the docker-compose fields provided in the `deployment example repository. `_ The sharing functionality requires the following environment variables to be present in order to work: @@ -87,7 +87,7 @@ to be present in order to work: Upload runner back-end ---------------------- SwiftUI upload runner should be run by running it in a container. Easiest way -to do this is to use the docker-compose files provided in the +to do this is to use the docker-compose files provided in the `deployment example repository. `_ The upload runner requires the following environment variables to be present in order to work: diff --git a/docs/source/instructions.rst b/docs/source/instructions.rst index e5c8885ea..9d3aede8c 100644 --- a/docs/source/instructions.rst +++ b/docs/source/instructions.rst @@ -19,7 +19,7 @@ The program can be installed with pip from the git repository: can be found from the git repositories. The instructions for getting the services up and running can be found in their respective repositories, and partly under the *Deployment* section. - + * https://github.com/cscfi/swift-x-account-sharing * https://github.com/cscfi/swift-sharing-request * https://github.com/cscfi/swiftui-upload-runner @@ -82,7 +82,7 @@ For the Pouta test environment with NGINX TLS termination proxy in use:: For the Pouta production environment for testing unsecurely without trust:: export BROWSER_START_AUTH_ENDPOINT_URL="https://pouta.csc.fi:5001/v3" - + Setting up TLS termination proxy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/source/testing.rst b/docs/source/testing.rst index 7bc7e14e9..f52d630e4 100644 --- a/docs/source/testing.rst +++ b/docs/source/testing.rst @@ -39,7 +39,7 @@ and the tests are developed for both Firefox and Chrome web browsers. $ cd swift_browser_ui_frontend/ $ npm install -g pnpm@7 - $ pnpm install + $ pnpm install $ pnpm run build $ cd .. $ pnpm install cypress diff --git a/swift_browser_ui_frontend/src/common/db.js b/swift_browser_ui_frontend/src/common/db.js index 76f64a08a..a1e936a3c 100644 --- a/swift_browser_ui_frontend/src/common/db.js +++ b/swift_browser_ui_frontend/src/common/db.js @@ -14,7 +14,7 @@ function initDB() { db.preferences.add({id: 1}); } }); - + return db; } diff --git a/swift_browser_ui_frontend/src/components/BrowserMainNavbar.vue b/swift_browser_ui_frontend/src/components/BrowserMainNavbar.vue index 5b6637289..2ac60a1ba 100644 --- a/swift_browser_ui_frontend/src/components/BrowserMainNavbar.vue +++ b/swift_browser_ui_frontend/src/components/BrowserMainNavbar.vue @@ -47,7 +47,7 @@ + >
{{ item.title }} diff --git a/swift_browser_ui_frontend/src/components/CObjectTable.vue b/swift_browser_ui_frontend/src/components/CObjectTable.vue index ac1f23042..59312c3b1 100644 --- a/swift_browser_ui_frontend/src/components/CObjectTable.vue +++ b/swift_browser_ui_frontend/src/components/CObjectTable.vue @@ -255,7 +255,7 @@ export default { size: "small", title: "Edit tags", path: mdiPencilOutline, - onClick: ({ data }) => + onClick: ({ data }) => toggleEditTagsModal(data.name.value, null), onKeyUp: (event) => { if(event.keyCode === 13) { diff --git a/swift_browser_ui_frontend/src/components/CUploadButton.vue b/swift_browser_ui_frontend/src/components/CUploadButton.vue index d3c2f144f..4defcf01d 100644 --- a/swift_browser_ui_frontend/src/components/CUploadButton.vue +++ b/swift_browser_ui_frontend/src/components/CUploadButton.vue @@ -2,7 +2,7 @@ Inspired by https://github.com/buefy/buefy/blob/3b3ae60e448ddfd669f20570d40812fd