Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/browse/origin-visits.html
{% extends "./browse.html" %} | {% extends "./browse.html" %} | ||||
{% comment %} | {% comment %} | ||||
Copyright (C) 2017-2018 The Software Heritage developers | Copyright (C) 2017-2020 The Software Heritage developers | ||||
See the AUTHORS file at the top-level directory of this distribution | See the AUTHORS file at the top-level directory of this distribution | ||||
License: GNU Affero General Public License version 3, or any later version | License: GNU Affero General Public License version 3, or any later version | ||||
See top-level LICENSE file for more information | See top-level LICENSE file for more information | ||||
{% endcomment %} | {% endcomment %} | ||||
{% load static %} | {% load static %} | ||||
{% load swh_templatetags %} | {% load swh_templatetags %} | ||||
{% load render_bundle from webpack_loader %} | {% load render_bundle from webpack_loader %} | ||||
{% block header %} | {% block header %} | ||||
{{ block.super }} | {{ block.super }} | ||||
{% render_bundle 'origin' %} | {% render_bundle 'origin' %} | ||||
{% endblock %} | {% endblock %} | ||||
{% block swh-browse-content %} | {% block swh-browse-content %} | ||||
<div class="p-3"> | |||||
<h4>Overview</h4> | <h4>Overview</h4> | ||||
<ul> | <ul> | ||||
<li class="d-inline-block"> | <li class="d-inline-block"> | ||||
<b>Total number of visits: </b>{{ origin_visits|length }} | <b>Total number of visits: </b>{{ origin_visits|length }} | ||||
<i class="mdi mdi-fw" aria-hidden="true"></i> | <i class="mdi mdi-fw" aria-hidden="true"></i> | ||||
</li> | </li> | ||||
<li class="d-inline-block"> | <li class="d-inline-block"> | ||||
<b>Last full visit: </b><span style="margin-left: 20px;" id="swh-last-full-visit"></span> | <b>Last full visit: </b><span style="margin-left: 20px;" id="swh-last-full-visit"></span> | ||||
<i class="mdi mdi-fw" aria-hidden="true"></i> | <i class="mdi mdi-fw" aria-hidden="true"></i> | ||||
</li> | </li> | ||||
<li class="d-inline-block"> | <li class="d-inline-block"> | ||||
<b>First full visit: </b><span style="margin-left: 20px;" id="swh-first-full-visit"></span> | <b>First full visit: </b><span style="margin-left: 20px;" id="swh-first-full-visit"></span> | ||||
<i class="mdi mdi-fw" aria-hidden="true"></i> | <i class="mdi mdi-fw" aria-hidden="true"></i> | ||||
</li> | </li> | ||||
<li class="d-inline-block"> | <li class="d-inline-block"> | ||||
<b>Last visit: </b><span style="margin-left: 20px;" id="swh-last-visit"></span> | <b>Last visit: </b><span style="margin-left: 20px;" id="swh-last-visit"></span> | ||||
<i class="mdi mdi-fw" aria-hidden="true"></i> | <i class="mdi mdi-fw" aria-hidden="true"></i> | ||||
</li> | </li> | ||||
</ul> | </ul> | ||||
<h4>History</h4> | <h4>History</h4> | ||||
<form class="text-center"> | <form class="text-center"> | ||||
<div class="custom-control custom-radio custom-control-inline"> | <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> | <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)"> | <label class="custom-control-label font-weight-normal" for="swh-different-snapshot-visits" onclick="swh.origin.showFullVisitsDifferentSnapshots(event)"> | ||||
Show full visits with different snapshots | Show full visits with different snapshots | ||||
</label> | </label> | ||||
</div> | </div> | ||||
<div class="custom-control custom-radio custom-control-inline"> | <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"> | <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)"> | <label class="custom-control-label font-weight-normal" for="swh-full-visits" onclick="swh.origin.showFullVisits(event)"> | ||||
Show all full visits | Show all full visits | ||||
</label> | </label> | ||||
</div> | </div> | ||||
<div class="custom-control custom-radio custom-control-inline"> | <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"> | <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)"> | <label class="custom-control-label font-weight-normal" for="swh-all-visits" onclick="swh.origin.showAllVisits(event)"> | ||||
Show all visits | Show all visits | ||||
</label> | </label> | ||||
</div> | </div> | ||||
</form> | </form> | ||||
<h5>Calendar</h5> | <h5>Calendar</h5> | ||||
<div id="swh-visits-calendar"></div> | <div id="swh-visits-calendar"></div> | ||||
<h5>List</h5> | <h5>List</h5> | ||||
<div id="swh-visits-list"></div> | <div id="swh-visits-list"></div> | ||||
<h5>Timeline</h5> | <h5>Timeline</h5> | ||||
<div id="swh-visits-timeline" class="d3-wrapper"></div> | <div id="swh-visits-timeline" class="d3-wrapper"></div> | ||||
</div> | |||||
<script> | <script> | ||||
// all origin visits | // all origin visits | ||||
var visits = {{ origin_visits|jsonify }}; | var visits = {{ origin_visits|jsonify }}; | ||||
swh.origin.initVisitsReporting(visits); | swh.origin.initVisitsReporting(visits); | ||||
</script> | </script> | ||||
{% endblock %} | {% endblock %} |