Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
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
4780b59c
authored
Jul 16, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: allow showing activity details for everyone
parent
66ddb1a9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
11 deletions
+26
-11
circle/dashboard/templates/dashboard/instanceactivity_detail.html
+7
-2
circle/dashboard/templates/dashboard/node-detail/_activity-timeline.html
+9
-2
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
+6
-6
circle/dashboard/views.py
+4
-1
No files found.
circle/dashboard/templates/dashboard/instanceactivity_detail.html
View file @
4780b59c
...
...
@@ -5,7 +5,12 @@
<div
class=
"body-content"
>
<div
class=
"page-header"
>
<h1>
{{ object.instance.name }}: {{ object.readable_name.get_user_text }}
{{ object.instance.name }}:
{% if user.is_superuser %}
{{object.readable_name.get_admin_text}}
{% else %}
{{object.readable_name.get_user_text}}
{% endif %}
</h1>
</div>
<div
class=
"row"
>
...
...
@@ -53,7 +58,7 @@
<dt>
{% trans "result" %}
</dt>
<dd><textarea
class=
"form-control"
>
{
{object.result}
}
</textarea></dd>
<dd><textarea
class=
"form-control"
>
{
% if user.is_superuser %}{{object.result.get_admin_text}}{% else %}{{object.result.get_admin_text}}{% endif %
}
</textarea></dd>
<dt>
{% trans "resultant state" %}
</dt>
<dd>
{{object.resultant_state|default:'n/a'}}
</dd>
...
...
circle/dashboard/templates/dashboard/node-detail/_activity-timeline.html
View file @
4780b59c
...
...
@@ -5,13 +5,20 @@
<span
class=
"timeline-icon{% if a.has_failed %} timeline-icon-failed{% endif %}"
>
<i
class=
"fa{% if not a.finished %}fa-refresh fa-spin {% else %}fa fa-plus{% endif %}"
></i>
</span>
<strong>
{{ a.readable_name.get_user_text }}
</strong>
<strong>
{% if user.is_superuser %}
{{ a.readable_name.get_admin_text }}
{% else %}
{{ a.readable_name.get_user_text }}{% endif %}
</strong>
{{ a.started|date:"Y-m-d H:i" }}, {{ a.user }}
{% if a.children.count > 0 %}
<div
class=
"sub-timeline"
>
{% for s in a.children.all %}
<div
data-activity-id=
"{{ s.pk }}"
class=
"sub-activity{% if s.has_failed %} sub-activity-failed{% endif %}"
>
{{ s.readable_name.get_user_text }} -
{% if user.is_superuser %}
{{ s.readable_name.get_admin_text }}
{% else %}
{{ s.readable_name.get_user_text }}{% endif %}
–
{% if s.finished %}
{{ s.finished|time:"H:i:s" }}
{% else %}
...
...
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
View file @
4780b59c
...
...
@@ -4,10 +4,10 @@
<span
class=
"timeline-icon{% if a.has_failed %} timeline-icon-failed{% endif %}"
>
<i
class=
"fa {% if not a.finished %}fa-refresh fa-spin {% else %}fa-plus{% endif %}"
></i>
</span>
<strong
{%
if
user
.
is_superuser
and
a
.
result
%}
title=
"{{ a.result.get_admin
_text }}"
{%
endif
%}
>
{% if user.is_superuser %}
<a
href=
"{{ a.get_absolute_url }}"
>
{% endif %}
<strong
{%
if
a
.
result
%}
title=
"{{ a.result.get_user
_text }}"
{%
endif
%}
>
<a
href=
"{{ a.get_absolute_url }}"
>
{% if a.times > 1 %}({{ a.times }}x){% endif %}
{{ a.readable_name.get_user_text }}
{% if user.is_superuser %}
</a>
{% endif %}
{{ a.readable_name.get_user_text }}
</a>
{% if a.has_percent %}
- {{ a.percentage }}%
...
...
@@ -30,9 +30,9 @@
<div
class=
"sub-timeline"
>
{% for s in a.children.all %}
<div
data-activity-id=
"{{ s.pk }}"
class=
"sub-activity{% if s.has_failed %} sub-activity-failed{% endif %}{% if s.pk == active.pk %} sub-activity-active{% endif %}"
>
<span
{%
if
user
.
is_superuser
and
s
.
result
%}
title=
"{{ s.result.get_admin
_text }}"
{%
endif
%}
>
{% if user.is_superuser %}
<a
href=
"{{ s.get_absolute_url }}"
>
{% endif %}
{{ s.readable_name.get_user_text }}
{% if user.is_superuser %}
</a>
{% endif %}
</span>
–
<span
{%
if
s
.
result
%}
title=
"{{ s.result.get_user
_text }}"
{%
endif
%}
>
<a
href=
"{{ s.get_absolute_url }}"
>
{{ s.readable_name.get_user_text }}
</a>
</span>
–
{% if s.finished %}
{{ s.finished|time:"H:i:s" }}
{% else %}
...
...
circle/dashboard/views.py
View file @
4780b59c
...
...
@@ -2822,11 +2822,14 @@ def get_disk_download_status(request, pk):
)
class
InstanceActivityDetail
(
SuperuserRequiredMixin
,
DetailView
):
class
InstanceActivityDetail
(
Checked
DetailView
):
model
=
InstanceActivity
context_object_name
=
'instanceactivity'
# much simpler to mock object
template_name
=
'dashboard/instanceactivity_detail.html'
def
get_has_level
(
self
):
return
self
.
object
.
instance
.
has_level
def
get_context_data
(
self
,
**
kwargs
):
ctx
=
super
(
InstanceActivityDetail
,
self
)
.
get_context_data
(
**
kwargs
)
ctx
[
'activities'
]
=
self
.
object
.
instance
.
get_activities
(
...
...
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