From de98e1e2941389db225be369fffb2b8c5632b310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Wed, 13 Nov 2024 09:00:36 +0100 Subject: [PATCH] continue --- docker-compose-lib.yaml | 2 +- env.default | 2 +- tests/test_app.py | 14 ++++++++++++-- ui/src/interfaces/ControllerDesktop.ts | 6 +++--- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/docker-compose-lib.yaml b/docker-compose-lib.yaml index 2e6853f8e..6990a7c7f 100644 --- a/docker-compose-lib.yaml +++ b/docker-compose-lib.yaml @@ -82,7 +82,7 @@ services: environment: - PGOPTIONS - MAPSERVER_CONFIG_FILE=/etc/mapserver/mapserver.conf - - MAPSERVER_BASE_PATH=/mapserv_proxy/mapserver + - MAPSERVER_BASE_PATH=/mapserv_proxy/ - OGCAPI_HTML_TEMPLATE_DIRECTORY=/usr/local/share/mapserver/ogcapi/templates/html-bootstrap4/ - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY diff --git a/env.default b/env.default index a19816b28..ef43d62dd 100644 --- a/env.default +++ b/env.default @@ -44,7 +44,7 @@ TILECLOUDCHAIN_INTERNAL_URL=http://tilecloudchain:8080 TILECLOUDCHAIN_INTERNAL_HOST=tilecloudchain TILECLOUDCHAIN_INTERNAL_PORT=8080 # For internal print -MAPSERVER_URL=http://mapserver:8080/ +MAPSERVER_URL=http://mapserver:8080/mapserv_proxy TINYOWS_URL=http://tinyows:8080/ QGISSERVER_URL=http://qgisserver:8080/mapserv_proxy QGIS_VERSION=3.34-gdal3.8 diff --git a/tests/test_app.py b/tests/test_app.py index e72e7a35c..36bdbab3b 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -16,7 +16,7 @@ ("https://front/c2c/health_check", {"max_level": "1"}, 2), ("https://front/c2c/health_check", {"checker": "check_collector"}, 2), ( - "http://mapserver:8080/mapserv_proxy/mapserver/", + "http://mapserver:8080/mapserv_proxy/", {"SERVICE": "WMS", "REQUEST": "GetCapabilities", "MAP": "MainPNG"}, 60, ), @@ -25,7 +25,6 @@ {"SERVICE": "WMS", "REQUEST": "GetCapabilities", "MAP": "/etc/qgisserver/project.qgs"}, 60, ), - # TODO adapt ( "https://front/mapserv_proxy", {"ogcserver": "Main PNG", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, @@ -36,6 +35,17 @@ {"ogcserver": "QGIS server", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60, ), + # OGC API - Features + ( + "https://mapserver:8080/mapserv_proxy/MainPNG/ogcapi/collections/osm_open/items", + {"ogcserver": "Main PNG", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + 60, + ), + ( + "https://qgisserver:8080/mapserv_proxy/wfs3/collections/points/items", + {"map": "/etc/qgisserver/project.qgs", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + 60, + ), ], ) def test_url(url: str, params: dict[str, str], timeout: int) -> None: diff --git a/ui/src/interfaces/ControllerDesktop.ts b/ui/src/interfaces/ControllerDesktop.ts index ecabc54d4..2780d0198 100644 --- a/ui/src/interfaces/ControllerDesktop.ts +++ b/ui/src/interfaces/ControllerDesktop.ts @@ -66,12 +66,12 @@ class Controller extends AbstractDesktopController { // console.log(features); // }); - // MapServer route: /mapserv_proxy/mapserver//ogcapi/* + // MapServer route: /mapserv_proxy//ogcapi/* fetch( - 'https://localhost:8484/mapserv_proxy/mapserver//ogcapi/collections//items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0', + 'https://localhost:8484/mapserv_proxy//ogcapi/collections//items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0', ); fetch( - 'http://localhost:8090/mapserv_proxy/mapserver/MainPNG/ogcapi/collections/osm_open/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0&ogcserver=MainPNG', + 'http://localhost:8090/mapserv_proxy/MainPNG/ogcapi/collections/osm_open/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0&ogcserver=MainPNG', ); // QGISServer route: /mapserv_proxy//wfs3/*