Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
11051553
authored
Jun 04, 2023
by
carpoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add export target filed
parent
724e1aa1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
circle/dashboard/forms.py
+5
-5
No files found.
circle/dashboard/forms.py
View file @
11051553
...
...
@@ -14,9 +14,6 @@
#
# You should have received a copy of the GNU General Public License along
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from
urllib.parse
import
urlparse
import
os
...
...
@@ -877,13 +874,15 @@ class VmDiskExportForm(OperationForm):
disk_format
=
forms
.
ChoiceField
(
choices
=
Disk
.
EXPORT_FORMATS
,
label
=
_
(
'Format'
))
export_target
=
forms
.
ChoiceField
(
choices
=
((
'user_store'
,
'User store'
),
(
'datastore'
,
'Datastore'
)),
label
=
_
(
'Export target'
))
def
__init__
(
self
,
*
args
,
**
kwargs
):
choices
=
kwargs
.
pop
(
'choices'
)
self
.
disk
=
kwargs
.
pop
(
'default'
)
super
(
VmDiskExportForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
fields
[
'disk'
]
=
forms
.
ModelChoiceField
(
queryset
=
choices
,
initial
=
self
.
disk
,
required
=
True
,
empty_label
=
None
,
label
=
_
(
'Disk'
))
...
...
@@ -902,7 +901,8 @@ class VmDiskExportForm(OperationForm):
),
Field
(
'disk'
),
Field
(
'exported_name'
),
Field
(
'disk_format'
)
Field
(
'disk_format'
),
Field
(
'export_target'
),
)
return
helper
...
...
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