- fixed http 400 "too many items for 'connections'" for route search ESI endpoint -> ESI can just handle 100 custom connections

- image preload adjustment for "image carousel" on /login page
This commit is contained in:
Mark Friedrich
2018-06-09 20:46:00 +02:00
parent aeb3f73089
commit 9769ae72ff
4 changed files with 16 additions and 3 deletions

View File

@@ -21,6 +21,12 @@ class Route extends Controller\AccessController {
const ROUTE_SEARCH_DEPTH_DEFAULT = 1;
/**
* ESI route search can handle max 100 custom connections
* -> each connection has a A->B and B->A entry. So we have 50 "real connections"
*/
const MAX_CONNECTION_COUNT = 100;
/**
* cache time for static jump data (e.g. K-Space stargates)
* @var int
@@ -424,7 +430,7 @@ class Route extends Controller\AccessController {
* @return array
* @throws \Exception\PathfinderException
*/
public function searchRouteCustom(int $systemFromId, int $systemToId, $searchDepth = 0, array $mapIds = [], array $filterData = []) : array {
private function searchRouteCustom(int $systemFromId, int $systemToId, $searchDepth = 0, array $mapIds = [], array $filterData = []) : array {
// reset all previous set jump data
$this->resetJumpData();
@@ -506,7 +512,7 @@ class Route extends Controller\AccessController {
* @return array
* @throws \Exception\PathfinderException
*/
public function searchRouteESI(int $systemFromId, int $systemToId, int $searchDepth = 0, array $mapIds = [], array $filterData = []) : array {
private function searchRouteESI(int $systemFromId, int $systemToId, int $searchDepth = 0, array $mapIds = [], array $filterData = []) : array {
// reset all previous set jump data
$this->resetJumpData();
@@ -547,6 +553,11 @@ class Route extends Controller\AccessController {
// ... there can be multiple connections between same systems in Pathfinder
if(!in_array($jumpNode, $connections)){
$connections[] = [$systemSourceId, $systemTargetId];
// check if connections limit is reached
if(count($connections) >= self::MAX_CONNECTION_COUNT){
// ESI API limit for custom "connections"
break 2;
}
}
}
}

View File

@@ -276,6 +276,7 @@ define([
titleProperty: 'imgTitle',
transitionSpeed: 600,
slideshowInterval: 5000,
preloadRange: 1,
onopened: function () {
// Callback function executed when the Gallery has been initialized
// and the initialization transition has been completed.

View File

@@ -276,6 +276,7 @@ define([
titleProperty: 'imgTitle',
transitionSpeed: 600,
slideshowInterval: 5000,
preloadRange: 1,
onopened: function () {
// Callback function executed when the Gallery has been initialized
// and the initialization transition has been completed.

View File

@@ -1,4 +1,4 @@
<div id="{{id}}" class="alert alert-warning">
<div class="ui-pnotify-icon"><span class="fas fa-exclamation fa-fw fa-lg"></span></div>
<h4 class="ui-pnotify-title">Scheduled maintenance: <small> Pathfinder upgrade. v1.3.5 <i class="fas fa-long-arrow-alt-right"></i> v1.3.6; Shutdown: ~20:00 (UTC). ETA ~20:30 (UTC)</small></h4>
<h4 class="ui-pnotify-title">Scheduled maintenance: <small> Pathfinder upgrade. v1.3.4 <i class="fas fa-long-arrow-alt-right"></i> v1.3.5; Shutdown: ~11:00 (UTC). ETA ~11:30 (UTC)</small></h4>
</div>