Anton Shestakov <av6@dwimlabs.net>, Thu, 26 May 2016 00:08:29 +0800
viewer: update d3.js on fancy results page to 3.5.17
templates/fancy.html
Permissions: -rw-r--r--
<title>hgperfcheck
{% if changesets %} (rev
{{ changesets[0]['rev'] }} and earlier)
{% end %}</title> <link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css" rel="stylesheet" type="text/css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.js"></script> <a href="{{ setrev() }}">back to tip
</a> {% set prevrev = changesets[0]['rev'] + 120 if changesets else None %} {% if prevrev %}<a href="{{ setrev(prevrev) }}">prev page
</a>{% end %} {% set nextrev = changesets[-1]['rev'] - 1 if changesets else None %} {% if nextrev > -1 %}<a href="{{ setrev(nextrev) }}">next page
</a>{% end %} <span style="color: #777;"> hover things for a tooltip; red means slow, green means fast; first
color and time means without .hg/cache, second means with .hg/cache.
{% for mark, desc in marks.items() %} -
<a href="{{ setmarks(remove=mark) }}" title="{{ desc }}">{{ mark }}</a> {% for mark, desc in moremarks.items() %} +
<a href="{{ setmarks(add=mark) }}" title="{{ desc }}">{{ mark }}</a> *
<a href="{{ setmarks() }}">all
</a> <a href="{{ setrev() }}">back to tip
</a> {% if prevrev %}<a href="{{ setrev(prevrev) }}">prev page
</a>{% end %} {% if nextrev > -1 %}<a href="{{ setrev(nextrev) }}">next page
</a>{% end %} <script type="application/json" id="data">{% raw json_encode(data) %}</script> var data = JSON.parse(document.getElementById('data').firstChild.nodeValue); var chart = c3.generate({ tooltip: {format: {title: function(x) { var c = data.csetmap[-x]; return c.rev + ':' + c.shortnode + ' <span class="branch">' + c.branch + '</span>' + ' <span class="tags">' + c.tags.join(', ') + '</span>' + ' <span class="merge">' + c.merge + '</span> ' axis: {x: {tick: {format: function(x) { return -x; }}}},