]> TLD Linux GIT Repositories - tld-ftp-admin.git/blobdiff - html/qa.php
- tldized
[tld-ftp-admin.git] / html / qa.php
diff --git a/html/qa.php b/html/qa.php
deleted file mode 100644 (file)
index a24416e..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<html>
-<head>
-<link rel="Shortcut Icon" href="//www.pld-linux.org/favicon.ico"/>
-       <title>PLD QA Reports</title>
-       <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="//srcbuilder.pld-linux.org/th/style.css">
-       <style>
-       .hidden { display: none; }
-       span#count { font-weight: bold; }
-       </style>
-</head>
-<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
-<script>
-jQuery(function($) {
-       $('#q').on('change', function(e) {
-               var el = e.target;
-               var o = el.options;
-               var v = o[o.selectedIndex].value;
-               location.href = "?q=" + v;
-       });
-
-       var $lines = $('#lines>li');
-       var $count = $('#count');
-       $('#filter').on('keyup', function() {
-               var search = $(this).val();
-               var count = 0;
-               $lines.each(function() {
-                       var $line = $(this);
-                       var text = $line.text();
-                       var fn = text.match(search) && ++count ? 'removeClass' : 'addClass';
-                       $line[fn]('hidden');
-               });
-               $count.html(count);
-       });
-       $count.html($lines.length);
-});
-</script>
-<body>
-<?php
-
-$report = isset($_GET['q']) ? basename($_GET['q']) : null;
-$reports = array(
-       "main" => "Main deps x86_64",
-       "main-ready" => "Main ready deps x86_64",
-       "main-ready-test" => "Main+ready+test deps x86_64",
-
-       "main-i686" => "Main deps i686",
-       "main-ready-i686" => "Main ready deps i686",
-       "main-ready-test-i686" => "Main+ready+test deps i686",
-
-       "main-x32" => "Main deps x32",
-       "main-ready-x32" => "Main ready deps x32",
-       "main-ready-test-x32" => "Main+ready+test deps x32",
-
-       "freshness" => "GIT vs FTP freshness",
-
-       "lint-PLD" => "rpmlint: main",
-       "lint-test" => "rpmlint: test",
-       "lint-ready" => "rpmlint: ready",
-);
-
-function reports_selection($reports) {
-       global $report;
-       echo "Select report:";
-       echo "<select id=q name=q>\n";
-       foreach ($reports as $q => $title) {
-               printf("<option value=%s %s>%s</option>\n", $q, $q == $report ? 'selected' :'',  $title);
-       }
-       echo "</select>\n";
-}
-
-/**
- * Create text input for filtering results
- */
-function filter_box() {
-       echo '<br>Filter results: <input id="filter">';
-       echo '<br><span id="count">?</span> errors';
-}
-
-function format_report($report) {
-       echo "<br>View the <a href=$report.txt>raw</a> report<br/>\n";
-       $file = "$report.txt";
-       $giturl = 'http://git.pld-linux.org/gitweb.cgi?p=packages/%1$s.git;f=%1$s.spec;h=HEAD;a=shortlog';
-       echo '<ol id="lines">';
-       foreach (file($file) as $line) {
-               $line = preg_replace_callback('/^(?P<prefix>error:|GIT:)\s*\[(?P<spec>[^]]+)\]\s*(?P<msg>.+)$/', function($m) use ($giturl) {
-                       $package = basename($m['spec'], '.spec');
-                       $url = sprintf($giturl, $package);
-                       return sprintf('<li><font color=red>%s</font> [<a href="%s">%s</a>] %s', $m['prefix'], $url, $m['spec'], $m['msg']);
-               }, $line);
-               echo $line, "<br/>\n";
-       }
-       echo '</ol>';
-}
-
-reports_selection($reports);
-filter_box();
-if (isset($reports[$report])) {
-       format_report($report);
-}
-
-?>
-</body>
-</html>