Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/misc/coverage.html
{% comment %} | {% comment %} | ||||||||
Copyright (C) 2015-2019 The Software Heritage developers | Copyright (C) 2015-2021 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 %} | ||||||||
<!DOCTYPE html> | <!DOCTYPE html> | ||||||||
{% load js_reverse %} | {% load js_reverse %} | ||||||||
{% load static %} | {% load static %} | ||||||||
{% load render_bundle from webpack_loader %} | {% load render_bundle from webpack_loader %} | ||||||||
<html lang="en"> | <html lang="en"> | ||||||||
<head> | <head> | ||||||||
<meta charset="utf-8"> | <meta charset="utf-8"> | ||||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||||||||
<title>Software Heritage archive coverage</title> | <title>Software Heritage archive coverage</title> | ||||||||
{% render_bundle 'vendors' %} | {% render_bundle 'vendors' %} | ||||||||
{% render_bundle 'webapp' %} | {% render_bundle 'webapp' %} | ||||||||
<script> | <script> | ||||||||
/* | /* | ||||||||
@licstart The following is the entire license notice for the JavaScript code in this page. | @licstart The following is the entire license notice for the JavaScript code in this page. | ||||||||
Copyright (C) 2015-2019 The Software Heritage developers | Copyright (C) 2015-2021 The Software Heritage developers | ||||||||
This program is free software: you can redistribute it and/or modify | This program is free software: you can redistribute it and/or modify | ||||||||
it under the terms of the GNU Affero General Public License as | it under the terms of the GNU Affero General Public License as | ||||||||
published by the Free Software Foundation, either version 3 of the | published by the Free Software Foundation, either version 3 of the | ||||||||
License, or (at your option) any later version. | License, or (at your option) any later version. | ||||||||
This program is distributed in the hope that it will be useful, | This program is distributed in the hope that it will be useful, | ||||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||
Show All 9 Lines | */ | ||||||||
<script src="{% url 'js_reverse' %}" type="text/javascript"></script> | <script src="{% url 'js_reverse' %}" type="text/javascript"></script> | ||||||||
<base target="_parent"> | <base target="_parent"> | ||||||||
</head> | </head> | ||||||||
<body style="padding-bottom: 0;"> | <body style="padding-bottom: 0;"> | ||||||||
<div class="wrapper" style="margin-left: 0;" data-iframe-height> | <div class="wrapper" style="margin-left: 0;" data-iframe-height> | ||||||||
<div class="content"> | <div class="content"> | ||||||||
<div class="container-fluid"> | <div class="container-fluid"> | ||||||||
<p> | |||||||||
A significant amount of source code has already been ingested in the Software Heritage | |||||||||
archive. It notably includes the following software origins. | |||||||||
</p> | |||||||||
{% for origins_type, origins_data in origins.items %} | |||||||||
<h5>{{ origins_type }}</h5> | |||||||||
<p>{{ origins_data.info | safe }}</p> | |||||||||
<div class="row"> | <div class="row"> | ||||||||
{% for provider in providers %} | {% for origins in origins_data.origins %} | ||||||||
<div class="col-md-2 swh-coverage-col"> | <div class="col-md-3 swh-coverage-col"> | ||||||||
<div class="card swh-coverage" id="{{ provider.provider_id }}" title="{{ provider.provider_info }}"> | <div class="card swh-coverage" id="{{ origins.type }}" title="{{ origins.info }}"> | ||||||||
<a href="{{ provider.provider_url }}"> | <a href="{{ origins.info_url }}" target="_blank" rel="noopener noreferrer"> | ||||||||
<img class="card-img-top swh-coverage-logo" src="{% static provider.provider_logo %}"> | {% with 'img/logos/'|add:origins.type.lower|add:'.png' as png_logo %} | ||||||||
vlorentzUnsubmitted Not Done Inline Actions
vlorentz: | |||||||||
<img class="card-img-top swh-coverage-logo" src="{% static png_logo %}"> | |||||||||
{% endwith %} | |||||||||
</a> | </a> | ||||||||
<div class="text-center swh-coverage-origin-count"></div> | <div class="card-header"> | ||||||||
<a class="collapsed d-block" data-toggle="collapse" href="#swh-coverage-info" | |||||||||
aria-expanded="true" aria-controls="swh-coverage-info" id="heading-collapsed" | |||||||||
title="click to expand or collapse detailed information about software origins"> | |||||||||
<i class="swh-coverage-chevron mdi mdi-24px mdi-chevron-down"></i> | |||||||||
{% if "count" in origins %} | |||||||||
<div class="text-center" style="font-size: 120%">{{ origins.count }} origins</div> | |||||||||
{% endif %} | |||||||||
</a> | |||||||||
</div> | |||||||||
<div id="swh-coverage-info" class="collapse" aria-labelledby="heading-collapsed"> | |||||||||
<div class="card-body text-center"> | |||||||||
{% if "instances" in origins %} | |||||||||
<table style="width: 100%"> | |||||||||
<thead> | |||||||||
<tr> | |||||||||
<th>instance</th> | |||||||||
<th>type</th> | |||||||||
<th>count</th> | |||||||||
<th>search</th> | |||||||||
</tr> | |||||||||
</thead> | |||||||||
<tbody> | |||||||||
{% for instance, visit_types in origins.instances.items %} | |||||||||
{% for visit_type, count in visit_types.items %} | |||||||||
{% if count %} | |||||||||
<tr> | |||||||||
<td>{{ instance }}</td> | |||||||||
<td>{{ visit_type}}</td> | |||||||||
<td>{{ count }}</td> | |||||||||
<td><i class="mdi mdi-magnify"></i></td> | |||||||||
</tr> | |||||||||
{% endif %} | |||||||||
{% endfor %} | |||||||||
{% endfor %} | |||||||||
Not Done Inline Actions
ardumont: | |||||||||
</tbody> | |||||||||
</table> | |||||||||
{% endif %} | |||||||||
</div> | |||||||||
</div> | |||||||||
</div> | </div> | ||||||||
</div> | </div> | ||||||||
{% endfor %} | {% endfor %} | ||||||||
</div> | </div> | ||||||||
{% endfor %} | |||||||||
</div> | </div> | ||||||||
</div> | </div> | ||||||||
</div> | </div> | ||||||||
<a href="{% url 'jslicenses' %}" rel="jslicense" style="display: none;">JavaScript license information</a> | <a href="{% url 'jslicenses' %}" rel="jslicense" style="display: none;">JavaScript license information</a> | ||||||||
</body> | </body> | ||||||||
{% if count_origins %} | |||||||||
<script> | |||||||||
$.ajax({ | |||||||||
url: Urls.swh_coverage_count(), | |||||||||
dataType: 'json', | |||||||||
success: function (data) { | |||||||||
for (var i = 0 ; i < data.length; ++i) { | |||||||||
var origin_count = data[i].origin_count; | |||||||||
var provider_id = data[i].provider_id; | |||||||||
var origin_types = data[i].origin_types; | |||||||||
if (origin_count < 0) { | |||||||||
$('.swh-coverage-origin-count').text(''); | |||||||||
break; | |||||||||
} else { | |||||||||
var text = origin_count.toLocaleString() + ' ' + origin_types; | |||||||||
$('#'+provider_id + ' .swh-coverage-origin-count').text(text); | |||||||||
} | |||||||||
} | |||||||||
} | |||||||||
}); | |||||||||
</script> | |||||||||
{% endif %} | |||||||||
</html> | </html> | ||||||||
Not Done Inline Actions
ardumont: |