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
b57dff77
authored
Jul 27, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add loading icon for more/less activities link
parent
0fc357cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
circle/dashboard/static/dashboard/vm-details.js
+8
-3
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
+2
-2
No files found.
circle/dashboard/static/dashboard/vm-details.js
View file @
b57dff77
...
...
@@ -19,6 +19,7 @@ $(function() {
});
$
(
"#activity-refresh"
).
on
(
"click"
,
"#show-all-activities"
,
function
()
{
$
(
this
).
find
(
"i"
).
addClass
(
"fa-spinner fa-spin"
);
show_all
=
!
show_all
;
$
(
'a[href="#activity"]'
).
trigger
(
"click"
);
return
false
;
...
...
@@ -359,10 +360,14 @@ function checkNewActivity(runs) {
url
:
'/dashboard/vm/'
+
instance
+
'/activity/'
,
data
:
{
'show_all'
:
show_all
},
success
:
function
(
data
)
{
a
=
unescapeHTML
(
data
[
'activities'
]);
b
=
changeHTML
(
$
(
"#activity-refresh"
).
html
());
if
(
a
!=
b
)
if
(
show_all
)
{
/* replace on longer string freezes the spinning stuff */
$
(
"#activity-refresh"
).
html
(
data
[
'activities'
]);
}
else
{
a
=
unescapeHTML
(
data
[
'activities'
]);
b
=
changeHTML
(
$
(
"#activity-refresh"
).
html
());
if
(
a
!=
b
)
$
(
"#activity-refresh"
).
html
(
data
[
'activities'
]);
}
$
(
"#ops"
).
html
(
data
[
'ops'
]);
$
(
"#disk-ops"
).
html
(
data
[
'disk_ops'
]);
$
(
"[title]"
).
tooltip
();
...
...
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
View file @
b57dff77
...
...
@@ -56,9 +56,9 @@
<div
id=
"show-all-activities-container"
>
<a
id=
"show-all-activities"
href=
"#"
>
{% if activities|length > 10 %}
<span>
{% trans "Show less activities" %}
</span
>
{% trans "Show less activities" %}
<i
class=
"fa fa-angle-double-up"
></i
>
{% else %}
<span>
{% trans "Show all activities" %}
</span
>
{% trans "Show all activities" %}
<i
class=
"fa fa-angle-double-down"
></i
>
{% endif %}
</a>
</div>
...
...
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