From a8a06f00db577388ae7b8e21d115fe2fc4230e6b Mon Sep 17 00:00:00 2001 From: Jan Vrobel Date: Mon, 28 Jul 2025 15:53:04 +0200 Subject: [PATCH 1/2] Update map file requests to use UUID instead of workspace/name. --- pages/index.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pages/index.js b/pages/index.js index 6aac6a8..d2648fe 100644 --- a/pages/index.js +++ b/pages/index.js @@ -72,7 +72,7 @@ const endpointToUrlPartGetter = { 'maps': () => `/maps`, 'workspace-maps': ({workspace}) => `/workspaces/${workspace}/maps`, 'workspace-map': ({workspace, mapname}) => `/workspaces/${workspace}/maps/${mapname}`, - 'workspace-map-file': ({workspace, mapname}) => `/workspaces/${workspace}/maps/${mapname}/file`, + 'map-file': ({uuid}) => `/maps/${uuid}/file`, 'map-thumbnail': ({uuid}) => `/maps/${uuid}/thumbnail`, 'workspace-map-metadata-comparison': ({workspace, mapname}) => `/workspaces/${workspace}/maps/${mapname}/metadata-comparison`, 'users': () => `/users`, @@ -93,7 +93,7 @@ const endpointToPathParams = { 'maps': [], 'workspace-maps': ['workspace'], 'workspace-map': ['workspace', 'name'], - 'workspace-map-file': ['workspace', 'name'], + 'map-file': ['uuid'], 'map-thumbnail': ['uuid'], 'workspace-map-metadata-comparison': ['workspace', 'name'], 'users': [], @@ -111,7 +111,7 @@ const endpointToPathParamsClass = { 'workspace-layer-metadata-comparison': WorkspaceLayerPathParams, 'workspace-maps': WorkspacePathParams, 'workspace-map': WorkspaceMapPathParams, - 'workspace-map-file': WorkspaceMapPathParams, + 'map-file': UuidParams, 'map-thumbnail': UuidParams, 'workspace-map-metadata-comparison': WorkspaceMapPathParams, } @@ -143,7 +143,7 @@ const getEndpointDefaultParamsState = (endpoint, state) => { 'workspace-layer-metadata-comparison': ({layername}) => ({layername}), 'workspace-maps': () => ({mapname: ''}), 'workspace-map': ({mapname}) => ({mapname}), - 'workspace-map-file': ({mapname}) => ({mapname}), + 'map-file': ({uuid}) => ({uuid}), 'map-thumbnail': ({uuid}) => ({uuid}), 'workspace-map-metadata-comparison': ({mapname}) => ({mapname}), } @@ -193,7 +193,7 @@ const getEndpointParamsProps = (endpoint, component) => { 'maps': {}, 'workspace-maps': workspace_props, 'workspace-map': map_props, - 'workspace-map-file': map_props, + 'map-file': map_uuid_props, 'map-thumbnail': map_uuid_props, 'workspace-map-metadata-comparison': map_props, 'users': {}, @@ -743,6 +743,20 @@ class IndexPage extends React.PureComponent { x x + + Map File + /rest/maps/<uuid>/file + + + + x + x + x + Workspace Maps /rest/workspaces/<workspace_name>/maps @@ -795,20 +809,6 @@ class IndexPage extends React.PureComponent { >DELETE - - Workspace Map File - /rest/workspaces/<workspace_name>/maps/<mapname>/file - - - - x - x - x - Workspace Map Metadata Comparison /rest/workspaces/<workspace_name>/maps/<mapname>/metadata-comparison From 785ee0c0fd0b9e7fbfa2846dbd931bc5fef7891a Mon Sep 17 00:00:00 2001 From: Jan Vrobel Date: Tue, 12 Aug 2025 15:43:01 +0200 Subject: [PATCH 2/2] Update layer style requests to use UUID instead of workspace/name. --- pages/index.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pages/index.js b/pages/index.js index d2648fe..2804224 100644 --- a/pages/index.js +++ b/pages/index.js @@ -67,7 +67,7 @@ const endpointToUrlPartGetter = { 'workspace-layers': ({workspace}) => `/workspaces/${workspace}/layers`, 'workspace-layer': ({workspace, layername}) => `/workspaces/${workspace}/layers/${layername}`, 'layer-thumbnail': ({uuid}) => `/layers/${uuid}/thumbnail`, - 'workspace-layer-style': ({workspace, layername}) => `/workspaces/${workspace}/layers/${layername}/style`, + 'layer-style': ({uuid}) => `/layers/${uuid}/style`, 'workspace-layer-metadata-comparison': ({workspace, layername}) => `/workspaces/${workspace}/layers/${layername}/metadata-comparison`, 'maps': () => `/maps`, 'workspace-maps': ({workspace}) => `/workspaces/${workspace}/maps`, @@ -88,7 +88,7 @@ const endpointToPathParams = { 'workspace-layers': ['workspace'], 'workspace-layer': ['workspace', 'name'], 'layer-thumbnail': ['uuid'], - 'workspace-layer-style': ['workspace', 'name'], + 'layer-style': ['uuid'], 'workspace-layer-metadata-comparison': ['workspace', 'name'], 'maps': [], 'workspace-maps': ['workspace'], @@ -107,7 +107,7 @@ const endpointToPathParamsClass = { 'workspace-layers': WorkspacePathParams, 'workspace-layer': WorkspaceLayerPathParams, 'layer-thumbnail': UuidParams, - 'workspace-layer-style': WorkspaceLayerPathParams, + 'layer-style': UuidParams, 'workspace-layer-metadata-comparison': WorkspaceLayerPathParams, 'workspace-maps': WorkspacePathParams, 'workspace-map': WorkspaceMapPathParams, @@ -139,7 +139,7 @@ const getEndpointDefaultParamsState = (endpoint, state) => { 'workspace-layers': () => ({layername: ''}), 'workspace-layer': ({layername}) => ({layername}), 'layer-thumbnail': ({uuid}) => ({uuid}), - 'workspace-layer-style': ({layername}) => ({layername}), + 'layer-style': ({uuid}) => ({uuid}), 'workspace-layer-metadata-comparison': ({layername}) => ({layername}), 'workspace-maps': () => ({mapname: ''}), 'workspace-map': ({mapname}) => ({mapname}), @@ -188,7 +188,7 @@ const getEndpointParamsProps = (endpoint, component) => { 'workspace-layers': workspace_props, 'workspace-layer': layer_props, 'layer-thumbnail': layer_uuid_props, - 'workspace-layer-style': layer_props, + 'layer-style': layer_uuid_props, 'workspace-layer-metadata-comparison': layer_props, 'maps': {}, 'workspace-maps': workspace_props, @@ -612,6 +612,20 @@ class IndexPage extends React.PureComponent { x x + + Layer Style + /rest/layers/<uuid>/style + + + + x + x + x + Workspace Layers /rest/workspaces/<workspace_name>/layers @@ -664,20 +678,6 @@ class IndexPage extends React.PureComponent { >DELETE - - Workspace Layer Style - /rest/workspaces/<workspace_name>/layers/<layername>/style - - - - x - x - x - Workspace Layer Metadata Comparison /rest/workspaces/<workspace_name>/layers/<layername>/metadata-comparison