mirror of https://gitlab.federez.net/re2o/re2o
committed by
root
11 changed files with 343 additions and 18 deletions
@ -0,0 +1,39 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2017-08-08 00:33 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('machines', '0043_auto_20170721_0350'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.CreateModel( |
|||
name='Service', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('service_type', models.CharField(blank=True, max_length=255, unique=True)), |
|||
('time_regen', models.DurationField()), |
|||
], |
|||
), |
|||
migrations.CreateModel( |
|||
name='Service_link', |
|||
fields=[ |
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('last_regen', models.DateTimeField()), |
|||
('asked_regen', models.BooleanField()), |
|||
('server', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='machines.Interface')), |
|||
('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='machines.Service')), |
|||
], |
|||
), |
|||
migrations.AddField( |
|||
model_name='service', |
|||
name='servers', |
|||
field=models.ManyToManyField(through='machines.Service_link', to='machines.Interface'), |
|||
), |
|||
] |
|||
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.10.7 on 2017-08-08 01:48 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('machines', '0044_auto_20170808_0233'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterField( |
|||
model_name='service_link', |
|||
name='asked_regen', |
|||
field=models.BooleanField(default=False), |
|||
), |
|||
migrations.AlterField( |
|||
model_name='service_link', |
|||
name='last_regen', |
|||
field=models.DateTimeField(auto_now_add=True), |
|||
), |
|||
] |
|||
@ -0,0 +1,47 @@ |
|||
{% 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 %} |
|||
|
|||
<table class="table table-striped"> |
|||
<thead> |
|||
<tr> |
|||
<th>Nom du service</th> |
|||
<th>Serveur</th> |
|||
<th>Dernière régénération</th> |
|||
<th>Régénération nécessaire</th> |
|||
<th>Régénération activée</th> |
|||
</tr> |
|||
</thead> |
|||
{% for server in servers_list %} |
|||
<tr> |
|||
<td>{{ server.service }}</td> |
|||
<td>{{ server.server }}</td> |
|||
<td>{{ server.last_regen }}</td> |
|||
<td>{{ server.asked_regen }}</td> |
|||
<td>{{ server.need_regen }}</td> |
|||
<td class="text-right"> |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
|
|||
@ -0,0 +1,49 @@ |
|||
{% 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 %} |
|||
|
|||
<table class="table table-striped"> |
|||
<thead> |
|||
<tr> |
|||
<th>Nom du service</th> |
|||
<th>Temps minimum de régénération</th> |
|||
<th>Serveurs inclus</th> |
|||
<th></th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
{% for service in service_list %} |
|||
<tr> |
|||
<td>{{ service.service_type }}</td> |
|||
<td>{{ service.time_regen }}</td> |
|||
<td>{% for serv in service.servers.all %}{{ serv }}, {% endfor %}</td> |
|||
<td class="text-right"> |
|||
{% if is_infra %} |
|||
{% include 'buttons/edit.html' with href='machines:edit-service' id=service.id %} |
|||
{% endif %} |
|||
{% include 'buttons/history.html' with href='machines:history' name='service' id=service.id %} |
|||
</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</table> |
|||
|
|||
@ -0,0 +1,43 @@ |
|||
{% 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 © 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 %}Machines{% endblock %} |
|||
|
|||
{% block content %} |
|||
<h2>Liste des services</h2> |
|||
{% if is_infra %} |
|||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-service' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un service</a> |
|||
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-service' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs service</a> |
|||
{% endif %} |
|||
{% include "machines/aff_service.html" with service_list=service_list %} |
|||
<h2>Etat des serveurs</h2> |
|||
{% include "machines/aff_servers.html" with servers_list=servers_list %} |
|||
<br /> |
|||
<br /> |
|||
<br /> |
|||
{% endblock %} |
|||
|
|||
Loading…
Reference in new issue