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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
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
Show 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):
...
@@ -334,6 +334,7 @@ class VmDetailView(CheckedDetailView):
for
k
,
v
in
options
.
iteritems
():
for
k
,
v
in
options
.
iteritems
():
if
request
.
POST
.
get
(
k
)
is
not
None
:
if
request
.
POST
.
get
(
k
)
is
not
None
:
return
v
(
request
)
return
v
(
request
)
raise
Http404
()
def
__change_password
(
self
,
request
):
def
__change_password
(
self
,
request
):
self
.
object
=
self
.
get_object
()
self
.
object
=
self
.
get_object
()
...
@@ -514,6 +515,10 @@ class VmRawDataUpdate(SuperuserRequiredMixin, UpdateView):
...
@@ -514,6 +515,10 @@ class VmRawDataUpdate(SuperuserRequiredMixin, UpdateView):
def
get_success_url
(
self
):
def
get_success_url
(
self
):
return
self
.
get_object
()
.
get_absolute_url
()
+
"#resources"
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
):
class
OperationView
(
RedirectToLoginMixin
,
DetailView
):
...
@@ -862,12 +867,15 @@ vm_ops = OrderedDict([
...
@@ -862,12 +867,15 @@ vm_ops = OrderedDict([
op
=
'shut_off'
,
icon
=
'ban'
,
effect
=
'warning'
)),
op
=
'shut_off'
,
icon
=
'ban'
,
effect
=
'warning'
)),
(
'recover'
,
VmOperationView
.
factory
(
(
'recover'
,
VmOperationView
.
factory
(
op
=
'recover'
,
icon
=
'medkit'
,
effect
=
'warning'
)),
op
=
'recover'
,
icon
=
'medkit'
,
effect
=
'warning'
)),
(
'nostate'
,
VmOperationView
.
factory
(
op
=
'change_state'
,
icon
=
'legal'
,
effect
=
'danger'
)),
(
'destroy'
,
VmOperationView
.
factory
(
(
'destroy'
,
VmOperationView
.
factory
(
extra_bases
=
[
TokenOperationView
],
extra_bases
=
[
TokenOperationView
],
op
=
'destroy'
,
icon
=
'times'
,
effect
=
'danger'
)),
op
=
'destroy'
,
icon
=
'times'
,
effect
=
'danger'
)),
(
'create_disk'
,
VmCreateDiskView
),
(
'create_disk'
,
VmCreateDiskView
),
(
'download_disk'
,
VmDownloadDiskView
),
(
'download_disk'
,
VmDownloadDiskView
),
(
'renew'
,
VmRenewView
),
(
'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