From 2edb7817bd0a83c8c4c1b45d075d18f10c8a1912 Mon Sep 17 00:00:00 2001 From: David Quartey <42542676+DavidQuartz@users.noreply.github.com> Date: Tue, 5 Apr 2022 14:31:16 +0000 Subject: [PATCH] Added global extensions folder (#895) --- geonode_mapstore_client/client/package.json | 2 +- geonode_mapstore_client/context_processors.py | 1 + .../templates/geonode-mapstore-client/_geonode_config.html | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/geonode_mapstore_client/client/package.json b/geonode_mapstore_client/client/package.json index edd0b25891..c3c1958fb3 100644 --- a/geonode_mapstore_client/client/package.json +++ b/geonode_mapstore_client/client/package.json @@ -26,7 +26,7 @@ "author": "GeoSolutions", "license": "BSD-2-Clause", "devDependencies": { - "@mapstore/project": "1.0.20", + "@mapstore/project": "1.0.21", "dotenv": "10.0.0", "jsdoc-to-markdown": "7.1.0" }, diff --git a/geonode_mapstore_client/context_processors.py b/geonode_mapstore_client/context_processors.py index 9bc09357dc..e55c9948e0 100644 --- a/geonode_mapstore_client/context_processors.py +++ b/geonode_mapstore_client/context_processors.py @@ -37,6 +37,7 @@ def resource_urls(request): 'TRANSLATIONS_PATH': getattr(settings, "MAPSTORE_TRANSLATIONS_PATH", ['/static/mapstore/ms-translations', '/static/mapstore/gn-translations']), 'PROJECTION_DEFS': getattr(settings, "MAPSTORE_PROJECTION_DEFS", []), 'PLUGINS_CONFIG_PATCH_RULES': getattr(settings, "MAPSTORE_PLUGINS_CONFIG_PATCH_RULES", []), + 'EXTENSIONS_FOLDER_PATH': getattr(settings, "MAPSTORE_EXTENSIONS_FOLDER_PATH", '/static/mapstore/extensions/'), 'TIME_ENABLED': getattr( settings, 'UPLOADER', diff --git a/geonode_mapstore_client/templates/geonode-mapstore-client/_geonode_config.html b/geonode_mapstore_client/templates/geonode-mapstore-client/_geonode_config.html index e0a5fb5216..1d1af27f81 100644 --- a/geonode_mapstore_client/templates/geonode-mapstore-client/_geonode_config.html +++ b/geonode_mapstore_client/templates/geonode-mapstore-client/_geonode_config.html @@ -54,6 +54,7 @@ const projectionDefs = geoNodeSettings.PROJECTION_DEFS || []; const pluginsConfigPatchRules = geoNodeSettings.PLUGINS_CONFIG_PATCH_RULES || []; const translationsPath = geoNodeSettings.TRANSLATIONS_PATH; + const extensionsFolder = geoNodeSettings.EXTENSIONS_FOLDER_PATH; const isEmbed = checkBoolean('{{ is_embed }}') || false; const pluginsConfigKey = '{{ plugins_config_key }}'; @@ -76,6 +77,7 @@ url: '{{ PROXY_URL|default:"/proxy/?url=" }}', useCORS: [] }, + extensionsFolder: extensionsFolder, printUrl: geoServerPublicLocation + 'pdf/info.json', bingApiKey: '{% bing_api_key %}', geoNodeApi: {