Skip to content

Commit

Permalink
Adding option to not downlaod consoleLog
Browse files Browse the repository at this point in the history
  • Loading branch information
Lowell Vaughn committed Mar 14, 2016
1 parent a80846f commit 3d12d82
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
19 changes: 16 additions & 3 deletions www/jsonResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,22 @@ function GetSingleRunData($id, $testPath, $run, $cached, &$pageData, $testInfo)
$ret['requests'] = $requests;
}

$console_log = DevToolsGetConsoleLog($testPath, $run, $cached);
if (isset($console_log))
$ret['consoleLog'] = $console_log;
// Check to see if we're adding the console log
$addConsole = 1;
if(isset($_GET['console'])){
if($_GET['console'] == 0){
$addConsole = 0;
}
}

// add requests
if($addConsole == 1) {
$console_log = DevToolsGetConsoleLog($testPath, $run, $cached);
if (isset($console_log)) {
$ret['consoleLog'] = $console_log;
}
}

if (gz_is_file("$testPath/$run{$cachedText}_status.txt")) {
$ret['status'] = array();
$lines = gz_file("$testPath/$run{$cachedText}_status.txt");
Expand Down
3 changes: 3 additions & 0 deletions www/xmlResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@ function StatusMessages($id, $testPath, $run, $cached) {
* @param mixed $cached
*/
function ConsoleLog($id, $testPath, $run, $cached) {
if(isset($_GET['console']) && $_GET['console'] == 0) {
return;
}
$consoleLog = DevToolsGetConsoleLog($testPath, $run, $cached);
if (isset($consoleLog) && is_array($consoleLog) && count($consoleLog)) {
echo "<consoleLog>\n";
Expand Down

0 comments on commit 3d12d82

Please sign in to comment.