Commit 82045447 authored by Andrew Cohen's avatar Andrew Cohen

toProcessQ - don't remove prefix a second time on cached Q

parent 673d5a76
......@@ -173,8 +173,6 @@ function buildProcessTables(Q)
var row=row=tbl.insertRow();
var leverFile=Q.toProcessQ[i].leverFile;
leverFile=leverFile.substring(ROOT.length+1);
row.innerHTML='<td>+'+(i+1)+': </td><td class="processRow">'+leverFile+'</td>'+
'<td class="processRow">'+Q.toProcessQ[i].command+'</td>'+
'<td class="processRow">'+Q.toProcessQ[i].time+'</td>';
......
......@@ -16,7 +16,9 @@ for f=1:length(leverList)
end
url=[SERVER leverList{f} '/trackList/5'];
trackList=webread(url);
if isempty(trackList)
continue
end
nFusion= length(find([trackList.t0]>1))/length(trackList);
nFission = length(find([trackList.t1]<max([trackList.t1])))/length(trackList);
fissionEvents{idx}=[fissionEvents{idx};nFission];
......@@ -25,8 +27,8 @@ for f=1:length(leverList)
end
median(fissionEvents{1})
median(fissionEvents{2})
ission12=[median(fissionEvents{1}), median(fissionEvents{2})]
[p,h]=ranksum(fissionEvents{1},fissionEvents{2})
fusion12=[median(fusionEvents{1}) median(fusionEvents{2})]
[p,h]=ranksum(fusionEvents{1},fusionEvents{2})
median(fusionEvents{1})
median(fusionEvents{2})
......@@ -179,13 +179,17 @@ app.post('/killProcessAll/',checkLWT, function(req,res) {
app.get('/processQ', function(req,res) {
const process=require('./leverjs/process.js');
const path=require('path');
var rootStd=path.resolve(ROOT);
var Q=process.getQ(function(Q) {
// remove root from each
for (var i=0;i<Q.inProcessQ.length;i++) {
Q.inProcessQ[i].leverFile=Q.inProcessQ[i].leverFile.substring(ROOT.length+1);
}
for (var i=0;i<Q.toProcessQ.length;i++) {
Q.toProcessQ[i].leverFile=Q.toProcessQ[i].leverFile.substring(ROOT.length+1);
var lf=path.resolve(Q.toProcessQ[i].leverFile);
if (lf.indexOf(rootStd)>=0)
Q.toProcessQ[i].leverFile=Q.toProcessQ[i].leverFile.substring(ROOT.length+1);
}
res.send(JSON.stringify(Q))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment