Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
154839c7
authored
Jan 09, 2015
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: async vm search
parent
04ac0b01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
circle/dashboard/static/dashboard/dashboard.js
+6
-3
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
154839c7
...
...
@@ -151,7 +151,8 @@ $(function () {
$
(
"#dashboard-vm-search-input"
).
keyup
(
function
(
e
)
{
// if my_vms is empty get a list of our vms
if
(
my_vms
.
length
<
1
)
{
$
.
ajaxSetup
(
{
"async"
:
false
}
);
$
(
"#dashboard-vm-search-form button i"
).
addClass
(
"fa-spinner fa-spin"
);
$
.
get
(
"/dashboard/vm/list/"
,
function
(
result
)
{
for
(
var
i
in
result
)
{
my_vms
.
push
({
...
...
@@ -165,8 +166,10 @@ $(function () {
'owner'
:
result
[
i
].
owner
,
});
}
$
(
"#dashboard-vm-search-input"
).
trigger
(
"keyup"
);
$
(
"#dashboard-vm-search-form button i"
).
removeClass
(
"fa-spinner fa-spin"
).
addClass
(
"fa-search"
);
});
$
.
ajaxSetup
(
{
"async"
:
true
}
)
;
return
;
}
input
=
$
(
"#dashboard-vm-search-input"
).
val
().
toLowerCase
();
...
...
@@ -358,7 +361,7 @@ function generateVmHTML(pk, name, host, icon, _status, fav, is_last) {
'<span class="index-vm-list-name">'
+
'<i class="fa '
+
icon
+
'" title="'
+
_status
+
'"></i> '
+
safe_tags_replace
(
name
)
+
'</span>'
+
'<small class="text-muted"> '
+
host
+
'</small>'
+
'<small class="text-muted
index-vm-list-host
"> '
+
host
+
'</small>'
+
'<div class="pull-right dashboard-vm-favourite" data-vm="'
+
pk
+
'">'
+
(
fav
?
'<i class="fa fa-star text-primary title-favourite" title="'
+
gettext
(
"Unfavourite"
)
+
'"></i>'
:
'<i class="fa fa-star-o text-primary title-favourite" title="'
+
gettext
(
"Mark as favorite"
)
+
'"></i>'
)
+
...
...
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