Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
66cdb71a
Commit
66cdb71a
authored
Jan 15, 2015
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6609 from mitocw/bdero/fix-detailed-gitlogs
Collapsible import logs in sysadmin dashboard
parents
a6fc9ab6
a6dc7061
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
22 deletions
+53
-22
lms/templates/sysadmin_dashboard_gitlogs.html
+53
-22
No files found.
lms/templates/sysadmin_dashboard_gitlogs.html
View file @
66cdb71a
...
...
@@ -12,6 +12,23 @@
<
%
static:css
group=
'style-course'
/>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/flot/jquery.flot.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/flot/jquery.flot.axislabels.js')}"
></script>
<script>
$
(
function
()
{
$
(
".toggle-import-log"
).
click
(
function
(
e
)
{
var
self
=
$
(
this
);
var
id
=
self
.
data
(
"import-log"
);
$
(
"#import-log-"
+
id
).
toggle
({
duration
:
200
});
if
(
self
.
html
()
===
"[ + ]"
)
{
self
.
html
(
"[ − ]"
);
}
else
{
self
.
html
(
"[ + ]"
);
}
e
.
preventDefault
();
});
});
</script>
</
%
block>
<style
type=
"text/css"
>
a
.active-section
{
...
...
@@ -42,6 +59,9 @@ table.stat_table td {
border-color
:
#666666
;
background-color
:
#ffffff
;
}
.import-log
{
display
:
none
;
}
a
.selectedmode
{
background-color
:
yellow
;
}
...
...
@@ -82,11 +102,11 @@ textarea {
%endif
%endif
<table
class=
"stat_table"
>
<table
class=
"stat_table"
width=
"100%"
>
<thead>
<tr>
<th>
${_('Date')}
</th>
<th>
${_('Course ID')}
</th>
<th
width=
"15%"
>
${_('Date')}
</th>
<th
width=
"15%"
>
${_('Course ID')}
</th>
## Translators: Git is a version-control system; see http://git-scm.com/about
<th>
${_('Git Action')}
</th>
</tr>
...
...
@@ -96,11 +116,11 @@ textarea {
if
course_id =
=
None:
logs =
cilset[:10]
else:
logs =
cilset[:
2
]
logs =
cilset[:
5
]
cil =
None
%
>
% for
cil in logs
:
% for
index, cil in enumerate(logs)
:
<
%
#
Appropriate
datetime
string
for
current
locale
and
timezone
date =
get_time_display(cil.created.replace(tzinfo=UTC),
...
...
@@ -108,27 +128,38 @@ textarea {
%
>
<tr>
<td>
${date}
</td>
<td><a
href=
"${reverse('gitlogs_detail', kwargs={'course_id': unicode(cil.course_id)})}"
>
${cil.course_id | h}
</a></td>
<td>
${cil.git_log}
</td>
</tr>
%endfor
## Show the full log if viewing information about a specific course
%if course_id is not None:
<tr>
<td
colspan=
"3"
>
<pre>
%if cil is not None:
${cil.import_log | h}
%else:
## Translators: git is a version-control system; see http://git-scm.com/about
${_('No git import logs have been recorded for this course.')}
%endif
</pre>
<td>
<a
href=
"${reverse('gitlogs_detail', kwargs={'course_id': unicode(cil.course_id)})}"
>
${cil.course_id | h}
</a>
</td>
<td>
%if course_id is not None:
<a
class=
"toggle-import-log"
data-import-log=
"${index}"
href=
"#"
>
[ + ]
</a>
%endif
${cil.git_log}
</td>
</tr>
%endif
## Show the full log of the latest import if viewing logs for a specific course
%if course_id is not None:
<tr
class=
"import-log"
id=
"import-log-${index}"
>
<td
colspan=
"3"
>
<pre>
${cil.import_log | h}
</pre>
</td>
</tr>
%endif
%endfor
</tbody>
</table>
## If viewing a single course and there are no logs available, let the user know
%if course_id is not None and cil is None:
## Translators: git is a version-control system; see http://git-scm.com/about
${_('No git import logs have been recorded for this course.')}
%endif
</section>
</div>
</section>
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