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
38e373e3
authored
Jul 21, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: added state change button
parent
c342b6da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
circle/dashboard/views.py
+8
-0
No files found.
circle/dashboard/views.py
View file @
38e373e3
...
...
@@ -334,6 +334,7 @@ class VmDetailView(CheckedDetailView):
for
k
,
v
in
options
.
iteritems
():
if
request
.
POST
.
get
(
k
)
is
not
None
:
return
v
(
request
)
raise
Http404
()
def
__change_password
(
self
,
request
):
self
.
object
=
self
.
get_object
()
...
...
@@ -514,6 +515,10 @@ class VmRawDataUpdate(SuperuserRequiredMixin, UpdateView):
def
get_success_url
(
self
):
return
self
.
get_object
()
.
get_absolute_url
()
+
"#resources"
def
post
(
self
,
request
,
**
kwargs
):
messages
.
error
(
request
,
"
%
s"
%
request
.
POST
.
get
(
"raw_data"
))
return
redirect
(
self
.
get_object
()
.
get_absolute_url
()
+
"#resources"
)
class
OperationView
(
RedirectToLoginMixin
,
DetailView
):
...
...
@@ -862,12 +867,15 @@ vm_ops = OrderedDict([
op
=
'shut_off'
,
icon
=
'ban'
,
effect
=
'warning'
)),
(
'recover'
,
VmOperationView
.
factory
(
op
=
'recover'
,
icon
=
'medkit'
,
effect
=
'warning'
)),
(
'nostate'
,
VmOperationView
.
factory
(
op
=
'change_state'
,
icon
=
'legal'
,
effect
=
'danger'
)),
(
'destroy'
,
VmOperationView
.
factory
(
extra_bases
=
[
TokenOperationView
],
op
=
'destroy'
,
icon
=
'times'
,
effect
=
'danger'
)),
(
'create_disk'
,
VmCreateDiskView
),
(
'download_disk'
,
VmDownloadDiskView
),
(
'renew'
,
VmRenewView
),
(
'resources_change'
,
VmResourcesChangeView
),
])
...
...
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