/** * Load the location information * */ function LoadLocations() { $locations = LoadLocationsIni(); FilterLocations($locations); // strip out any sensitive information foreach ($locations as $index => &$loc) { // count the number of tests at each location if (isset($loc['localDir'])) { $loc['backlog'] = CountTests($loc['localDir']); unset($loc['localDir']); } if (isset($loc['key'])) { unset($loc['key']); } if (isset($loc['remoteDir'])) { unset($loc['remoteDir']); } if (isset($loc['notify'])) { unset($loc['notify']); } } return $locations; }
/** * Load the location information * */ function LoadLocations() { $locations = LoadLocationsIni(); FilterLocations($locations, 'pss'); // strip out any sensitive information foreach ($locations as $index => &$loc) { if (isset($loc['browser'])) { $testCount = 16; if (array_key_exists('relayServer', $loc)) { $loc['backlog'] = 0; $loc['avgTime'] = 30; $loc['testers'] = 1; $loc['wait'] = ceil($testCount * 30 / 60); } else { GetPendingTests($index, $count, $avgTime); if (!$avgTime) { $avgTime = 30; } // default to 30 seconds if we don't have any history $loc['backlog'] = $count; $loc['avgTime'] = $avgTime; $loc['testers'] = GetTesterCount($index); $loc['wait'] = -1; if ($loc['testers']) { if ($loc['testers'] > 1) { $testCount = 16; } $loc['wait'] = ceil(($testCount + $count / $loc['testers']) * $avgTime / 60); } } } unset($loc['localDir']); unset($loc['key']); unset($loc['remoteDir']); unset($loc['relayKey']); } return $locations; }
/** * Load the location information * */ function LoadLocations() { $locations = parse_ini_file('./settings/locations.ini', true); // only include the mobile browsers foreach ($locations as $index => &$loc) { if (array_key_exists('browser', $loc)) { if (!array_key_exists('type', $loc) || stripos($loc['type'], 'nodejs') === false && stripos($loc['type'], 'mobile') == false) { unset($locations[$index]); } } } FilterLocations($locations, 'pss'); // strip out any sensitive information foreach ($locations as $index => &$loc) { if (isset($loc['browser'])) { $testCount = 26; if (array_key_exists('relayServer', $loc)) { $loc['backlog'] = 0; $loc['avgTime'] = 30; $loc['testers'] = 1; $loc['wait'] = ceil($testCount * 30 / 60); } else { GetPendingTests($index, $count, $avgTime); if (!$avgTime) { $avgTime = 30; } // default to 30 seconds if we don't have any history $loc['backlog'] = $count; $loc['avgTime'] = $avgTime; $loc['testers'] = GetTesterCount($index); $loc['wait'] = -1; if ($loc['testers']) { if ($loc['testers'] > 1) { $testCount = 16; } $loc['wait'] = ceil(($testCount + $count / $loc['testers']) * $avgTime / 60); } } } unset($loc['localDir']); unset($loc['key']); unset($loc['remoteDir']); unset($loc['relayKey']); } return $locations; }
/** * Load the location information and extract just the end nodes * */ function LoadLocations() { $locations = array(); $loc = LoadLocationsIni(); if (isset($_REQUEST['k']) && preg_match('/^(?P<prefix>[0-9A-Za-z]+)(?P<key>[\\.0-9A-Za-z]*)$/', $_REQUEST['k'], $matches)) { $filter = $matches['prefix']; foreach ($loc as $name => $location) { if (isset($location['browser'])) { $ok = false; if (isset($location['allowKeys'])) { $keys = explode(',', $location['allowKeys']); foreach ($keys as $k) { if ($k == $filter) { $ok = true; break; } } } if (!$ok) { unset($loc[$name]); } } } } FilterLocations($loc); BuildLocations($loc); if (isset($loc['locations']['default'])) { $default = $loc['locations']['default']; } else { $default = $loc['locations'][1]; } $i = 1; while (isset($loc['locations'][$i])) { $group =& $loc[$loc['locations'][$i]]; if (!isset($group['hidden']) || !$group['hidden'] || $_REQUEST['hidden']) { $label = $group['label']; if (isset($group['default'])) { $def = $group['default']; } else { $def = $group[1]; } $j = 1; while (isset($group[$j])) { if (isset($loc[$group[$j]]['location'])) { $loc_name = $loc[$group[$j]]['location']; if (!isset($loc[$group[$j]]['hidden']) || !$loc[$group[$j]]['hidden'] || $_REQUEST['hidden']) { if (isset($locations[$loc_name])) { $locations[$loc_name]['Browsers'] .= ',' . $loc[$group[$j]]['browser']; } else { $locations[$loc_name] = array('Label' => $label, 'location' => $loc[$group[$j]]['location'], 'Browsers' => $loc[$group[$j]]['browser'], 'localDir' => $loc[$group[$j]]['localDir'], 'status' => @$loc[$group[$j]]['status'], 'relayServer' => @$loc[$group[$j]]['relayServer'], 'relayLocation' => @$loc[$group[$j]]['relayLocation'], 'labelShort' => $loc[$loc_name]['label']); if ($default == $loc['locations'][$i] && $def == $group[$j]) { $locations[$loc_name]['default'] = true; } if (isset($group['group'])) { $locations[$loc_name]['group'] = $group['group']; } } } } $j++; } } $i++; } return $locations; }
/** * Load the location information * */ function LoadLocations() { $locations = parse_ini_file('./settings/locations.ini', true); FilterLocations($locations, 'blink', array('IE', '6', '7', '8', '9', 'dynaTrace')); //FilterLocations( $locations); // strip out any sensitive information foreach ($locations as $index => &$loc) { if (isset($loc['browser'])) { GetPendingTests($index, $count, $avgTime); if (!$avgTime) { $avgTime = 30; } // default to 30 seconds if we don't have any history $loc['backlog'] = $count; $loc['avgTime'] = $avgTime; $loc['testers'] = GetTesterCount($index); $loc['wait'] = -1; if ($loc['testers']) { $testCount = 20; if ($loc['testers'] > 1) { $testCount = 10; } $loc['wait'] = ceil(($testCount + $count / $loc['testers']) * $avgTime / 60); } } unset($loc['localDir']); unset($loc['key']); unset($loc['remoteDir']); } return $locations; }
/** * Load the location information * */ function LoadLocations() { $locations = parse_ini_file('./settings/locations.ini', true); FilterLocations($locations); // strip out any sensitive information foreach ($locations as $index => &$loc) { // count the number of tests at each location if (isset($loc['localDir'])) { $loc['backlog'] = CountTests($loc['localDir']); unset($loc['localDir']); } if (isset($loc['key'])) { unset($loc['key']); } if (isset($loc['remoteDir'])) { unset($loc['remoteDir']); } } return $locations; }
/** * Load the location information and extract just the end nodes * */ function LoadLocations() { $locations = array(); $loc = parse_ini_file('./settings/locations.ini', true); FilterLocations($loc); BuildLocations($loc); if (isset($loc['locations']['default'])) { $default = $loc['locations']['default']; } else { $default = $loc['locations'][1]; } $i = 1; while (isset($loc['locations'][$i])) { $group =& $loc[$loc['locations'][$i]]; if (!array_key_exists('hidden', $group) || !$group['hidden'] || $_REQUEST['hidden']) { $label = $group['label']; if (isset($group['default'])) { $def = $group['default']; } else { $def = $group[1]; } $j = 1; while (isset($group[$j])) { if (array_key_exists($group[$j], $loc)) { if (!array_key_exists('hidden', $loc[$group[$j]]) || !$loc[$group[$j]]['hidden'] || $_REQUEST['hidden']) { $locations[$group[$j]] = array('Label' => $label, 'location' => $loc[$group[$j]]['location'], 'Browser' => $loc[$group[$j]]['browser'], 'localDir' => $loc[$group[$j]]['localDir'], 'relayServer' => @$loc[$group[$j]]['relayServer'], 'relayLocation' => @$loc[$group[$j]]['relayLocation']); if ($default == $loc['locations'][$i] && $def == $group[$j]) { $locations[$group[$j]]['default'] = true; } } } $j++; } } $i++; } return $locations; }