Merge pull request #437 from Luis-Fernando-Molina/develop

Contribution: Bug Fixed Issue #318. Using # in the name of the trading system didn't show backtest results.
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-01-21 20:15:47 +01:00
commit 6bb37ab10d
4 files changed
+13 -5

No files matched your search

+1 -1
View File
@@ -62,7 +62,7 @@
Jeff Braun, rico4dev, 9808us, Barry Low, Nikola Bjelogrlic, Hirajin Koizuko, Francisco J. Santillán, Norman,
Viktoria B., Guillermo V., Daniel J.,
Javier A., Gustavo J., Romina GS, Pedro P., Thais M., Andrey M., Loui M., Natalia M., Bashar A., Carlos V.,
Diego M.,
Diego M., CarnivalBen,
Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M., Nicanor M., Alejandro P., Mateo H., Lan
T., Leon A., Uroš R., Filip M., Vladimir J. and Pavle B.</p>
<p><span class="credits-red">With Superalgos Beta 8, contributing is easier than ever! Become a contributor!</span></p>
+6 -1
View File
@@ -1349,7 +1349,12 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
case 'Storage':
{
respondWithFile(global.env.PATH_TO_DATA_STORAGE + '/' + httpRequest.url.substring(9), httpResponse)
let pathToFile = httpRequest.url.substring(9)
/* Unsavping # */
for (let i = 0; i < 10; i++) {
pathToFile = pathToFile.replace('HASHTAG', '#')
}
respondWithFile(global.env.PATH_TO_DATA_STORAGE + '/' + pathToFile, httpResponse)
}
break
+1 -1
View File
@@ -261,7 +261,7 @@ Superalgos is a Community Project built by Contributors for Contributors. Learn
## Top Contributors
Luis Fernando Molina, Julian Molina, Andreja Cobeljic, Matías Benitez, Ira Miller, Eduardo Remis, Jeff Braun, rico4dev, 9808us, Barry Low, Nikola Bjelogrlic, Hirajin Koizuko, Francisco J. Santillán, Norman, Viktoria B., Guillermo V., Daniel J., Javier A., Gustavo J., Romina GS, Pedro P., Thais M., Andrey M., Loui M., Natalia M., Bashar A., Carlos V., Diego M., Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M., Nicanor M., Alejandro P., Mateo H., Lan T., Leon A., Uroš R., Filip M., Vladimir J. and Pavle B.
Luis Fernando Molina, Julian Molina, Andreja Cobeljic, Matías Benitez, Ira Miller, Eduardo Remis, Jeff Braun, rico4dev, 9808us, Barry Low, Nikola Bjelogrlic, Hirajin Koizuko, Francisco J. Santillán, Norman, Viktoria B., Guillermo V., Daniel J., Javier A., Gustavo J., Romina GS, Pedro P., Thais M., Andrey M., Loui M., Natalia M., Bashar A., Carlos V., Diego M., CarnivalBen, Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M., Nicanor M., Alejandro P., Mateo H., Lan T., Leon A., Uroš R., Filip M., Vladimir J. and Pavle B.
# License
+5 -2
View File
@@ -2,7 +2,7 @@ function newFileStorage(host, port) {
const MODULE_NAME = 'File Storage'
const INFO_LOG = false
const logger = newWebDebugLog()
const MAX_RETRY = 2
let currentRetry = 0
@@ -37,13 +37,16 @@ function newFileStorage(host, port) {
if (pathComplete === false || pathComplete === undefined) {
folder = 'Storage/'
}
let url = folder + filePath
let url
if (host !== undefined && port !== undefined) {
url = 'http://' + host + ':' + port + '/' + folder + filePath
} else {
url = folder + filePath
}
/* Scaping # since it breaks the URL */
url = url.replaceAll('#', 'HASHTAG')
httpRequest(undefined, url, (response, fileContent) => {
if (response.result === GLOBAL.DEFAULT_OK_RESPONSE.result) {
callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE, fileContent)