Removed AACloud configuration sent through web broser
This commit is contained in:
1 parent
988049e54a
commit
3f022d0653
4 files changed
+6
-115
No files matched your search
@@ -12,7 +12,6 @@ function newEcosystem() {
|
||||
getExchange: getExchange,
|
||||
getPlotter: getPlotter,
|
||||
getPlotterModule: getPlotterModule,
|
||||
getAACloudConfig: getAACloudConfig,
|
||||
initialize: initialize
|
||||
}
|
||||
|
||||
@@ -26,11 +25,6 @@ function newEcosystem() {
|
||||
|
||||
}
|
||||
|
||||
function getAACloudConfig() {
|
||||
|
||||
return ECOSYSTEM.AACloud;
|
||||
}
|
||||
|
||||
function getHost(pHostCodeName) {
|
||||
|
||||
for (let i = 0; i < ECOSYSTEM.hosts.length; i++) {
|
||||
|
||||
+3
-104
@@ -113,7 +113,7 @@
|
||||
ecosystem = ecosystem.trim(); // remove first byte with some encoding.
|
||||
|
||||
ecosystemObject = JSON.parse(ecosystem);
|
||||
readAACloudConfig();
|
||||
readHostsConfigs();
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] ConfigReader -> readEcosystemConfig -> Cloud -> onDataArrived -> Error = " + err);
|
||||
@@ -142,7 +142,7 @@
|
||||
ecosystem = ecosystem.trim(); // remove first byte with some encoding.
|
||||
|
||||
ecosystemObject = JSON.parse(ecosystem);
|
||||
readAACloudConfig();
|
||||
readHostsConfigs();
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] ConfigReader -> readEcosystemConfig -> File System -> onFileRead -> File = " + fileName + " Error = " + err);
|
||||
@@ -172,7 +172,7 @@
|
||||
ecosystem = ecosystem.trim(); // remove first byte with some encoding.
|
||||
|
||||
ecosystemObject = JSON.parse(ecosystem);
|
||||
readAACloudConfig();
|
||||
readHostsConfigs();
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] ConfigReader -> readEcosystemConfig -> Github -> onDataArrived -> Error = " + err);
|
||||
@@ -187,107 +187,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function readAACloudConfig() {
|
||||
|
||||
try {
|
||||
|
||||
if (CONSOLE_LOG === true) { console.log("[INFO] ConfigReader -> readAACloudConfig -> Entering function."); }
|
||||
|
||||
switch (serverConfig.configAndPlugins.Location) {
|
||||
|
||||
case 'Cloud': {
|
||||
|
||||
if (CONSOLE_LOG === true) { console.log("[INFO] ConfigReader -> readAACloudConfig -> Cloud -> Entering Case."); }
|
||||
|
||||
storage.getStorageData('AdvancedAlgos', 'AACloud', 'this.config.json', onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
try {
|
||||
|
||||
if (CONSOLE_LOG === true) { console.log("[INFO] ConfigReader -> readAACloudConfig -> Cloud -> onDataArrived -> Entering function."); }
|
||||
|
||||
let data = pData.toString();
|
||||
data = data.trim(); // remove first byte with some encoding.
|
||||
|
||||
let dataObject = JSON.parse(data);
|
||||
ecosystemObject.AACloud = dataObject;
|
||||
readHostsConfigs();
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] ConfigReader -> readAACloudConfig -> Cloud -> onDataArrived -> Error = " + err);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 'File System': {
|
||||
|
||||
if (CONSOLE_LOG === true) { console.log("[INFO] ConfigReader -> readAACloudConfig -> File System -> Entering Case."); }
|
||||
|
||||
let fs = require('fs');
|
||||
try {
|
||||
let fileName = '../AACloud/this.config.json';
|
||||
fs.readFile(fileName, onFileRead);
|
||||
|
||||
function onFileRead(err, pData) {
|
||||
|
||||
try {
|
||||
|
||||
if (CONSOLE_LOG === true) { console.log("[INFO] ConfigReader -> readAACloudConfig -> File System -> onFileRead -> Entering function."); }
|
||||
|
||||
let data = pData.toString();
|
||||
data = data.trim(); // remove first byte with some encoding.
|
||||
|
||||
let dataObject = JSON.parse(data);
|
||||
ecosystemObject.AACloud = dataObject;
|
||||
readHostsConfigs();
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] ConfigReader -> readAACloudConfig -> File System -> onFileRead -> File = " + fileName + " Error = " + err);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] ConfigReader -> readAACloudConfig -> File System -> File = " + fileName + " Error = " + err);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'Github': {
|
||||
|
||||
if (CONSOLE_LOG === true) { console.log("[INFO] ConfigReader -> readAACloudConfig -> Github -> Entering Case."); }
|
||||
|
||||
github.getGithubData('AdvancedAlgos', 'AAWeb', 'this.config.json', onDataArrived);
|
||||
|
||||
function onDataArrived(pData) {
|
||||
|
||||
try {
|
||||
|
||||
if (CONSOLE_LOG === true) { console.log("[INFO] ConfigReader -> readAACloudConfig -> Github -> onDataArrived -> Entering function."); }
|
||||
|
||||
let data = pData.toString();
|
||||
data = data.trim(); // remove first byte with some encoding.
|
||||
|
||||
let dataObject = JSON.parse(data);
|
||||
ecosystemObject.AACloud = dataObject;
|
||||
readHostsConfigs();
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] ConfigReader -> readAACloudConfig -> Github -> onDataArrived -> Error = " + err);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] ConfigReader -> readAACloudConfig -> Error = " + err);
|
||||
}
|
||||
}
|
||||
|
||||
function readHostsConfigs() {
|
||||
|
||||
try {
|
||||
|
||||
@@ -7,6 +7,8 @@ When running at the clode on NodeJS some things work diffently that at the brows
|
||||
|
||||
*/
|
||||
|
||||
window.CURRENT_ENVIRONMENT = "Develop";
|
||||
|
||||
function runBot() {
|
||||
|
||||
let root = newRoot();
|
||||
|
||||
+1
-5
@@ -29,11 +29,7 @@
|
||||
|
||||
switch (pPath) {
|
||||
|
||||
case 'this.config.json': {
|
||||
|
||||
/* This is AAWeb Config File. */
|
||||
|
||||
return JSON.stringify(ecosystem.getAACloudConfig());
|
||||
case '': {
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user