Minor MeshCommander fix
This commit is contained in:
parent
3bac19c691
commit
9c522011f6
|
@ -456,8 +456,8 @@ module.exports.CreateAmtRedirect = function (module, domain, user, webserver, me
|
|||
obj.xxSend = function (x) {
|
||||
if (obj.redirTrace) { console.log("REDIR-SEND(" + x.length + "): " + new Buffer(x, "binary").toString('hex'), typeof x); }
|
||||
//obj.Debug("Send(" + x.length + "): " + webserver.common.rstr2hex(x));
|
||||
obj.forwardclient.write(x); // FIXES CIRA
|
||||
//obj.forwardclient.write(new Buffer(x, "binary"));
|
||||
//obj.forwardclient.write(x); // FIXES CIRA
|
||||
obj.forwardclient.write(new Buffer(x, "binary"));
|
||||
}
|
||||
|
||||
obj.Send = function (x) {
|
||||
|
|
|
@ -1181,7 +1181,7 @@ function iderStart(){var b;b='<div>Mount disk images on a Intel® AMT compute
|
|||
setDialogMode(11,"Storage Redirection",3,iderStart2,b);if(b=localStorage.getItem("iderurl"))Q("storageserverurl").value=b.substring(1,b.length-1)}
|
||||
function iderStart2(){if(1!=Q("floppyImageInput").files.length&&1!=Q("cdromImageInput").files.length)messagebox("Storage Redirection Error","At least one disk image file must be selected.");else if(1==Q("floppyImageInput").files.length&&0!=Q("floppyImageInput").files[0].size%512)messagebox("Storage Redirection Error","Invalid .img file.");else if(1==Q("cdromImageInput").files.length&&0!=Q("cdromImageInput").files[0].size%2048)messagebox("Storage Redirection Error","Invalid .iso file.");else{var b=
|
||||
null,c=null;1==Q("floppyImageInput").files.length&&(b=Q("floppyImageInput").files[0]);1==Q("cdromImageInput").files.length&&(c=Q("cdromImageInput").files[0]);iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=Q("iderStartType").value;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0)}}
|
||||
function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
|
||||
function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
|
||||
function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"Server ":"")+"IDE-R Session</b>, Connected, "+ider.m.bytesFromAmt+" in, "+ider.m.bytesToAmt+" out.")}var heatMapWidth=600,heatMapDividor={};
|
||||
function iderSectorStats(b,c,a,d,e){var q=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),k=q.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText","<b>CDROM</b>, blocks are "+2048*heatMapDividor[c]+" bytes.")):(QV("floppyHeatMap",a),QH("floppyHeatMapText","<b>Floppy</b>, blocks are "+512*heatMapDividor[c]+" bytes."))}c=heatMapDividor[c];a/=c;d/=c;e/=c;if(0==b)q.height=6*(Math.floor(a/(heatMapWidth/
|
||||
6))+(a%heatMapWidth?1:0)),k.fillStyle="rgba(225,250,225,1)",k.fillRect(0,0,heatMapWidth,6*Math.floor(a/(heatMapWidth/6))),a%heatMapWidth&&k.fillRect(0,6*Math.floor(a/(heatMapWidth/6)),a%(heatMapWidth/6)*6,6),k.fillStyle="rgba(0,0,0,0.3)";else for(b=d;b<d+e;b++)sectorHeat(k,b,6,c)}function sectorHeat(b,c,a,d){b.fillRect(c%(heatMapWidth/a)*a,Math.floor(c/(heatMapWidth/a))*a,a,a)}
|
||||
|
|
Loading…
Reference in New Issue