Writting to the storage

This commit is contained in:
Luis Fernando Molina committed 2018-05-23 08:31:12 +02:00
1 parent 600c79506b
commit 3295e91d5f
6 files changed
+154 -70

No files matched your search

+147
View File
@@ -0,0 +1,147 @@
/*
This module is for enabling the AACloud to run at the browser.
When running at the clode on NodeJS some things work diffently that at the browser. That gap will be fixed by the functions at this module.
*/
function runBot() {
window.CURRENT_ENVIRONMENT = "Develop";
window.STORAGE_PERMISSIONS = ecosystem.getStoragePermissions();
window.EXCHANGE_KEYS = ecosystem.getExchangeKeys();
let root = newRoot();
root.initialize(onInitialized);
function onInitialized() {
root.start();
}
}
function webRequire(pModulePath) {
switch (pModulePath) {
case 'fs': {
return newWebFS();
}
case 'azure-storage': {
return AzureStorage.Blob;
}
case './EventHandler': {
let MODULE = {};
MODULE.newEventHandler = newEventHandler;
return MODULE;
}
case './BlobStorage': {
let MODULE = {};
MODULE.newBlobStorage = newBlobStorage;
return MODULE;
}
case './DebugLog': {
let MODULE = {};
MODULE.newDebugLog = newDebugLog;
return MODULE;
}
case './TradingBotProcessMainLoop': {
let MODULE = {};
MODULE.newTradingBotProcessMainLoop = newTradingBotProcessMainLoop;
return MODULE;
}
case './ExtractionBotProcessMainLoop': {
let MODULE = {};
MODULE.newExtractionBotProcessMainLoop = newExtractionBotProcessMainLoop;
return MODULE;
}
case './IndicatorBotProcessMainLoop': {
let MODULE = {};
MODULE.newIndicatorBotProcessMainLoop = newIndicatorBotProcessMainLoop;
return MODULE;
}
case './CloudUtilities': {
let MODULE = {};
MODULE.newCloudUtilities = newCloudUtilities;
return MODULE;
}
case './PoloniexAPIClient': {
let MODULE = {};
MODULE.newPoloniexAPIClient = newPoloniexAPIClient;
return MODULE;
}
case './ExchangeAPI': {
let MODULE = {};
MODULE.newExchangeAPI = newExchangeAPI;
return MODULE;
}
case './Context': {
let MODULE = {};
MODULE.newContext = newContext;
return MODULE;
}
case './Assistant': {
let MODULE = {};
MODULE.newAssistant = newAssistant;
return MODULE;
}
case './StatusReport': {
let MODULE = {};
MODULE.newStatusReport = newStatusReport;
return MODULE;
}
case './DataSet': {
let MODULE = {};
MODULE.newDataSet = newDataSet;
return MODULE;
}
case './StatusDependencies': {
let MODULE = {};
MODULE.newStatusDependencies = newStatusDependencies;
return MODULE;
}
case './DataDependencies': {
let MODULE = {};
MODULE.newDataDependencies = newDataDependencies;
return MODULE;
}
default: {
console.log(pModulePath + " not found. ");
}
}
}
function downloadModule(pPath) {
/* We will need this to load individual bots modules. */
Requirejs(["Scripts/DummyWeb"], function (DummyWeb) {
console.log("Dummy Web Loaded");
});
}
View File
File renamed without changes.
+3 -3
View File
@@ -35,10 +35,10 @@
<Compile Include="Server\Permissions.js">
<SubType>Code</SubType>
</Compile>
<Compile Include="WebVM\CloudSupport.js">
<Compile Include="CloudVM\CloudSupport.js">
<SubType>Code</SubType>
</Compile>
<Compile Include="WebVM\WebFS.js">
<Compile Include="CloudVM\WebFS.js">
<SubType>Code</SubType>
</Compile>
<Compile Include="FloatingSpace\Note.js">
@@ -153,7 +153,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Azure\" />
<Folder Include="WebVM\" />
<Folder Include="CloudVM\" />
<Folder Include="Files\" />
<Folder Include="FloatingSpace\" />
<Folder Include="Scripts\" />
-63
View File
@@ -1,63 +0,0 @@
/*
This module is for enabling the AACloud to run at the browser.
When running at the clode on NodeJS some things work diffently that at the browser. That gap will be fixed by the functions at this module.
*/
function runBot() {
window.CURRENT_ENVIRONMENT = "Develop";
window.STORAGE_PERMISSIONS = ecosystem.getStoragePermissions();
window.EXCHANGE_KEYS = ecosystem.getExchangeKeys();
let root = newRoot();
root.initialize(onInitialized);
function onInitialized() {
root.start();
}
}
function webRequire(pModulePath) {
switch (pModulePath) {
case 'fs': {
return newWebFS();
}
case './BlobStorage': {
return newBlobStorage();
}
case 'azure-storage': {
return AzureStorage.Blob;
}
case './DebugLog': {
return newDebugLog();
}
}
}
function downloadModule(pPath) {
/* We will need this to load individual bots modules. */
Requirejs(["Scripts/DummyWeb"], function (DummyWeb) {
console.log("Dummy Web Loaded");
});
}
+2 -2
View File
@@ -10,8 +10,8 @@
<script type="text/javascript" src="Scripts/Require.js"></script>
<script type="text/javascript" src="WebVM/CloudSupport.js"></script>
<script type="text/javascript" src="WebVM/WebFS.js"></script>
<script type="text/javascript" src="CloudVM/CloudSupport.js"></script>
<script type="text/javascript" src="CloudVM/WebFS.js"></script>
<script type="text/javascript" src="WebDebugLog.js"></script>
<script type="text/javascript" src="NewBot.js"></script>
+2 -2
View File
@@ -346,10 +346,10 @@ function onBrowserRequest(request, response) {
}
break;
case "WebVM": // This means the Scripts folder.
case "CloudVM": // This means the Scripts folder.
{
respondWithFile('./WebVM/' + requestParameters[2], response);
respondWithFile('./CloudVM/' + requestParameters[2], response);
}
break;