mirror of https://gitlab.federez.net/re2o/re2o
15 changed files with 386 additions and 4 deletions
@ -0,0 +1,33 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2018-07-29 11:39 |
|||
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', '0084_dname'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.CreateModel( |
|||
name='SshFp', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('pub_key_entry', models.TextField(help_text='SSH public key', max_length=2048)), |
|||
('algo', models.CharField(choices=[('ssh-rsa', 'ssh-rsa'), ('ssh-ed25519', 'ssh-ed25519'), ('ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp256'), ('ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp384'), ('ecdsa-sha2-nistp521', 'ecdsa-sha2-nistp521')], max_length=32)), |
|||
('comment', models.CharField(blank=True, help_text='Comment', max_length=255, null=True)), |
|||
('machine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='machines.Machine')), |
|||
], |
|||
options={ |
|||
'verbose_name': 'SSHFP record', |
|||
'verbose_name_plural': 'SSHFP records', |
|||
'permissions': (('view_sshfp', 'Can see an SSHFP record'),), |
|||
}, |
|||
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model), |
|||
), |
|||
] |
|||
@ -0,0 +1,54 @@ |
|||
{% 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 %} |
|||
{% load logs_extra %} |
|||
|
|||
<div class="table-responsive"> |
|||
<table class="table table-striped long_text"> |
|||
<thead> |
|||
<tr> |
|||
<th class="long_text">SSH public key</th> |
|||
<th>Algorithm used</th> |
|||
<th>Comment</th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
{% for sshfp in sshfp_list %} |
|||
<tr> |
|||
<td class="long_text">{{ sshfp.pub_key_entry }}</td> |
|||
<td>{{ sshfp.algo }}</td> |
|||
<td>{{ sshfp.comment }}</td> |
|||
<td class="text-right"> |
|||
{% can_edit sshfp %} |
|||
{% include 'buttons/edit.html' with href='machines:edit-sshfp' id=sshfp.id %} |
|||
{% acl_end %} |
|||
{% can_delete sshfp %} |
|||
{% include 'buttons/suppr.html' with href='machines:del-sshfp' id=sshfp.id %} |
|||
{% acl_end %} |
|||
{% history_button sshfp %} |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
</div> |
|||
|
|||
@ -0,0 +1,38 @@ |
|||
{% 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>SSH fingerprints</h2> |
|||
{% can_create SshFp machine_id %} |
|||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-sshfp' machine_id %}"> |
|||
<i class="fa fa-plus"></i> Add an SSH fingerprint |
|||
</a> |
|||
{% acl_end %} |
|||
{% include "machines/aff_sshfp.html" with sshfp_list=sshfp_list %} |
|||
{% endblock %} |
|||
|
|||
Loading…
Reference in new issue