Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
ea948deb
authored
Aug 01, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: handle resultant state being None
parent
32edaf0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
circle/dashboard/views.py
+3
-2
No files found.
circle/dashboard/views.py
View file @
ea948deb
...
@@ -312,6 +312,7 @@ class VmDetailView(CheckedDetailView):
...
@@ -312,6 +312,7 @@ class VmDetailView(CheckedDetailView):
context
[
'show_show_all'
]
=
show_show_all
context
[
'show_show_all'
]
=
show_show_all
latest
=
instance
.
get_latest_activity_in_progress
()
latest
=
instance
.
get_latest_activity_in_progress
()
context
[
'is_new_state'
]
=
(
latest
and
context
[
'is_new_state'
]
=
(
latest
and
latest
.
resultant_state
is
not
None
and
instance
.
status
!=
latest
.
resultant_state
)
instance
.
status
!=
latest
.
resultant_state
)
context
[
'vlans'
]
=
Vlan
.
get_objects_with_level
(
context
[
'vlans'
]
=
Vlan
.
get_objects_with_level
(
...
@@ -2460,8 +2461,8 @@ def vm_activity(request, pk):
...
@@ -2460,8 +2461,8 @@ def vm_activity(request, pk):
response
[
'status'
]
=
instance
.
status
response
[
'status'
]
=
instance
.
status
response
[
'icon'
]
=
instance
.
get_status_icon
()
response
[
'icon'
]
=
instance
.
get_status_icon
()
latest
=
instance
.
get_latest_activity_in_progress
()
latest
=
instance
.
get_latest_activity_in_progress
()
response
[
'is_new_state'
]
=
(
latest
and
response
[
'is_new_state'
]
=
(
latest
and
latest
.
resultant_state
is
not
None
instance
.
status
!=
latest
.
resultant_state
)
and
instance
.
status
!=
latest
.
resultant_state
)
context
=
{
context
=
{
'instance'
:
instance
,
'instance'
:
instance
,
...
...
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