Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124600
D7097.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D7097.diff
View Options
diff --git a/assets/src/bundles/origin/visits-reporting.js b/assets/src/bundles/origin/visits-reporting.js
--- a/assets/src/bundles/origin/visits-reporting.js
+++ b/assets/src/bundles/origin/visits-reporting.js
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2018-2021 The Software Heritage developers
+ * Copyright (C) 2018-2022 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
@@ -131,6 +131,11 @@
}
});
+ if (!firstFullVisit) {
+ $('#swh-full-visits-different-snapshots').prop('disabled', true);
+ $('#swh-full-visits').prop('disabled', true);
+ }
+
if ($('#swh-full-visits').prop('checked')) {
showFullVisits();
} else if ($('#swh-all-visits').prop('checked')) {
diff --git a/swh/web/templates/browse/origin-visits.html b/swh/web/templates/browse/origin-visits.html
--- a/swh/web/templates/browse/origin-visits.html
+++ b/swh/web/templates/browse/origin-visits.html
@@ -1,7 +1,7 @@
{% extends "./browse.html" %}
{% comment %}
-Copyright (C) 2017-2020 The Software Heritage developers
+Copyright (C) 2017-2022 The Software Heritage developers
See the AUTHORS file at the top-level directory of this distribution
License: GNU Affero General Public License version 3, or any later version
See top-level LICENSE file for more information
@@ -45,21 +45,27 @@
<form class="text-center">
<div class="custom-control custom-radio custom-control-inline">
- <input class="custom-control-input" type="radio" id="swh-different-snapshot-visits" name="swh-visits" value="option1" checked>
- <label class="custom-control-label font-weight-normal" for="swh-different-snapshot-visits" onclick="swh.origin.showFullVisitsDifferentSnapshots(event)">
- Show full visits with different snapshots
+ <input class="custom-control-input" type="radio" id="swh-all-visits" name="swh-visits"
+ value="option3" checked>
+ <label class="custom-control-label font-weight-normal" for="swh-all-visits"
+ onclick="swh.origin.showAllVisits(event)">
+ Show all visits
</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
- <input class="custom-control-input" type="radio" id="swh-full-visits" name="swh-visits" value="option2">
- <label class="custom-control-label font-weight-normal" for="swh-full-visits" onclick="swh.origin.showFullVisits(event)">
- Show all full visits
+ <input class="custom-control-input" type="radio" id="swh-full-visits-different-snapshots"
+ name="swh-visits" value="option1">
+ <label class="custom-control-label font-weight-normal" for="swh-full-visits-different-snapshots"
+ onclick="swh.origin.showFullVisitsDifferentSnapshots(event)">
+ Show full visits with different snapshots
</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
- <input class="custom-control-input" type="radio" id="swh-all-visits" name="swh-visits" value="option3">
- <label class="custom-control-label font-weight-normal" for="swh-all-visits" onclick="swh.origin.showAllVisits(event)">
- Show all visits
+ <input class="custom-control-input" type="radio" id="swh-full-visits" name="swh-visits"
+ value="option2">
+ <label class="custom-control-label font-weight-normal" for="swh-full-visits"
+ onclick="swh.origin.showFullVisits(event)">
+ Show all full visits
</label>
</div>
</form>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 2:11 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3221245
Attached To
D7097: templates/origin-visits: Prefer to show all visits by default
Event Timeline
Log In to Comment