mirror of https://gitlab.federez.net/re2o/re2o
committed by
root
14 changed files with 513 additions and 11 deletions
@ -0,0 +1,36 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2017-10-26 01:38 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('topologie', '0031_auto_20171015_2033'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.CreateModel( |
|||
name='ConstructorSwitch', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('name', models.CharField(max_length=255)), |
|||
], |
|||
), |
|||
migrations.CreateModel( |
|||
name='ModelSwitch', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('reference', models.CharField(max_length=255)), |
|||
('constructor', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='topologie.ConstructorSwitch')), |
|||
], |
|||
), |
|||
migrations.AddField( |
|||
model_name='switch', |
|||
name='model', |
|||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='topologie.ModelSwitch'), |
|||
), |
|||
] |
|||
@ -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 © 2017 Gabriel Détraz |
|||
Copyright © 2017 Goulven Kermarec |
|||
Copyright © 2017 Augustin Lemesle |
|||
|
|||
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 %} |
|||
|
|||
{% if constructor_switch_list.paginator %} |
|||
{% include "pagination.html" with list=constructor_switch_list %} |
|||
{% endif %} |
|||
|
|||
<table class="table table-striped"> |
|||
<thead> |
|||
<tr> |
|||
<th>{% include "buttons/sort.html" with prefix='constructor-switch' col='name' text='Constructeur' %}</th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
{% for constructor_switch in constructor_switch_list %} |
|||
<tr> |
|||
<td>{{constructor_switch}}</td> |
|||
<td class="text-right"> |
|||
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'constructor_switch' constructor_switch.pk %}"> |
|||
<i class="glyphicon glyphicon-time"></i> |
|||
</a> |
|||
{% if is_infra %} |
|||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-constructor-switch' constructor_switch.id %}"> |
|||
<i class="glyphicon glyphicon-edit"></i> |
|||
</a> |
|||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-constructor-switch' constructor_switch.id %}"> |
|||
<i class="glyphicon glyphicon-trash"></i> |
|||
</a> |
|||
{% endif %} |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
@ -0,0 +1,56 @@ |
|||
{% 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 © 2017 Gabriel Détraz |
|||
Copyright © 2017 Goulven Kermarec |
|||
Copyright © 2017 Augustin Lemesle |
|||
|
|||
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 %} |
|||
|
|||
{% if model_switch_list.paginator %} |
|||
{% include "pagination.html" with list=model_switch_list %} |
|||
{% endif %} |
|||
|
|||
<table class="table table-striped"> |
|||
<thead> |
|||
<tr> |
|||
<th>{% include "buttons/sort.html" with prefix='model-switch' col='reference' text='Référence' %}</th> |
|||
<th>{% include "buttons/sort.html" with prefix='model-switch' col='constructor' text='Constructeur' %}</th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
{% for model_switch in model_switch_list %} |
|||
<tr> |
|||
<td>{{model_switch.reference}}</td> |
|||
<td>{{model_switch.constructor}}</td> |
|||
<td class="text-right"> |
|||
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'model_switch' model_switch.pk %}"> |
|||
<i class="glyphicon glyphicon-time"></i> |
|||
</a> |
|||
{% if is_infra %} |
|||
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-model-switch' model_switch.id %}"> |
|||
<i class="glyphicon glyphicon-edit"></i> |
|||
</a> |
|||
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-model-switch' model_switch.id %}"> |
|||
<i class="glyphicon glyphicon-trash"></i> |
|||
</a> |
|||
{% endif %} |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
@ -0,0 +1,46 @@ |
|||
{% extends "topologie/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 © 2017 Gabriel Détraz |
|||
Copyright © 2017 Goulven Kermarec |
|||
Copyright © 2017 Augustin Lemesle |
|||
|
|||
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 %} |
|||
|
|||
{% block title %}Modèles de switches{% endblock %} |
|||
|
|||
{% block content %} |
|||
<h2>Modèles de switches</h2> |
|||
{% if is_infra %} |
|||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-model-switch' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un modèle</a> |
|||
<hr> |
|||
{% endif %} |
|||
{% include "topologie/aff_model_switch.html" with model_switch_list=model_switch_list %} |
|||
<h2>Constructeurs de switches</h2> |
|||
{% if is_infra %} |
|||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-constructor-switch' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un constructeur</a> |
|||
<hr> |
|||
{% endif %} |
|||
{% include "topologie/aff_constructor_switch.html" with constructor_switch_list=constructor_switch_list %} |
|||
<br /> |
|||
<br /> |
|||
<br /> |
|||
{% endblock %} |
|||
Loading…
Reference in new issue