aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-11-01 21:06:58 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-11-01 21:06:58 +0100
commitae374404e75e622f9e45517fa8db8dfb7f120c42 (patch)
tree2b96c6e361634760397dcd667d2b10b70ee13e61 /web
parent3461ec9baafd384a540041121ed6fb913e020245 (diff)
downloadbuildroot-test-ae374404e75e622f9e45517fa8db8dfb7f120c42.tar.gz
buildroot-test-ae374404e75e622f9e45517fa8db8dfb7f120c42.tar.bz2
index.php: display branch name
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'web')
-rw-r--r--web/funcs.inc.php4
-rw-r--r--web/index.php9
2 files changed, 10 insertions, 3 deletions
diff --git a/web/funcs.inc.php b/web/funcs.inc.php
index a44a3c6..04b7e31 100644
--- a/web/funcs.inc.php
+++ b/web/funcs.inc.php
@@ -52,7 +52,7 @@ function bab_total_results_count()
* and limited to $count items. The items starting with $start=0 are
* the most recent build results.
*/
-function bab_get_results($start=0, $count=100, $filter_status=-1, $filter_arch="", $filter_reason="", $filter_submitter="", $filter_libc="", $filter_static="", $filter_subarch="")
+function bab_get_results($start=0, $count=100, $filter_status=-1, $filter_arch="", $filter_reason="", $filter_submitter="", $filter_libc="", $filter_static="", $filter_subarch="", $filter_branch="")
{
$db = new db();
$where_parts = array();
@@ -70,6 +70,8 @@ function bab_get_results($start=0, $count=100, $filter_status=-1, $filter_arch="
$where_parts[] = " static=" . $db->quote_smart($filter_static) . " ";
if ($filter_subarch != '')
$where_parts[] = " subarch=" . $db->quote_smart($filter_subarch) . " ";
+ if ($filter_branch != '')
+ $where_parts[] = " branch=" . $db->quote_smart($filter_branch) . " ";
if (count($where_parts)) {
$condition = "where " . implode("and", $where_parts);
} else {
diff --git a/web/index.php b/web/index.php
index 88bf10d..6750cc9 100644
--- a/web/index.php
+++ b/web/index.php
@@ -53,6 +53,11 @@ if (isset($_GET['arch']) && ereg("^[a-z0-9_]*$", $_GET['arch']))
else
$filter_arch = "";
+if (isset($_GET['branch']) && ereg("^[a-z0-9_\.]*$", $_GET['branch']))
+ $filter_branch = $_GET['branch'];
+else
+ $filter_branch = "";
+
if (isset($_GET['reason']) && ereg("^[A-Za-z0-9_\+\.\-]*$", $_GET['reason']))
$filter_reason = $_GET['reason'];
else
@@ -86,7 +91,7 @@ echo "<tr class=\"header\">";
echo "<td>Date</td><td>Duration</td><td>Status</td><td>Commit ID</td><td>Submitter</td><td>Arch/Subarch</td><td>Failure reason</td><td>Libc</td><td>Static?</td><td>Data</td>";
echo "</tr>";
-$results = bab_get_results($start, $step, $filter_status, $filter_arch, $filter_reason, $filter_submitter, $filter_libc, $filter_static, $filter_subarch);
+$results = bab_get_results($start, $step, $filter_status, $filter_arch, $filter_reason, $filter_submitter, $filter_libc, $filter_static, $filter_subarch, $filter_branch);
while ($current = mysql_fetch_object($results)) {
@@ -114,7 +119,7 @@ while ($current = mysql_fetch_object($results)) {
else if ($current->status == 2)
echo "<td><a href=\"?status=TIMEOUT\">TIMEOUT</a></td>";
- echo "<td><a href=\"http://git.buildroot.net/buildroot/commit/?id=" . $current->commitid . "\">" . substr($current->commitid, 0, 8) . "</a></td>";
+ echo "<td style=\"font-size: 80%\"><a href=\"?branch=" . urlencode($current->branch) . "\">" . $current->branch . "</a><br/><a href=\"http://git.buildroot.net/buildroot/commit/?id=" . $current->commitid . "\">" . substr($current->commitid, 0, 8) . "</a></td>";
echo "<td><a href=\"?submitter=" . urlencode($current->submitter) . "\">" . $submitter . "</a></td>";
echo "<td><a href=\"?arch=" . $current->arch . "\">" . $current->arch . "</a>";
if ($current->subarch != "")