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
8a7407ff
authored
Mar 25, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add icon to vm state after ajax activity refresh
parent
327ada45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
circle/dashboard/static/dashboard/vm-details.js
+2
-1
circle/dashboard/templates/dashboard/vm-detail.html
+4
-1
circle/dashboard/views.py
+1
-0
No files found.
circle/dashboard/static/dashboard/vm-details.js
View file @
8a7407ff
...
...
@@ -214,7 +214,8 @@ function checkNewActivity(only_state, runs) {
$
(
"[title]"
).
tooltip
();
}
$
(
"#vm-details-state"
).
html
(
data
[
'state'
]);
$
(
"#vm-details-state i"
).
prop
(
"class"
,
data
[
'icon'
]);
$
(
"#vm-details-state span"
).
html
(
data
[
'state'
]);
if
(
data
[
'state'
]
==
"RUNNING"
)
{
$
(
"[data-target=#_console]"
).
attr
(
"data-toggle"
,
"pill"
).
attr
(
"href"
,
"#console"
).
parent
(
"li"
).
removeClass
(
"disabled"
);
}
else
{
...
...
circle/dashboard/templates/dashboard/vm-detail.html
View file @
8a7407ff
...
...
@@ -111,7 +111,10 @@
<div
class=
"row"
>
<div
class=
"col-md-4"
id=
"vm-info-pane"
>
<div
class=
"big"
>
<span
id=
"vm-details-state"
class=
"label label-success"
><i
class=
"{{ instance.get_status_icon }}"
></i>
{{ instance.get_status_display|upper }}
</span>
<span
id=
"vm-details-state"
class=
"label label-success"
>
<i
class=
"{{ instance.get_status_icon }}"
></i>
<span>
{{ instance.get_status_display|upper }}
</span>
</span>
</div>
<h3>
{% trans "Connection" %}
</h3>
<input
type=
"text"
value=
"{{ instance.get_connect_command }}"
class=
"form-control"
readonly
/>
...
...
circle/dashboard/views.py
View file @
8a7407ff
...
...
@@ -1598,6 +1598,7 @@ def vm_activity(request, pk):
only_state
=
request
.
GET
.
get
(
"only_state"
)
response
[
'state'
]
=
instance
.
state
response
[
'icon'
]
=
instance
.
get_status_icon
()
if
only_state
is
not
None
and
only_state
==
"false"
:
# instance activity
context
=
{
'activities'
:
InstanceActivity
.
objects
.
filter
(
...
...
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