Page MenuHomeSoftware Heritage

templates/origin-save: Add a "Save again" button in requests list
ClosedPublic

Authored by anlambert on Jun 26 2020, 2:25 PM.

Details

Summary

When clicking on it, the save request submission form will be automatically
filled with the origin info related to the associated requests table row
and the view will be scrolled to the top.

Also rename "Visit type" to "Origin type" ast it is more comprehensible
for non swh staff users.

Closes T2325

Depends on D3358.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D3364 (id=11932)

Could not rebase; Attempt merge onto 04170796f4...

Updating 04170796..7f8d2f0b
Fast-forward
 cypress/fixtures/save-task-info.json            |  16 +++
 cypress/integration/origin-save.spec.js         | 111 +++++++++++++----
 swh/web/admin/origin_save.py                    |  14 ---
 swh/web/assets/src/bundles/admin/origin-save.js |  92 +-------------
 swh/web/assets/src/bundles/save/index.js        | 159 +++++++++++++++++++++++-
 swh/web/common/origin_save.py                   |  34 +++--
 swh/web/misc/origin_save.py                     |  16 +++
 swh/web/templates/misc/origin-save.html         |  10 +-
 swh/web/tests/common/test_origin_save.py        |  32 ++++-
 9 files changed, 335 insertions(+), 149 deletions(-)
 create mode 100644 cypress/fixtures/save-task-info.json
Changes applied before test
commit 7f8d2f0b2c4045b2ef4cae3a7966566a1689eb21
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Jun 26 14:22:23 2020 +0200

    templates/origin-save: Add a "Save again" button in requests list
    
    When clicking on it, the save request submission form will be automatically
    filled with the origin info related to the associated requests table row
    and the view will be scrolled to the top.
    
    Also rename "Visit type" to "Origin type" ast it is more comprehensible
    for non swh staff users.
    
    Closes T2325

commit c0983d0ea516ab0dfb7c99bf126263b46f7c90e0
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Jun 25 14:34:28 2020 +0200

    templates/origin-save: Add a new "Info" column in save requests table
    
    An "Info" button has been added in that new column. When clicking on it, a
    popover containing various loading task information will be displayed.
    
    For anonymous users, the displayed info are:
    
      - Task type
      - Task arguments
      - Task scheduling date
      - Task start date
      - Task termination date
      - Task duration
      - Task log (with Traceback removed in case of failed task,
        only the exception is displayed)
    
    For staff users, more internal info and a full traceback are displayed in
    case of a failed task.
    
    Related to T2325

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/232/ for more details.

This revision is now accepted and ready to land.Jun 26 2020, 3:25 PM