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
4a0abb1e
authored
Feb 27, 2015
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: add new fields to blacklisttable
parent
704027af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
circle/network/tables.py
+6
-3
No files found.
circle/network/tables.py
View file @
4a0abb1e
...
...
@@ -20,7 +20,8 @@ from django.utils.translation import ugettext_lazy as _
from
django.utils.html
import
format_html
from
django_tables2
import
Table
,
A
from
django_tables2.columns
import
LinkColumn
,
TemplateColumn
,
Column
from
django_tables2.columns
import
(
LinkColumn
,
TemplateColumn
,
Column
,
BooleanColumn
)
from
firewall.models
import
Host
,
Vlan
,
Domain
,
Group
,
Record
,
Rule
,
SwitchPort
...
...
@@ -41,12 +42,14 @@ class MACColumn(Column):
class
BlacklistItemTable
(
Table
):
ipv4
=
LinkColumn
(
'network.blacklist'
,
args
=
[
A
(
'pk'
)])
whitelisted
=
BooleanColumn
()
class
Meta
:
model
=
Domain
attrs
=
{
'class'
:
'table table-striped table-condensed'
}
fields
=
(
'ipv4'
,
'host'
,
'expires_at'
,
'whitelisted'
,
'reason'
)
order_by
=
(
'ipv4'
,
)
fields
=
(
'ipv4'
,
'host'
,
'reason'
,
'whitelisted'
,
'expires_at'
,
'created_at'
)
order_by
=
(
'-expires_at'
,
)
class
DomainTable
(
Table
):
...
...
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