} } } } else { if ($args->type == $statusCode['not_run']) { $gui->warning_msg = lang_get('no_notrun'); } if ($args->type == $statusCode['failed']) { $gui->warning_msg = lang_get('no_failed'); } if ($args->type == $statusCode['blocked']) { $gui->warning_msg = lang_get('no_blocked'); } } //new dBug($gui->dataSet); $gui->tableSet[] = buildMatrix($gui->dataSet, $args, array('status_not_run' => $args->type == $statusCode['not_run'], 'bugInterfaceOn' => $gui->bugInterfaceOn, 'format' => $args->format, 'show_platforms' => $show_platforms)); $smarty = new TLSmarty(); $smarty->assign('gui', $gui); displayReport($templateCfg->template_dir . $templateCfg->default_template, $smarty, $args->format, $mailCfg); /** * Function returns number of Test Cases in the Test Plan * @deprecated 1.9 * @return string Link of Test ID + Title */ function buildTCLink($tcID, $tcversionID, $title, $buildID, $testCaseExternalId, $tplanId) { $title = htmlspecialchars($title); $suffix = htmlspecialchars($testCaseExternalId) . ": <b>" . $title . "</b></a>"; //Added tplan_id as a parameter - amitkhullar -BUGID 2267 $testTitle = '<a href="lib/execute/execSetResults.php?level=testcase&build_id=' . $buildID . '&id=' . $tcID . '&version_id=' . $tcversionID . '&tplan_id=' . $tplanId . '">'; $testTitle .= $suffix;
if ($gui->result >= tl::OK) { logAuditEvent(TLS("audit_user_disabled", $user->login), "DISABLE", $args->user_id, "users"); $gui->user_feedback = sprintf(lang_get('user_disabled'), $user->login); } } } if ($gui->result != tl::OK) { $gui->user_feedback = lang_get('error_user_not_disabled'); } break; default: break; } $gui->matrix = $users = getAllUsersForGrid($db); $gui->images = $smarty->getImages(); $gui->tableSet[] = buildMatrix($gui, $args); $highlight = initialize_tabsmenu(); $highlight->view_users = 1; $smarty->assign('highlight', $highlight); $smarty->assign('update_title_bar', 0); $smarty->assign('reload', 0); $smarty->assign('gui', $gui); $smarty->display($templateCfg->template_dir . $templateCfg->default_template); /** * */ function initEnv(&$dbHandler) { $_REQUEST = strings_stripSlashes($_REQUEST); // input from GET['HelloString3'], // type: string,
$buildExecStatus[] = $lastBuildRun; } if ($gui->matrixCfg->buildColumns['latestBuildOnLeft']) { $buildExecStatus = array_reverse($buildExecStatus); } $rowArray = array_merge($rowArray, $buildExecStatus); // BUGID 4341 $rowArray[] = $latestExecution['status']; $gui->matrix[] = $rowArray; $indexOfArrData++; } } } } // end if $gui->tableSet[] = buildMatrix($gui->buildInfoSet, $gui->matrix, $args->format, $show_platforms, $args, $gui->platforms); $smarty = new TLSmarty(); $smarty->assign('gui', $gui); displayReport($templateCfg->template_dir . $templateCfg->default_template, $smarty, $args->format, $mailCfg); /** * * */ function init_args() { $iParams = array("format" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N), "tplan_id" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); $args->basehref = $_SESSION['basehref']; return $args; }
} } } } } // end of inner foreach() if (!$any_result_found) { $gui->matrix[] = $rowArray; $gui->number_of_not_run_testcases++; } } } } // create and show the table only if we have data to display if ($gui->number_of_not_run_testcases) { $gui->tableSet[] = buildMatrix($gui->matrix, $args->format); } if ($platforms_active) { $gui->status_message = sprintf(lang_get('not_run_any_platform_status_msg'), $gui->number_of_testcases, $gui->number_of_not_run_testcases); } else { $gui->warning_msg = lang_get('not_run_any_platform_no_platforms'); } $smarty = new TLSmarty(); $smarty->assign('gui', $gui); displayReport($templateCfg->template_dir . $templateCfg->default_template, $smarty, $args->format, $mailCfg); /** * * */ function init_args() {
} // $tcaseSet } // $tsuiteSet } unset($metrics); unset($latestExecution); switch ($args->format) { case FORMAT_XLS: // new dBug($gui->matrix); die(); createSpreadsheet($gui, $args, $buildIDSet); break; default: // new dBug($gui->matrix); // die(); $gui->tableSet[] = buildMatrix($gui, $args, $buildIDSet, $lastestBuild); break; } } else { // We need to ask user to do a choice $tpl = 'resultsTCLauncher.tpl'; $gui->pageTitle = $labels['test_result_matrix_filters']; if ($gui->matrixCfg->buildQtyLimit > 0) { $gui->userFeedback = $labels['too_much_data'] . '<br>' . sprintf($labels['too_much_builds'], $gui->activeBuildsQty, $gui->matrixCfg->buildQtyLimit); } } $timerOff = microtime(true); $gui->elapsed_time = round($timerOff - $timerOn, 2); $smarty->assign('gui', $gui); displayReport($templateCfg->template_dir . $tpl, $smarty, $args->format, $mailCfg); /**
} // Time tracking //$chronos[] = microtime(true);$tnow = end($chronos);$tprev = prev($chronos); //$t_elapsed_abs = number_format( $tnow - $tstart, 4); //$t_elapsed = number_format( $tnow - $tprev, 4); //echo '<br>' . __FUNCTION__ . ' Elapsed relative (sec):' . $t_elapsed . ' Elapsed ABSOLUTE (sec):' . $t_elapsed_abs .'<br>'; //reset($chronos); //$mem['usage'][] = memory_get_usage(true); $mem['peak'][] = memory_get_peak_usage(true); //echo '<br>' . __FUNCTION__ . ' Mem:' . end($mem['usage']) . ' Peak:' . end($mem['peak']) .'<br>'; switch ($args->format) { case FORMAT_XLS: createSpreadsheet($gui, $args, $cfSet); break; default: $tableOptions = array('status_not_run' => $args->type == $statusCode['not_run'], 'bugInterfaceOn' => $gui->bugInterfaceOn, 'format' => $args->format, 'show_platforms' => $gui->show_platforms); $gui->tableSet[] = buildMatrix($gui->dataSet, $args, $tableOptions, $gui->platformSet, $cfSet); break; } // Time tracking //$chronos[] = microtime(true);$tnow = end($chronos);$tprev = prev($chronos); //$t_elapsed_abs = number_format( $tnow - $tstart, 4); //$t_elapsed = number_format( $tnow - $tprev, 4); //echo '<br>' . __FUNCTION__ . ' Elapsed relative (sec):' . $t_elapsed . ' Elapsed ABSOLUTE (sec):' . $t_elapsed_abs .'<br>'; //reset($chronos); $smarty = new TLSmarty(); $smarty->assign('gui', $gui); displayReport($templateCfg->template_dir . $templateCfg->default_template, $smarty, $args->format, $mailCfg); // Time tracking //$chronos[] = microtime(true);$tnow = end($chronos);$tprev = prev($chronos); //$t_elapsed_abs = number_format( $tnow - $tstart, 4); //$t_elapsed = number_format( $tnow - $tprev, 4);