Renamed /getOptions to /options

pull/1/head
Piero Toffanin 2016-09-19 17:25:39 -04:00
rodzic 0bf03d50c6
commit d5a9648fb6
4 zmienionych plików z 16 dodań i 16 usunięć

Wyświetl plik

@ -44,11 +44,11 @@ _Schemes_ : HTTP
[[_paths]]
== Paths
[[_getinfo_get]]
=== GET /getInfo
[[_info_get]]
=== GET /info
==== Description
Retrieves information about this node.
Retrieves information about this node
==== Responses
@ -56,10 +56,10 @@ Retrieves information about this node.
[options="header", cols=".^2,.^14,.^4"]
|===
|HTTP Code|Description|Schema
|*200*|Info|<<_getinfo_get_response_200,Response 200>>
|*200*|Info|<<_info_get_response_200,Response 200>>
|===
[[_getinfo_get_response_200]]
[[_info_get_response_200]]
*Response 200*
[options="header", cols=".^3,.^11,.^4"]
@ -72,8 +72,8 @@ _required_|Current version|string
|===
[[_getoptions_get]]
=== GET /getOptions
[[_options_get]]
=== GET /options
==== Description
Retrieves the command line options that can be passed to process a task
@ -149,7 +149,7 @@ _required_|Images to process, plus an optional GPC file. If included, the GPC fi
|*FormData*|*name* +
_optional_|An optional name to be associated with the task|string|
|*FormData*|*options* +
_optional_|Serialized JSON string of the options to use for processing, as an array of the format: [{name: option1, value: value1}, {name: option2, value: value2}, …]. For example, [{"name":"cmvs-maxImages","value":"500"},{"name":"time","value":true}]. For a list of all options, call /getOptions|string|
_optional_|Serialized JSON string of the options to use for processing, as an array of the format: [{name: option1, value: value1}, {name: option2, value: value2}, …]. For example, [{"name":"cmvs-maxImages","value":"500"},{"name":"time","value":true}]. For a list of all options, call /options|string|
|===

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -92,7 +92,7 @@ let server;
* -
* name: options
* in: formData
* description: 'Serialized JSON string of the options to use for processing, as an array of the format: [{name: option1, value: value1}, {name: option2, value: value2}, ...]. For example, [{"name":"cmvs-maxImages","value":"500"},{"name":"time","value":true}]. For a list of all options, call /getOptions'
* description: 'Serialized JSON string of the options to use for processing, as an array of the format: [{name: option1, value: value1}, {name: option2, value: value2}, ...]. For example, [{"name":"cmvs-maxImages","value":"500"},{"name":"time","value":true}]. For a list of all options, call /options'
* required: false
* type: string
* responses:
@ -408,7 +408,7 @@ app.post('/task/restart', uuidCheck, (req, res) => {
});
/** @swagger
* /getOptions:
* /options:
* get:
* description: Retrieves the command line options that can be passed to process a task
* responses:
@ -442,7 +442,7 @@ app.post('/task/restart', uuidCheck, (req, res) => {
* type: string
* description: Description of what this option does
*/
app.get('/getOptions', (req, res) => {
app.get('/options', (req, res) => {
odmOptions.getOptions((err, options) => {
if (err) res.json({error: err.message});
else res.json(options);
@ -450,9 +450,9 @@ app.get('/getOptions', (req, res) => {
});
/** @swagger
* /getInfo:
* /info:
* get:
* description: Retrieves information about this node.
* description: Retrieves information about this node
* responses:
* 200:
* description: Info
@ -467,7 +467,7 @@ app.get('/getOptions', (req, res) => {
* type: integer
* description: Number of tasks currently being processed or waiting to be processed
*/
app.get('/getInfo', (req, res) => {
app.get('/info', (req, res) => {
res.json({
version: packageJson.version,
currentTaskQueue: taskManager.getQueueCount()

Wyświetl plik

@ -326,7 +326,7 @@ $(function(){
this.showOptions = ko.observable(false);
this.error = ko.observable();
$.get("/getOptions")
$.get("/options")
.done(function(json){
if (json.error) self.error(json.error);
else{