Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
543b883a
authored
Oct 29, 2013
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: add SwitchPort, EthernetDevice to admin
parent
e685d5d6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
+12
-1
circle/firewall/admin.py
+12
-1
No files found.
circle/firewall/admin.py
View file @
543b883a
...
...
@@ -2,7 +2,8 @@
from
django.contrib
import
admin
from
firewall.models
import
(
Rule
,
Host
,
Vlan
,
Group
,
VlanGroup
,
Firewall
,
Domain
,
Record
,
Blacklist
)
Domain
,
Record
,
Blacklist
,
SwitchPort
,
EthernetDevice
)
from
django
import
contrib
...
...
@@ -111,6 +112,14 @@ class RecordAdmin(admin.ModelAdmin):
class
BlacklistAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'ipv4'
,
'reason'
,
'created_at'
,
'modified_at'
)
class
SwitchPortAdmin
(
admin
.
ModelAdmin
):
list_display
=
()
class
EthernetDeviceAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'name'
,
)
admin
.
site
.
register
(
Host
,
HostAdmin
)
admin
.
site
.
register
(
Vlan
,
VlanAdmin
)
admin
.
site
.
register
(
Rule
,
RuleAdmin
)
...
...
@@ -120,3 +129,5 @@ admin.site.register(Firewall, FirewallAdmin)
admin
.
site
.
register
(
Domain
,
DomainAdmin
)
admin
.
site
.
register
(
Record
,
RecordAdmin
)
admin
.
site
.
register
(
Blacklist
,
BlacklistAdmin
)
admin
.
site
.
register
(
SwitchPort
)
admin
.
site
.
register
(
EthernetDevice
,
EthernetDeviceAdmin
)
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