summaryrefslogtreecommitdiffstats
path: root/test_index.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-05 15:07:40 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-05 15:07:40 +0000
commitd5f0f5a4bc4934c1c4c660b3dabccb95ca76865a (patch)
treeeb0e851034c7f832da45cf150625e58c518e00b2 /test_index.php
parent4e4e41250051cbae6e9be0300d9140e3670dbcd8 (diff)
downloadpkgsubmit-d5f0f5a4bc4934c1c4c660b3dabccb95ca76865a.tar
pkgsubmit-d5f0f5a4bc4934c1c4c660b3dabccb95ca76865a.tar.gz
pkgsubmit-d5f0f5a4bc4934c1c4c660b3dabccb95ca76865a.tar.bz2
pkgsubmit-d5f0f5a4bc4934c1c4c660b3dabccb95ca76865a.tar.xz
pkgsubmit-d5f0f5a4bc4934c1c4c660b3dabccb95ca76865a.zip
add possibility to list all related log files right under the build line, on request
Diffstat (limited to 'test_index.php')
-rw-r--r--test_index.php32
1 files changed, 31 insertions, 1 deletions
diff --git a/test_index.php b/test_index.php
index e97b425..e6f18d1 100644
--- a/test_index.php
+++ b/test_index.php
@@ -239,7 +239,7 @@ if ($total > 0) {
$s .= '<td>';
$s .= ($typelink != '') ?
- sprintf('<a href="%s">%s</a>', $typelink, $typestr) :
+ sprintf('<a href="%s" class="status-link">%s</a>', $typelink, $typestr) :
$typestr;
$s .= '</td><td class="timeinfo">';
@@ -304,6 +304,36 @@ else
?>
</ul>
+ <script src="js/jquery.js"></script>
+ <script>
+ $(function () {
+ $('.status-link').click(function (ev) {
+ ev.preventDefault();
+ var key = $(this).attr("href");
+ var elId = 'e' + key.replace(/\/|\./g, '-');
+
+ if ($("#" + elId).length == 0) {
+ $(this).parent().parent().after($("<tr />",
+ {
+ class: "build-files-list",
+ id: elId,
+ html: '<td colspan="8">loading</td>'
+ }
+ ));
+ $.get(
+ "/pkg/log_files.php",
+ {"k": $(this).attr("href")},
+ function (data) {
+ $("#" + elId).html('<td colspan="2"></td><td colspan="6">' + data + '</td>');
+ }
+ );
+ } else {
+ $("#" + elId).toggle();
+ }
+ return false;
+ });
+ })();
+ </script>
<div class="clear"></div>
<hr />
<p>Generated at <?php echo $date_gen; ?>.