Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import {Form} from 'semantic-ui-react'
import PublicationAccessRightsParams from "./PublicationAccessRightsParams";

class PatchWorkspaceMapParams extends React.PureComponent {
class PatchMapParams extends React.PureComponent {

render() {
return (
Expand All @@ -26,5 +26,4 @@ class PatchWorkspaceMapParams extends React.PureComponent {
}
}

export default PatchWorkspaceMapParams;

export default PatchMapParams;
66 changes: 33 additions & 33 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import scrollIntoView from 'scroll-into-view';
import PatchWorkspaceLayerParams from "../components/PatchWorkspaceLayerParams";
import Resumable from "resumablejs";
import PostWorkspaceMapsParams from "../components/PostWorkspaceMapsParams";
import PatchWorkspaceMapParams from "../components/PatchWorkspaceMapParams";
import PatchMapParams from "../components/PatchMapParams";
import WorkspacePathParams from "../components/WorkspacePathParams";
import WorkspaceLayerPathParams from "../components/WorkspaceLayerPathParams";
import WorkspaceMapPathParams from "../components/WorkspaceMapPathParams";
Expand Down Expand Up @@ -51,7 +51,7 @@ const requestToParamsClass = {
'get-maps': GetPublicationsParams,
'get-workspace-maps': GetPublicationsParams,
'post-workspace-maps': PostWorkspaceMapsParams,
'patch-workspace-map': PatchWorkspaceMapParams,
'patch-map': PatchMapParams,
'patch-current-user': PatchCurrentuserParams,
'delete-user': DeleteUserParams,
}
Expand All @@ -71,7 +71,7 @@ const endpointToUrlPartGetter = {
'workspace-layer-metadata-comparison': ({workspace, layername}) => `/workspaces/${workspace}/layers/${layername}/metadata-comparison`,
'maps': () => `/maps`,
'workspace-maps': ({workspace}) => `/workspaces/${workspace}/maps`,
'workspace-map': ({workspace, mapname}) => `/workspaces/${workspace}/maps/${mapname}`,
'map': ({uuid}) => `/maps/${uuid}`,
'map-file': ({uuid}) => `/maps/${uuid}/file`,
'map-thumbnail': ({uuid}) => `/maps/${uuid}/thumbnail`,
'workspace-map-metadata-comparison': ({workspace, mapname}) => `/workspaces/${workspace}/maps/${mapname}/metadata-comparison`,
Expand All @@ -92,7 +92,7 @@ const endpointToPathParams = {
'workspace-layer-metadata-comparison': ['workspace', 'name'],
'maps': [],
'workspace-maps': ['workspace'],
'workspace-map': ['workspace', 'name'],
'map': ['uuid'],
'map-file': ['uuid'],
'map-thumbnail': ['uuid'],
'workspace-map-metadata-comparison': ['workspace', 'name'],
Expand All @@ -110,7 +110,7 @@ const endpointToPathParamsClass = {
'layer-style': UuidParams,
'workspace-layer-metadata-comparison': WorkspaceLayerPathParams,
'workspace-maps': WorkspacePathParams,
'workspace-map': WorkspaceMapPathParams,
'map': UuidParams,
'map-file': UuidParams,
'map-thumbnail': UuidParams,
'workspace-map-metadata-comparison': WorkspaceMapPathParams,
Expand Down Expand Up @@ -142,7 +142,7 @@ const getEndpointDefaultParamsState = (endpoint, state) => {
'layer-style': ({uuid}) => ({uuid}),
'workspace-layer-metadata-comparison': ({layername}) => ({layername}),
'workspace-maps': () => ({mapname: ''}),
'workspace-map': ({mapname}) => ({mapname}),
'map': ({uuid}) => ({uuid}),
'map-file': ({uuid}) => ({uuid}),
'map-thumbnail': ({uuid}) => ({uuid}),
'workspace-map-metadata-comparison': ({mapname}) => ({mapname}),
Expand Down Expand Up @@ -192,7 +192,7 @@ const getEndpointParamsProps = (endpoint, component) => {
'workspace-layer-metadata-comparison': layer_props,
'maps': {},
'workspace-maps': workspace_props,
'workspace-map': map_props,
'map': map_uuid_props,
'map-file': map_uuid_props,
'map-thumbnail': map_uuid_props,
'workspace-map-metadata-comparison': map_props,
Expand Down Expand Up @@ -729,6 +729,32 @@ class IndexPage extends React.PureComponent {
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Map</Table.Cell>
<Table.Cell><code>/rest/maps/&lt;uuid&gt;</code></Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'get-map'}
onClick={this.setRequest.bind(this, 'get-map')}
>GET</Button>
</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'patch-map'}
onClick={this.setRequest.bind(this, 'patch-map')}
>PATCH</Button>
</Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'delete-map'}
onClick={this.setRequest.bind(this, 'delete-map')}
>DELETE</Button>
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Map Thumbnail</Table.Cell>
<Table.Cell><code>/rest/maps/&lt;uuid&gt;/thumbnail</code></Table.Cell>
Expand Down Expand Up @@ -783,32 +809,6 @@ class IndexPage extends React.PureComponent {
>DELETE</Button>
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Workspace Map</Table.Cell>
<Table.Cell><code>/rest/workspaces/&lt;workspace_name&gt;/maps/&lt;mapname&gt;</code></Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'get-workspace-map'}
onClick={this.setRequest.bind(this, 'get-workspace-map')}
>GET</Button>
</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'patch-workspace-map'}
onClick={this.setRequest.bind(this, 'patch-workspace-map')}
>PATCH</Button>
</Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'delete-workspace-map'}
onClick={this.setRequest.bind(this, 'delete-workspace-map')}
>DELETE</Button>
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Workspace Map Metadata Comparison</Table.Cell>
<Table.Cell><code>/rest/workspaces/&lt;workspace_name&gt;/maps/&lt;mapname&gt;/metadata-comparison</code></Table.Cell>
Expand Down