Example #1
0
    $gui->do_report['status_ok'] = 0;
    $gui->do_report['msg'] = lang_get('report_tplan_has_no_build');
}
// -----------------------------------------------------------------------------
// get navigation data
$gui->menuItems = array();
if ($gui->do_report['status_ok']) {
    // create a list or reports
    $context = new stdClass();
    $context->tproject_id = $args->tproject_id;
    $context->tplan_id = $args->tplan_id;
    $tplan_mgr = new testplan($db);
    $dmy = $tplan_mgr->get_by_id($context->tplan_id);
    $gui->buildInfoSet = $tplan_mgr->get_builds($gui->tplan_id);
    $report_plans = $tplan_mgr->report_get_plans($args->tproject_id);
    $report_suites = $tplan_mgr->report_get_suites($args->tproject_id);
    $report_builds = $tplan_mgr->report_get_builds();
    $report_build_total = count($report_builds);
    $report_devices = $tplan_mgr->report_get_devices($args->tproject_id);
    $report_device_total = count($report_devices);
    unset($tplan_mgr);
    $context->apikey = $dmy['api_key'];
    // $context->apikey = $_SESSION['currentUser']->userApiKey;
    $context->imgSet = $smarty->getImages();
    $gui->menuItems = $reports_mgr->get_list_reports($context, $gui->btsEnabled, $args->optReqs, $tlCfg->reports_formats[$args->format]);
}
$smarty->assign('gui', $gui);
$smarty->assign('report_plans', $report_plans);
$smarty->assign('report_suites', $report_suites);
$smarty->assign('report_builds', json_encode($report_builds));
$smarty->assign('report_build_total', $report_build_total);