Product Storage born

This commit is contained in:
Luis Fernando Molina committed 2018-03-11 19:33:36 +01:00
1 parent 674ce0a705
commit 100eb21689
7 files changed
+49 -33

No files matched your search

Binary file not shown.
+1 -1
View File
@@ -97,7 +97,7 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="SpreadChart.js" />
<Compile Include="Storage.js">
<Compile Include="ProductStorage.js">
<SubType>Code</SubType>
</Compile>
<Compile Include="temp.js" />
+4 -2
View File
@@ -18,14 +18,16 @@ function newFileCloud() {
}
function getFile(pSet, pDevTeam, pBot, pExchange, pMarket, pPeriodName, pDatetime, callBackFunction) {
function getFile(pDevTeam, pBot, pSet, pExchange, pMarket, pPeriodName, pDatetime, callBackFunction) {
let fileName = pSet.fileName;
let filePath = pSet.filePath;
if (fileName === undefined) {
console.log("Inconsistant data. Check the following. ");
console.log("Inconsistant data. Check the following: ");
console.log(JSON.stringify(pDevTeam));
console.log(JSON.stringify(pBot));
console.log(JSON.stringify(pSet));
console.log(JSON.stringify(pExchange));
console.log(JSON.stringify(pMarket));
+1 -1
View File
@@ -1,5 +1,5 @@

function newStorage(pName) {
function newProductStorage(pName) {
const CONSOLE_LOG = false;
+1 -1
View File
@@ -112,7 +112,7 @@ function newTimelineChart() {
/* Before Initializing a Plotter, we need the Storage it will use, loaded with the files it will initially need. */
let objName = pProductCard.devTeam.codeName + "-" + pProductCard.bot.codeName + "-" + pProductCard.product.codeName;
let storage = newStorage(objName);
let storage = newProductStorage(objName);
/*
+1 -1
View File
@@ -7,7 +7,7 @@
<!--Plotters-->
<script type="text/javascript" src="Plotters.js"></script>
<script type="text/javascript" src="Storage.js"></script>
<script type="text/javascript" src="ProductStorage.js"></script>
<script type="text/javascript" src="ProductCard.js"></script>
<script type="text/javascript" src="Ecosystem.js"></script>
<script type="text/javascript" src="File.js"></script>
+41 -27
View File
@@ -375,29 +375,36 @@ function onBrowserRequest(request, response) {
' break;' + '\n' + '\n'
let devTeams = ecosystemObject.devTeams;
let competitionHosts = ecosystemObject.competitionHosts;
for (let i = 0; i < devTeams.length; i++) {
addToFileContent(devTeams);
addToFileContent(competitionHosts);
let devTeam = devTeams[i];
function addToFileContent(pDevTeamsOrCompetitionHosts) {
for (let j = 0; j < devTeam.plotters.length; j++) {
for (let i = 0; i < pDevTeamsOrCompetitionHosts.length; i++) {
let plotter = devTeam.plotters[j];
let devTeam = pDevTeamsOrCompetitionHosts[i];
let caseStringCopy = caseString;
for (let j = 0; j < devTeam.plotters.length; j++) {
let newFunctionName = devTeam.codeName + plotter.repo + plotter.moduleName;
newFunctionName = newFunctionName.replace(/-/g, "");
let plotter = devTeam.plotters[j];
let stringToInsert;
stringToInsert = caseStringCopy.replace('@newFunctionName@', newFunctionName);
stringToInsert = stringToInsert.replace('newPlotterName', 'new' + newFunctionName);
let caseStringCopy = caseString;
let firstPart = fileContent.substring(0,fileContent.indexOf('// Cases'));
let secondPart = fileContent.substring(fileContent.indexOf('// Cases'));
let newFunctionName = devTeam.codeName + plotter.repo + plotter.moduleName;
newFunctionName = newFunctionName.replace(/-/g, "");
fileContent = firstPart + stringToInsert + secondPart;
let stringToInsert;
stringToInsert = caseStringCopy.replace('@newFunctionName@', newFunctionName);
stringToInsert = stringToInsert.replace('newPlotterName', 'new' + newFunctionName);
let firstPart = fileContent.substring(0, fileContent.indexOf('// Cases'));
let secondPart = fileContent.substring(fileContent.indexOf('// Cases'));
fileContent = firstPart + stringToInsert + secondPart;
}
}
}
@@ -516,29 +523,36 @@ function onBrowserRequest(request, response) {
' <script type="text/javascript" src="Plotters/@devTeam@/@repo@/@module@.js"></script>'
let devTeams = ecosystemObject.devTeams;
let competitionHosts = ecosystemObject.competitionHosts;
for (let i = 0; i < devTeams.length; i++) {
addScript(devTeams);
addScript(competitionHosts);
let devTeam = devTeams[i];
function addScript(pDevTeamsOrCompetitionHosts) {
for (let j = 0; j < devTeam.plotters.length; j++) {
for (let i = 0; i < pDevTeamsOrCompetitionHosts.length; i++) {
let plotter = devTeam.plotters[j];
let devTeam = pDevTeamsOrCompetitionHosts[i];
/* Now each of these layers has a plotter that we need to define on the Plotter.js file. */
for (let j = 0; j < devTeam.plotters.length; j++) {
let htmlLineCopy = htmlLine;
let plotter = devTeam.plotters[j];
let stringToInsert;
stringToInsert = htmlLineCopy.replace('@devTeam@', devTeam.codeName);
stringToInsert = stringToInsert.replace('@repo@', plotter.repo);
stringToInsert = stringToInsert.replace('@module@', plotter.moduleName);
/* Now each of these layers has a plotter that we need to define on the Plotter.js file. */
let firstPart = fileContent.substring(0, fileContent.indexOf('<!--Plotters-->') + 15);
let secondPart = fileContent.substring(fileContent.indexOf('<!--Plotters-->') + 15);
let htmlLineCopy = htmlLine;
fileContent = firstPart + stringToInsert + secondPart;
let stringToInsert;
stringToInsert = htmlLineCopy.replace('@devTeam@', devTeam.codeName);
stringToInsert = stringToInsert.replace('@repo@', plotter.repo);
stringToInsert = stringToInsert.replace('@module@', plotter.moduleName);
let firstPart = fileContent.substring(0, fileContent.indexOf('<!--Plotters-->') + 15);
let secondPart = fileContent.substring(fileContent.indexOf('<!--Plotters-->') + 15);
fileContent = firstPart + stringToInsert + secondPart;
}
}
}