From 602e2504e67d758bb3cd7a193a5893ffb71cc402 Mon Sep 17 00:00:00 2001 From: Nathan Nguyen Date: Tue, 16 Feb 2021 18:04:21 -0500 Subject: [PATCH] Reposition input file that match with main webpage --- templates/temp_index.html | 63 +++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/templates/temp_index.html b/templates/temp_index.html index 7bcdeb3..b91cf42 100644 --- a/templates/temp_index.html +++ b/templates/temp_index.html @@ -395,35 +395,37 @@

This is a simulation project, implem //skipsim = contents[4]; //outFile = contents[5]; - DDDstate = contents[0]; - skipsim = contents[1]; - summfile = contents[2]; - logfile = contents[3]; - - - packetsize = new Number(contents[4]); - rtsa = new Number(contents[5]); - maxqueuesize = new Number(contents[6]); - dddmappingdelay = new Number(contents[7]); - propagationdelay = new Number(contents[8]); - numofDDDport = new Number(contents[9]); - timetonextDDDport = new Number(contents[10]); - overlaptimeoldDDD = new Number(contents[11]); - durationSim = new Number(contents[12]); - numbSynAckResends = new Number(contents[13]); - clienttoRouter = new Number(contents[14]); - routertoClient = new Number(contents[15]); - routertoReflector = new Number(contents[16]); - routertoNormal = new Number(contents[17]); - normaltoRouter= new Number(contents[18]); - reflectortoRouter= new Number(contents[19]); - attackertoReflector= new Number(contents[20]); - queueLimit= new Number(contents[21]); - attackerType = new Number(contents[22]); - amplification = new Number(contents[23]); + packetsize = new Number(contents[0]); + rtsa = new Number(contents[1]); + maxqueuesize = new Number(contents[2]); + dddmappingdelay = new Number(contents[3]); + propagationdelay = new Number(contents[4]); + numofDDDport = new Number(contents[5]); + timetonextDDDport = new Number(contents[6]); + overlaptimeoldDDD = new Number(contents[7]); + durationSim = new Number(contents[8]); + numbSynAckResends = new Number(contents[9]); + clienttoRouter = new Number(contents[10]); + routertoClient = new Number(contents[11]); + routertoReflector = new Number(contents[12]); + routertoNormal = new Number(contents[13]); + normaltoRouter= new Number(contents[14]); + reflectortoRouter= new Number(contents[15]); + attackertoReflector= new Number(contents[16]); + queueLimit= new Number(contents[17]); + DDDstate = contents[18]; // booleans + attackerType = new Number(contents[19]); + amplification = new Number(contents[20]); + + + skipsim = contents[21]; // booleans + logfile = contents[22]; // booleans + summfile = contents[23]; // booleans + + console.log(logfile); console.log("The content is " + DDDstate); console.log("Second content is " + skipsim); document.getElementById("DDDstate").value = DDDstate; @@ -469,14 +471,10 @@

This is a simulation project, implem document.getElementById("simOption").checked = false; } - //if(outFile == "Yes" || outFile =="yes"){ - // document.getElementById("downOutput").checked = true; - //} - //else if(outFile == "No" || outFile =="no"){ - // document.getElementById("downOutput").checked = false; - //} + if(summfile =="Yes" || summfile == "yes" || logfile =="Yes" || logfile =="yes"){ document.getElementById("downOutput").checked = true; + if(summfile =="Yes" || summfile == "yes"){ document.getElementById("summfile").checked = true; } @@ -484,6 +482,7 @@

This is a simulation project, implem document.getElementById("summfile").checked = false; } if(logfile =="Yes" || logfile =="yes"){ + document.getElementById("downOutput").checked = checked; document.getElementById("logfile").checked = true; } else if(logfile =="No" || logfile =="no"){