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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
7b84eaf8
authored
Aug 27, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add activity icons to context
parent
62303312
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
circle/dashboard/views.py
+6
-4
No files found.
circle/dashboard/views.py
View file @
7b84eaf8
...
@@ -309,7 +309,7 @@ class VmDetailView(CheckedDetailView):
...
@@ -309,7 +309,7 @@ class VmDetailView(CheckedDetailView):
activities
=
instance
.
get_merged_activities
(
user
)
activities
=
instance
.
get_merged_activities
(
user
)
show_show_all
=
len
(
activities
)
>
10
show_show_all
=
len
(
activities
)
>
10
activities
=
activities
[:
10
]
activities
=
activities
[:
10
]
context
[
'activities'
]
=
activities
context
[
'activities'
]
=
_format_activities
(
activities
)
context
[
'show_show_all'
]
=
show_show_all
context
[
'show_show_all'
]
=
show_show_all
latest
=
instance
.
get_latest_activity_in_progress
()
latest
=
instance
.
get_latest_activity_in_progress
()
context
[
'is_new_state'
]
=
(
latest
and
context
[
'is_new_state'
]
=
(
latest
and
...
@@ -2501,7 +2501,8 @@ def vm_activity(request, pk):
...
@@ -2501,7 +2501,8 @@ def vm_activity(request, pk):
response
=
{}
response
=
{}
show_all
=
request
.
GET
.
get
(
"show_all"
,
"false"
)
==
"true"
show_all
=
request
.
GET
.
get
(
"show_all"
,
"false"
)
==
"true"
activities
=
instance
.
get_merged_activities
(
request
.
user
)
activities
=
_format_activities
(
instance
.
get_merged_activities
(
request
.
user
))
show_show_all
=
len
(
activities
)
>
10
show_show_all
=
len
(
activities
)
>
10
if
not
show_all
:
if
not
show_all
:
activities
=
activities
[:
10
]
activities
=
activities
[:
10
]
...
@@ -2982,8 +2983,9 @@ class InstanceActivityDetail(CheckedDetailView):
...
@@ -2982,8 +2983,9 @@ class InstanceActivityDetail(CheckedDetailView):
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
ctx
=
super
(
InstanceActivityDetail
,
self
)
.
get_context_data
(
**
kwargs
)
ctx
=
super
(
InstanceActivityDetail
,
self
)
.
get_context_data
(
**
kwargs
)
ctx
[
'activities'
]
=
self
.
object
.
instance
.
get_activities
(
ctx
[
'activities'
]
=
_format_activities
(
self
.
request
.
user
)
self
.
object
.
instance
.
get_activities
(
self
.
request
.
user
))
ctx
[
'icon'
]
=
_get_activity_icon
(
self
.
object
)
return
ctx
return
ctx
...
...
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