mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 15:33:45 +00:00
Stockage du firmware dans la bdd
This commit is contained in:
parent
5b76ac3afd
commit
33e1d1fa6b
4 changed files with 29 additions and 2 deletions
|
@ -691,7 +691,7 @@ class ProfilSerializer(NamespacedHMSerializer):
|
|||
class ModelSwitchSerializer(NamespacedHMSerializer):
|
||||
class Meta:
|
||||
model = topologie.ModelSwitch
|
||||
fields = ('reference',)
|
||||
fields = ('reference', 'firmware')
|
||||
|
||||
|
||||
class SwitchBaySerializer(NamespacedHMSerializer):
|
||||
|
|
20
topologie/migrations/0068_modelswitch_firmware.py
Normal file
20
topologie/migrations/0068_modelswitch_firmware.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2018-07-08 19:56
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('topologie', '0067_auto_20180701_0016'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='modelswitch',
|
||||
name='firmware',
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
]
|
|
@ -299,6 +299,11 @@ class ModelSwitch(AclMixin, RevMixin, models.Model):
|
|||
'topologie.ConstructorSwitch',
|
||||
on_delete=models.PROTECT
|
||||
)
|
||||
firmware = models.CharField(
|
||||
max_length=255,
|
||||
null=True,
|
||||
blank=True
|
||||
)
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
|
|
|
@ -32,13 +32,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<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>Firmware</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.firmware}}</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' 'modelswitch' model_switch.pk %}">
|
||||
|
|
Loading…
Reference in a new issue