Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b19ab633
authored
Sep 02, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: success messages for host actions
parent
5795d50c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
network/views.py
+10
-0
No files found.
network/views.py
View file @
b19ab633
...
...
@@ -618,6 +618,11 @@ def remove_host_group(request, **kwargs):
# for post we actually remove the group from the host
elif
request
.
method
==
"POST"
:
host
.
groups
.
remove
(
group
)
messages
.
success
(
request
,
_
(
"Successfully removed
%(host)
s from "
"
%(group)
s group!"
%
{
'host'
:
host
,
'group'
:
group
}))
return
redirect
(
reverse_lazy
(
'network.host'
,
kwargs
=
{
'pk'
:
kwargs
[
'pk'
]}))
...
...
@@ -628,4 +633,9 @@ def add_host_group(request, **kwargs):
host
=
Host
.
objects
.
get
(
pk
=
kwargs
[
'pk'
])
group
=
Group
.
objects
.
get
(
pk
=
group_pk
)
host
.
groups
.
add
(
group
)
messages
.
success
(
request
,
_
(
"Successfully added
%(host)
s to group "
"
%(group)
s!"
%
{
'host'
:
host
,
'group'
:
group
}))
return
redirect
(
reverse_lazy
(
'network.host'
,
kwargs
=
kwargs
))
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