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
b05078d8
authored
Apr 22, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: i18n fixes
parent
c7517f56
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
circle/dashboard/forms.py
+6
-3
circle/vm/models/instance.py
+2
-1
No files found.
circle/dashboard/forms.py
View file @
b05078d8
...
...
@@ -463,7 +463,7 @@ class NodeForm(forms.ModelForm):
class
TemplateForm
(
forms
.
ModelForm
):
networks
=
forms
.
ModelMultipleChoiceField
(
queryset
=
VLANS
,
required
=
False
)
queryset
=
None
,
required
=
False
,
label
=
_
(
"Networks"
)
)
parent_type
=
forms
.
CharField
(
required
=
False
)
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -471,6 +471,9 @@ class TemplateForm(forms.ModelForm):
self
.
user
=
kwargs
.
pop
(
"user"
,
None
)
super
(
TemplateForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
fields
[
'networks'
]
.
queryset
=
Vlan
.
get_objects_with_level
(
'user'
,
self
.
user
)
data
=
self
.
data
.
copy
()
data
[
'owner'
]
=
self
.
user
.
pk
self
.
data
=
data
...
...
@@ -590,7 +593,7 @@ class TemplateForm(forms.ModelForm):
Field
(
'arch'
),
),
Fieldset
(
"stuff"
,
_
(
"Virtual machine settings"
)
,
Field
(
'access_method'
),
Field
(
'boot_menu'
),
Field
(
'raw_data'
,
**
kwargs_raw_data
),
...
...
@@ -600,7 +603,7 @@ class TemplateForm(forms.ModelForm):
Field
(
"system"
),
),
Fieldset
(
_
(
"External"
),
_
(
"External
resources
"
),
Field
(
"networks"
),
Field
(
"lease"
),
Field
(
"tags"
),
...
...
circle/vm/models/instance.py
View file @
b05078d8
...
...
@@ -84,7 +84,8 @@ class VirtualMachineDescModel(BaseResourceConfigModel):
boot_menu
=
BooleanField
(
verbose_name
=
_
(
'boot menu'
),
default
=
False
,
help_text
=
_
(
'Show boot device selection menu on boot.'
))
lease
=
ForeignKey
(
Lease
,
help_text
=
_
(
"Preferred expiration periods."
))
lease
=
ForeignKey
(
Lease
,
help_text
=
_
(
"Preferred expiration periods."
),
verbose_name
=
_
(
"Lease"
))
raw_data
=
TextField
(
verbose_name
=
_
(
'raw_data'
),
blank
=
True
,
help_text
=
_
(
'Additional libvirt domain parameters in XML format.'
))
req_traits
=
ManyToManyField
(
Trait
,
blank
=
True
,
...
...
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