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
154902de
authored
Sep 22, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature-refactor-views
Conflicts: circle/dashboard/views.py
parents
2fd40158
753691c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
circle/dashboard/static/dashboard/dashboard.js
+2
-1
circle/dashboard/templates/dashboard/index-vm.html
+4
-1
circle/dashboard/views/vm.py
+3
-0
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
154902de
...
...
@@ -234,6 +234,7 @@ $(function () {
'host'
:
result
[
i
].
host
,
'icon'
:
result
[
i
].
icon
,
'status'
:
result
[
i
].
status
,
'owner'
:
result
[
i
].
owner
,
});
}
});
...
...
@@ -251,7 +252,7 @@ $(function () {
search_result
.
sort
(
compareVmByFav
);
for
(
var
i
=
0
;
i
<
5
&&
i
<
search_result
.
length
;
i
++
)
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
.
length
<
5
));
if
(
search_result
.
length
==
0
)
...
...
circle/dashboard/templates/dashboard/index-vm.html
View file @
154902de
...
...
@@ -25,7 +25,10 @@
<i
class=
"fa {{ i.get_status_icon }}"
title=
"{{ i.get_status_display }}"
></i>
{{ i.name }}
</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 }}"
>
{% if i.fav %}
<i
class=
"fa fa-star text-primary title-favourite"
title=
"{% trans "
Unfavourite
"
%}"
></i>
...
...
circle/dashboard/views/vm.py
View file @
154902de
...
...
@@ -796,6 +796,8 @@ class VmList(LoginRequiredMixin, FilterMixin, ListView):
'icon'
:
i
.
get_status_icon
(),
'host'
:
i
.
short_hostname
,
'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
,
}
for
i
in
instances
]
return
HttpResponse
(
...
...
@@ -1377,6 +1379,7 @@ class TransferOwnershipConfirmView(LoginRequiredMixin, View):
old
=
instance
.
owner
with
instance_activity
(
code_suffix
=
'ownership-transferred'
,
concurrency_check
=
False
,
instance
=
instance
,
user
=
request
.
user
):
instance
.
owner
=
request
.
user
instance
.
clean
()
...
...
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