Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
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
7a8a89b4
authored
Jun 17, 2018
by
Szabolcs Gelencser
Committed by
Szabolcs Gelencsér
Jun 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix template listing for mitaka
parent
631d0f12
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
10 deletions
+2
-10
circle/dashboard/forms.py
+1
-1
circle/dashboard/templates/dashboard/_vm-create-1.html
+0
-8
circle/dashboard/views/vm.py
+1
-1
No files found.
circle/dashboard/forms.py
View file @
7a8a89b4
...
@@ -128,7 +128,7 @@ class VmFromPlainImageForm(forms.Form):
...
@@ -128,7 +128,7 @@ class VmFromPlainImageForm(forms.Form):
super
(
VmFromPlainImageForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
super
(
VmFromPlainImageForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
images
=
openstack_api
.
glance
.
image_list_detailed
(
request
)[
0
]
#TODO: flatten?
images
=
openstack_api
.
glance
.
image_list_detailed
(
request
)[
0
]
#TODO: flatten?
images
=
[
i
for
i
in
images
if
i
.
_apiresource
[
"visibility"
]
in
[
"p
rivate"
,
"public"
]]
images
=
[
i
for
i
in
images
if
i
.
_apiresource
[
"visibility"
]
in
[
"p
ublic"
,
]]
def
sizeof_fmt
(
num
,
suffix
=
'B'
):
def
sizeof_fmt
(
num
,
suffix
=
'B'
):
for
unit
in
[
''
,
'K'
,
'M'
,
'G'
,
'T'
]:
for
unit
in
[
''
,
'K'
,
'M'
,
'G'
,
'T'
]:
...
...
circle/dashboard/templates/dashboard/_vm-create-1.html
View file @
7a8a89b4
...
@@ -79,14 +79,6 @@
...
@@ -79,14 +79,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
{% empty %}
{% if not template_access_types %}
{% trans "You can't start new virtual machines because no templates are shared with you." %}
{% else %}
{% trans "You can't start new virtual machines because no templates are shared with you however you can request them via the form below." %}
<hr
/>
{% include "request/_request-template-form.html" %}
{% endif %}
{% endfor %}
{% endfor %}
<div
class=
"vm-create-template"
>
<div
class=
"vm-create-template"
>
...
...
circle/dashboard/views/vm.py
View file @
7a8a89b4
...
@@ -1173,7 +1173,7 @@ class VmCreate(LoginRequiredMixin, TemplateView):
...
@@ -1173,7 +1173,7 @@ class VmCreate(LoginRequiredMixin, TemplateView):
if
form
is
None
:
if
form
is
None
:
form
=
self
.
form_class
(
user
=
request
.
user
,
template
=
template
)
form
=
self
.
form_class
(
user
=
request
.
user
,
template
=
template
)
else
:
else
:
templates
=
InstanceTemplate
.
objects
.
filter
(
owner_id
=
self
.
request
.
user
.
id
)
templates
=
InstanceTemplate
.
objects
.
filter
(
owner_id
=
self
.
request
.
user
.
tenant_
id
)
images
=
openstack_api
.
glance
.
image_list_detailed
(
request
)
images
=
openstack_api
.
glance
.
image_list_detailed
(
request
)
...
...
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