Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
c5254b04
authored
Aug 24, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: add vlan groups to index
parent
26220312
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
firewall/models.py
+1
-1
network/views.py
+2
-1
No files found.
firewall/models.py
View file @
c5254b04
...
...
@@ -295,7 +295,7 @@ class VlanGroup(models.Model):
@models.permalink
def
get_absolute_url
(
self
):
return
(
'network.vlangroup'
,
None
,
{
'pk'
:
self
.
pk
})
return
(
'network.vlan
_
group'
,
None
,
{
'pk'
:
self
.
pk
})
class
Group
(
models
.
Model
):
...
...
network/views.py
View file @
c5254b04
...
...
@@ -33,11 +33,12 @@ class IndexView(TemplateView):
hosts
=
Host
.
objects
.
all
()
.
order_by
(
'-modified_at'
)[:
size
]
records
=
Record
.
objects
.
all
()
.
order_by
(
'-modified_at'
)[:
size
]
vlans
=
Vlan
.
objects
.
all
()
.
order_by
(
'-modified_at'
)[:
size
]
vlangroups
=
VlanGroup
.
objects
.
all
()
.
order_by
(
'-modified_at'
)[:
size
]
rules
=
Rule
.
objects
.
all
()
.
order_by
(
'-modified_at'
)[:
size
]
result_list
=
[]
for
i
in
(
sorted
(
chain
(
blacklists
,
domains
,
groups
,
hosts
,
records
,
vlans
,
rules
),
records
,
vlans
,
vlangroups
,
rules
),
key
=
lambda
x
:
x
.
modified_at
,
reverse
=
True
)[:
size
]):
result_list
.
append
(
{
...
...
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