This repository has been archived on 2024-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
adlin/token-validator/htdocs/views/domains.html

393 lines
15 KiB
HTML

<h2>
Noms de domaine
</h2>
<h3>
Association simple
<span class="badge badge-pill badge-dark" title="Une association simple est un sous-domaine qui va vous être attribué, sans que vous ayez à gérer de serveur DNS. Ce domaine sera associé à une IP que vous pourrez changer par la suite. C'est la première étape, plus facile que la délégation.">?</span>
</h3>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Domaine</th>
<th>TTL</th>
<th>Type</th>
<th>Entrée</th>
</tr>
</thead>
<tbody style="font-family: monospace">
<tr ng-repeat="ad in adomains">
<td>{{ ad.domain }}</td>
<td>{{ ad.ttl }}</td>
<td>{{ ad.rr }}</td>
<td><span ng-repeat="val in ad.values">{{ val }} </span></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">
<button class="btn btn-primary" ng-click="askAssociationD()">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" ng-show="pleaseWaitNewAssociation"></span>
Demander une nouvelle association
</button>
<button class="btn ml-2" ng-class="{'btn-secondary': !adomains || !adomains.length, 'btn-success': adomains && adomains.length}" ng-disabled="!adomains || !adomains.length" ng-click="useMyAssociationD()">
Utiliser mon domaine
</button>
</td>
</tr>
</tfoot>
</table>
<hr class="my-4">
<h3>
Délégation
<span class="badge badge-pill badge-dark" title="Une délégation va vous permettre de gérer vous-même votre domaine sur Internet. Nous vous offrons login.srs.p0m.fr, mais vous pouvez aussi choisir de créer la délégation sur votre domaine, si vous en possédez un. Rendez-vous ensuite sur votre serveur pour y installer un serveur de noms de domaine autoritaire tel que nsd, bind, knot ou encore powerDNS...">?</span>
</h3>
<ul class="nav nav-tabs" id="ddomainTabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" data-target="#NS" role="tab" aria-controls="ns" aria-selected="true">Serveurs de nom</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" data-target="#GLUE" role="tab" aria-controls="glue" aria-selected="false">GLUE</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" data-target="#DNSSEC" role="tab" aria-controls="dnssec" aria-selected="false">DNSSEC</a>
</li>
</ul>
<div ng-if="!student.delegated_domain" class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="NS" role="tabpanel" aria-labelledby="ns-tab">
<div ng-repeat="domain in ddomains">
<h4 class="text-muted">
{{ domain }}
<button class="btn btn-sm btn-info ml-2" ng-if="$first" ng-click="useMyDelegationD()">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" ng-show="pleaseWaitNewDelegation"></span>
Utiliser mon domaine
</button>
</h4>
<table class="table table-striped table-hover" ng-controller="NSDomainsController">
<thead>
<tr>
<th>Serveur DNS</th>
<th>Joignable</th>
</tr>
</thead>
<tbody style="font-family: monospace" ng-if="domainNS">
<tr ng-repeat="rr in domainNS">
<td><span ng-repeat="val in rr.values">{{ val }} </span></td>
<td>
<!--span class="badge badge-pill badge-secondary">Not implemented yet</span-->
</td>
<td>
<button class="btn btn-warning" ng-click="updateNS(domain, rr)">Modifier</button>
<button class="btn btn-danger" ng-click="deleteRR(domain, rr)">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" ng-show="rr.pleaseWaitNSdel"></span>
Supprimer
</button>
</td>
</tr>
</tbody>
<tbody style="font-family: monospace" ng-if="!domainNS">
<tr>
<td colspan="4">Vous n'avez défini aucun serveur de noms pour l'instant</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3">
<button class="btn btn-primary" ng-click="addNS(domain)">Ajouter un nouveau serveur de noms</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="tab-pane fade" id="GLUE" role="tabpanel" aria-labelledby="glue-tab">
<div ng-repeat="domain in ddomains">
<h4 class="text-muted">{{ domain }}</h4>
<table class="table table-striped table-hover" ng-controller="GLUEDomainsController">
<thead>
<tr>
<th>Domaine DNS</th>
<th>IP</th>
<th>Joignable</th>
</tr>
</thead>
<tbody style="font-family: monospace" ng-if="domainGLUE">
<tr ng-repeat="rr in domainGLUE">
<td>{{ rr.domain }}</td>
<td><span ng-repeat="val in rr.values">{{ val }} </span></td>
<td ng-controller="GLUEController">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" ng-show="GLUEpending"></span>
<span class="badge badge-pill" ng-class="{'badge-success': GLUEok, 'badge-danger': !GLUEok}" ng-bind="GLUEerr">Not implemented yet</span>
</td>
<td>
<button class="btn btn-warning" ng-click="updateGLUE(rr.domain, rr)">Modifier</button>
<button class="btn btn-danger" ng-click="deleteRR(rr.domain, rr)">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" ng-show="rr.pleaseWaitAAAAdel"></span>
Supprimer
</button>
</td>
</tr>
</tbody>
<tbody style="font-family: monospace" ng-if="!domainGLUE">
<tr>
<td colspan="4">Vous n'avez défini aucun enregistrement glue pour l'instant</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">
<button class="btn btn-primary" ng-click="addGLUE(domain)">Ajouter un enregistrement glue</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="tab-pane fade" id="DNSSEC" role="tabpanel" aria-labelledby="dnssec-tab">
<div ng-repeat="domain in ddomains">
<h4 class="text-muted">{{ domain }}</h4>
<table class="table table-striped table-hover" ng-controller="DSDomainsController">
<thead>
<tr>
<th>Key Tag</th>
<th>Algorithme de la clef</th>
<th>Algorithme de hash</th>
<th>Hash (hex)</th>
</tr>
</thead>
<tbody style="font-family: monospace" ng-if="domainDS">
<tr ng-repeat="rr in domainDS">
<td ng-repeat="val in rr.values">{{ val }}</td>
<td>
<button class="btn btn-danger" ng-click="deleteRR(domain, rr)">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" ng-show="rr.pleaseWaitDSdel"></span>
Supprimer
</button>
</td>
</tr>
</tbody>
<tbody style="font-family: monospace" ng-if="!domainDS">
<tr>
<td colspan="4">Vous n'avez défini aucun enregistrement DS pour l'instant</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5">
<button class="btn btn-primary" ng-click="addDS(domain)">Ajouter un enregistrement DS</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<div ng-if="student.delegated_domain">
<h4 class="text-muted">
{{ student.delegated_domain }}
<button class="btn btn-sm btn-danger ml-2" ng-if="student.delegated_domain" ng-click="delMyDomainDelegatedD()">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" ng-show="pleaseWaitNewDelegation"></span>
Ne plus utiliser mon domaine
</button>
</h4>
<p>
Vous avez choisi d'utiliser votre propre domaine pour réaliser la délégation.
</p>
<p>
L'interface de maatma ne vous est plus utile, car pour réaliser la délégation, vous devez passer par l'interface de votre bureau d'enregistrement.
</p>
<p>
Pour rappel, voici les enregistrements à rajouter&nbsp;:
</p>
<pre>
;; Delegation {{ student.delegated_domain }} to the given name server
{{ student.delegated_domain }} 300 IN NS ns.{{ student.delegated_domain }}
;; GLUE record to serve along with the previous record
ns.{{ student.delegated_domain }} 300 IN AAAA [your NS ip]
</pre>
</div>
<div class="modal" id="AssocModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Nouvelle association</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>
Attention : la nouvelle association écrasera toute association précédente&nbsp;!
</p>
<form class="ml-2 mr-2">
<div class="form-group row">
<label class="col-sm-2 col-form-label">Domaine</label>
<div class="col-sm-10">
<input class="form-control-plaintext" ng-model="assoc.domain" readonly>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">IPv4</label>
<div class="col-sm-10">
<input class="form-control-plaintext" ng-model="assoc.a" readonly>
</div>
</div>
<div class="form-group row">
<label for="value" class="col-sm-2 col-form-label">IPv6</label>
<div class="col-sm-10">
<input class="form-control" id="value" ng-model="assoc.aaaa">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
<button type="button" class="btn btn-primary" ng-click="newAssociationD(assoc)">Envoyer</button>
</div>
</div>
</div>
</div>
<div class="modal" id="AssocMyDomainModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Utiliser mon domaine</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>
Si tu possèdes ton propre domaine, tu peux l'utiliser à la place du domaine qui t'es proposé ici&nbsp;!
</p>
<p>
Pour cela, rien de plus simple. Choisis un sous-domaine de ton choix, dans ton domaine (par exemple <code>adlin.nemunai.re</code>)&nbsp;:
</p>
<form class="ml-2 mr-2">
<div class="form-group">
<label class="form-label" for="mysubdomain">Ton sous-domaine&nbsp;:</label>
<input class="form-control" id="mysubdomain" ng-model="assoc.cname" autofocus>
</div>
</form>
<p>
Ensuite, dans ta zone DNS, ajoute un alias pointant vers le domaine sous <code>adlin20xx.p0m.fr</code> qui t'es proposé&nbsp;:
</p>
<pre>
{{ assoc.cname }} 300 IN CNAME {{ assoc.domain }}
</pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
<button type="button" class="btn btn-primary" ng-disabled="!assoc.cname" ng-click="newMyDomainAssociationD(assoc)">Ok, c'est fait</button>
<button type="button" class="btn btn-danger" ng-show="student.associated_domain" ng-click="delMyDomainAssociationD(assoc)">Supprimer l'association enregistrée</button>
</div>
</div>
</div>
</div>
<div class="modal" id="DelegateMyDomainModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Utiliser mon domaine comme délégation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>
Tu peux utiliser ton propre domaine à la place du domaine qui t'es proposé ici&nbsp;!
</p>
<p>
Commence par choisir un sous-domaine de ton choix (différent de l'association ci-dessus), dans ton domaine (par exemple <code>adlin.nemunai.re</code>)&nbsp;:
</p>
<form class="ml-2 mr-2">
<div class="form-group">
<label class="form-label" for="mysubdomaind">Ton sous-domaine&nbsp;:</label>
<input class="form-control" id="mysubdomaind" ng-model="assoc.ns" autofocus>
</div>
</form>
<p>
Ensuite, configure ta zone DNS, pour réaliser la délégation. L'interface
</p>
<pre>
;; Delegation {{ assoc.ns }} to the given name server
{{ assoc.ns }} 300 IN NS ns.{{ assoc.ns }}
;; GLUE record to serve along with the previous record
ns.{{ assoc.ns }} 300 IN AAAA [your NS ip]
</pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
<button type="button" class="btn btn-primary" ng-disabled="!assoc.ns" ng-click="newMyDomainDelegationD(assoc)">Ok, c'est fait</button>
</div>
</div>
</div>
</div>
<div class="modal" id="NSModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" ng-if="nsrr.rr == 'NS'">Modifier la liste des serveurs de noms de la zone</h5>
<h5 class="modal-title" ng-if="nsrr.rr == 'AAAA'">Modifier les enregistrements GLUE du domaine</h5>
<h5 class="modal-title" ng-if="nsrr.rr == 'DS'">Modifier les clefs DNSSEC de la zone parente</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form class="ml-2 mr-2">
<div class="form-group row">
<label class="col-sm-2 col-form-label">Domaine</label>
<div class="col-sm-10">
<input class="form-control-plaintext" ng-model="nsrr.domain" ng-if="nsrr.rr == 'NS' || nsrr.rr == 'DS'" readonly>
<input class="form-control" ng-model="nsrr.domain" ng-if="nsrr.rr == 'AAAA'">
</div>
</div>
<div class="form-group row">
<label for="ttl" class="col-sm-2 col-form-label">TTL</label>
<div class="col-sm-10">
<input class="form-control" id="ttl" ng-model="nsrr.ttl">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">Type</label>
<div class="col-sm-10">
<input class="form-control-plaintext" ng-model="nsrr.rr" readonly>
</div>
</div>
<div class="form-group row" ng-repeat="v in nsrr.values track by $index">
<label for="value{{$index}}" class="col-sm-2 col-form-label" ng-if="nsrr.labels">{{ nsrr.labels[$index] }}</label>
<label for="value{{$index}}" class="col-sm-2 col-form-label" ng-if="!nsrr.labels">Valeur</label>
<div class="col-sm-10">
<input class="form-control" id="value{{$index}}" ng-model="nsrr.values[$index]">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
<button type="button" class="btn btn-primary" ng-click="saveNSRR(nsrr)">Enregistrer</button>
</div>
</div>
</div>
</div>