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
89787e6e
authored
Jun 06, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add Vm{Create,Download}DiskView
parent
198ec637
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
+20
-1
circle/dashboard/views.py
+20
-1
No files found.
circle/dashboard/views.py
View file @
89787e6e
...
@@ -59,7 +59,8 @@ from .forms import (
...
@@ -59,7 +59,8 @@ from .forms import (
CircleAuthenticationForm
,
HostForm
,
LeaseForm
,
MyProfileForm
,
CircleAuthenticationForm
,
HostForm
,
LeaseForm
,
MyProfileForm
,
NodeForm
,
TemplateForm
,
TraitForm
,
VmCustomizeForm
,
GroupCreateForm
,
NodeForm
,
TemplateForm
,
TraitForm
,
VmCustomizeForm
,
GroupCreateForm
,
UserCreationForm
,
GroupProfileUpdateForm
,
UnsubscribeForm
,
UserCreationForm
,
GroupProfileUpdateForm
,
UnsubscribeForm
,
CirclePasswordChangeForm
,
VmSaveForm
,
VmSaveForm
,
CirclePasswordChangeForm
,
VmCreateDiskForm
,
VmDownloadDiskForm
,
)
)
from
.tables
import
(
from
.tables
import
(
...
@@ -595,6 +596,22 @@ class FormOperationMixin(object):
...
@@ -595,6 +596,22 @@ class FormOperationMixin(object):
return
self
.
get
(
request
)
return
self
.
get
(
request
)
class
VmCreateDiskView
(
FormOperationMixin
,
VmOperationView
):
op
=
'create_disk'
form_class
=
VmCreateDiskForm
show_in_toolbar
=
False
icon
=
'hdd'
class
VmDownloadDiskView
(
FormOperationMixin
,
VmOperationView
):
op
=
'download_disk'
form_class
=
VmDownloadDiskForm
show_in_toolbar
=
False
icon
=
'download'
class
VmMigrateView
(
VmOperationView
):
class
VmMigrateView
(
VmOperationView
):
op
=
'migrate'
op
=
'migrate'
...
@@ -634,6 +651,8 @@ vm_ops = {
...
@@ -634,6 +651,8 @@ vm_ops = {
'destroy'
:
VmOperationView
.
factory
(
op
=
'destroy'
,
icon
=
'remove'
),
'destroy'
:
VmOperationView
.
factory
(
op
=
'destroy'
,
icon
=
'remove'
),
'sleep'
:
VmOperationView
.
factory
(
op
=
'sleep'
,
icon
=
'moon'
),
'sleep'
:
VmOperationView
.
factory
(
op
=
'sleep'
,
icon
=
'moon'
),
'wake_up'
:
VmOperationView
.
factory
(
op
=
'wake_up'
,
icon
=
'sun'
),
'wake_up'
:
VmOperationView
.
factory
(
op
=
'wake_up'
,
icon
=
'sun'
),
'create_disk'
:
VmCreateDiskView
,
'download_disk'
:
VmDownloadDiskView
,
}
}
...
...
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