Skip to content

Commit

Permalink
results in html, fix link to results
Browse files Browse the repository at this point in the history
  • Loading branch information
lathoub committed Sep 7, 2024
1 parent 1dbcb5f commit 8fb0204
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 16 deletions.
24 changes: 9 additions & 15 deletions src/apiTemplates/processes/paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"/processes": {
"get": {
"tags": ["Processes"],
"summary": "Processes",
"description": "",
"summary": "Retrieve the list of available processes",
"description": "The process description contains information about inputs and outputs and a link to the execution-endpoint for the process. The Core does not mandate the use of a specific process description to specify the interface of a process.",
"externalDocs": {
"description": "The specification that describes this operation: OGC API - Processes - Part 1",
"url": "https://docs.ogc.org/is/18-062r2/18-062r2.html"
Expand Down Expand Up @@ -48,16 +48,16 @@
"/processes/{{:processId}}": {
"get": {
"tags": ["Processes"],
"summary": "process",
"description": "",
"summary": "Retrieve a process description",
"description": "The process description contains information about inputs and outputs and a link to the execution-endpoint for the process. The Core does not mandate the use of a specific process description to specify the interface of a process. ",
"externalDocs": {
"description": "The specification that describes this operation: OGC API - Processes - Part 1",
"url": "https://docs.ogc.org/is/18-062r2/18-062r2.html"
},
"operationId": "{{:processId}}.getProcesses",
"parameters": [
{
"$ref": "#/components/parameters/fCollection"
"$ref": "#/components/parameters/fProcesses"
}
],
"responses": {
Expand Down Expand Up @@ -94,17 +94,12 @@
"/processes/{{:processId}}/execution": {
"post": {
"tags": ["Processes"],
"description": "Process execution.",
"operationId": "execute{{:processId}}.getProcesses",
"summary": "Process execution",
"description": "Create a new job.",
"operationId": "execute.{{:processId}}.getProcesses",
"requestBody": {
"content": {
"application/json": {
"example": {
"inputs": {
"message": "An optional message.",
"name": "World"
}
},
"schema": {
"$ref": "https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/execute.yaml"
}
Expand Down Expand Up @@ -138,8 +133,7 @@
"500": {
"$ref": "https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/responses/ServerError.yaml"
}
},
"summary": "Process execution"
}
}
}
}
3 changes: 3 additions & 0 deletions src/models/processes/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export function get(neutralUrl, format, jobId, callback) {
undefined
);

if (!neutralUrl.endsWith("jobs"))
neutralUrl = neutralUrl.substr(0, neutralUrl.lastIndexOf("/"));

var content = getContent(neutralUrl, format, jobId, job);

return callback(undefined, content);
Expand Down
2 changes: 1 addition & 1 deletion src/public/api/openapi.json

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions src/views/results.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,19 @@ extends layout.pug

block content

.container
.row
.col-sm-12
br
section#data-collections
h1 Results of job xyz
table.table.table-striped.table-bordered
thead
tr
th Id
th Value
tbody
each output in outputs
tr
td(data-label='id') #{output.id}
td(data-label='value') #{output.value}

0 comments on commit 8fb0204

Please sign in to comment.