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
b42a5745
authored
Sep 16, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-268' into 'master'
Issue 268
parents
9831b9b0
b640ae3d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
circle/dashboard/static/dashboard/dashboard.js
+2
-1
circle/dashboard/templates/dashboard/index-vm.html
+4
-1
circle/dashboard/views.py
+2
-0
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
b42a5745
...
@@ -234,6 +234,7 @@ $(function () {
...
@@ -234,6 +234,7 @@ $(function () {
'host'
:
result
[
i
].
host
,
'host'
:
result
[
i
].
host
,
'icon'
:
result
[
i
].
icon
,
'icon'
:
result
[
i
].
icon
,
'status'
:
result
[
i
].
status
,
'status'
:
result
[
i
].
status
,
'owner'
:
result
[
i
].
owner
,
});
});
}
}
});
});
...
@@ -251,7 +252,7 @@ $(function () {
...
@@ -251,7 +252,7 @@ $(function () {
search_result
.
sort
(
compareVmByFav
);
search_result
.
sort
(
compareVmByFav
);
for
(
var
i
=
0
;
i
<
5
&&
i
<
search_result
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
5
&&
i
<
search_result
.
length
;
i
++
)
html
+=
generateVmHTML
(
search_result
[
i
].
pk
,
search_result
[
i
].
name
,
html
+=
generateVmHTML
(
search_result
[
i
].
pk
,
search_result
[
i
].
name
,
search_result
[
i
].
host
,
search_result
[
i
].
icon
,
search_result
[
i
].
owner
?
search_result
[
i
].
owner
:
search_result
[
i
].
host
,
search_result
[
i
].
icon
,
search_result
[
i
].
status
,
search_result
[
i
].
fav
,
search_result
[
i
].
status
,
search_result
[
i
].
fav
,
(
search_result
.
length
<
5
));
(
search_result
.
length
<
5
));
if
(
search_result
.
length
==
0
)
if
(
search_result
.
length
==
0
)
...
...
circle/dashboard/templates/dashboard/index-vm.html
View file @
b42a5745
...
@@ -25,7 +25,10 @@
...
@@ -25,7 +25,10 @@
<i
class=
"fa {{ i.get_status_icon }}"
title=
"{{ i.get_status_display }}"
></i>
<i
class=
"fa {{ i.get_status_icon }}"
title=
"{{ i.get_status_display }}"
></i>
{{ i.name }}
{{ i.name }}
</span>
</span>
<small
class=
"text-muted"
>
{{ i.short_hostname }}
</small>
<small
class=
"text-muted"
>
{% if i.owner == request.user %}{{ i.short_hostname }}
{% else %}{{i.owner.profile.get_display_name}}{% endif %}
</small>
<div
class=
"pull-right dashboard-vm-favourite"
data-vm=
"{{ i.pk }}"
>
<div
class=
"pull-right dashboard-vm-favourite"
data-vm=
"{{ i.pk }}"
>
{% if i.fav %}
{% if i.fav %}
<i
class=
"fa fa-star text-primary title-favourite"
title=
"{% trans "
Unfavourite
"
%}"
></i>
<i
class=
"fa fa-star text-primary title-favourite"
title=
"{% trans "
Unfavourite
"
%}"
></i>
...
...
circle/dashboard/views.py
View file @
b42a5745
...
@@ -1890,6 +1890,8 @@ class VmList(LoginRequiredMixin, FilterMixin, ListView):
...
@@ -1890,6 +1890,8 @@ class VmList(LoginRequiredMixin, FilterMixin, ListView):
'icon'
:
i
.
get_status_icon
(),
'icon'
:
i
.
get_status_icon
(),
'host'
:
i
.
short_hostname
,
'host'
:
i
.
short_hostname
,
'status'
:
i
.
get_status_display
(),
'status'
:
i
.
get_status_display
(),
'owner'
:
(
i
.
owner
.
profile
.
get_display_name
()
if
i
.
owner
!=
self
.
request
.
user
else
None
),
'fav'
:
i
.
pk
in
favs
,
'fav'
:
i
.
pk
in
favs
,
}
for
i
in
instances
]
}
for
i
in
instances
]
return
HttpResponse
(
return
HttpResponse
(
...
...
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