mirror of https://gitlab.federez.net/re2o/re2o
committed by
Gabriel Detraz
12 changed files with 360 additions and 3 deletions
@ -0,0 +1,50 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.10.7 on 2018-06-23 14:51 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
import re2o.mixins |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('machines', '0083_role'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.CreateModel( |
||||
|
name='SshFingerprint', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
|
('hash_entry', models.TextField(max_length=512)), |
||||
|
('comment', models.CharField(blank=True, max_length=255, null=True)), |
||||
|
], |
||||
|
options={ |
||||
|
'permissions': (('view_sshfingerprint', 'Peut voir un objet sshfingerprint'),), |
||||
|
}, |
||||
|
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model), |
||||
|
), |
||||
|
migrations.CreateModel( |
||||
|
name='SshFprAlgo', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
|
('name', models.TextField(max_length=256)), |
||||
|
], |
||||
|
options={ |
||||
|
'permissions': (('view_sshfpralgo', 'Peut voir un algo de chiffrement'),), |
||||
|
}, |
||||
|
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model), |
||||
|
), |
||||
|
migrations.AddField( |
||||
|
model_name='sshfingerprint', |
||||
|
name='algo', |
||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='machines.SshFprAlgo'), |
||||
|
), |
||||
|
migrations.AddField( |
||||
|
model_name='sshfingerprint', |
||||
|
name='machine', |
||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='machines.Machine'), |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,51 @@ |
|||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2018 Gabriel Détraz |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
|
||||
|
{% load acl %} |
||||
|
|
||||
|
<table class="table table-striped"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>Entrée du hash</th> |
||||
|
<th>Algorithme utilisé</th> |
||||
|
<th>Commentaire</th> |
||||
|
<th></th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
{% for sshfpr in sshfingerprint_list %} |
||||
|
<tr> |
||||
|
<td>{{ sshfpr.hash_entry }}</td> |
||||
|
<td>{{ sshfpr.algo }}</td> |
||||
|
<td>{{ sshfpr.comment }}</td> |
||||
|
<td class="text-right"> |
||||
|
{% can_edit sshfpr %} |
||||
|
{% include 'buttons/edit.html' with href='machines:edit-sshfingerprint' id=sshfpr.id %} |
||||
|
{% acl_end %} |
||||
|
{% can_delete sshfpr %} |
||||
|
{% include 'buttons/suppr.html' with href='machines:del-sshfingerprint' id=sshfpr.id %} |
||||
|
{% acl_end %} |
||||
|
{% include 'buttons/history.html' with href='machines:history' name='sshfingerprint' id=sshfpr.id %} |
||||
|
</td> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</table> |
||||
|
|
||||
@ -0,0 +1,39 @@ |
|||||
|
{% extends "machines/sidebar.html" %} |
||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2018 Gabriel Détraz |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
|
||||
|
{% load bootstrap3 %} |
||||
|
{% load acl %} |
||||
|
|
||||
|
{% block title %}Machines{% endblock %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<h2>Liste des fingerprint ssh</h2> |
||||
|
{% can_create SshFingerprint machine_id %} |
||||
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-sshfingerprint' machine_id %}"><i class="fa fa-plus"></i> Ajouter une fingerprint ssh</a> |
||||
|
{% acl_end %} |
||||
|
{% include "machines/aff_sshfingerprint.html" with sshfingerprint_list=sshfingerprint_list %} |
||||
|
<br /> |
||||
|
<br /> |
||||
|
<br /> |
||||
|
{% endblock %} |
||||
|
|
||||
Loading…
Reference in new issue