Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
re2o
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
29f00f21
Commit
29f00f21
authored
Jul 08, 2018
by
Gabriel Detraz
Committed by
Grizzly
Sep 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stockage du firmware dans la bdd
parent
d2d6f7e5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
1 deletion
+30
-1
api/serializers.py
api/serializers.py
+1
-1
topologie/migrations/0068_modelswitch_firmware.py
topologie/migrations/0068_modelswitch_firmware.py
+20
-0
topologie/models.py
topologie/models.py
+5
-0
topologie/templates/topologie/aff_model_switch.html
topologie/templates/topologie/aff_model_switch.html
+4
-0
No files found.
api/serializers.py
View file @
29f00f21
...
...
@@ -717,7 +717,7 @@ class ProfilSerializer(NamespacedHMSerializer):
class
ModelSwitchSerializer
(
NamespacedHMSerializer
):
class
Meta
:
model
=
topologie
.
ModelSwitch
fields
=
(
'reference'
,)
fields
=
(
'reference'
,
'firmware'
)
class
SwitchBaySerializer
(
NamespacedHMSerializer
):
...
...
topologie/migrations/0068_modelswitch_firmware.py
0 → 100644
View file @
29f00f21
# -*- 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
),
),
]
topologie/models.py
View file @
29f00f21
...
...
@@ -320,6 +320,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
=
(
...
...
topologie/templates/topologie/aff_model_switch.html
View file @
29f00f21
...
...
@@ -35,6 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr>
{% trans "Reference" as tr_ref %}
<th>
{% include "buttons/sort.html" with prefix='model-switch' col='reference' text=tr_ref %}
</th>
<th>
Firmware
</th>
{% trans "Switch constructor" as tr_constructor %}
<th>
{% include "buttons/sort.html" with prefix='model-switch' col='constructor' text=tr_constructor %}
</th>
<th></th>
...
...
@@ -43,6 +44,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% 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"
>
{% can_edit model_switch %}
...
...
@@ -64,4 +66,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% if model_switch_list.paginator %}
{% include "pagination.html" with list=model_switch_list %}
{% endif %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment