Index: inc_tinderbox.php.dist =================================================================== RCS file: /var/cvs/FreeBSD/tinderbox2/webui/inc_tinderbox.php.dist,v retrieving revision 1.1 retrieving revision 1.4 diff -u -r1.1 -r1.4 --- inc_tinderbox.php.dist 20 Oct 2007 17:07:42 -0000 1.1 +++ inc_tinderbox.php.dist 20 Oct 2007 18:22:03 -0000 1.4 @@ -1,20 +1,27 @@ start(); if( isset($_POST['do_login']) ) { @@ -136,6 +139,9 @@ break; case 'config': $display = $moduleConfig->display_config(); break; + case 'latest_buildports_rss': + print $moduleRss->display_latest_buildports(); + exit; case 'list_builds': default: $display = $moduleBuilds->display_list_builds(); break; Index: module/moduleRss.php =================================================================== RCS file: module/moduleRss.php diff -N module/moduleRss.php --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ module/moduleRss.php 20 Oct 2007 17:33:35 -0000 1.1 @@ -0,0 +1,64 @@ + +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $Paefchen: FreeBSD/tinderbox2/webui/module/moduleRss.php,v 1.1 2007/10/20 17:33:35 as Exp $ +# + +require_once 'module/module.php'; +require_once 'module/modulePorts.php'; + +class moduleRss extends module { + + function moduleRss() { + $this->module(); + $this->modulePorts = new modulePorts(); + } + + function display_latest_buildports( $limit = 20 ) { + global $wwwrooturi; + + $ports = array(); + + foreach ( $this->TinderboxDS->getLatestPorts( false, $limit ) as $port ) { + $build = $this->TinderboxDS->getBuildById( $port->getBuildId() ); + $jail = $this->TinderboxDS->getJailById( $build->getJailId() ); + + list( $data ) = $this->modulePorts->get_list_data( '', array($port) ); + $data['port_last_status'] = $port->getLastStatus(); + $data['jail_name'] = $jail->getName(); + + $ports[] = $data; + } + + $this->template_assign( 'data', $ports ); + $this->template_assign( 'wwwrooturi', $wwwrooturi ); + $this->template_assign( 'lastBuildDate', date('r') ); + + return $this->template_parse( 'rss.tpl' ); + } +} + +?> Index: templates/default/rss.tpl =================================================================== RCS file: templates/default/rss.tpl diff -N templates/default/rss.tpl --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ templates/default/rss.tpl 20 Oct 2007 17:33:35 -0000 1.1 @@ -0,0 +1,21 @@ +?xml version="1.0" encoding="ISO-8859-1"?> + + + + + <?=$tinderbox_title?> + + + + 10 + + + [<?=$row['jail_name']?>] - <?=$row['port_directory']?> - <?=$row['port_last_status']?> + + + => + => [|] -- + + + +