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
78df1c1e
authored
Nov 11, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add favorite icon to VM details
fixes #349
parent
fa1d82c3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletions
+9
-1
circle/dashboard/static/dashboard/dashboard.js
+1
-1
circle/dashboard/templates/dashboard/vm-detail.html
+7
-0
circle/dashboard/views/vm.py
+1
-0
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
78df1c1e
...
@@ -132,7 +132,7 @@ $(function () {
...
@@ -132,7 +132,7 @@ $(function () {
$
(
'.js-hidden'
).
hide
();
$
(
'.js-hidden'
).
hide
();
/* favourite star */
/* favourite star */
$
(
"#dashboard-vm-list"
).
on
(
'click'
,
'.dashboard-vm-favourite'
,
function
(
e
)
{
$
(
"#dashboard-vm-list
, .page-header
"
).
on
(
'click'
,
'.dashboard-vm-favourite'
,
function
(
e
)
{
var
star
=
$
(
this
).
children
(
"i"
);
var
star
=
$
(
this
).
children
(
"i"
);
var
pk
=
$
(
this
).
data
(
"vm"
);
var
pk
=
$
(
this
).
data
(
"vm"
);
if
(
star
.
hasClass
(
"fa-star-o"
))
{
if
(
star
.
hasClass
(
"fa-star-o"
))
{
...
...
circle/dashboard/templates/dashboard/vm-detail.html
View file @
78df1c1e
...
@@ -70,6 +70,13 @@
...
@@ -70,6 +70,13 @@
{{ instance.name }}
{{ instance.name }}
</div>
</div>
<small>
{{ instance.primary_host.get_fqdn }}
</small>
<small>
{{ instance.primary_host.get_fqdn }}
</small>
<small
class=
"dashboard-vm-favourite"
style=
"line-height: 39.6px;"
data-vm=
"{{ instance.pk }}"
>
{% if fav %}
<i
class=
"fa fa-star text-primary title-favourite"
title=
"{% trans "
Unfavourite
"
%}"
></i>
{% else %}
<i
class=
"fa fa-star-o text-primary title-favourite"
title=
"{% trans "
Mark
as
favorite
"
%}"
></i>
{% endif %}
</small>
</h1>
</h1>
<div
style=
"clear: both;"
></div>
<div
style=
"clear: both;"
></div>
</div>
</div>
...
...
circle/dashboard/views/vm.py
View file @
78df1c1e
...
@@ -115,6 +115,7 @@ class VmDetailView(GraphMixin, CheckedDetailView):
...
@@ -115,6 +115,7 @@ class VmDetailView(GraphMixin, CheckedDetailView):
'op'
:
{
i
.
op
:
i
for
i
in
ops
},
'op'
:
{
i
.
op
:
i
for
i
in
ops
},
'connect_commands'
:
user
.
profile
.
get_connect_commands
(
instance
),
'connect_commands'
:
user
.
profile
.
get_connect_commands
(
instance
),
'hide_tutorial'
:
hide_tutorial
,
'hide_tutorial'
:
hide_tutorial
,
'fav'
:
instance
.
favourite_set
.
filter
(
user
=
user
)
.
exists
(),
})
})
# activity data
# activity data
...
...
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