Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/misc/forge-add.html
- This file was added.
{% extends "../layout.html" %} | |||||
{% comment %} | |||||
Copyright (C) 2021 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 | |||||
{% endcomment %} | |||||
{% load render_bundle from webpack_loader %} | |||||
{% load static %} | |||||
{% block title %}{{ heading }} – Software Heritage archive{% endblock %} | |||||
{% block header %} | |||||
{% render_bundle 'forge_add' %} | |||||
{% endblock %} | |||||
{% block navbar-content %} | |||||
<h4>Add forge now</h4> | |||||
{% endblock %} | |||||
{% block content %} | |||||
<p class="mt-3"> | |||||
You can contribute to extend the content of the Software Heritage archive by | |||||
submitting a new supported forge type in our recurrent listing processes.<br /> | |||||
You can also contribute <a href="{% url 'origin-save' %}">one origin at a time</a>. | |||||
<br /> | |||||
To submit a new supported forge type, fill the required info in the form below: | |||||
</p> | |||||
<form id="swh-forge-add-form" class="needs-validation" novalidate> | |||||
{% csrf_token %} | |||||
<div class="form-row"> | |||||
<div class="col-md-1"></div> | |||||
<div class="form-group col-md-2"> | |||||
<label for="swh-input-forge-type">Forge type</label> | |||||
<select id="swh-input-forge-type" class="form-control" required> | |||||
{% for forge_type in forge_types %} | |||||
<option value="{{ forge_type }}">{{ forge_type }}</option> | |||||
{% endfor %} | |||||
</select> | |||||
<div class="invalid-feedback">The forge type must be specified</div> | |||||
</div> | |||||
<div class="form-group col-md-6"> | |||||
<label for="swh-input-forge-url">Forge url</label> | |||||
<input type="text" class="form-control" id="swh-input-forge-url" oninput="swh.forge_add.validateAddForgeUrl(this)" required> | |||||
<div class="invalid-feedback">The forge url is not valid or does not reference a forge repository</div> | |||||
</div> | |||||
<div class="col-md-2"> | |||||
<div class="form-group"> | |||||
<label for="swh-input-forge-add-submit">​</label> | |||||
<button type="submit" id="swh-input-forge-add-submit" class="btn btn-default btn-block">Submit</button> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</form> | |||||
<div class="swh-processing-forge-add-request text-center" style="display: none;"> | |||||
<img src="{% static 'img/swh-spinner.gif' %}"> | |||||
<p>Processing "forge add now" request ...</p> | |||||
</div> | |||||
<div id="swh-forge-add-request-status"> | |||||
</div> | |||||
<ul class="nav nav-tabs" style="padding-left: 5px;"> | |||||
<li class="nav-item"><a class="nav-link active" data-toggle="tab" id="swh-forge-add-request-help" href="#swh-forge-add-requests-create">Help</a></li> | |||||
<li class="nav-item"><a class="nav-link" data-toggle="tab" id="swh-forge-add-requests-list" href="#swh-forge-add-requests-list">Browse forge add requests</a></li> | |||||
</ul> | |||||
<div class="tab-content"> | |||||
<div id="swh-forge-add-requests-create" class="tab-pane active"> | |||||
<p style="margin-top: 1rem;">A "Add forge now" request takes the following parameters:</p> | |||||
<ul> | |||||
<li><b>Forge type:</b> the type of supported forge the software archive is able to list. | |||||
Currently, the supported types are: | |||||
<ul> | |||||
<li><code>cgit</code>, for <a href="https://git.zx2c4.com/cgit/">cgit</a> forges</li> | |||||
<li><code>gitlab</code>, for <a href="https://about.gitlab.com/install/">gitlab</a> forges</li> | |||||
<li><code>heptapod</code>, for <a href="https://heptapod.net/">heptapod</a> forges</li> | |||||
... | |||||
</ul> | |||||
</li> | |||||
<li><b>Forge url:</b> the url of the remote forge to list.<br/> | |||||
</li> | |||||
</ul> | |||||
<p> | |||||
Once submitted, your "add forge" request can either be: | |||||
</p> | |||||
<ul> | |||||
<li><b>accepted:</b> a listing of the provided forge will then be scheduled by Software Heritage in order to | |||||
load its content into the archive as soon as possible</li> | |||||
<li><b>rejected:</b> the provided forge url is blacklisted and no listing will be scheduled</li> | |||||
<li>put in <b>pending</b> state: a manual review will then be performed in order to determine if the | |||||
forge can be safely listed</li> | |||||
</ul> | |||||
<p> | |||||
Once a forge request has been accepted, you can follow its current status in the | |||||
<a id="swh-show-forge-add-requests-list" href="#swh-forge-add-requests-list">submitted forge add requests list</a>. | |||||
</p> | |||||
</div> | |||||
<div id="swh-forge-add-requests-list" class="tab-pane mt-3"> | |||||
<table id="swh-forge-add-requests" class="table swh-table swh-table-striped" width="100%"> | |||||
<thead> | |||||
<tr> | |||||
<th data-priority="3">Date</th> | |||||
<th data-priority="4">Type</th> | |||||
<th data-priority="1">Url</th> | |||||
<th data-priority="2">Request</th> | |||||
<th data-priority="2">Status</th> | |||||
<th data-priority="3">Info</th> | |||||
</tr> | |||||
</thead> | |||||
</table> | |||||
<p id="swh-forge-add-request-list-error"></p> | |||||
</div> | |||||
</div> | |||||
<script> | |||||
swh.webapp.initPage('forge-add'); | |||||
swh.forge_add.initForgeAdd() | |||||
</script> | |||||
{% endblock %} |