Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/misc/coverage.html
{% comment %} | {% comment %} | ||||
Copyright (C) 2015-2021 The Software Heritage developers | Copyright (C) 2015-2022 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-2021 The Software Heritage developers | Copyright (C) 2015-2022 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 | ||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
GNU Affero General Public License for more details. | GNU Affero General Public License for more details. | ||||
You should have received a copy of the GNU Affero General Public License | You should have received a copy of the GNU Affero General Public License | ||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | along with this program. If not, see <https://www.gnu.org/licenses/>. | ||||
@licend The above is the entire license notice for the JavaScript code in this page. | @licend The above is the entire license notice for the JavaScript code in this page. | ||||
*/ | */ | ||||
</script> | </script> | ||||
<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 id="swh-coverage-content" class="container-fluid"> | ||||
<p> | <p> | ||||
A significant amount of source code has already been ingested in the Software Heritage | A significant amount of source code has already been ingested in the Software Heritage | ||||
archive. It notably includes the following software origins. | archive. It notably includes the following software origins. | ||||
</p> | </p> | ||||
{% for origins_type, origins_data in origins.items %} | {% for origins_type, origins_data in origins.items %} | ||||
<h5>{{ origins_type }}</h5> | <h5>{{ origins_type }}</h5> | ||||
<p>{{ origins_data.info | safe }}</p> | <p>{{ origins_data.info | safe }}</p> | ||||
<div class="row"> | <div class="row"> | ||||
{% for origins in origins_data.origins %} | {% for origins in origins_data.origins %} | ||||
<div class="col-md-4 swh-coverage-col"> | <div class="col-md-4 swh-coverage-col"> | ||||
<div class="card swh-coverage" id="{{ origins.type }}" title="{{ origins.info }}"> | <div class="card swh-coverage {% if focus and origins.type in focus %}swh-coverage-focus{% endif %}" | ||||
id="{{ origins.type }}" title="{{ origins.info }}"> | |||||
<a href="{{ origins.info_url }}" target="_blank" rel="noopener noreferrer"> | <a href="{{ origins.info_url }}" target="_blank" rel="noopener noreferrer"> | ||||
{% with 'img/logos/'|add:origins.type.lower|add:'.png' as png_logo %} | {% with 'img/logos/'|add:origins.type.lower|add:'.png' as png_logo %} | ||||
<img class="card-img-top swh-coverage-logo" src="{% static png_logo %}" | <img class="card-img-top swh-coverage-logo" src="{% static png_logo %}" | ||||
alt="{{ origins.type }}"> | alt="{{ origins.type }}"> | ||||
{% endwith %} | {% endwith %} | ||||
</a> | </a> | ||||
<div class="card-header swh-coverage-header"> | <div class="card-header swh-coverage-header"> | ||||
<a class="collapsed d-block" data-toggle="collapse" | <a class="{% if not focus %}collapsed{% endif %} d-block" data-toggle="collapse" | ||||
href="#swh-coverage-info-{{ origins_type.lower|cut:' ' }}" | href="#swh-coverage-info-{{ origins_type.lower|cut:' ' }}" | ||||
aria-expanded="true" aria-controls="swh-coverage-info-{{ origins_type.lower|cut:' ' }}" | aria-expanded="true" aria-controls="swh-coverage-info-{{ origins_type.lower|cut:' ' }}" | ||||
id="heading-collapsed" | id="heading-collapsed" | ||||
title="click to expand or collapse detailed information about software origins"> | title="click to expand or collapse detailed information about software origins"> | ||||
<i class="swh-coverage-chevron mdi mdi-24px mdi-chevron-down"></i> | <i class="swh-coverage-chevron mdi mdi-24px mdi-chevron-down"></i> | ||||
<div class="text-center" style="font-size: 120%"> | <div class="text-center" style="font-size: 120%"> | ||||
{% if "count" in origins and origins.count %} | {% if "count" in origins and origins.count %} | ||||
{{ origins.count }} origins | {{ origins.count }} origins | ||||
{% else %} | {% else %} | ||||
<br/> | <br/> | ||||
{% endif %} | {% endif %} | ||||
</div> | </div> | ||||
</a> | </a> | ||||
</div> | </div> | ||||
<div id="swh-coverage-info-{{ origins_type.lower|cut:' ' }}" class="collapse" | <div id="swh-coverage-info-{{ origins_type.lower|cut:' ' }}" | ||||
class="collapse {% if focus %}show{% endif %}" | |||||
aria-labelledby="heading-collapsed"> | aria-labelledby="heading-collapsed"> | ||||
<div class="card-body text-center swh-coverage-info-body"> | <div class="card-body text-center swh-coverage-info-body" | ||||
{% if focus is not None %}style="max-height: none;"{% endif %}> | |||||
<table style="width: 100%"> | <table style="width: 100%"> | ||||
{% if "instances" in origins %} | {% if "instances" in origins %} | ||||
<thead> | <thead> | ||||
<tr> | <tr> | ||||
<th>instance</th> | <th>instance</th> | ||||
<th>type</th> | <th>type</th> | ||||
<th>count</th> | <th>count</th> | ||||
<th>search</th> | <th>search</th> | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | <div class="wrapper" style="margin-left: 0;" data-iframe-height> | ||||
</div> | </div> | ||||
{% endfor %} | {% endfor %} | ||||
</div> | </div> | ||||
{% endfor %} | {% 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> | ||||
<script> | |||||
$(document).ready(function() { | |||||
if (window.frameElement === null) { | |||||
// do not render full width page if not embedded in an iframe | |||||
$("#swh-coverage-content").removeClass("container-fluid"); | |||||
$("#swh-coverage-content").addClass("container"); | |||||
} | |||||
}); | |||||
</script> | |||||
</body> | </body> | ||||
</html> | </html> |