mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 08:38:26 +01:00
1992d3dc94
Instead of manually adding this functionality with our own code; we use the JQuery tablesorter plugin which adds support for sorting with a few simple rows of code.
213 lines
5.9 KiB
XML
213 lines
5.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
|
|
<title>Generated by gitinspector {0}</title>
|
|
<script type="application/javascript">{1}</script>
|
|
<script type="application/javascript">{2}</script>
|
|
<script type="application/javascript">{3}</script>
|
|
<script type="application/javascript">{4}</script>
|
|
<script type="application/javascript">
|
|
$(document).ready(function() {{
|
|
var row = 0;
|
|
var MINOR_AUTHOR_PERCENTAGE = 1.00;
|
|
var isReversed = false;
|
|
|
|
var colorRows = function() {{
|
|
$(this).removeClass("odd");
|
|
|
|
if (row++ % 2 == 1) {{
|
|
$(this).addClass("odd");
|
|
}}
|
|
|
|
if(this == $(this).parent().find("tr:visible").get(-1)) {{
|
|
row = 0;
|
|
}}
|
|
}}
|
|
|
|
var filterTimeLine = function() {{
|
|
$("div#timeline table.git tbody tr").filter(function() {{
|
|
return $(this).find("td:has(div)").length == 0;
|
|
}}).hide();
|
|
}}
|
|
|
|
$("table.git tbody tr td:last-child").filter(function() {{
|
|
return parseFloat(this.innerHTML) < MINOR_AUTHOR_PERCENTAGE;
|
|
}}).parent().hide();
|
|
|
|
$("table.git tbody tr:visible").each(colorRows);
|
|
|
|
$("table#changes, table#blame").tablesorter({{
|
|
sortList: [[0,0]],
|
|
headers: {{
|
|
0: {{ sorter: "text" }}
|
|
}}
|
|
}}).bind("sortEnd", function() {{
|
|
$(this).find("tbody tr:visible").each(colorRows);
|
|
}});
|
|
|
|
$("table#changes thead tr th, table#blame thead tr th").click(function() {{
|
|
$(this).parent().find("th strong").remove();
|
|
var parentIndex = $(this).index();
|
|
|
|
if (this.isReversed) {{
|
|
$(this).append("<strong> ∧</strong>");
|
|
}} else {{
|
|
$(this).append("<strong> ∨</strong>");
|
|
}}
|
|
this.isReversed = !this.isReversed;
|
|
}});
|
|
|
|
$("table#changes thead tr th:first-child, table#blame thead tr th:first-child").each(function() {{
|
|
this.isReversed = true;
|
|
$(this).append("<strong> ∨</strong>");
|
|
}});
|
|
|
|
$("table.git tfoot tr td:first-child").filter(function() {{
|
|
return $(this).parent().parent().parent().find("tbody tr:hidden").length > 0;
|
|
}}).each(function() {{
|
|
this.innerHTML = "Show minor authors ∨";
|
|
}}).toggle(function() {{
|
|
this.innerHTML = "Hide minor authors ∧";
|
|
$(this).parent().parent().parent().find("tbody tr").show().each(colorRows);
|
|
}}, function() {{
|
|
this.innerHTML = "Show minor authors ∨";
|
|
$(this).parent().parent().parent().find("tbody tr td:last-child").filter(function() {{
|
|
return parseFloat(this.innerHTML) < MINOR_AUTHOR_PERCENTAGE;
|
|
}}).parent().hide();
|
|
$("table.git tbody tr:visible").each(colorRows);
|
|
}});
|
|
|
|
filterTimeLine();
|
|
|
|
if ($("div#timeline table.git tbody tr:hidden").length > 0) {{
|
|
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
|
$("div#timeline").prepend("<div class=\"button\">Show rows with minor work ∨</div>");
|
|
|
|
$("div#timeline div.button").toggle(function() {{
|
|
this.innerHTML = "Hide rows with minor work ∧"
|
|
$("div#timeline table.git tbody tr").show().each(colorRows);
|
|
}}, function() {{
|
|
this.innerHTML = "Show rows with minor work ∨";
|
|
filterTimeLine();
|
|
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
|
}});
|
|
}}
|
|
}});
|
|
</script>
|
|
<style type="text/css">
|
|
body {{
|
|
background: -webkit-linear-gradient(left, #8f8a9a, #dad2d7, #8f8a9a);
|
|
background: -moz-linear-gradient(left, #8f8a9a, #dad2d7, #8f8a9a);
|
|
}}
|
|
html, body {{
|
|
margin: 0;
|
|
height: 100%;
|
|
font-family: "Arial";
|
|
}}
|
|
body > div {{
|
|
margin: 0 auto;
|
|
width: 50em;
|
|
}}
|
|
div.box {{
|
|
border: 4px solid #ddd;
|
|
background-color: #eee;
|
|
margin: 0.75em;
|
|
padding: 5px;
|
|
font-size: small;
|
|
border-radius: 15px;
|
|
-moz-border-radius: 15px;
|
|
box-shadow: 1px 1px 3px #666;
|
|
-moz-box-shadow: 1px 1px 3px #666;
|
|
}}
|
|
div.logo p {{
|
|
margin-top: 18px;
|
|
}}
|
|
div.logo img {{
|
|
float: left;
|
|
padding: 2px 10px 2px 2px;
|
|
}}
|
|
body > div {{
|
|
display: block-inline;
|
|
}}
|
|
body > div > div > div {{
|
|
position: relative;
|
|
width: 100%;
|
|
min-height: 215px;
|
|
}}
|
|
table.git {{
|
|
font-size: small;
|
|
width: 60%;
|
|
padding-right: 5px;
|
|
}}
|
|
table.full {{
|
|
width: 100%;
|
|
}}
|
|
table.git th, table.git tfoot tr td {{
|
|
padding: 0.3em;
|
|
background-color: #ddcece;
|
|
border-radius: 8px 8px 0px 0px;
|
|
-moz-border-radius: 8px 8px 0px 0px;
|
|
}}
|
|
table#changes thead tr th, table#blame thead tr th, table.git tfoot tr td {{
|
|
border: 1px solid #eee;
|
|
text-align: center;
|
|
}}
|
|
table.git tfoot tr td {{
|
|
border-radius: 0px 0px 8px 8px;
|
|
-moz-border-radius: 0px 0px 8px 8px;
|
|
text-align: center;
|
|
}}
|
|
table.git td {{
|
|
padding: 0.4em;
|
|
height: 1em;
|
|
}}
|
|
table.git td div.insert {{
|
|
background-color: #7a7;
|
|
}}
|
|
table.git td div.remove {{
|
|
background-color: #c66;
|
|
}}
|
|
table.git td div.insert, table.git td div.remove {{
|
|
height: 100%;
|
|
float: left;
|
|
}}
|
|
table.git tr.odd {{
|
|
background-color: #dbdbdb;
|
|
}}
|
|
div.chart {{
|
|
position: absolute;
|
|
top: 5px;
|
|
bottom: 5px;
|
|
right: 0px;
|
|
width: 40%;
|
|
font-size: x-small;
|
|
height: 210px;
|
|
}}
|
|
p.error {{
|
|
color: #700;
|
|
}}
|
|
div.button {{
|
|
border-radius: 8px 8px 8px 8px;
|
|
-moz-border-radius: 8px 8px 8px 8px;
|
|
border: 1px solid #eee;
|
|
float: right;
|
|
width: auto;
|
|
padding: 0.5em;
|
|
background-color: #ddcece;
|
|
min-height: 0;
|
|
}}
|
|
table#changes thead tr th:hover, table#blame thead tr th:hover,
|
|
table#changes tfoot tr td:hover, table#blame tfoot tr td:hover, div.button:hover {{
|
|
background-color: #eddede;
|
|
border: 1px solid #bbb;
|
|
cursor: hand;
|
|
}}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div><div class="box logo">
|
|
<img src="data:image/png;base64,{5}" />
|
|
<p>The output has been generated by <a href="http://gitinspector.googlecode.com">gitinspector</a>;
|
|
the statistical analysis tool for git repositories.<p>
|
|
</div></div>
|