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
41d99935
authored
Mar 12, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fail message for vms after ajax refresh
parent
d5f44571
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
circle/dashboard/static/dashboard/vm-details.js
+2
-0
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
+0
-0
circle/dashboard/views.py
+8
-4
No files found.
circle/dashboard/static/dashboard/vm-details.js
View file @
41d99935
...
@@ -209,8 +209,10 @@ function checkNewActivity(only_state, runs) {
...
@@ -209,8 +209,10 @@ function checkNewActivity(only_state, runs) {
url
:
'/dashboard/vm/'
+
instance
+
'/activity/'
,
url
:
'/dashboard/vm/'
+
instance
+
'/activity/'
,
data
:
{
'only_state'
:
only_state
},
data
:
{
'only_state'
:
only_state
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
data
[
'activities'
]);
if
(
!
only_state
)
{
if
(
!
only_state
)
{
$
(
"#activity-timeline"
).
html
(
data
[
'activities'
]);
$
(
"#activity-timeline"
).
html
(
data
[
'activities'
]);
$
(
"[title]"
).
tooltip
();
}
}
$
(
"#vm-details-state"
).
html
(
data
[
'state'
]);
$
(
"#vm-details-state"
).
html
(
data
[
'state'
]);
...
...
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
View file @
41d99935
circle/dashboard/views.py
View file @
41d99935
...
@@ -24,6 +24,7 @@ from django.contrib import messages
...
@@ -24,6 +24,7 @@ from django.contrib import messages
from
django.utils.translation
import
ugettext
as
_
from
django.utils.translation
import
ugettext
as
_
from
django.template.defaultfilters
import
title
from
django.template.defaultfilters
import
title
from
django.template.loader
import
render_to_string
from
django.template.loader
import
render_to_string
from
django.template
import
RequestContext
from
django.forms.models
import
inlineformset_factory
from
django.forms.models
import
inlineformset_factory
from
django_tables2
import
SingleTableView
from
django_tables2
import
SingleTableView
...
@@ -1470,12 +1471,15 @@ def vm_activity(request, pk):
...
@@ -1470,12 +1471,15 @@ def vm_activity(request, pk):
response
[
'state'
]
=
instance
.
state
response
[
'state'
]
=
instance
.
state
if
only_state
is
not
None
and
only_state
==
"false"
:
# instance activity
if
only_state
is
not
None
and
only_state
==
"false"
:
# instance activity
print
"Sdsa"
context
=
{
'activities'
:
InstanceActivity
.
objects
.
filter
(
instance
=
instance
,
parent
=
None
)
.
order_by
(
'-started'
)
.
select_related
()
}
activities
=
render_to_string
(
activities
=
render_to_string
(
"dashboard/vm-detail/_activity-timeline.html"
,
"dashboard/vm-detail/_activity-timeline.html"
,
{
'activities'
:
InstanceActivity
.
objects
.
filter
(
RequestContext
(
request
,
context
),
instance
=
instance
,
parent
=
None
)
.
order_by
(
'-started'
)
.
select_related
()}
)
)
response
[
'activities'
]
=
activities
response
[
'activities'
]
=
activities
...
...
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