Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: tools/buildbot/perf/dashboard/changelog.html

Issue 53061: Fix details.html to handle new data file names and formats. Remove old, unuse... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/buildbot/perf/dashboard/details.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="js/common.js"></script>
4 <style type="text/css">
5 table {
6 border-collapse: collapse;
7 }
8 thead {
9 border-top: solid 1px gray;
10 border-left: solid 1px gray;
11 }
12 tbody {
13 border-top: solid 1px gray;
14 border-bottom: solid 1px gray;
15 border-left: solid 1px gray;
16 }
17 th {
18 text-align: center;
19 border-right: solid 1px gray;
20 }
21 td {
22 padding-left: 0.5em;
23 padding-top: 0.3em;
24 padding-bottom: 0.3em;
25 padding-right: 1.4em;
26 border-top: solid 1px gray;
27 vertical-align: top;
28 font-family: monospace;
29 }
30 form {
31 background-color: lightblue;
32 border: 1px solid gray;
33 padding: 2px;
34 }
35 iframe#content {
36 border: none;
37 width: 0px;
38 height: 0px;
39 }
40 /*
41 form {
42 position: fixed;
43 left: 0px;
44 top: 0px;
45 width: 100%;
46 }
47 */
48 </style>
49 </head>
50 <body>
51 <form name="ui">
52 SVN path: <input id="url" type="text" name="url" value="">
53 SVN revision range: <input id="range" type="text" name="range" value="">
54 <input id="mode_text" type="radio" name="mode" value="text">text
55 <input id="mode_html" type="radio" name="mode" value="html">html
56 <input type="submit" value="Show Changelog">
57 </form>
58
59 <script>
60 params = ParseParams();
61
62 function fix_text(str, n) {
63 if (str.length > n)
64 return str.substring(0, n);
65
66 for (var i = str.length; i < n; ++i)
67 str = str + ' ';
68 return str;
69 }
70
71 function get_entries() {
72 return content.contentDocument.getElementsByTagName("logentry");
73 }
74
75 function get_info(entry) {
76 var r = new Object;
77 r.rev = entry.getAttribute("revision");
78 r.author = entry.getElementsByTagName("author")[0].textContent;
79 r.msg = entry.getElementsByTagName("msg")[0].textContent;
80 r.paths = [];
81 var paths = entry.getElementsByTagName("path")
82 for (var i = 0; i < paths.length; ++i) {
83 r.paths.push({"action" : paths[i].getAttribute("action"),
84 "value" : paths[i].textContent});
85 }
86 return r;
87 }
88
89 function render_log_callback() {
90 if ("mode" in params && params.mode == "text") {
91 var out = document.createElement("PRE");
92 document.body.appendChild(out);
93
94 var entries = get_entries();
95 for (var i = 0; i < entries.length; ++i) {
96 var info = get_info(entries[i]);
97
98 var msg = info.msg;
99 msg = msg.replace(/\n/g, ' ' );
100 msg = msg.replace(/\t/g, ' ' );
101 while (msg.charAt(0) == ' ')
102 msg = msg.substring(1);
103
104 var msg_clipped = msg.substring(0, 66);
105 if (msg_clipped.length < msg.length)
106 msg_clipped = msg_clipped + "...";
107
108 out.appendChild(document.createTextNode(
109 fix_text(info.rev, 6) + " " +
110 fix_text(info.author, 8) + " " +
111 msg_clipped + "\n"));
112 }
113 } else {
114 var table = document.createElement("TABLE");
115 table.setAttribute("class", "log");
116 document.body.appendChild(table);
117
118 var entries = get_entries();
119 for (var i = 0; i < entries.length; ++i) {
120 var info = get_info(entries[i]);
121
122 var tr = document.createElement("TR");
123 table.appendChild(tr);
124
125 var td, a;
126
127 // revision:
128 td = document.createElement("TD");
129 tr.appendChild(td);
130
131 a = document.createElement("A");
132 a.setAttribute("href", "http://src.chromium.org/viewvc/chrome?view=rev&rev ision=" + info.rev);
133 a.appendChild(document.createTextNode(info.rev));
134
135 td.appendChild(a);
136
137 // author:
138 td = document.createElement("TD");
139 tr.appendChild(td);
140
141 a = document.createElement("A");
142 a.setAttribute("href", "mailto:" + info.author);
143 a.appendChild(document.createTextNode(info.author));
144
145 td.appendChild(a);
146
147 // details:
148 td = document.createElement("TD");
149 tr.appendChild(td);
150
151 var p = document.createElement("PRE");
152 td.appendChild(p);
153
154 var s = info.msg;
155 p.appendChild(document.createTextNode(s));
156
157 for (var j = 0; j < info.paths.length; ++j) {
158 td.appendChild(document.createTextNode(info.paths[j]["action"] + " - "))
159 var a = document.createElement("A");
160 a.setAttribute("href", "http://src.chromium.org/viewvc/chrome" + info.pa ths[j]["value"] + "?r1=" + info.rev + "&r2=" + (info.rev - 1) + "&pathrev=" + in fo.rev);
161 a.appendChild(document.createTextNode(info.paths[j]["value"]));
162 td.appendChild(a);
163 td.appendChild(document.createElement("BR"));
164 }
165 }
166 }
167 }
168
169 function render_log() {
170 var svn_url = params["url"];
171 var svn_range = params["range"];
172 if (svn_url == undefined || svn_range == undefined)
173 return;
174
175 var url = "http://" + location.host + "/cgi-bin/svn-log?url=http://codf21.jail /svn/" +
176 unescape(svn_url) + "&range=" + unescape(svn_range);
177
178 // global 'content' variable: a hidden iframe used to fetch svn data.
179 content = document.createElement("IFRAME");
180 content.setAttribute("id", "content");
181 content.setAttribute("onload", "render_log_callback()");
182 content.setAttribute("src", url);
183 document.body.appendChild(content);
184
185 var el;
186 if ("mode" in params && params["mode"] == "text") {
187 el = document.getElementById("mode_text");
188 } else {
189 el = document.getElementById("mode_html");
190 }
191 el.setAttribute("checked", "1");
192
193 el = document.getElementById("url");
194 el.setAttribute("value", unescape(svn_url));
195
196 el = document.getElementById("range");
197 el.setAttribute("value", unescape(svn_range));
198 }
199
200 render_log()
201 </script>
202 </body>
203 </html>
204
OLDNEW
« no previous file with comments | « no previous file | tools/buildbot/perf/dashboard/details.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698