author | Paul Aurich <paul@darkrain42.org> |
Thu, 23 Apr 2009 08:45:44 +0200 | |
changeset 8125 | da9f3866c637 |
parent 7548 | e8b818029ed6 |
child 8235 | 89bc3946c8f3 |
permissions | -rw-r--r-- |
7111 | 1 |
#header# |
2 |
<title>#repo|escape#: graph</title> |
|
3 |
<link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for #repo|escape#"/> |
|
4 |
<link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for #repo|escape#"/> |
|
5 |
<!--[if IE]><script type="text/javascript" src="#staticurl#excanvas.js"></script><![endif]--> |
|
6 |
</head> |
|
7 |
||
8 |
<body> |
|
9 |
<div id="container"> |
|
10 |
<div class="page-header"> |
|
11 |
<h1><a href="{url}summary{sessionvars%urlparameter}">#repo|escape#</a> / graph</h1> |
|
12 |
||
13 |
<form action="{url}log"> |
|
14 |
{sessionvars%hiddenformentry} |
|
15 |
<dl class="search"> |
|
16 |
<dt><label>Search: </label></dt> |
|
17 |
<dd><input type="text" name="rev" /></dd> |
|
18 |
</dl> |
|
19 |
</form> |
|
20 |
||
21 |
<ul class="page-nav"> |
|
22 |
<li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li> |
|
23 |
<li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li> |
|
24 |
<li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li> |
|
25 |
<li class="current">graph</li> |
|
26 |
<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li> |
|
27 |
<li><a href="{url}file/#node|short#{sessionvars%urlparameter}">files</a></li> |
|
28 |
</ul> |
|
29 |
</div> |
|
30 |
||
31 |
<h2 class="no-link no-border">graph</h2> |
|
32 |
||
33 |
<div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div> |
|
34 |
<div id="wrapper"> |
|
35 |
<ul id="nodebgs"></ul> |
|
36 |
<canvas id="graph" width="224" height="#canvasheight#"></canvas> |
|
37 |
<ul id="graphnodes"></ul> |
|
38 |
</div> |
|
39 |
||
40 |
<script type="text/javascript" src="#staticurl#graph.js"></script> |
|
41 |
<script> |
|
42 |
<!-- hide script content |
|
43 |
||
44 |
document.getElementById('noscript').style.display = 'none'; |
|
45 |
||
46 |
var data = {jsdata|json}; |
|
47 |
var graph = new Graph(); |
|
48 |
graph.scale({bg_height}); |
|
49 |
||
50 |
graph.edge = function(x0, y0, x1, y1, color) { |
|
51 |
||
52 |
this.setColor(color, 0.0, 0.65); |
|
53 |
this.ctx.beginPath(); |
|
54 |
this.ctx.moveTo(x0, y0); |
|
55 |
this.ctx.lineTo(x1, y1); |
|
56 |
this.ctx.stroke(); |
|
57 |
||
58 |
} |
|
59 |
||
60 |
var revlink = '<li style="_STYLE"><span class="desc">'; |
|
61 |
revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>'; |
|
7408
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
62 |
revlink += '</span>_TAGS<span class="info">_DATE ago, by _USER</span></li>'; |
7111 | 63 |
|
64 |
graph.vertex = function(x, y, color, parity, cur) { |
|
65 |
||
66 |
this.ctx.beginPath(); |
|
67 |
color = this.setColor(color, 0.25, 0.75); |
|
68 |
this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); |
|
69 |
this.ctx.fill(); |
|
70 |
||
71 |
var bg = '<li class="bg parity' + parity + '"></li>'; |
|
72 |
var left = (this.columns + 1) * this.bg_height; |
|
73 |
var nstyle = 'padding-left: ' + left + 'px;'; |
|
74 |
var item = revlink.replace(/_STYLE/, nstyle); |
|
75 |
item = item.replace(/_PARITY/, 'parity' + parity); |
|
76 |
item = item.replace(/_NODEID/, cur[0]); |
|
77 |
item = item.replace(/_NODEID/, cur[0]); |
|
78 |
item = item.replace(/_DESC/, cur[3]); |
|
79 |
item = item.replace(/_USER/, cur[4]); |
|
80 |
item = item.replace(/_DATE/, cur[5]); |
|
81 |
||
7408
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
82 |
var tagspan = ''; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
83 |
if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
84 |
tagspan = '<span class="logtags">'; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
85 |
if (cur[6][1]) { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
86 |
tagspan += '<span class="branchtag" title="' + cur[6][0] + '">'; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
87 |
tagspan += cur[6][0] + '</span> '; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
88 |
} else if (!cur[6][1] && cur[6][0] != 'default') { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
89 |
tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">'; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
90 |
tagspan += cur[6][0] + '</span> '; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
91 |
} |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
92 |
if (cur[7].length) { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
93 |
for (var t in cur[7]) { |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
94 |
var tag = cur[7][t]; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
95 |
tagspan += '<span class="tagtag">' + tag + '</span> '; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
96 |
} |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
97 |
} |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
98 |
tagspan += '</span>'; |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
99 |
} |
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
100 |
|
f031a12dfc31
coal/paper/monoblue: show branch names in hgweb graph
Benoit Allard <benoit@aeteurope.nl>
parents:
7111
diff
changeset
|
101 |
item = item.replace(/_TAGS/, tagspan); |
7111 | 102 |
return [bg, item]; |
103 |
||
104 |
} |
|
105 |
||
106 |
graph.render(data); |
|
107 |
||
108 |
// stop hiding script --> |
|
109 |
</script> |
|
110 |
||
111 |
<div class="page-path"> |
|
7548
e8b818029ed6
monoblue: add less/more links to graph page
Pascal Quantin <pascal.quantin@gmail.com>
parents:
7408
diff
changeset
|
112 |
<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a> |
e8b818029ed6
monoblue: add less/more links to graph page
Pascal Quantin <pascal.quantin@gmail.com>
parents:
7408
diff
changeset
|
113 |
<a href="{url}graph/{rev}{morevars%urlparameter}">more</a> |
e8b818029ed6
monoblue: add less/more links to graph page
Pascal Quantin <pascal.quantin@gmail.com>
parents:
7408
diff
changeset
|
114 |
| {changenav%navgraphentry} |
7111 | 115 |
</div> |
116 |
||
117 |
#footer# |