Skip to content
Closed
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
76 changes: 38 additions & 38 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ 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`,
'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`,
Expand All @@ -88,12 +88,12 @@ 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'],
'workspace-map': ['workspace', 'name'],
'workspace-map-file': ['workspace', 'name'],
'map-file': ['uuid'],
'map-thumbnail': ['uuid'],
'workspace-map-metadata-comparison': ['workspace', 'name'],
'users': [],
Expand All @@ -107,11 +107,11 @@ 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,
'workspace-map-file': WorkspaceMapPathParams,
'map-file': UuidParams,
'map-thumbnail': UuidParams,
'workspace-map-metadata-comparison': WorkspaceMapPathParams,
}
Expand Down Expand Up @@ -139,11 +139,11 @@ 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}),
'workspace-map-file': ({mapname}) => ({mapname}),
'map-file': ({uuid}) => ({uuid}),
'map-thumbnail': ({uuid}) => ({uuid}),
'workspace-map-metadata-comparison': ({mapname}) => ({mapname}),
}
Expand Down Expand Up @@ -188,12 +188,12 @@ 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,
'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': {},
Expand Down Expand Up @@ -612,6 +612,20 @@ class IndexPage extends React.PureComponent {
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Layer Style</Table.Cell>
<Table.Cell><code>/rest/layers/&lt;uuid&gt;/style</code></Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'get-layer-style'}
onClick={this.setRequest.bind(this, 'get-layer-style')}
>GET</Button>
</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Workspace Layers</Table.Cell>
<Table.Cell><code>/rest/workspaces/&lt;workspace_name&gt;/layers</code></Table.Cell>
Expand Down Expand Up @@ -664,20 +678,6 @@ class IndexPage extends React.PureComponent {
>DELETE</Button>
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Workspace Layer Style</Table.Cell>
<Table.Cell><code>/rest/workspaces/&lt;workspace_name&gt;/layers/&lt;layername&gt;/style</code></Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'get-workspace-layer-style'}
onClick={this.setRequest.bind(this, 'get-workspace-layer-style')}
>GET</Button>
</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Workspace Layer Metadata Comparison</Table.Cell>
<Table.Cell><code>/rest/workspaces/&lt;workspace_name&gt;/layers/&lt;layername&gt;/metadata-comparison</code></Table.Cell>
Expand Down Expand Up @@ -743,6 +743,20 @@ class IndexPage extends React.PureComponent {
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Map File</Table.Cell>
<Table.Cell><code>/rest/maps/&lt;uuid&gt;/file</code></Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'get-map-file'}
onClick={this.setRequest.bind(this, 'get-map-file')}
>GET</Button>
</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Workspace Maps</Table.Cell>
<Table.Cell><code>/rest/workspaces/&lt;workspace_name&gt;/maps</code></Table.Cell>
Expand Down Expand Up @@ -795,20 +809,6 @@ class IndexPage extends React.PureComponent {
>DELETE</Button>
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Workspace Map File</Table.Cell>
<Table.Cell><code>/rest/workspaces/&lt;workspace_name&gt;/maps/&lt;mapname&gt;/file</code></Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'get-workspace-map-file'}
onClick={this.setRequest.bind(this, 'get-workspace-map-file')}
>GET</Button>
</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</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