diff --git a/app/main/controller/api/route.php b/app/main/controller/api/route.php index 8ddfb64a..4dc9238b 100644 --- a/app/main/controller/api/route.php +++ b/app/main/controller/api/route.php @@ -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; + } } } } diff --git a/js/app/login.js b/js/app/login.js index 5bee651a..00fb38d5 100644 --- a/js/app/login.js +++ b/js/app/login.js @@ -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. diff --git a/public/js/v1.3.5/app/login.js b/public/js/v1.3.5/app/login.js index 5bee651a..00fb38d5 100644 --- a/public/js/v1.3.5/app/login.js +++ b/public/js/v1.3.5/app/login.js @@ -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. diff --git a/public/templates/ui/info_panel.html b/public/templates/ui/info_panel.html index 97619c17..c564e155 100644 --- a/public/templates/ui/info_panel.html +++ b/public/templates/ui/info_panel.html @@ -1,4 +1,4 @@