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
Commit
e7ed8921
authored
Feb 10, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: fix show.html if no firewall_host
parent
7e6a19f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
+7
-1
one/templates/show.html
+2
-0
one/views.py
+5
-1
No files found.
one/templates/show.html
View file @
e7ed8921
...
@@ -116,6 +116,7 @@
...
@@ -116,6 +116,7 @@
</table>
</table>
</div>
</div>
</div>
</div>
{% if i.firewall_host %}
<div
class=
"contentblock"
id=
"ports"
>
<div
class=
"contentblock"
id=
"ports"
>
<h2>
{% trans "Port administration" %}
</h2>
<h2>
{% trans "Port administration" %}
</h2>
<div
class=
"content"
>
<div
class=
"content"
>
...
@@ -158,6 +159,7 @@
...
@@ -158,6 +159,7 @@
</form>
</form>
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
<div
class=
"boxes"
>
<div
class=
"boxes"
>
<div
class=
"contentblock"
id=
"vm-list"
>
<div
class=
"contentblock"
id=
"vm-list"
>
...
...
one/views.py
View file @
e7ed8921
...
@@ -168,6 +168,10 @@ def vm_show(request, iid):
...
@@ -168,6 +168,10 @@ def vm_show(request, iid):
inst
.
update_state
()
inst
.
update_state
()
if
inst
.
template
.
state
==
"SAVING"
:
if
inst
.
template
.
state
==
"SAVING"
:
inst
.
check_if_is_save_as_done
()
inst
.
check_if_is_save_as_done
()
try
:
ports
=
inst
.
firewall_host
.
list_ports
()
except
:
ports
=
None
return
render_to_response
(
"show.html"
,
RequestContext
(
request
,{
return
render_to_response
(
"show.html"
,
RequestContext
(
request
,{
'uri'
:
inst
.
get_connect_uri
(),
'uri'
:
inst
.
get_connect_uri
(),
'state'
:
inst
.
state
,
'state'
:
inst
.
state
,
...
@@ -177,7 +181,7 @@ def vm_show(request, iid):
...
@@ -177,7 +181,7 @@ def vm_show(request, iid):
'instances'
:
_list_instances
(
request
),
'instances'
:
_list_instances
(
request
),
'i'
:
inst
,
'i'
:
inst
,
'booting'
:
not
inst
.
active_since
,
'booting'
:
not
inst
.
active_since
,
'ports'
:
inst
.
firewall_host
.
list_ports
()
'ports'
:
ports
,
}))
}))
@require_safe
@require_safe
...
...
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