/** */ function get_cdash_dashboard_xml_by_name($projectname, $date) { return get_cdash_dashboard_xml($projectname, $date); }
$Project = new Project(); $role = 0; if ($projectid) { $project = pdo_query("SELECT name FROM project WHERE id='{$projectid}'"); if (pdo_num_rows($project) > 0) { $project_array = pdo_fetch_array($project); $projectname = $project_array["name"]; } $Project->Id = $projectid; $role = $Project->GetUserRole($userid); } else { $projectname = 'Global'; } $xml = begin_XML_for_XSLT(); $xml .= "<title>Feed - " . $projectname . "</title>"; $xml .= get_cdash_dashboard_xml(get_project_name($projectid), $date); $sql = ''; if ($date) { $sql = "AND date>'" . $date . "'"; } // Get the errors $query = pdo_query("SELECT * FROM feed WHERE projectid=" . qnum($projectid) . " ORDER BY id DESC"); while ($query_array = pdo_fetch_array($query)) { $xml .= "<feeditem>"; $xml .= add_XML_value("date", $query_array["date"]); $xml .= add_XML_value("buildid", $query_array["buildid"]); $xml .= add_XML_value("type", $query_array["type"]); $xml .= add_XML_value("description", $query_array["description"]); $xml .= "</feeditem>"; } $xml .= add_XML_value("admin", $User->IsAdmin());
checkUserPolicy(@$_SESSION['cdash']['loginid'], $projectid); // connect to the database $db = pdo_connect("{$CDASH_DB_HOST}", "{$CDASH_DB_LOGIN}", "{$CDASH_DB_PASS}"); pdo_select_db("{$CDASH_DB_NAME}", $db); // handle optional date argument @($date = $_GET["date"]); if ($date != NULL) { $date = htmlspecialchars(pdo_real_escape_string($date)); } list($previousdate, $currentstarttime, $nextdate) = get_dates($date, $Project->NightlyTime); // Date range is currently hardcoded to two weeks in the past. // This could become a configurable value instead. $date_range = 14; // begin .xml that is used to render this page $xml = begin_XML_for_XSLT(); $xml .= get_cdash_dashboard_xml($projectname, $date); $projectname = get_project_name($projectid); $xml .= "<title>CDash Overview : " . $projectname . "</title>"; $xml .= get_cdash_dashboard_xml_by_name($projectname, $date); $xml .= "<menu>"; $xml .= add_XML_value("previous", "overview.php?project={$projectname}&date={$previousdate}"); $xml .= add_XML_value("current", "overview.php?project={$projectname}"); $xml .= add_XML_value("next", "overview.phpv?project={$projectname}&date={$nextdate}"); $xml .= "</menu>"; $xml .= add_XML_value("hasSubProjects", $has_subprojects); // configure/build/test data that we care about. $build_measurements = array("configure_warnings", "configure_errors", "build_warnings", "build_errors", "failing_tests"); // for static analysis, we only care about errors & warnings. $static_measurements = array("errors", "warnings"); // information on how to sort by the various build measurements $sort = array("configure_warnings" => "[[5,1]]", "configure_errors" => "[[4,1]]", "build_warnings" => "[[8,1]]", "build_errors" => "[[7,1]]", "failing_tests" => "[[11,1]]");