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
dd05833f
authored
Nov 20, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix activites missing users
parent
f2148cee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
circle/dashboard/views.py
+4
-4
No files found.
circle/dashboard/views.py
View file @
dd05833f
...
@@ -36,7 +36,7 @@ class IndexView(TemplateView):
...
@@ -36,7 +36,7 @@ class IndexView(TemplateView):
else
:
else
:
user
=
None
user
=
None
instances
=
Instance
.
objects
.
filter
(
owner
=
user
)
instances
=
Instance
.
active
.
filter
(
owner
=
user
)
context
=
super
(
IndexView
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
IndexView
,
self
)
.
get_context_data
(
**
kwargs
)
context
.
update
({
context
.
update
({
'instances'
:
instances
[:
5
],
'instances'
:
instances
[:
5
],
...
@@ -269,7 +269,7 @@ class VmCreate(TemplateView):
...
@@ -269,7 +269,7 @@ class VmCreate(TemplateView):
inst
=
Instance
.
create_from_template
(
template
=
template
,
inst
=
Instance
.
create_from_template
(
template
=
template
,
owner
=
user
,
networks
=
networks
,
owner
=
user
,
networks
=
networks
,
disks
=
disks
,
**
ikwargs
)
disks
=
disks
,
**
ikwargs
)
inst
.
deploy_async
()
inst
.
deploy_async
(
user
=
request
.
user
)
resp
[
'pk'
]
=
inst
.
pk
resp
[
'pk'
]
=
inst
.
pk
messages
.
success
(
request
,
_
(
'VM successfully created!'
))
messages
.
success
(
request
,
_
(
'VM successfully created!'
))
...
@@ -309,7 +309,7 @@ class VmDelete(DeleteView):
...
@@ -309,7 +309,7 @@ class VmDelete(DeleteView):
if
not
object
.
has_level
(
request
.
user
,
'owner'
):
if
not
object
.
has_level
(
request
.
user
,
'owner'
):
raise
PermissionDenied
()
raise
PermissionDenied
()
object
.
destroy_async
()
object
.
destroy_async
(
user
=
request
.
user
)
success_url
=
self
.
get_success_url
()
success_url
=
self
.
get_success_url
()
success_message
=
_
(
"VM successfully deleted!"
)
success_message
=
_
(
"VM successfully deleted!"
)
...
@@ -344,7 +344,7 @@ def mass_delete_vm(request, **kwargs):
...
@@ -344,7 +344,7 @@ def mass_delete_vm(request, **kwargs):
raise
PermissionDenied
()
# no need for rollback or proper
raise
PermissionDenied
()
# no need for rollback or proper
# error message, this can't
# error message, this can't
# normally happen.
# normally happen.
i
.
destroy_async
()
i
.
destroy_async
(
request
.
user
)
names
.
append
(
i
.
name
)
names
.
append
(
i
.
name
)
success_message
=
_
(
"Mass delete complete, the following VMs were "
+
success_message
=
_
(
"Mass delete complete, the following VMs were "
+
...
...
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