Use MINOR_AUTHOR_PERCENTAGE in output modules (#28).

Consequently, we now only need to change the percentage in one place if
we want to modify the lower bound for minor authors.
This commit is contained in:
Adam Waldenberg 2015-11-24 23:47:42 +01:00
parent 0c4e4bf54f
commit 7945dbbe72
3 changed files with 4 additions and 3 deletions

View File

@ -11,9 +11,10 @@
{bootstrap_css}
<script type="application/javascript"{bootstrap}</script>
<script type="application/javascript">
var MINOR_AUTHOR_PERCENTAGE = 1.00;
$(document).ready(function() {{
var row = 0;
var MINOR_AUTHOR_PERCENTAGE = 1.00;
var isReversed = false;
// Fix header and set it to the right width.

View File

@ -85,7 +85,7 @@ class BlameOutput(Outputable):
blame_xml += " innerRadius: 0.4,"
blame_xml += " show: true,"
blame_xml += " combine: {"
blame_xml += " threshold: 0.01,"
blame_xml += " threshold: MINOR_AUTHOR_PERCENTAGE / 100,"
blame_xml += " label: \"" + _("Minor Authors") + "\""
blame_xml += " }"
blame_xml += " }"

View File

@ -82,7 +82,7 @@ class ChangesOutput(Outputable):
changes_xml += " innerRadius: 0.4,"
changes_xml += " show: true,"
changes_xml += " combine: {"
changes_xml += " threshold: 0.01,"
changes_xml += " threshold: MINOR_AUTHOR_PERCENTAGE / 100,"
changes_xml += " label: \"" + _("Minor Authors") + "\""
changes_xml += " }"
changes_xml += " }"