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
8382230f
authored
Sep 09, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: rule list to host group edit
parent
c6cbc766
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
circle/network/templates/network/group-edit.html
+10
-0
circle/network/views.py
+8
-0
No files found.
circle/network/templates/network/group-edit.html
View file @
8382230f
...
@@ -15,5 +15,15 @@
...
@@ -15,5 +15,15 @@
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
{% crispy form %}
{% crispy form %}
</div>
</div>
<div
class=
"col-sm-5 col-sm-offset-1"
>
<div
class=
"page-header"
>
<h3>
{% trans "Rules" %}
</h3>
</div>
{% if rule_list.data.data.count > 0 %}
{% render_table rule_list %}
{% else %}
{% trans "No rules associated with this host group!" %}
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% endblock %}
circle/network/views.py
View file @
8382230f
...
@@ -243,6 +243,14 @@ class GroupDetail(UpdateView, SuccessMessageMixin):
...
@@ -243,6 +243,14 @@ class GroupDetail(UpdateView, SuccessMessageMixin):
if
'pk'
in
self
.
kwargs
:
if
'pk'
in
self
.
kwargs
:
return
reverse_lazy
(
'network.group'
,
kwargs
=
self
.
kwargs
)
return
reverse_lazy
(
'network.group'
,
kwargs
=
self
.
kwargs
)
def
get_context_data
(
self
,
*
args
,
**
kwargs
):
context
=
super
(
GroupDetail
,
self
)
.
get_context_data
(
**
kwargs
)
# records
q
=
Rule
.
objects
.
filter
(
hostgroup
=
self
.
object
)
context
[
'rule_list'
]
=
SmallRuleTable
(
q
)
return
context
class
GroupDelete
(
DeleteView
):
class
GroupDelete
(
DeleteView
):
model
=
Group
model
=
Group
...
...
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