diff --git a/engine/services/technicalComponentDirectory.js b/engine/services/technicalComponentDirectory.js index 9c710d597..2fe9f6f31 100644 --- a/engine/services/technicalComponentDirectory.js +++ b/engine/services/technicalComponentDirectory.js @@ -12,8 +12,7 @@ module.exports = { cacheNosql: require('../workspaceComponentExecutor/cacheNosql.js'), gouvFrInverseGeo: require('../workspaceComponentExecutor/gouvFrInverseGeo.js'), restApiGet: require('../workspaceComponentExecutor/restApiGet.js'), - restApiPost: require('../workspaceComponentExecutor/httpProvider.js'), - httpProvider: require('../workspaceComponentExecutor/httpProvider.js'), + restApiPost: require('../workspaceComponentExecutor/restApiPost.js'), // xmlToObject: require('./workspaceComponentExecutor/xmlToObject.js'), framcalcGetCsv: require('../workspaceComponentExecutor/framcalcGetCsv.js'), gouvFrGeoLocaliser: require('../workspaceComponentExecutor/gouvFrGeoLocaliser.js'), @@ -23,8 +22,7 @@ module.exports = { filter: require('../workspaceComponentExecutor/filter.js'), upload: require('../workspaceComponentExecutor/upload.js'), scrapper: require('../workspaceComponentExecutor/scrapper/scrapper.js'), - httpGet: require('../workspaceComponentExecutor/httpFileConsumer.js'), - httpFileConsumer: require('../workspaceComponentExecutor/httpFileConsumer.js'), + httpGet: require('../workspaceComponentExecutor/restGetFile.js'), sqlConnector: require('../workspaceComponentExecutor/sqlConnecteur.js'), mongoConnector: require('../workspaceComponentExecutor/MongoDB.js'), influxdbConnector: require('../workspaceComponentExecutor/influxdb.js'), @@ -35,8 +33,7 @@ module.exports = { valueFromPath: require('../workspaceComponentExecutor/valueFromPath.js'), unicity: require('../workspaceComponentExecutor/unicity.js'), propertiesMatrix: require('../workspaceComponentExecutor/propertiesMatrix.js'), - postConsumer: require('../workspaceComponentExecutor/httpConsumer.js'), - httpConsumer: require('../workspaceComponentExecutor/httpConsumer.js'), + postConsumer: require('../workspaceComponentExecutor/postConsumer.js'), keyToArray: require('../workspaceComponentExecutor/keyToArray.js'), sftpConsumer: require('../workspaceComponentExecutor/sftpConsumer.js'), flat: require('../workspaceComponentExecutor/flat.js'), diff --git a/engine/workspaceComponentExecutor/httpConsumer.js b/engine/workspaceComponentExecutor/postConsumer.js similarity index 99% rename from engine/workspaceComponentExecutor/httpConsumer.js rename to engine/workspaceComponentExecutor/postConsumer.js index a4f27a4d6..7510241d0 100644 --- a/engine/workspaceComponentExecutor/httpConsumer.js +++ b/engine/workspaceComponentExecutor/postConsumer.js @@ -4,7 +4,7 @@ const fs = require('fs'); const https = require('https'); const fileLib = require('../../core/lib/file_lib.js') -class HttpConsumer { +class PostConsumer { constructor () { this.fetch = require('node-fetch'); this.stringReplacer = require('../utils/stringReplacer.js'); @@ -298,4 +298,4 @@ class HttpConsumer { } } -module.exports = new HttpConsumer() +module.exports = new PostConsumer() diff --git a/engine/workspaceComponentExecutor/httpProvider.js b/engine/workspaceComponentExecutor/restApiPost.js similarity index 88% rename from engine/workspaceComponentExecutor/httpProvider.js rename to engine/workspaceComponentExecutor/restApiPost.js index 599e60a8b..59c1c4012 100644 --- a/engine/workspaceComponentExecutor/httpProvider.js +++ b/engine/workspaceComponentExecutor/restApiPost.js @@ -1,8 +1,8 @@ 'use strict' -class HttpProvider { +class RestApiPost { constructor () { this.stepNode = false - this.workspace_component_lib = require('../../core/lib/workspace_component_lib.js') + this.workspace_component_lib = require('../../core/lib/workspace_component_lib') this.data2xml = require('data2xml') this.dataTraitment = require('../../core/dataTraitmentLibrary/index.js') this.json2yaml = require('json2yaml') @@ -22,4 +22,4 @@ class HttpProvider { } } -module.exports = new HttpProvider() +module.exports = new RestApiPost() diff --git a/engine/workspaceComponentExecutor/httpFileConsumer.js b/engine/workspaceComponentExecutor/restGetFile.js similarity index 97% rename from engine/workspaceComponentExecutor/httpFileConsumer.js rename to engine/workspaceComponentExecutor/restGetFile.js index 643d5b639..3e61b7678 100644 --- a/engine/workspaceComponentExecutor/httpFileConsumer.js +++ b/engine/workspaceComponentExecutor/restGetFile.js @@ -1,5 +1,5 @@ 'use strict'; -class HttpFileConsumer { +class HttpGet { constructor () { this.url = require('url') this.http = require('http') @@ -68,4 +68,4 @@ class HttpFileConsumer { return this.makeRequest('GET', data.specificData.url, data.specificData.contentType,flowdata, pullParams) } } -module.exports = new HttpFileConsumer() +module.exports = new HttpGet() diff --git a/main/client/static/application.html b/main/client/static/application.html index 9193bbc64..909d5f601 100644 --- a/main/client/static/application.html +++ b/main/client/static/application.html @@ -111,7 +111,7 @@ - + diff --git a/main/client/static/tag/editorComponents/dataFlow/http-consumer-editor.tag b/main/client/static/tag/editorComponents/dataFlow/post-consumer-editor.tag similarity index 99% rename from main/client/static/tag/editorComponents/dataFlow/http-consumer-editor.tag rename to main/client/static/tag/editorComponents/dataFlow/post-consumer-editor.tag index cc51e31c0..b1a26f70d 100644 --- a/main/client/static/tag/editorComponents/dataFlow/http-consumer-editor.tag +++ b/main/client/static/tag/editorComponents/dataFlow/post-consumer-editor.tag @@ -1,4 +1,4 @@ - +
Aide @@ -165,4 +165,4 @@ display: none; } - + diff --git a/main/client/static/tag/editorComponents/dataFlow/http-provider-editor.tag b/main/client/static/tag/editorComponents/dataFlow/rest-api-post-editor.tag similarity index 99% rename from main/client/static/tag/editorComponents/dataFlow/http-provider-editor.tag rename to main/client/static/tag/editorComponents/dataFlow/rest-api-post-editor.tag index e4bed51c1..75c4383a3 100644 --- a/main/client/static/tag/editorComponents/dataFlow/http-provider-editor.tag +++ b/main/client/static/tag/editorComponents/dataFlow/rest-api-post-editor.tag @@ -1,4 +1,4 @@ - +
Aide @@ -131,4 +131,4 @@ color:rgb(180,180,180); } - + diff --git a/main/client/static/tag/editorComponents/files/http-file-consumer-editor.tag b/main/client/static/tag/editorComponents/files/rest-get-editor.tag similarity index 98% rename from main/client/static/tag/editorComponents/files/http-file-consumer-editor.tag rename to main/client/static/tag/editorComponents/files/rest-get-editor.tag index 04a152af5..daf09e3a0 100644 --- a/main/client/static/tag/editorComponents/files/http-file-consumer-editor.tag +++ b/main/client/static/tag/editorComponents/files/rest-get-editor.tag @@ -1,4 +1,4 @@ - +
Aide diff --git a/main/server/services/technicalComponentDirectory.js b/main/server/services/technicalComponentDirectory.js index 66228b79b..79c381417 100644 --- a/main/server/services/technicalComponentDirectory.js +++ b/main/server/services/technicalComponentDirectory.js @@ -12,8 +12,7 @@ module.exports = { cacheNosql: require('../workspaceComponentInitialize/cacheNosql.js'), gouvFrInverseGeo: require('../workspaceComponentInitialize/gouvFrInverseGeo.js'), restApiGet: require('../workspaceComponentInitialize/restApiGet.js'), - restApiPost: require('../workspaceComponentInitialize/httpProvider.js'), - httpProvider: require('../workspaceComponentInitialize/httpProvider.js'), + restApiPost: require('../workspaceComponentInitialize/restApiPost.js'), // xmlToObject: require('./workspaceComponentInitialize/xmlToObject.js'), framcalcGetCsv: require('../workspaceComponentInitialize/framcalcGetCsv.js'), gouvFrGeoLocaliser: require('../workspaceComponentInitialize/gouvFrGeoLocaliser.js'), @@ -23,8 +22,7 @@ module.exports = { filter: require('../workspaceComponentInitialize/filter.js'), upload: require('../workspaceComponentInitialize/upload.js'), scrapper: require('../workspaceComponentInitialize/scrapper.js'), - httpGet: require('../workspaceComponentInitialize/httpFileConsumer.js'), - httpFileConsumer: require('../workspaceComponentInitialize/httpFileConsumer.js'), + httpGet: require('../workspaceComponentInitialize/restGetFile.js'), sqlConnector: require('../workspaceComponentInitialize/sqlConnecteur.js'), mongoConnector: require('../workspaceComponentInitialize/MongoDB.js'), influxdbConnector: require('../workspaceComponentInitialize/influxdb.js'), @@ -35,8 +33,7 @@ module.exports = { valueFromPath: require('../workspaceComponentInitialize/valueFromPath.js'), unicity: require('../workspaceComponentInitialize/unicity.js'), propertiesMatrix: require('../workspaceComponentInitialize/propertiesMatrix.js'), - postConsumer: require('../workspaceComponentInitialize/httpConsumer.js'), - httpConsumer: require('../workspaceComponentInitialize/httpConsumer.js'), + postConsumer: require('../workspaceComponentInitialize/postConsumer.js'), keyToArray: require('../workspaceComponentInitialize/keyToArray.js'), sftpConsumer: require('../workspaceComponentInitialize/sftpConsumer.js'), flat: require('../workspaceComponentInitialize/flat.js'), @@ -67,17 +64,17 @@ module.exports = { return directory }, - initialise: function (router, unSafeRouteur, engineTracer) { + initialise: function (router, unSafeRouteur,engineTracer) { // console.log('initialise') - this.httpProvider.initialise(unSafeRouteur, engineTracer) // NO SECURE CHANGE ROUTER - this.restApiGet.initialise(unSafeRouteur, engineTracer) // NO SECURE CHANGE ROUTER - this.upload.initialise(router, engineTracer) - this.cacheNosql.initialise(router, engineTracer) // NO SECURE CHANGE ROUTER + this.restApiPost.initialise(unSafeRouteur,engineTracer) // NO SECURE CHANGE ROUTER + this.restApiGet.initialise(unSafeRouteur,engineTracer) // NO SECURE CHANGE ROUTER + this.upload.initialise(router,engineTracer) + this.cacheNosql.initialise(router,engineTracer) // NO SECURE CHANGE ROUTER }, - setAmqp: function (channel) { + setAmqp : function (channel){ // console.log('setAmqp') - this.httpProvider.setAmqp(channel) + this.restApiPost.setAmqp(channel); this.upload.setAmqp(channel) } } diff --git a/main/server/workspaceComponentInitialize/httpConsumer.js b/main/server/workspaceComponentInitialize/postConsumer.js similarity index 79% rename from main/server/workspaceComponentInitialize/httpConsumer.js rename to main/server/workspaceComponentInitialize/postConsumer.js index a2595a142..3f12bbe93 100644 --- a/main/server/workspaceComponentInitialize/httpConsumer.js +++ b/main/server/workspaceComponentInitialize/postConsumer.js @@ -1,9 +1,9 @@ 'use strict'; -class HttpConsumer { +class PostConsumer { constructor () { this.type = 'HTTP consumer' this.description = 'Appeler une API HTTP; Executer une requête HTTP.' - this.editor = 'http-consumer-editor' + this.editor = 'post-consumer-editor' this.graphIcon = 'Post_consumer.svg' this.tags = [ 'http://semantic-bus.org/data/tags/outComponents', @@ -13,4 +13,4 @@ class HttpConsumer { } } -module.exports = new HttpConsumer() +module.exports = new PostConsumer() diff --git a/main/server/workspaceComponentInitialize/httpProvider.js b/main/server/workspaceComponentInitialize/restApiPost.js similarity index 98% rename from main/server/workspaceComponentInitialize/httpProvider.js rename to main/server/workspaceComponentInitialize/restApiPost.js index 134f26df8..c3cc754d9 100644 --- a/main/server/workspaceComponentInitialize/httpProvider.js +++ b/main/server/workspaceComponentInitialize/restApiPost.js @@ -2,7 +2,7 @@ const { v4: uuidv4 } = require('uuid'); const MODE = 'AMQP' // MODE could be AMQP when all workflow will migrate over V1 -class HttpProvider { +class RestApiPost { constructor() { this.type = 'HTTP provider' this.description = `Mettre à disposition une API HTTP; Permettre à votre workflow d'être appelé par une requete HTTP.` @@ -14,9 +14,9 @@ class HttpProvider { 'http://semantic-bus.org/data/tags/APIComponents' ], this.stepNode = false - this.workspace_component_lib = require('../../../core/lib/workspace_component_lib.js') - this.workspace_lib = require('../../../core/lib/workspace_lib.js') - this.fragment_lib = require('../../../core/lib/fragment_lib.js') + this.workspace_component_lib = require('../../../core/lib/workspace_component_lib') + this.workspace_lib = require('../../../core/lib/workspace_lib') + this.fragment_lib = require('../../../core/lib/fragment_lib') this.data2xml = require('data2xml'); this.xmlJS = require('xml-js'); this.dataTraitment = require('../../../core/dataTraitmentLibrary/index.js') @@ -294,4 +294,4 @@ class HttpProvider { } } -module.exports = new HttpProvider() +module.exports = new RestApiPost() diff --git a/main/server/workspaceComponentInitialize/httpFileConsumer.js b/main/server/workspaceComponentInitialize/restGetFile.js similarity index 68% rename from main/server/workspaceComponentInitialize/httpFileConsumer.js rename to main/server/workspaceComponentInitialize/restGetFile.js index 2bd03f3cf..24a286253 100644 --- a/main/server/workspaceComponentInitialize/httpFileConsumer.js +++ b/main/server/workspaceComponentInitialize/restGetFile.js @@ -1,9 +1,9 @@ 'use strict'; -class HttpFileConsumer { +class HttpGet { constructor () { - this.type = 'HTTP File Consumer' + this.type = 'File consumer' this.description = 'Interroger un fichier mis à disposition sur une API REST avec une requete GET.' - this.editor = 'http-file-consumer-editor' + this.editor = 'rest-get-editor' this.graphIcon = 'File_consumer.svg' this.tags = [ 'http://semantic-bus.org/data/tags/inComponents', @@ -11,4 +11,4 @@ class HttpFileConsumer { ] } } -module.exports = new HttpFileConsumer() +module.exports = new HttpGet()