From c8f5acffbbbda22c14ab392fd8341c1a2c02b83f Mon Sep 17 00:00:00 2001 From: stefano bovio Date: Tue, 23 Aug 2022 10:25:00 +0200 Subject: [PATCH] [Fixes #1156] Remove duplicated data download plugin (#1162) --- .../js/plugins/actionnavbar/buttons.jsx | 21 +--- .../client/js/plugins/index.js | 13 --- .../static/mapstore/configs/localConfig.json | 105 +----------------- 3 files changed, 2 insertions(+), 137 deletions(-) diff --git a/geonode_mapstore_client/client/js/plugins/actionnavbar/buttons.jsx b/geonode_mapstore_client/client/js/plugins/actionnavbar/buttons.jsx index b0c76d1581..33371a0d84 100644 --- a/geonode_mapstore_client/client/js/plugins/actionnavbar/buttons.jsx +++ b/geonode_mapstore_client/client/js/plugins/actionnavbar/buttons.jsx @@ -112,25 +112,6 @@ export const FullScreenActionButton = connect(createSelector([ ); }); -export const DataDownloadActionButton = connect( - () => ({}), - { onClick: setControlProperty.bind(null, 'layerdownload', 'enabled', true, true) } -)(({ - onClick, - variant, - size -}) => { - return ( - - ); -}); - export const LayerDownloadActionButton = connect( () => ({}), { onClick: setControlProperty.bind(null, 'layerdownload', 'enabled', true, true) } @@ -145,7 +126,7 @@ export const LayerDownloadActionButton = connect( size={size} onClick={() => onClick()} > - + ); }); diff --git a/geonode_mapstore_client/client/js/plugins/index.js b/geonode_mapstore_client/client/js/plugins/index.js index e6575e8a08..d6d37a8059 100644 --- a/geonode_mapstore_client/client/js/plugins/index.js +++ b/geonode_mapstore_client/client/js/plugins/index.js @@ -14,7 +14,6 @@ import { CatalogActionButton, MeasureActionButton, LayerDownloadActionButton, - DataDownloadActionButton, AnnotationsActionButton, FullScreenActionButton, FilterLayerActionButton @@ -117,18 +116,6 @@ export const plugins = { } } ), - DataDownloadPlugin: toLazyPlugin( - 'LayerDownload', - () => import(/* webpackChunkName: 'plugins/data-download' */ '@mapstore/framework/plugins/LayerDownload'), - { - containers: { - ActionNavbar: { - name: 'DataDownload', - Component: DataDownloadActionButton - } - } - } - ), SwipePlugin: toLazyPlugin( 'Swipe', () => import(/* webpackChunkName: 'plugins/swipe' */ '@mapstore/framework/plugins/Swipe') diff --git a/geonode_mapstore_client/client/static/mapstore/configs/localConfig.json b/geonode_mapstore_client/client/static/mapstore/configs/localConfig.json index 941d4ade90..8e57f0397f 100644 --- a/geonode_mapstore_client/client/static/mapstore/configs/localConfig.json +++ b/geonode_mapstore_client/client/static/mapstore/configs/localConfig.json @@ -935,7 +935,7 @@ "items": [ { "type": "plugin", - "name": "DataDownload" + "name": "LayerDownload" }, { "type": "plugin", @@ -1281,109 +1281,6 @@ { "name": "AddLayer" }, - { - "name": "DataDownload", - "cfg": { - "formats": [ - { - "name": "application/json", - "label": "GeoJSON", - "type": "vector", - "validServices": [ - "wps" - ] - }, - { - "name": "application/arcgrid", - "label": "ArcGrid", - "type": "raster", - "validServices": [ - "wps" - ] - }, - { - "name": "image/tiff", - "label": "TIFF", - "type": "raster", - "validServices": [ - "wps" - ] - }, - { - "name": "image/png", - "label": "PNG", - "type": "raster", - "validServices": [ - "wps" - ] - }, - { - "name": "image/jpeg", - "label": "JPEG", - "type": "raster", - "validServices": [ - "wps" - ] - }, - { - "name": "application/wfs-collection-1.0", - "label": "GML (FeatureCollection)", - "type": "vector", - "validServices": [ - "wps" - ] - }, - { - "name": "application/wfs-collection-1.1", - "label": "GML (WFS 1.1.0 FeatureCollection)", - "type": "vector", - "validServices": [ - "wps" - ] - }, - { - "name": "application/zip", - "label": "Shapefile", - "type": "vector", - "validServices": [ - "wps" - ] - }, - { - "name": "text/csv", - "label": "CSV", - "type": "vector", - "validServices": [ - "wps" - ] - }, - { - "name": "application/geopackage+sqlite3", - "label": "GeoPackage", - "type": "vector", - "validServices": [ - "wps" - ] - }, - { - "name": "application/geopackage+sqlite3", - "label": "GeoPackage", - "type": "raster", - "validServices": [ - "wps" - ] - }, - { - "name": "application/vnd.google-earth.kml+xml", - "label": "KML", - "type": "vector", - "validServices": [ - "wps" - ] - } - ] - } - }, { "name": "FilterLayer" },