*NOT FOR* review
@jayesh might be interested though
Differential D7348
wip: moderation: Start ui coverage and fix permissions ardumont on Mar 15 2022, 11:47 AM. Authored by Tags None Subscribers None
Details
Diff Detail
Event TimelineComment Actions Build has FAILED Patch application report for D7348 (id=26564)Could not rebase; Attempt merge onto 5bc77709cb... Merge made by the 'recursive' strategy. assets/src/bundles/add_forge/create-request.js | 69 +++ assets/src/bundles/add_forge/index.js | 12 + .../src/bundles/add_forge/moderator-dashboard.js | 53 ++ assets/src/bundles/add_forge/request-dashboard.js | 122 ++++ cypress/integration/add-forge-moderation.spec.js | 284 +++++++++ cypress/support/index.js | 4 + swh/web/add_forge_now/__init__.py | 0 swh/web/add_forge_now/apps.py | 10 + swh/web/add_forge_now/migrations/0001_initial.py | 109 ++++ swh/web/add_forge_now/migrations/__init__.py | 0 swh/web/add_forge_now/models.py | 99 ++++ swh/web/add_forge_now/tests/test_migration.py | 62 ++ swh/web/add_forge_now/urls.py | 16 + swh/web/add_forge_now/views.py | 85 +++ swh/web/api/urls.py | 1 + swh/web/api/views/add_forge_now.py | 400 +++++++++++++ swh/web/auth/utils.py | 1 + swh/web/settings/common.py | 1 + .../templates/add_forge_now/create-request.html | 232 ++++++++ swh/web/templates/add_forge_now/moderation.html | 45 ++ .../templates/add_forge_now/request-dashboard.html | 139 +++++ swh/web/templates/layout.html | 18 +- swh/web/tests/add_forge_now/test_models.py | 26 + swh/web/tests/api/views/test_add_forge_now.py | 635 +++++++++++++++++++++ swh/web/tests/create_test_users.py | 14 +- swh/web/tests/utils.py | 5 +- swh/web/urls.py | 1 + 27 files changed, 2438 insertions(+), 5 deletions(-) create mode 100644 assets/src/bundles/add_forge/create-request.js create mode 100644 assets/src/bundles/add_forge/index.js create mode 100644 assets/src/bundles/add_forge/moderator-dashboard.js create mode 100644 assets/src/bundles/add_forge/request-dashboard.js create mode 100644 cypress/integration/add-forge-moderation.spec.js create mode 100644 swh/web/add_forge_now/__init__.py create mode 100644 swh/web/add_forge_now/apps.py create mode 100644 swh/web/add_forge_now/migrations/0001_initial.py create mode 100644 swh/web/add_forge_now/migrations/__init__.py create mode 100644 swh/web/add_forge_now/models.py create mode 100644 swh/web/add_forge_now/tests/test_migration.py create mode 100644 swh/web/add_forge_now/urls.py create mode 100644 swh/web/add_forge_now/views.py create mode 100644 swh/web/api/views/add_forge_now.py create mode 100644 swh/web/templates/add_forge_now/create-request.html create mode 100644 swh/web/templates/add_forge_now/moderation.html create mode 100644 swh/web/templates/add_forge_now/request-dashboard.html create mode 100644 swh/web/tests/add_forge_now/test_models.py create mode 100644 swh/web/tests/api/views/test_add_forge_now.py Changes applied before testcommit 492125208d83814e78f6ac3571dea5eb4b077e41 Merge: 5bc77709 7e6a2f56 Author: Jenkins user <jenkins@localhost> Date: Tue Mar 15 10:48:15 2022 +0000 Merge branch 'diff-target' into HEAD commit 7e6a2f563236dfafacde1f08d14863749fd107ec Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Tue Mar 15 11:46:21 2022 +0100 wip: moderation: Start ui coverage and fix permissions commit 62f0696aa5e1c26f3fd7ccc13caca4b76d1e1d88 Author: Jayesh Velayudhan <jayesh@softwareheritage.org> Date: Mon Mar 14 21:35:15 2022 +0100 Basic JS refactoring Create seperate JS files; moved functions to respective pages they still need some improvement; Added FIXME tags commit d0b719a417e8b36f671d175ef4f7b7935c354d50 Author: Jayesh Velayudhan <jayesh@softwareheritage.org> Date: Mon Mar 14 20:32:08 2022 +0100 HTML improvements Replaced <b> tags with <strong> commit 0ffe744ddfc8f0600c3ebdfce792d2dd5c8f2435 Author: Jayesh Velayudhan <jayesh@softwareheritage.org> Date: Mon Mar 14 19:21:51 2022 +0100 Minor: Fixed API issue in browse requests in add forge now page commit c7ce0d9a1a66aef564afae53cc55d5b0d8c885a4 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Mon Mar 14 18:52:29 2022 +0100 add-forge-now: Fix datatable listing setup After the latest change to the api: - the 'request_id' field got renamed to 'id' - we no longer need the extra callback to map the result to list commit 8862f9d70e0a50b4d002221c2dd9cf6ed750e6f1 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Mon Mar 14 18:43:12 2022 +0100 add-forge-now: Restrict access to the moderation request view commit 756b2f41f2e85a71bef0d46afabd20c1c4b14bc5 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Mon Mar 14 18:42:01 2022 +0100 add-forge-now: Restrict access to the moderation view commit 6e30f42bf3960571b928929aa423d2a0a7f244ff Author: Jayesh Velayudhan <jayesh@softwareheritage.org> Date: Mon Mar 14 15:21:30 2022 +0100 Added history in request dashboard Added history in the view (basic/not styled) Added basic logic for mailto Removed unused code in JS commit c867f6e9871d4ae819925c69c390fd7e40b5b848 Author: Jayesh Velayudhan <jayesh@softwareheritage.org> Date: Mon Mar 14 13:40:31 2022 +0100 Improvements to Add request form - Removed Django form and using HTML - Made HTML better with correct Ids and names - JS changes to show proper error message from server - Minor: Removed unused code from views (Python) - Made comment optional in the HTML (This is still mandatory in the API, to be fixed) commit 79d2feb4b794ecb147547e0a7d6d0472137d1e64 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Fri Mar 11 18:10:53 2022 +0100 request_moderation: Actually fix update calls This is for now duplicating client side the automation states. We'll see later how to avoid it. commit aa6025b4a7f816ff57907c3442839b2dd501e6e6 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Fri Mar 11 16:54:17 2022 +0100 moderation: Rename Request ID to ID It takes less space commit c5e778e53387f599df9423854bcf00ab859d1270 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Fri Mar 11 16:48:05 2022 +0100 add_forge_now/views: Update hard-coded forge types Add bitbucket commit 6c97d5a9ab79367f62e34a7e8371ee2086ddb95e Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Fri Mar 11 15:44:36 2022 +0100 create-request: Fix typos commit 816121222d396dc33ea0f9af739b6b41a94c675b Author: Jayesh Velayudhan <jayesh@softwareheritage.org> Date: Fri Mar 11 15:24:00 2022 +0100 Datatables; update and get api integrations commit 8e7daf9a19e4532c21b59701a85cb8913fe1f959 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Thu Mar 10 16:12:55 2022 +0100 wip: Prepare using api and datatable on moderation view commit 03e65a59edd3e24480d94a2b75482ea7f5415ddb Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Thu Mar 10 15:04:41 2022 +0100 create forge request: Fix login link commit 44f58ac805361ef36325ba6b9c5fd079e2da3184 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Thu Mar 10 14:55:16 2022 +0100 Improve help message according to specification commit ad85223f7ab76185a268f017e7557a0a08942dcb Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Thu Mar 10 14:31:28 2022 +0100 create-request: Cleanup whitespaces commit 9e6393707ca008967ed67a1e1a49ae31948c6014 Author: Jayesh Velayudhan <jayesh@softwareheritage.org> Date: Thu Mar 10 12:45:52 2022 +0100 Basic styling and content for templates commit cab17aa9242ce404f8f57a558f7fc3200e5ace30 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Wed Mar 9 15:50:32 2022 +0100 Bootstrap request dashboard to display request commit 8205928f04a9c45a9cd022b5904e40b7b41b3491 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Wed Mar 9 15:30:39 2022 +0100 Bootstrap add-forge-now moderation view That's only listing created requests for now. Related to T3991 commit 7339f39799de53071671bd2601c0180adce86c45 Author: Jayesh Velayudhan <jayesh@softwareheritage.org> Date: Tue Mar 8 21:19:58 2022 +0100 Add browse existing requests table view Add different screens for anonymous and logged in user Improve template style Related to T3987 commit dd942f9949cdc419db6ed87cad33caadad4fb8af Author: Jayesh Velayudhan <jayesh@softwareheritage.org> Date: Tue Mar 8 15:14:21 2022 +0100 Create Submission form w/basic info Created template, posting to API, Messages Related to T3987 Depends on D7311 commit a79d95a65280f2b74048f4e897cc2734033b02a0 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Mon Mar 14 17:10:53 2022 +0100 package.json: Upgrade dependencies commit 143a3acdc5b771494da389d0035d0b7d348c84a0 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Thu Mar 10 16:21:43 2022 +0100 assets/webapp.css: Fix sidebar scrolling On small resolution screens, the sidebar content could not be scrolled to the last menu entry. commit 6b9f6249ce3a9c8d75c7d78aa852080717a62dd6 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Mar 9 15:21:30 2022 +0100 Disable unsafe directives when rendering READMEs rst_to_html is called by get_readme_to_display, which processes unsafe data; so it should not allow inclusion of arbitrary files or arbitrary HTML. commit 797cc31b6813485bb07893e1a84e6eb5982d45bd Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Wed Mar 9 16:00:34 2022 +0100 package.json: Upgrade dependencies commit f6343395310bc226a50a283c88304006e8ece337 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Mon Mar 14 15:35:17 2022 +0100 api/add_forge_now: Allow to use requests list endpoint with datatables datatables is the javascript library we use on the frontend side to display interactive tables. As we use server-side processing, table data must be provided in a paginated way by an HTTP endpoint. Response format expected by datatables is different from the one returned by the Web API endpoint listing add-forge requests. So adapt the response format of that endpoint when we know the input request has been sent by datatables. Related to T3989 Related to T3991 commit 26748e56ecce5877fce3a215eba06a19ebb8342f Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Thu Mar 10 14:09:36 2022 +0100 api: Add endpoint to get details about an add-forge request Related to T4030 commit 294a95c711bc40622c6d718afa2535f377b90dfc Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Wed Mar 9 16:30:06 2022 +0100 api: Add endpoint to list add-forge requests Related to T4027 commit 1bf17d6a75fd7265b1da9c9e87220efa62869c93 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Wed Mar 9 16:28:03 2022 +0100 api: Add endpoint to update an add-forge request Related to T4026 commit 130e9faa9bcab18bc3c76dc898546edb89f3f9b8 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Tue Mar 8 15:23:50 2022 +0100 api: Add endpoint to create an add-forge request Related to T3990 commit 03101208803501e5178f35d18d171e740ee4ca76 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Tue Mar 8 11:34:44 2022 +0100 add_forge_now: Bootstrap app and model Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1455/ |