swh.web 0.14.2__py3-none-any.whl → 0.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- swh/web/alter/forms.py +16 -16
- swh/web/alter/templates/admin_alteration.html +5 -5
- swh/web/alter/templates/alteration_details.html +2 -2
- swh/web/alter/templates/assistant_category.html +21 -19
- swh/web/alter/templates/assistant_email.html +3 -4
- swh/web/alter/templates/assistant_origins.html +1 -2
- swh/web/alter/templates/assistant_reasons.html +1 -2
- swh/web/alter/templates/assistant_summary.html +3 -4
- swh/web/alter/templates/content_policies.html +8 -15
- swh/web/alter/templates/includes/swh_legal.html +1 -1
- swh/web/alter/tests/test_views.py +2 -2
- swh/web/alter/urls.py +1 -1
- swh/web/alter/views.py +2 -2
- swh/web/browse/assets/browse/browse.css +10 -0
- swh/web/browse/assets/browse/sidetabs.js +22 -2
- swh/web/browse/templates/includes/sidetabs.html +20 -16
- swh/web/browse/templates/includes/snapshot-context.html +3 -1
- swh/web/save_code_now/templates/includes/take-new-snapshot.html +1 -1
- swh/web/static/css/browse.0a250d3b07ce628588a5.css +2 -0
- swh/web/static/css/browse.0a250d3b07ce628588a5.css.map +1 -0
- swh/web/static/js/add_forge_now.f8fa8235350a7875b4b2.js.map +1 -1
- swh/web/static/js/archive_coverage.71f6961fbdc0d76c313b.js +3 -0
- swh/web/static/js/{archive_coverage.b37e2158e800bc69180b.js.LICENSE.txt → archive_coverage.71f6961fbdc0d76c313b.js.LICENSE.txt} +1 -1
- swh/web/static/js/archive_coverage.71f6961fbdc0d76c313b.js.map +1 -0
- swh/web/static/js/auth.971392ebe3f22c222189.js.map +1 -1
- swh/web/static/js/{browse.b150f8992236375f2e9b.js → browse.d5014e5cae44a2cd3e6e.js} +3 -3
- swh/web/static/js/browse.d5014e5cae44a2cd3e6e.js.map +1 -0
- swh/web/static/js/deposit.060ba94288f399dfe89e.js.map +1 -1
- swh/web/static/js/guided_tour.3a7a41181c43663f866b.js.map +1 -1
- swh/web/static/js/highlightjs.19cb5fa8879fdc8357d7.js.map +1 -1
- swh/web/static/js/mailmap.5dc62b52b8eb18e2e8b0.js.map +1 -1
- swh/web/static/js/origin_visits.679992a2a951f67a08bc.js.map +1 -1
- swh/web/static/js/pdf.worker.min.js +1 -1
- swh/web/static/js/pdfjs.97ecbde9d93314dba75a.js +3 -0
- swh/web/static/js/pdfjs.97ecbde9d93314dba75a.js.map +1 -0
- swh/web/static/js/revision.c5f4750ef7caee355fd9.js.map +1 -1
- swh/web/static/js/save_code_now.3db9c75765eb44fe774a.js.map +1 -1
- swh/web/static/js/showdown.8be01722fe56f5a7c2db.js.map +1 -1
- swh/web/static/js/vault.8c6e8e445d128eb30488.js.map +1 -1
- swh/web/static/js/{vendors.076b42bbe0326fc632ae.js → vendors.532425b092b95d43a1d6.js} +3 -3
- swh/web/static/js/vendors.532425b092b95d43a1d6.js.map +1 -0
- swh/web/static/js/webapp.5427bd8b32cec7de0951.js +3 -0
- swh/web/static/js/{webapp.ec7025df24c9f358f1cc.js.LICENSE.txt → webapp.5427bd8b32cec7de0951.js.LICENSE.txt} +1 -1
- swh/web/static/js/webapp.5427bd8b32cec7de0951.js.map +1 -0
- swh/web/static/jssources/@iframe-resizer/child/index.umd.js +2 -2
- swh/web/static/jssources/@iframe-resizer/parent/index.umd.js +2 -2
- swh/web/static/jssources/core-js/internals/array-to-reversed.js +2 -2
- swh/web/static/jssources/core-js/internals/array-with.js +2 -2
- swh/web/static/jssources/core-js/internals/async-iterator-iteration.js +6 -1
- swh/web/static/jssources/core-js/internals/flatten-into-array.js +1 -1
- swh/web/static/jssources/core-js/internals/get-iterator-direct.js +1 -1
- swh/web/static/jssources/core-js/internals/install-error-cause.js +1 -1
- swh/web/static/jssources/core-js/internals/iterator-create-proxy.js +1 -1
- swh/web/static/jssources/core-js/internals/set-difference.js +1 -1
- swh/web/static/jssources/core-js/internals/set-intersection.js +1 -1
- swh/web/static/jssources/core-js/internals/set-is-disjoint-from.js +1 -1
- swh/web/static/jssources/core-js/internals/set-is-subset-of.js +1 -1
- swh/web/static/jssources/core-js/internals/set-is-superset-of.js +1 -1
- swh/web/static/jssources/core-js/internals/set-method-get-keys-before-cloning-detection.js +1 -1
- swh/web/static/jssources/core-js/internals/set-symmetric-difference.js +1 -1
- swh/web/static/jssources/core-js/internals/set-union.js +1 -1
- swh/web/static/jssources/core-js/internals/shared-store.js +2 -2
- swh/web/static/jssources/core-js/internals/string-pad.js +0 -1
- swh/web/static/jssources/core-js/modules/es.array-buffer.transfer-to-fixed-length.js +1 -1
- swh/web/static/jssources/core-js/modules/es.array-buffer.transfer.js +1 -1
- swh/web/static/jssources/core-js/modules/es.error.is-error.js +1 -1
- swh/web/static/jssources/core-js/modules/es.symbol.constructor.js +1 -1
- swh/web/static/jssources/jslicenses.json +1 -1
- swh/web/static/jssources/pdfjs-dist/build/pdf.worker.mjs +299 -13
- swh/web/static/jssources/pdfjs-dist/legacy/build/pdf.mjs +492 -113
- swh/web/static/jssources/swh/web/browse/assets/browse/sidetabs.js +22 -2
- swh/web/static/jssources/swh/web/webapp/assets/webapp/webapp-utils.js +10 -0
- swh/web/static/webpack-stats.json +73 -73
- swh/web/utils/archive.py +12 -0
- swh/web/utils/tests/test_archive.py +32 -15
- swh/web/vault/templates/includes/vault-common.html +1 -1
- swh/web/vault/templates/includes/vault-create-tasks.html +5 -5
- swh/web/webapp/assets/webapp/webapp-utils.js +10 -0
- swh/web/webapp/templates/includes/footer.html +1 -1
- swh/web/webapp/templates/includes/global-modals.html +3 -3
- {swh_web-0.14.2.dist-info → swh_web-0.15.0.dist-info}/METADATA +1 -1
- {swh_web-0.14.2.dist-info → swh_web-0.15.0.dist-info}/RECORD +89 -89
- swh/web/static/css/browse.5775e0a313f4ccb8aef5.css +0 -2
- swh/web/static/css/browse.5775e0a313f4ccb8aef5.css.map +0 -1
- swh/web/static/js/archive_coverage.b37e2158e800bc69180b.js +0 -3
- swh/web/static/js/archive_coverage.b37e2158e800bc69180b.js.map +0 -1
- swh/web/static/js/browse.b150f8992236375f2e9b.js.map +0 -1
- swh/web/static/js/pdfjs.ca88359f90430972e38c.js +0 -3
- swh/web/static/js/pdfjs.ca88359f90430972e38c.js.map +0 -1
- swh/web/static/js/vendors.076b42bbe0326fc632ae.js.map +0 -1
- swh/web/static/js/webapp.ec7025df24c9f358f1cc.js +0 -3
- swh/web/static/js/webapp.ec7025df24c9f358f1cc.js.map +0 -1
- /swh/web/static/js/{browse.b150f8992236375f2e9b.js.LICENSE.txt → browse.d5014e5cae44a2cd3e6e.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{pdfjs.ca88359f90430972e38c.js.LICENSE.txt → pdfjs.97ecbde9d93314dba75a.js.LICENSE.txt} +0 -0
- /swh/web/static/js/{vendors.076b42bbe0326fc632ae.js.LICENSE.txt → vendors.532425b092b95d43a1d6.js.LICENSE.txt} +0 -0
- {swh_web-0.14.2.dist-info → swh_web-0.15.0.dist-info}/WHEEL +0 -0
- {swh_web-0.14.2.dist-info → swh_web-0.15.0.dist-info}/licenses/AUTHORS +0 -0
- {swh_web-0.14.2.dist-info → swh_web-0.15.0.dist-info}/licenses/LICENSE +0 -0
- {swh_web-0.14.2.dist-info → swh_web-0.15.0.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (C) 2018-
|
|
2
|
+
* Copyright (C) 2018-2025 The Software Heritage developers
|
|
3
3
|
* See the AUTHORS file at the top-level directory of this distribution
|
|
4
4
|
* License: GNU Affero General Public License version 3, or any later version
|
|
5
5
|
* See top-level LICENSE file for more information
|
|
@@ -92,7 +92,7 @@ function updateTabsSize() {
|
|
|
92
92
|
const top = window.innerHeight >= 700 ? 250 : 35;
|
|
93
93
|
$('.swh-side-tab').css('top', top + 'px');
|
|
94
94
|
// move citations tab handle below the permalinks one
|
|
95
|
-
$('#swh-citations .handle').css('top', '
|
|
95
|
+
$('#swh-citations .handle').css('top', '128px');
|
|
96
96
|
|
|
97
97
|
// backup current display states for tab contents
|
|
98
98
|
const currentSWHIDsDisplay = $('#swh-identifiers-content').css('display');
|
|
@@ -244,6 +244,11 @@ export async function initSideTabs() {
|
|
|
244
244
|
$('#swh-identifiers').data('opening', false);
|
|
245
245
|
$('#swhids-handle').attr('aria-expanded', 'true');
|
|
246
246
|
$('#swhids-handle').attr('aria-label', 'Collapse permalinks tab');
|
|
247
|
+
$('#swhids-handle').attr('title', 'Collapse permalinks tab');
|
|
248
|
+
$('#citations-handle').attr('aria-label', 'Display citations tab');
|
|
249
|
+
$('#citations-handle').attr('title', 'Display citations tab');
|
|
250
|
+
$('.tab-handle-arrow').removeClass('mdi-chevron-up');
|
|
251
|
+
$('.tab-handle-arrow').addClass('mdi-chevron-down');
|
|
247
252
|
},
|
|
248
253
|
onBeforeClose: function() {
|
|
249
254
|
$('#swh-identifiers').data('closing', true);
|
|
@@ -257,6 +262,9 @@ export async function initSideTabs() {
|
|
|
257
262
|
$('#swh-identifiers').data('closing', false);
|
|
258
263
|
$('#swhids-handle').attr('aria-expanded', 'false');
|
|
259
264
|
$('#swhids-handle').attr('aria-label', 'Expand permalinks tab');
|
|
265
|
+
$('#swhids-handle').attr('title', 'Expand permalinks tab');
|
|
266
|
+
$('.tab-handle-arrow').removeClass('mdi-chevron-down');
|
|
267
|
+
$('.tab-handle-arrow').addClass('mdi-chevron-up');
|
|
260
268
|
$('#swhids-handle').css('padding-bottom', '0.1em');
|
|
261
269
|
setTimeout(() => {
|
|
262
270
|
// ensure elements in closed SWHIDs tab are not keyboard focusable
|
|
@@ -275,6 +283,10 @@ export async function initSideTabs() {
|
|
|
275
283
|
// display SWHIDs tab content if not visible
|
|
276
284
|
toggleTabContentDisplay('#swh-identifiers', true);
|
|
277
285
|
toggleTabContentDisplay('#swh-citations', false);
|
|
286
|
+
$('#citations-handle').attr('aria-label', 'Display citations tab');
|
|
287
|
+
$('#citations-handle').attr('title', 'Display citations tab');
|
|
288
|
+
$('#swhids-handle').attr('aria-label', 'Collapse permalinks tab');
|
|
289
|
+
$('#swhids-handle').attr('title', 'Collapse permalinks tab');
|
|
278
290
|
} else {
|
|
279
291
|
$('#swh-identifiers').trigger('close');
|
|
280
292
|
}
|
|
@@ -322,6 +334,9 @@ export async function initSideTabs() {
|
|
|
322
334
|
$('#swh-citations').data('opening', false);
|
|
323
335
|
$('#citations-handle').attr('aria-expanded', 'true');
|
|
324
336
|
$('#citations-handle').attr('aria-label', 'Collapse citations tab');
|
|
337
|
+
$('#citations-handle').attr('title', 'Collapse citations tab');
|
|
338
|
+
$('#swhids-handle').attr('aria-label', 'Display permalinks tab');
|
|
339
|
+
$('#swhids-handle').attr('title', 'Display permalinks tab');
|
|
325
340
|
},
|
|
326
341
|
onBeforeClose: function() {
|
|
327
342
|
$('#swh-citations').data('closing', true);
|
|
@@ -335,6 +350,7 @@ export async function initSideTabs() {
|
|
|
335
350
|
$('#swh-citations').data('closing', false);
|
|
336
351
|
$('#citations-handle').attr('aria-expanded', 'false');
|
|
337
352
|
$('#citations-handle').attr('aria-label', 'Expand citations tab');
|
|
353
|
+
$('#citations-handle').attr('title', 'Expand citations tab');
|
|
338
354
|
$('#citations-handle').css('padding-bottom', '0.1em');
|
|
339
355
|
setTimeout(() => {
|
|
340
356
|
// ensure elements in closed citations tab are not keyboard focusable
|
|
@@ -353,6 +369,10 @@ export async function initSideTabs() {
|
|
|
353
369
|
// display citation tab content if not visible
|
|
354
370
|
toggleTabContentDisplay('#swh-identifiers', false);
|
|
355
371
|
toggleTabContentDisplay('#swh-citations', true);
|
|
372
|
+
$('#swhids-handle').attr('aria-label', 'Display permalinks tab');
|
|
373
|
+
$('#swhids-handle').attr('title', 'Display permalinks tab');
|
|
374
|
+
$('#citations-handle').attr('aria-label', 'Collapse citations tab');
|
|
375
|
+
$('#citations-handle').attr('title', 'Collapse citations tab');
|
|
356
376
|
} else {
|
|
357
377
|
$('#swh-citations').trigger('close');
|
|
358
378
|
}
|
|
@@ -138,6 +138,16 @@ $(document).ready(() => {
|
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
+
// modals in DOM are forced to not be displayed by default to avoid
|
|
142
|
+
// issues when animations are disabled, we need to set some event
|
|
143
|
+
// handlers forcing their display/hiding to restore expected behavior
|
|
144
|
+
$('.modal.fade').on('show.bs.modal', event => {
|
|
145
|
+
$(event.target).removeClass('d-none');
|
|
146
|
+
});
|
|
147
|
+
$('.modal.fade').on('hidden.bs.modal', event => {
|
|
148
|
+
$(event.target).addClass('d-none');
|
|
149
|
+
});
|
|
150
|
+
|
|
141
151
|
});
|
|
142
152
|
|
|
143
153
|
export function initPage(page) {
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/css/badges.52d6fb6f998319e1690a.css.map",
|
|
52
52
|
"publicPath": "/static/css/badges.52d6fb6f998319e1690a.css.map"
|
|
53
53
|
},
|
|
54
|
-
"css/browse.
|
|
55
|
-
"name": "css/browse.
|
|
56
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/css/browse.
|
|
57
|
-
"publicPath": "/static/css/browse.
|
|
54
|
+
"css/browse.0a250d3b07ce628588a5.css": {
|
|
55
|
+
"name": "css/browse.0a250d3b07ce628588a5.css",
|
|
56
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/css/browse.0a250d3b07ce628588a5.css",
|
|
57
|
+
"publicPath": "/static/css/browse.0a250d3b07ce628588a5.css"
|
|
58
58
|
},
|
|
59
|
-
"css/browse.
|
|
60
|
-
"name": "css/browse.
|
|
61
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/css/browse.
|
|
62
|
-
"publicPath": "/static/css/browse.
|
|
59
|
+
"css/browse.0a250d3b07ce628588a5.css.map": {
|
|
60
|
+
"name": "css/browse.0a250d3b07ce628588a5.css.map",
|
|
61
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/css/browse.0a250d3b07ce628588a5.css.map",
|
|
62
|
+
"publicPath": "/static/css/browse.0a250d3b07ce628588a5.css.map"
|
|
63
63
|
},
|
|
64
64
|
"css/guided_tour.96ec07d95e2576133b7b.css": {
|
|
65
65
|
"name": "css/guided_tour.96ec07d95e2576133b7b.css",
|
|
@@ -644,20 +644,20 @@
|
|
|
644
644
|
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/alter.5fc556e2e1ea9a108e8b.js.map",
|
|
645
645
|
"publicPath": "/static/js/alter.5fc556e2e1ea9a108e8b.js.map"
|
|
646
646
|
},
|
|
647
|
-
"js/archive_coverage.
|
|
648
|
-
"name": "js/archive_coverage.
|
|
649
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/archive_coverage.
|
|
650
|
-
"publicPath": "/static/js/archive_coverage.
|
|
647
|
+
"js/archive_coverage.71f6961fbdc0d76c313b.js": {
|
|
648
|
+
"name": "js/archive_coverage.71f6961fbdc0d76c313b.js",
|
|
649
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/archive_coverage.71f6961fbdc0d76c313b.js",
|
|
650
|
+
"publicPath": "/static/js/archive_coverage.71f6961fbdc0d76c313b.js"
|
|
651
651
|
},
|
|
652
|
-
"js/archive_coverage.
|
|
653
|
-
"name": "js/archive_coverage.
|
|
654
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/archive_coverage.
|
|
655
|
-
"publicPath": "/static/js/archive_coverage.
|
|
652
|
+
"js/archive_coverage.71f6961fbdc0d76c313b.js.LICENSE.txt": {
|
|
653
|
+
"name": "js/archive_coverage.71f6961fbdc0d76c313b.js.LICENSE.txt",
|
|
654
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/archive_coverage.71f6961fbdc0d76c313b.js.LICENSE.txt",
|
|
655
|
+
"publicPath": "/static/js/archive_coverage.71f6961fbdc0d76c313b.js.LICENSE.txt"
|
|
656
656
|
},
|
|
657
|
-
"js/archive_coverage.
|
|
658
|
-
"name": "js/archive_coverage.
|
|
659
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/archive_coverage.
|
|
660
|
-
"publicPath": "/static/js/archive_coverage.
|
|
657
|
+
"js/archive_coverage.71f6961fbdc0d76c313b.js.map": {
|
|
658
|
+
"name": "js/archive_coverage.71f6961fbdc0d76c313b.js.map",
|
|
659
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/archive_coverage.71f6961fbdc0d76c313b.js.map",
|
|
660
|
+
"publicPath": "/static/js/archive_coverage.71f6961fbdc0d76c313b.js.map"
|
|
661
661
|
},
|
|
662
662
|
"js/auth.971392ebe3f22c222189.js": {
|
|
663
663
|
"name": "js/auth.971392ebe3f22c222189.js",
|
|
@@ -684,20 +684,20 @@
|
|
|
684
684
|
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/badges.fba53d5f61bed948ddd4.js.map",
|
|
685
685
|
"publicPath": "/static/js/badges.fba53d5f61bed948ddd4.js.map"
|
|
686
686
|
},
|
|
687
|
-
"js/browse.
|
|
688
|
-
"name": "js/browse.
|
|
689
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/browse.
|
|
690
|
-
"publicPath": "/static/js/browse.
|
|
687
|
+
"js/browse.d5014e5cae44a2cd3e6e.js": {
|
|
688
|
+
"name": "js/browse.d5014e5cae44a2cd3e6e.js",
|
|
689
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/browse.d5014e5cae44a2cd3e6e.js",
|
|
690
|
+
"publicPath": "/static/js/browse.d5014e5cae44a2cd3e6e.js"
|
|
691
691
|
},
|
|
692
|
-
"js/browse.
|
|
693
|
-
"name": "js/browse.
|
|
694
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/browse.
|
|
695
|
-
"publicPath": "/static/js/browse.
|
|
692
|
+
"js/browse.d5014e5cae44a2cd3e6e.js.LICENSE.txt": {
|
|
693
|
+
"name": "js/browse.d5014e5cae44a2cd3e6e.js.LICENSE.txt",
|
|
694
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/browse.d5014e5cae44a2cd3e6e.js.LICENSE.txt",
|
|
695
|
+
"publicPath": "/static/js/browse.d5014e5cae44a2cd3e6e.js.LICENSE.txt"
|
|
696
696
|
},
|
|
697
|
-
"js/browse.
|
|
698
|
-
"name": "js/browse.
|
|
699
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/browse.
|
|
700
|
-
"publicPath": "/static/js/browse.
|
|
697
|
+
"js/browse.d5014e5cae44a2cd3e6e.js.map": {
|
|
698
|
+
"name": "js/browse.d5014e5cae44a2cd3e6e.js.map",
|
|
699
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/browse.d5014e5cae44a2cd3e6e.js.map",
|
|
700
|
+
"publicPath": "/static/js/browse.d5014e5cae44a2cd3e6e.js.map"
|
|
701
701
|
},
|
|
702
702
|
"js/d3.2fe5b1ddad0dbb25a61b.js": {
|
|
703
703
|
"name": "js/d3.2fe5b1ddad0dbb25a61b.js",
|
|
@@ -1125,20 +1125,20 @@
|
|
|
1125
1125
|
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/pdf.worker.min.js.LICENSE.txt",
|
|
1126
1126
|
"publicPath": "/static/js/pdf.worker.min.js.LICENSE.txt"
|
|
1127
1127
|
},
|
|
1128
|
-
"js/pdfjs.
|
|
1129
|
-
"name": "js/pdfjs.
|
|
1130
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/pdfjs.
|
|
1131
|
-
"publicPath": "/static/js/pdfjs.
|
|
1128
|
+
"js/pdfjs.97ecbde9d93314dba75a.js": {
|
|
1129
|
+
"name": "js/pdfjs.97ecbde9d93314dba75a.js",
|
|
1130
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/pdfjs.97ecbde9d93314dba75a.js",
|
|
1131
|
+
"publicPath": "/static/js/pdfjs.97ecbde9d93314dba75a.js"
|
|
1132
1132
|
},
|
|
1133
|
-
"js/pdfjs.
|
|
1134
|
-
"name": "js/pdfjs.
|
|
1135
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/pdfjs.
|
|
1136
|
-
"publicPath": "/static/js/pdfjs.
|
|
1133
|
+
"js/pdfjs.97ecbde9d93314dba75a.js.LICENSE.txt": {
|
|
1134
|
+
"name": "js/pdfjs.97ecbde9d93314dba75a.js.LICENSE.txt",
|
|
1135
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/pdfjs.97ecbde9d93314dba75a.js.LICENSE.txt",
|
|
1136
|
+
"publicPath": "/static/js/pdfjs.97ecbde9d93314dba75a.js.LICENSE.txt"
|
|
1137
1137
|
},
|
|
1138
|
-
"js/pdfjs.
|
|
1139
|
-
"name": "js/pdfjs.
|
|
1140
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/pdfjs.
|
|
1141
|
-
"publicPath": "/static/js/pdfjs.
|
|
1138
|
+
"js/pdfjs.97ecbde9d93314dba75a.js.map": {
|
|
1139
|
+
"name": "js/pdfjs.97ecbde9d93314dba75a.js.map",
|
|
1140
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/pdfjs.97ecbde9d93314dba75a.js.map",
|
|
1141
|
+
"publicPath": "/static/js/pdfjs.97ecbde9d93314dba75a.js.map"
|
|
1142
1142
|
},
|
|
1143
1143
|
"js/revision.c5f4750ef7caee355fd9.js": {
|
|
1144
1144
|
"name": "js/revision.c5f4750ef7caee355fd9.js",
|
|
@@ -1200,35 +1200,35 @@
|
|
|
1200
1200
|
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/vault.8c6e8e445d128eb30488.js.map",
|
|
1201
1201
|
"publicPath": "/static/js/vault.8c6e8e445d128eb30488.js.map"
|
|
1202
1202
|
},
|
|
1203
|
-
"js/vendors.
|
|
1204
|
-
"name": "js/vendors.
|
|
1205
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/vendors.
|
|
1206
|
-
"publicPath": "/static/js/vendors.
|
|
1203
|
+
"js/vendors.532425b092b95d43a1d6.js": {
|
|
1204
|
+
"name": "js/vendors.532425b092b95d43a1d6.js",
|
|
1205
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/vendors.532425b092b95d43a1d6.js",
|
|
1206
|
+
"publicPath": "/static/js/vendors.532425b092b95d43a1d6.js"
|
|
1207
1207
|
},
|
|
1208
|
-
"js/vendors.
|
|
1209
|
-
"name": "js/vendors.
|
|
1210
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/vendors.
|
|
1211
|
-
"publicPath": "/static/js/vendors.
|
|
1208
|
+
"js/vendors.532425b092b95d43a1d6.js.LICENSE.txt": {
|
|
1209
|
+
"name": "js/vendors.532425b092b95d43a1d6.js.LICENSE.txt",
|
|
1210
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/vendors.532425b092b95d43a1d6.js.LICENSE.txt",
|
|
1211
|
+
"publicPath": "/static/js/vendors.532425b092b95d43a1d6.js.LICENSE.txt"
|
|
1212
1212
|
},
|
|
1213
|
-
"js/vendors.
|
|
1214
|
-
"name": "js/vendors.
|
|
1215
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/vendors.
|
|
1216
|
-
"publicPath": "/static/js/vendors.
|
|
1213
|
+
"js/vendors.532425b092b95d43a1d6.js.map": {
|
|
1214
|
+
"name": "js/vendors.532425b092b95d43a1d6.js.map",
|
|
1215
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/vendors.532425b092b95d43a1d6.js.map",
|
|
1216
|
+
"publicPath": "/static/js/vendors.532425b092b95d43a1d6.js.map"
|
|
1217
1217
|
},
|
|
1218
|
-
"js/webapp.
|
|
1219
|
-
"name": "js/webapp.
|
|
1220
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/webapp.
|
|
1221
|
-
"publicPath": "/static/js/webapp.
|
|
1218
|
+
"js/webapp.5427bd8b32cec7de0951.js": {
|
|
1219
|
+
"name": "js/webapp.5427bd8b32cec7de0951.js",
|
|
1220
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/webapp.5427bd8b32cec7de0951.js",
|
|
1221
|
+
"publicPath": "/static/js/webapp.5427bd8b32cec7de0951.js"
|
|
1222
1222
|
},
|
|
1223
|
-
"js/webapp.
|
|
1224
|
-
"name": "js/webapp.
|
|
1225
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/webapp.
|
|
1226
|
-
"publicPath": "/static/js/webapp.
|
|
1223
|
+
"js/webapp.5427bd8b32cec7de0951.js.LICENSE.txt": {
|
|
1224
|
+
"name": "js/webapp.5427bd8b32cec7de0951.js.LICENSE.txt",
|
|
1225
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/webapp.5427bd8b32cec7de0951.js.LICENSE.txt",
|
|
1226
|
+
"publicPath": "/static/js/webapp.5427bd8b32cec7de0951.js.LICENSE.txt"
|
|
1227
1227
|
},
|
|
1228
|
-
"js/webapp.
|
|
1229
|
-
"name": "js/webapp.
|
|
1230
|
-
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/webapp.
|
|
1231
|
-
"publicPath": "/static/js/webapp.
|
|
1228
|
+
"js/webapp.5427bd8b32cec7de0951.js.map": {
|
|
1229
|
+
"name": "js/webapp.5427bd8b32cec7de0951.js.map",
|
|
1230
|
+
"path": "/var/lib/jenkins/agent-workdir/workspace/DWAPPS/pypi-upload/swh/web/static/js/webapp.5427bd8b32cec7de0951.js.map",
|
|
1231
|
+
"publicPath": "/static/js/webapp.5427bd8b32cec7de0951.js.map"
|
|
1232
1232
|
},
|
|
1233
1233
|
"robots.txt": {
|
|
1234
1234
|
"name": "robots.txt",
|
|
@@ -1247,7 +1247,7 @@
|
|
|
1247
1247
|
],
|
|
1248
1248
|
"archive_coverage": [
|
|
1249
1249
|
"css/archive_coverage.70eba3d32ed75472d638.css",
|
|
1250
|
-
"js/archive_coverage.
|
|
1250
|
+
"js/archive_coverage.71f6961fbdc0d76c313b.js"
|
|
1251
1251
|
],
|
|
1252
1252
|
"auth": [
|
|
1253
1253
|
"css/auth.4d6bb8912926efb08000.css",
|
|
@@ -1258,8 +1258,8 @@
|
|
|
1258
1258
|
"js/badges.fba53d5f61bed948ddd4.js"
|
|
1259
1259
|
],
|
|
1260
1260
|
"browse": [
|
|
1261
|
-
"css/browse.
|
|
1262
|
-
"js/browse.
|
|
1261
|
+
"css/browse.0a250d3b07ce628588a5.css",
|
|
1262
|
+
"js/browse.d5014e5cae44a2cd3e6e.js"
|
|
1263
1263
|
],
|
|
1264
1264
|
"deposit": [
|
|
1265
1265
|
"js/deposit.060ba94288f399dfe89e.js"
|
|
@@ -1288,11 +1288,11 @@
|
|
|
1288
1288
|
],
|
|
1289
1289
|
"vendors": [
|
|
1290
1290
|
"css/vendors.2aeca7777ec7af396ad7.css",
|
|
1291
|
-
"js/vendors.
|
|
1291
|
+
"js/vendors.532425b092b95d43a1d6.js"
|
|
1292
1292
|
],
|
|
1293
1293
|
"webapp": [
|
|
1294
1294
|
"css/webapp.4655323082740f1a4862.css",
|
|
1295
|
-
"js/webapp.
|
|
1295
|
+
"js/webapp.5427bd8b32cec7de0951.js"
|
|
1296
1296
|
]
|
|
1297
1297
|
},
|
|
1298
1298
|
"publicPath": "/static/"
|
swh/web/utils/archive.py
CHANGED
|
@@ -560,12 +560,17 @@ def lookup_origin_intrinsic_metadata(
|
|
|
560
560
|
|
|
561
561
|
def _lookup_directory_intrinsic_citation_metadata(
|
|
562
562
|
directory_id: str,
|
|
563
|
+
max_top_level_dir_recurse: int = 3,
|
|
563
564
|
) -> List[IntrinsicMetadataFile]:
|
|
564
565
|
"""Get raw intrinsic metadata given a directory id, respectively original codemeta.json
|
|
565
566
|
and citation.cff found in this directory.
|
|
566
567
|
|
|
568
|
+
If the directory only contains a single directory, that function will recurse.
|
|
569
|
+
|
|
567
570
|
Args:
|
|
568
571
|
directory_id: hexadecimal representation of a directory id (sha1_git)
|
|
572
|
+
max_top_level_dir_recurse: the maximum number of recursion to
|
|
573
|
+
perform in case of top level directories to traverse
|
|
569
574
|
|
|
570
575
|
Returns:
|
|
571
576
|
list of intrinsic metadata files info
|
|
@@ -590,6 +595,13 @@ def _lookup_directory_intrinsic_citation_metadata(
|
|
|
590
595
|
pass
|
|
591
596
|
|
|
592
597
|
if not metadata_files_info:
|
|
598
|
+
if max_top_level_dir_recurse > 0:
|
|
599
|
+
dir_entries = list(lookup_directory(directory_id))
|
|
600
|
+
if len(dir_entries) == 1 and dir_entries[0]["type"] == "dir":
|
|
601
|
+
# handle top level directory edge case
|
|
602
|
+
return _lookup_directory_intrinsic_citation_metadata(
|
|
603
|
+
dir_entries[0]["target"], max_top_level_dir_recurse - 1
|
|
604
|
+
)
|
|
593
605
|
raise NotFoundExc(
|
|
594
606
|
f"No metadata file ({', '.join(metadata_file_paths)}) in directory"
|
|
595
607
|
f" with sha1_git {directory_id} found."
|
|
@@ -1218,11 +1218,7 @@ def test_lookup_snapshot_branch_names_filtering_paginated(
|
|
|
1218
1218
|
assert partial_branches["next_branch"] is None
|
|
1219
1219
|
|
|
1220
1220
|
|
|
1221
|
-
def
|
|
1222
|
-
intrinsic_citation_metadata = archive.lookup_origin_intrinsic_citation_metadata(
|
|
1223
|
-
origin_with_metadata_file["url"]
|
|
1224
|
-
)
|
|
1225
|
-
|
|
1221
|
+
def _check_intrinsic_citation_metadata(intrinsic_citation_metadata):
|
|
1226
1222
|
assert len(intrinsic_citation_metadata) == 2
|
|
1227
1223
|
assert intrinsic_citation_metadata[0]["type"] == "codemeta.json"
|
|
1228
1224
|
assert intrinsic_citation_metadata[1]["type"] == "citation.cff"
|
|
@@ -1236,6 +1232,13 @@ def test_lookup_origin_intrinsic_citation_metadata(origin_with_metadata_file):
|
|
|
1236
1232
|
assert cff_file["cff-version"] == "1.2.0"
|
|
1237
1233
|
|
|
1238
1234
|
|
|
1235
|
+
def test_lookup_origin_intrinsic_citation_metadata(origin_with_metadata_file):
|
|
1236
|
+
intrinsic_citation_metadata = archive.lookup_origin_intrinsic_citation_metadata(
|
|
1237
|
+
origin_with_metadata_file["url"]
|
|
1238
|
+
)
|
|
1239
|
+
_check_intrinsic_citation_metadata(intrinsic_citation_metadata)
|
|
1240
|
+
|
|
1241
|
+
|
|
1239
1242
|
def test_lookup_swhid_raw_intrinsic_metadata(objects_with_metadata_file):
|
|
1240
1243
|
for object_with_metadata_file in objects_with_metadata_file:
|
|
1241
1244
|
intrinsic_citation_metadata = (
|
|
@@ -1244,19 +1247,33 @@ def test_lookup_swhid_raw_intrinsic_metadata(objects_with_metadata_file):
|
|
|
1244
1247
|
)
|
|
1245
1248
|
)
|
|
1246
1249
|
|
|
1247
|
-
|
|
1248
|
-
assert intrinsic_citation_metadata[0]["type"] == "codemeta.json"
|
|
1249
|
-
assert intrinsic_citation_metadata[1]["type"] == "citation.cff"
|
|
1250
|
+
_check_intrinsic_citation_metadata(intrinsic_citation_metadata)
|
|
1250
1251
|
|
|
1251
|
-
codemeta_file = intrinsic_citation_metadata[0]["content"]
|
|
1252
|
-
cff_file = intrinsic_citation_metadata[1]["content"]
|
|
1253
1252
|
|
|
1254
|
-
|
|
1255
|
-
|
|
1253
|
+
def test_lookup_swhid_raw_intrinsic_metadata_top_level_dir(
|
|
1254
|
+
archive_data, origin_with_metadata_file
|
|
1255
|
+
):
|
|
1256
|
+
snapshot = archive.lookup_latest_origin_snapshot(origin_with_metadata_file["url"])
|
|
1257
|
+
revision = archive.lookup_revision(
|
|
1258
|
+
snapshot["branches"]["refs/heads/master"]["target"]
|
|
1259
|
+
)
|
|
1260
|
+
directory = Directory(
|
|
1261
|
+
entries=(
|
|
1262
|
+
DirectoryEntry(
|
|
1263
|
+
name=b"root_dir",
|
|
1264
|
+
type="dir",
|
|
1265
|
+
target=hash_to_bytes(revision["directory"]),
|
|
1266
|
+
perms=DentryPerms.directory,
|
|
1267
|
+
),
|
|
1256
1268
|
)
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1269
|
+
)
|
|
1270
|
+
archive_data.directory_add([directory])
|
|
1271
|
+
intrinsic_citation_metadata = (
|
|
1272
|
+
archive.lookup_intrinsic_citation_metadata_by_target_swhid(
|
|
1273
|
+
str(directory.swhid())
|
|
1274
|
+
)
|
|
1275
|
+
)
|
|
1276
|
+
_check_intrinsic_citation_metadata(intrinsic_citation_metadata)
|
|
1260
1277
|
|
|
1261
1278
|
|
|
1262
1279
|
def test_lookup_swhid_raw_intrinsic_metadata_not_found(unknown_core_swhid):
|
|
@@ -47,7 +47,7 @@ See top-level LICENSE file for more information
|
|
|
47
47
|
{% endif %}
|
|
48
48
|
<!-- modals related to the creation of vault cooking tasks -->
|
|
49
49
|
<!-- they will be reparented in the script below in order to be able to display them -->
|
|
50
|
-
<div class="modal fade"
|
|
50
|
+
<div class="modal fade d-none"
|
|
51
51
|
id="vault-cook-directory-modal"
|
|
52
52
|
tabindex="-1"
|
|
53
53
|
role="dialog"
|
|
@@ -92,7 +92,7 @@ See top-level LICENSE file for more information
|
|
|
92
92
|
</div>
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
95
|
-
<div class="modal fade"
|
|
95
|
+
<div class="modal fade d-none"
|
|
96
96
|
id="vault-download-directory-modal"
|
|
97
97
|
tabindex="-1"
|
|
98
98
|
role="dialog"
|
|
@@ -129,7 +129,7 @@ See top-level LICENSE file for more information
|
|
|
129
129
|
</div>
|
|
130
130
|
</div>
|
|
131
131
|
</div>
|
|
132
|
-
<div class="modal fade"
|
|
132
|
+
<div class="modal fade d-none"
|
|
133
133
|
id="vault-cook-revision-modal"
|
|
134
134
|
tabindex="-1"
|
|
135
135
|
role="dialog"
|
|
@@ -174,7 +174,7 @@ See top-level LICENSE file for more information
|
|
|
174
174
|
</div>
|
|
175
175
|
</div>
|
|
176
176
|
</div>
|
|
177
|
-
<div class="modal fade"
|
|
177
|
+
<div class="modal fade d-none"
|
|
178
178
|
id="vault-download-revision-modal"
|
|
179
179
|
tabindex="-1"
|
|
180
180
|
role="dialog"
|
|
@@ -211,7 +211,7 @@ See top-level LICENSE file for more information
|
|
|
211
211
|
</div>
|
|
212
212
|
</div>
|
|
213
213
|
</div>
|
|
214
|
-
<div class="modal fade"
|
|
214
|
+
<div class="modal fade d-none"
|
|
215
215
|
id="invalid-email-modal"
|
|
216
216
|
tabindex="-1"
|
|
217
217
|
role="dialog"
|
|
@@ -138,6 +138,16 @@ $(document).ready(() => {
|
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
+
// modals in DOM are forced to not be displayed by default to avoid
|
|
142
|
+
// issues when animations are disabled, we need to set some event
|
|
143
|
+
// handlers forcing their display/hiding to restore expected behavior
|
|
144
|
+
$('.modal.fade').on('show.bs.modal', event => {
|
|
145
|
+
$(event.target).removeClass('d-none');
|
|
146
|
+
});
|
|
147
|
+
$('.modal.fade').on('hidden.bs.modal', event => {
|
|
148
|
+
$(event.target).addClass('d-none');
|
|
149
|
+
});
|
|
150
|
+
|
|
141
151
|
});
|
|
142
152
|
|
|
143
153
|
export function initPage(page) {
|
|
@@ -26,7 +26,7 @@ See top-level LICENSE file for more information
|
|
|
26
26
|
<a href="https://www.softwareheritage.org/legal/bulk-access-terms-of-use/">Archive access</a>,
|
|
27
27
|
<a href="https://www.softwareheritage.org/legal/api-terms-of-use/">API</a>—
|
|
28
28
|
{% if "swh.web.alter" in SWH_DJANGO_APPS %}
|
|
29
|
-
<a href="{% url 'content-
|
|
29
|
+
<a href="{% url 'content-policy' %}"
|
|
30
30
|
data-testid="swh-web-alter-content-policy">Content policy</a>—
|
|
31
31
|
{% endif %}
|
|
32
32
|
<a href="https://www.softwareheritage.org/contact/">Contact</a>—
|
|
@@ -5,7 +5,7 @@ License: GNU Affero General Public License version 3, or any later version
|
|
|
5
5
|
See top-level LICENSE file for more information
|
|
6
6
|
{% endcomment %}
|
|
7
7
|
|
|
8
|
-
<div class="modal fade"
|
|
8
|
+
<div class="modal fade d-none"
|
|
9
9
|
id="swh-web-modal-message"
|
|
10
10
|
tabindex="-1"
|
|
11
11
|
role="dialog"
|
|
@@ -33,7 +33,7 @@ See top-level LICENSE file for more information
|
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
|
-
<div class="modal fade"
|
|
36
|
+
<div class="modal fade d-none"
|
|
37
37
|
id="swh-web-modal-confirm"
|
|
38
38
|
tabindex="-1"
|
|
39
39
|
role="dialog"
|
|
@@ -65,7 +65,7 @@ See top-level LICENSE file for more information
|
|
|
65
65
|
</div>
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
|
-
<div class="modal fade"
|
|
68
|
+
<div class="modal fade d-none"
|
|
69
69
|
id="swh-web-modal-html"
|
|
70
70
|
tabindex="-1"
|
|
71
71
|
role="dialog"
|