- new "bubble"-tag for "connection endpoints", closed #301

- new filter option for "bubbled" connections added to "route search" dialog, closed #301
This commit is contained in:
Mark Friedrich
2019-04-27 23:38:52 +02:00
parent f68aebc3de
commit b5a3012ffd
39 changed files with 2337 additions and 1781 deletions

View File

@@ -125,6 +125,8 @@ class Route extends Controller\AccessController {
$excludeTypes = [];
$includeEOL = true;
$excludeEndpointTypes = [];
if( $filterData['stargates'] === true){
// include "stargates" for search
$includeScopes[] = 'stargate';
@@ -161,6 +163,10 @@ class Route extends Controller\AccessController {
}
}
if( $filterData['endpointsBubble'] !== true ){
$excludeEndpointTypes[] = 'bubble';
}
// search connections -------------------------------------------------------------------------------------
if( !empty($includeScopes) ){
@@ -178,6 +184,11 @@ class Route extends Controller\AccessController {
$whereQuery .= " `connection`.`eolUpdated` IS NULL AND ";
}
if( !empty($excludeEndpointTypes) ){
$whereQuery .= " CONCAT_WS(' ', `connection`.`sourceEndpointType`, `connection`.`targetEndpointType`) ";
$whereQuery .= " NOT REGEXP '" . implode("|", $excludeEndpointTypes) . "' AND ";
}
$query = "SELECT
`system_src`.`systemId` systemSourceId,
`system_tar`.`systemId` systemTargetId
@@ -717,22 +728,23 @@ class Route extends Controller\AccessController {
// search route with filter options
$filterData = [
'stargates' => (bool) $routeData['stargates'],
'jumpbridges' => (bool) $routeData['jumpbridges'],
'wormholes' => (bool) $routeData['wormholes'],
'wormholesReduced' => (bool) $routeData['wormholesReduced'],
'wormholesCritical' => (bool) $routeData['wormholesCritical'],
'wormholesFrigate' => (bool) $routeData['wormholesFrigate'],
'wormholesEOL' => (bool) $routeData['wormholesEOL'],
'flag' => $routeData['flag']
'stargates' => (bool) $routeData['stargates'],
'jumpbridges' => (bool) $routeData['jumpbridges'],
'wormholes' => (bool) $routeData['wormholes'],
'wormholesReduced' => (bool) $routeData['wormholesReduced'],
'wormholesCritical' => (bool) $routeData['wormholesCritical'],
'wormholesFrigate' => (bool) $routeData['wormholesFrigate'],
'wormholesEOL' => (bool) $routeData['wormholesEOL'],
'endpointsBubble' => (bool) $routeData['endpointsBubble'],
'flag' => $routeData['flag']
];
$returnRoutData = [
'systemFromData' => $routeData['systemFromData'],
'systemToData' => $routeData['systemToData'],
'skipSearch' => (bool) $routeData['skipSearch'],
'maps' => $mapData,
'mapIds' => $mapIds
'systemFromData' => $routeData['systemFromData'],
'systemToData' => $routeData['systemToData'],
'skipSearch' => (bool) $routeData['skipSearch'],
'maps' => $mapData,
'mapIds' => $mapIds
];
// add filter options for each route as well
@@ -742,10 +754,10 @@ class Route extends Controller\AccessController {
!$returnRoutData['skipSearch'] &&
count($mapIds) > 0
){
$systemFrom = $routeData['systemFromData']['name'];
$systemFromId = (int)$routeData['systemFromData']['systemId'];
$systemTo = $routeData['systemToData']['name'];
$systemToId = (int)$routeData['systemToData']['systemId'];
$systemFrom = $routeData['systemFromData']['name'];
$systemFromId = (int)$routeData['systemFromData']['systemId'];
$systemTo = $routeData['systemToData']['name'];
$systemToId = (int)$routeData['systemToData']['systemId'];
$cacheKey = $this->getRouteCacheKey(
$mapIds,