]>
Commit | Line | Data |
---|---|---|
ef63dafd ER |
1 | <html> |
2 | <head> | |
3 | <link rel="Shortcut Icon" href="http://www.pld-linux.org/favicon.ico"/> | |
4 | <title>PLD QA Reports</title> | |
5 | <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="http://src.th.pld-linux.org/style.css"> | |
6 | </head> | |
7 | <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
8 | <script> | |
9 | jQuery(function($) { | |
10 | $('#q').on('change', function(e) { | |
11 | var el = e.target; | |
12 | var o = el.options; | |
13 | var v = o[o.selectedIndex].value; | |
14 | location.href = "?q=" + v; | |
15 | }); | |
16 | }); | |
17 | </script> | |
18 | <body> | |
19 | <?php | |
20 | ||
21 | $report = isset($_GET['q']) ? basename($_GET['q']) : null; | |
22 | $reports = array( | |
23 | "main" => "Main deps x86_64", | |
24 | "main-ready" => "Main ready deps x86_64", | |
25 | "main-ready-test" => "Main+ready+test deps x86_64", | |
26 | ||
27 | "main-i686" => "Main deps i686", | |
28 | "main-ready-i686" => "Main ready deps i686", | |
29 | "main-ready-test-i686" => "Main+ready+test deps i686", | |
30 | ||
31 | "main-i486" => "Main deps i486", | |
32 | "main-ready-i486" => "Main ready deps i486", | |
33 | "main-ready-test-i486" => "Main+ready+test deps i486", | |
38f51586 | 34 | |
81fd4c90 | 35 | "ac-th-diff" => "Differences between AC and TH", |
38f51586 ER |
36 | "freshness" => "GIT vs FTP freshness", |
37 | ||
38 | "lint-PLD" => "rpmlint: main", | |
39 | "lint-test" => "rpmlint: test", | |
40 | "lint-ready" => "rpmlint: ready", | |
ef63dafd ER |
41 | ); |
42 | ||
43 | echo "Select report:"; | |
44 | echo "<select id=q name=q>\n"; | |
45 | foreach ($reports as $q => $title) { | |
46 | printf("<option value=%s %s>%s</option>\n", $q, $q == $report ? 'selected' :'', $title); | |
47 | } | |
81fd4c90 | 48 | echo "</select>\n"; |
ef63dafd ER |
49 | |
50 | if (isset($reports[$report])) { | |
81fd4c90 | 51 | echo "<a href=$report.txt>raw</a><br/>\n"; |
ef63dafd | 52 | $file = "$report.txt"; |
99eefd6f ER |
53 | $giturl = 'http://git.pld-linux.org/gitweb.cgi?p=packages/%1$s.git;f=%1$s.spec;h=HEAD;a=shortlog'; |
54 | foreach (file($file) as $line) { | |
38f51586 | 55 | $line = preg_replace_callback('/^(?P<prefix>error:|GIT:)\s*\[(?P<spec>[^]]+)\]\s*(?P<msg>.+)$/', function($m) use ($giturl) { |
99eefd6f ER |
56 | $package = basename($m['spec'], '.spec'); |
57 | $url = sprintf($giturl, $package); | |
58 | return sprintf('<font color=red>%s</font> [<a href="%s">%s</a>] %s', $m['prefix'], $url, $m['spec'], $m['msg']); | |
59 | }, $line); | |
60 | echo $line, "<br/>\n"; | |
61 | } | |
ef63dafd ER |
62 | } |
63 | ||
64 | ?> | |
65 | </body> | |
66 | </html> |