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
Commit
6d848036
authored
Aug 29, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix some mass_ops issues
parent
bb377d91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
circle/common/models.py
+3
-3
circle/dashboard/templates/dashboard/_vm-mass-migrate.html
+1
-1
circle/dashboard/views.py
+2
-1
No files found.
circle/common/models.py
View file @
6d848036
...
...
@@ -501,9 +501,9 @@ def fetch_human_exception(exception, user=None):
if
isinstance
(
exception
,
PermissionDenied
):
exception
=
create_readable
(
ugettext_noop
(
"Permission Denied"
))
else
:
exception
=
create_readable
(
_
(
"Unknown error"
),
_
(
"Unknown error:
%(ex)
s"
),
ex
=
unicode
(
exception
))
.
get_text
(
)
exception
=
create_readable
(
ugettext_noop
(
"Unknown error"
),
ugettext_noop
(
"Unknown error:
%(ex)
s"
),
ex
=
unicode
(
exception
)
)
return
exception
.
get_text
(
user
)
if
user
else
exception
...
...
circle/dashboard/templates/dashboard/_vm-mass-migrate.html
View file @
6d848036
...
...
@@ -13,7 +13,7 @@
</label>
<input
id=
"migrate-to-none"
type=
"radio"
name=
"node"
value=
""
style=
"float: right;"
checked=
"checked"
>
<span
class=
"vm-migrate-node-property"
>
{% trans "This option will reschedule each virtual machine to the
most
optimal node." %}
{% trans "This option will reschedule each virtual machine to the optimal node." %}
</span>
<div
style=
"clear: both;"
></div>
</div>
...
...
circle/dashboard/views.py
View file @
6d848036
...
...
@@ -1025,6 +1025,7 @@ class MassOperationView(OperationView):
template_name
=
'dashboard/mass-operate.html'
def
check_auth
(
self
):
self
.
get_op
()
.
check_perms
(
self
.
request
.
user
)
for
i
in
self
.
get_object
():
if
not
i
.
has_level
(
self
.
request
.
user
,
"user"
):
raise
PermissionDenied
(
...
...
@@ -1100,7 +1101,7 @@ class MassOperationView(OperationView):
store
.
used
=
True
return
HttpResponse
(
json
.
dumps
({
'messages'
:
[
unicode
(
m
)
for
m
in
store
]}),
content_type
=
"application
=
json"
content_type
=
"application
/
json"
)
else
:
return
redirect
(
reverse
(
"dashboard.views.vm-list"
))
...
...
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