/*
* getting data from the db
*/
- public List<Pair<String, String>> ReadProteinData(long day) {
+ public DateBean ReadProteinData(long day, String date) {
final long startTime = System.currentTimeMillis();
String com = "SELECT JobID, Protein FROM ProteinData WHERE jobtime = " + day + ";";
System.out.println("Command: " + com);
final long queryTime = System.currentTimeMillis();
List<Row> rows = results.all();
System.out.println("Query time is " + (queryTime - startTime) + " msec");
- List<Pair<String, String>> res = new ArrayList<Pair<String, String>>();
+ DateBean res = new DateBean(date);
int c = 0;
for (Row r : rows) {
- Pair<String, String> pair = new Pair<String, String>(r.getString("JobID"), r.getString("Protein"));
- res.add(pair);
+ res.setJobidAndSeq(r.getString("JobID"), r.getString("Protein"));
++c;
}
final long endTime = System.currentTimeMillis();
/*
* getting data from the db JobDateInfo
*/
- public List<Long> ReadDateTable(long queryDate) {
+ public Total ReadDateTable(long queryDate) {
ResultSet results = session.execute("SELECT * FROM JobDateInfo WHERE jobday = " + queryDate + ";");
if (results.isExhausted())
return null;
Row therow = results.one();
- List<Long> res = new ArrayList<Long>();
- res.add(therow.getLong("Total"));
- res.add(therow.getLong("TotalOK"));
- res.add(therow.getLong("TotalStopped"));
- res.add(therow.getLong("TotalError"));
- res.add(therow.getLong("TotalTimeOut"));
+ Total res = new Total(therow.getLong("Total"), therow.getLong("TotalOK"), therow.getLong("TotalStopped"),
+ therow.getLong("TotalError"), therow.getLong("TotalTimeOut"));
if (!results.isExhausted()) {
Date date = new Date (queryDate);
log.warn("CassandraReader.ReadDateTable: date row for " + date.toString () + " ("+ queryDate + ") duplicated ");
/*
* getting jobs by ip
*/
- public List<Pair<String, String>> ReadIpWithJobs(String ip) {
+ public Map<String, String[]> ReadIpWithJobs(String ip) {
final long startTime = System.currentTimeMillis();
- String com = "SELECT JobID, Protein, FinalStatus FROM ProteinLog WHERE ip = '" + ip + "';";
+ String com = "SELECT JobID, Protein, FinalStatus, DataBegin FROM ProteinLog WHERE ip = '" + ip + "';";
System.out.println("Command: " + com);
ResultSet results = session.execute(com);
if (results.isExhausted())
return null;
final long queryTime = System.currentTimeMillis();
List<Row> rows = results.all();
- List<Pair<String, String>> res = new ArrayList<Pair<String, String>>();
+ Map<String, String[]> res = new HashMap<String, String[]>();
System.out.println("Query time is " + (queryTime - startTime) + " msec");
System.out.println(" rows analysed, " + rows.size());
int c = 0;
for (Row r : rows) {
if (r.getString("FinalStatus").equals("OK")) {
- Pair<String, String> pair = new Pair<String, String>(r.getString("JobID"), r.getString("Protein"));
- System.out.println(pair.getElement0());
- System.out.println(pair.getElement1());
- res.add(pair);
+ String date = r.getString("DataBegin");
+ res.put(r.getString("JobID"), new String[] {date.substring(0, date.indexOf(":")), r.getString("Protein")});
++c;
}
}
Map<String, Integer> res = new HashMap<String, Integer>();
int c = 0;
for (Row r : rows) {
- String protein = r.getString("ip");
+ String ip = r.getString("ip");
String id = r.getString("JobID");
- if (res.containsKey(protein))
- res.put(protein, res.get(protein) + 1);
+ if (res.containsKey(ip))
+ res.put(ip, res.get(ip) + 1);
else
- res.put(protein, 1);
+ res.put(ip, 1);
}
final long endTime = System.currentTimeMillis();
System.out.println(c + " rows analysed, execution time is " + (endTime - startTime) + " msec");
/*
* getting log info for jobid
*/
- public StructureJobLog ReadJobLog(String jobid) {
+ public JobBean ReadJobLog(String jobid) {
final long startTime = System.currentTimeMillis();
String com = "SELECT * FROM ProteinLog WHERE JobID = '" + jobid + "';";
System.out.println("Command: " + com);
if (results1.isExhausted())
return null;
Row row1 = results1.one();
- StructureJobLog res = new StructureJobLog(row.getString("Protein"), row.getString("JobID"), row.getString("DataBegin"),
+ JobBean res = new JobBean(row.getString("Protein"), row.getString("JobID"), row.getString("DataBegin"),
row.getString("DataEnd"), row.getString("ip"), row1.getMap("Predictions", String.class, String.class));
System.out.println("Query time is " + (queryTime - startTime) + " msec");
final long endTime = System.currentTimeMillis();
private String jpred;
private List<Integer> timeRez;
private List<Integer> timeTotalExec;
- private StructureJobLog logInfo;
+ private JobBean logInfo;
private ProteinBean predictions;
public DataBase() {
return timeTotalExec;
}
- public void setLogInfo(StructureJobLog logInfo){
+ public void setLogInfo(JobBean logInfo){
this.logInfo = logInfo;
}
- public StructureJobLog getLogInfo() {
+ public JobBean getLogInfo() {
return logInfo;
}
--- /dev/null
+package compbio.cassandra;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class DateBean {
+ private String date;
+ private Map<String, String> jobidAndSeq; // Map for jobid and sequence
+
+ public DateBean() {
+ this.jobidAndSeq = new HashMap<String, String>();
+ }
+
+ public DateBean(String date) {
+ this.date = date;
+ this.jobidAndSeq = new HashMap<String, String>();
+ }
+
+ public void setJobidAndSeq(String jobid, String seq) {
+ if (jobidAndSeq == null)
+ jobidAndSeq = new HashMap<String, String>();
+ jobidAndSeq.put(jobid, seq);
+ }
+
+
+ public Map<String, String> getJobidAndSeq() {
+ return jobidAndSeq;
+ }
+
+ public void setDate(String date) {
+ this.date = date;
+ }
+
+ public String setDate() {
+ return date;
+ }
+}
package compbio.cassandra;
+import java.util.LinkedHashMap;
import java.util.Map;
-public class StructureJobLog {
+public class JobBean implements PredictionIndex {
private String jobid;
private String dateStart;
private String dateEnd;
private String sequence;
private String ip;
- private Map<String,String> prediction;
+ private LinkedHashMap<String,String> predictions;
- public StructureJobLog (String seq, String id, String dateStart, String dateEnd, String ip, Map<String,String> pred) {
+ public JobBean (String seq, String id, String dateStart, String dateEnd, String ip, Map<String,String> pred) {
this.sequence = seq;
this.jobid = id;
this.dateStart = dateStart;
this.dateEnd = dateEnd;
this.ip = ip;
- this.prediction = pred;
+ this.predictions = new LinkedHashMap<String,String>();
+ setPredictions(pred);
}
+ public void setPredictions(Map<String,String> pred) {
+ if (predictions == null)
+ predictions = new LinkedHashMap<String,String>();
+ for (String index : predIndex) {
+ this.predictions.put(index, pred.get(index));
+ }
+ }
public String getSequence () {
return sequence;
}
}
public Map<String,String> getPrediction () {
- return prediction;
+ return predictions;
}
}
}
public void setPredictions(Map<String,String> pred) {
+ if (predictions == null)
+ predictions = new LinkedHashMap<String,String>();
for (String index : predIndex) {
this.predictions.put(index, pred.get(index));
}
--- /dev/null
+package compbio.cassandra;
+
+public class Total {
+ private long total; // total number of jobs
+ private long totalOK; // number of jobs with execution status OK
+ private long totalStopped; // number of jobs with execution status STOPPED
+ private long totalError; // number of jobs with execution status Jpred ERROR
+ private long totalTimeOut; // number of jobs with execution status TIMEOUT
+
+ public Total() {}
+
+ public Total(long total, long totalOK, long totalStopped, long totalError, long totalTimeOut) {
+ this.total = total;
+ this.totalOK = totalOK;
+ this.totalStopped = totalStopped;
+ this.totalError = totalError;
+ this.totalTimeOut = totalTimeOut;
+ }
+
+ public void setTotal(long tot) {
+ this.total = tot;
+ }
+
+ public long getTotal() {
+ return total;
+ }
+
+ public void setTotalOK(long tot) {
+ this.totalOK = tot;
+ }
+
+ public long getTotalOK() {
+ return totalOK;
+ }
+
+ public void setTotalStopped(long tot) {
+ this.totalStopped = tot;
+ }
+
+ public long getTotalStopped() {
+ return totalStopped;
+ }
+
+ public void setTotalError(long tot) {
+ this.totalError = tot;
+ }
+
+ public long getTotalError() {
+ return totalError;
+ }
+
+ public void setTotalTimeOut(long tot) {
+ this.totalTimeOut = tot;
+ }
+
+ public long getTotalTimeOut() {
+ return totalTimeOut;
+ }
+}
--- /dev/null
+package compbio.cassandra;
+
+public class TotalByCounterBean {
+ private int totaljobs; // total jobs for current condition
+ private String name; // name for counter condition (ip or sequence)
+
+ public void setTotaljobs(int tot) {
+ this.totaljobs = tot;
+ }
+
+ public int getTotaljobs() {
+ return totaljobs;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+}
--- /dev/null
+package compbio.cassandra;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+public class TotalJobsStatisticBean extends Total {
+ private Map<String, Total> dateTotal;
+ private Total wholeTotal;
+
+ public TotalJobsStatisticBean() {
+ super();
+ this.dateTotal = new LinkedHashMap<String, Total>();
+ }
+
+ public void setDateTotal(String dat, Total tot) {
+ if (this.dateTotal == null)
+ dateTotal = new LinkedHashMap<String, Total>();
+ dateTotal.put(dat, tot);
+ }
+
+ public Map<String, Total> getDateTotal() {
+ return dateTotal;
+ }
+
+ public void setWholeTotal(Total tot) {
+ this.wholeTotal = tot;
+ }
+
+ public Total getWholeTotal() {
+ return wholeTotal;
+ }
+}
--- /dev/null
+package compbio.cassandra;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public class UserBean {
+ private String ip;
+ private Map<String,String[]> mainInfo; // store jobid, date start and sequence
+
+ public UserBean(String ip) {
+ this.ip = ip;
+ mainInfo = new HashMap<String,String[]>();
+ }
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setMainInfo(String jobid, String date, String sequence) {
+ if (mainInfo == null)
+ mainInfo = new HashMap<String,String[]>();
+ mainInfo.put(jobid, new String[] {date, sequence});
+ }
+
+ public void setMainInfo( Map<String,String[]> info) {
+ if (mainInfo == null)
+ mainInfo = new HashMap<String,String[]>();
+ mainInfo = info;
+ }
+
+ public Map<String,String[]> getMainInfo() {
+ return mainInfo;
+ }
+
+}
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
-
import compbio.cassandra.DataBase;
+import compbio.cassandra.DateBean;
+import compbio.cassandra.TotalJobsStatisticBean;
import compbio.statistic.CassandraRequester;
import compbio.statistic.StatisticsProt;
}
model.put("date1", date1);
model.put("date2", date2);
- List<DataBase> res = cr.countJobs(date1, date2);
+ TotalJobsStatisticBean res = cr.countJobs(date1, date2);
model.put("result", res);
final long endTime = System.currentTimeMillis();
model.put("timeExecution", (endTime - startTime));
CassandraRequester cr = new CassandraRequester();
// IMPORTANT: input should be suppied in the format: DD/MM/YYYY
- List<DataBase> r = cr.readJobByDay(realdate);
+ DateBean r = cr.readJobByDay(realdate);
model.put("results", r);
- model.put("njobs", r.size());
+ if (r != null)
+ model.put("njobs", r.getJobidAndSeq().size());
model.put("date", realdate);
final long endTime = System.currentTimeMillis();
model.put("timeExecution", (endTime - startTime));
import org.springframework.web.bind.annotation.RequestParam;
import compbio.cassandra.DataBase;
+import compbio.cassandra.TotalByCounterBean;
+import compbio.cassandra.UserBean;
import compbio.statistic.CassandraRequester;
/**
final long startTime = System.currentTimeMillis();
CassandraRequester cr = new CassandraRequester();
- List<DataBase> r = cr.readIpByCounter(realcounter);
+ List<TotalByCounterBean> r = cr.readIpByCounter(realcounter);
model.put("results", r);
model.put("njobs", 0);
if (null != r) {
public String findIP(@RequestParam("ip") String ip, Map<String, Object> model) {
final long startTime = System.currentTimeMillis();
CassandraRequester cr = new CassandraRequester();
- List<DataBase> r = cr.readIp(ip);
+ UserBean r = cr.readIp(ip);
model.put("results", r);
model.put("njobs", 0);
if (null != r) {
- model.put("njobs", r.size());
+ model.put("njobs", r.getMainInfo().size());
}
final long endTime = System.currentTimeMillis();
model.put("timeExecution", (endTime - startTime));
import compbio.cassandra.ProteinBean;
import compbio.cassandra.DataBase;
+import compbio.cassandra.TotalByCounterBean;
import compbio.statistic.CassandraRequester;
/**
}
CassandraRequester cr = new CassandraRequester();
- List<DataBase> r = cr.readProteinByCounter(realcounter);
+ List<TotalByCounterBean> r = cr.readProteinByCounter(realcounter);
model.put("results", r);
model.put("njobs", 0);
if (null != r) {
final long startTime = System.currentTimeMillis();
String ip = request.getParameter("ip");
CassandraRequester cr = new CassandraRequester();
- List<DataBase> r = cr.readIp(ip);
- request.setAttribute("results", r);
+ // List<DataBase> r = cr.readIp(ip);
+ // request.setAttribute("results", r);
final long endTime = System.currentTimeMillis();
request.setAttribute("timeExecution", (endTime - startTime));
request.setAttribute("ip", ip);
}
request.setAttribute("data1", date1);
request.setAttribute("data2", date2);
- List<DataBase> res = cr.countJobs(date1, date2);
- request.setAttribute("result", res);
+// List<DataBase> res = cr.countJobs(date1, date2);
+// request.setAttribute("result", res);
final long endTime = System.currentTimeMillis();
request.setAttribute("timeExecution", (endTime - startTime));
// System.out.println ("QueryServlet.doGet: total number of dates = " + res.size());
final long startTime = System.currentTimeMillis();
int counter = Integer.parseInt(request.getParameter("counterIp"));
CassandraRequester cr = new CassandraRequester();
- List<DataBase> r = cr.readIpByCounter(counter);
- request.setAttribute("results", r);
+ // List<DataBase> r = cr.readIpByCounter(counter);
+// request.setAttribute("results", r);
final long endTime = System.currentTimeMillis();
request.setAttribute("timeExecution", (endTime - startTime));
request.setAttribute("counter", counter);
int counter = Integer.parseInt(request.getParameter("counterJob"));
CassandraRequester cr = new CassandraRequester();
if (search.equals("Search counter")) {
- List<DataBase> r = cr.readProteinByCounter(counter);
- request.setAttribute("results", r);
+ // List<DataBase> r = cr.readProteinByCounter(counter);
+// request.setAttribute("results", r);
// System.out.println ("Search counter: " + r.size() + " proteins found");
} else {
// List<DataBase> r = cr.readProteins(prot, flag);
import java.util.List;
import java.util.Map;
+import compbio.cassandra.DateBean;
import compbio.cassandra.ProteinBean;
import compbio.cassandra.CassandraNativeConnector;
import compbio.cassandra.CassandraReader;
import compbio.cassandra.DataBase;
import compbio.cassandra.Pair;
-import compbio.cassandra.StructureJobLog;
+import compbio.cassandra.JobBean;
+import compbio.cassandra.Total;
+import compbio.cassandra.TotalByCounterBean;
+import compbio.cassandra.TotalJobsStatisticBean;
+import compbio.cassandra.UserBean;
public class CassandraRequester {
private CassandraReader db = new CassandraReader();
/*
* query: total number of jobs for the period from date1 till date2
*/
- public List<DataBase> countJobs(String date1, String date2) {
+ public TotalJobsStatisticBean countJobs(String date1, String date2) {
if (null == date1) {
date1 = "1970/1/1";
}
start.setTime(new Date(dateStart));
Calendar end = Calendar.getInstance();
end.setTime(new Date(dateEnd));
- query = new ArrayList<DataBase>();
+ TotalJobsStatisticBean query = new TotalJobsStatisticBean();
+ Total wholeTotal = new Total(0,0,0,0,0);
for (Date date = start.getTime(); !start.after(end); start.add(Calendar.DATE, 1), date = start.getTime()) {
- List<Long> res = db.ReadDateTable(date.getTime());
+ Total res = db.ReadDateTable(date.getTime());
if (res == null)
continue;
- DataBase bean = new DataBase();
- bean.setTotal((int)(long)res.get(0));
- bean.setTotalOK((int)(long)res.get(1));
- bean.setTotalStopped((int)(long)res.get(2));
- bean.setTotalError((int)(long)res.get(3));
- bean.setTotalTimeOut((int)(long)res.get(4));
- bean.setDate(DateFormat(date.getTime()));
- query.add(bean);
+ query.setDateTotal(DateFormat(date.getTime()), res);
+ wholeTotal.setTotal(res.getTotal() + wholeTotal.getTotal());
+ wholeTotal.setTotalOK(res.getTotalOK() + wholeTotal.getTotalOK());
+ wholeTotal.setTotalStopped(res.getTotalStopped() + wholeTotal.getTotalStopped());
+ wholeTotal.setTotalError(res.getTotalError() + wholeTotal.getTotalError());
+ wholeTotal.setTotalTimeOut(res.getTotalTimeOut() + wholeTotal.getTotalTimeOut());
}
+ query.setWholeTotal(wholeTotal);
return query;
}
/*
* query: jobs and sequence at date
*/
- public List<DataBase> readJobByDay (String date) {
- if (null == date) {
- return null;
- }
+ public DateBean readJobByDay (String date) {
if (!isThisDateValid(date, formatDDMMYY)) {
System.out.println("CassandraRequester.readJobByDay: Wrong date format for " + date);
return null;
long day = DateParsing(date, formatDDMMYY);
if (day < earlestDate || day > currentDate)
return null;
- List<Pair<String, String>> res = db.ReadProteinData(day);
- if (res == null)
- return null;
- query = new ArrayList<DataBase>();
- for (Pair<String, String> entry : res) {
- DataBase bean = new DataBase();
- bean.setDate(date);
- bean.setId(entry.getElement0());
- bean.setProt(entry.getElement1());
- query.add(bean);
- }
- return query;
+ return db.ReadProteinData(day, date);
}
/*
* query: protein sequence
- * */
+ **/
public List<ProteinBean> readProteins(String protIn, String flag) {
List<ProteinBean> result;
if (flag.equals("whole"))
/*
* query protein sequences with number of jobs
*/
- public List<DataBase> readProteinByCounter(int minimalcounter) {
- query = new ArrayList<DataBase>();
+ public List<TotalByCounterBean> readProteinByCounter(int minimalcounter) {
+ List<TotalByCounterBean> query = new ArrayList<TotalByCounterBean>();
Map<String, Integer> map = db.ReadProteinSequenceByCounter();
+ if (map == null)
+ return null;
for (Map.Entry<String, Integer> entry : map.entrySet()) {
- if (entry.getValue() > minimalcounter && entry.getKey().length() > 0) {
- DataBase bean = new DataBase();
- bean.setTotalId(entry.getValue());
- bean.setProt(entry.getKey());
+ if (entry.getValue() > minimalcounter) {
+ TotalByCounterBean bean = new TotalByCounterBean();
+ bean.setTotaljobs(entry.getValue());
+ bean.setName(entry.getKey());
query.add(bean);
}
}
/*
* query ip with number of jobs
*/
- public List<DataBase> readIpByCounter(Integer minimalcounter) {
- query = new ArrayList<DataBase>();
+ public List<TotalByCounterBean> readIpByCounter(Integer minimalcounter) {
+ List<TotalByCounterBean> query = new ArrayList<TotalByCounterBean>();
Map<String, Integer> map = db.ReadIpByCounter();
if (minimalcounter == null)
minimalcounter = 0;
return null;
for (Map.Entry<String, Integer> entry : map.entrySet()) {
if (entry.getValue() > minimalcounter) {
- DataBase bean = new DataBase();
- bean.setTotalId(entry.getValue());
- bean.setIp(entry.getKey());
+ TotalByCounterBean bean = new TotalByCounterBean();
+ bean.setTotaljobs(entry.getValue());
+ bean.setName(entry.getKey());
query.add(bean);
}
}
/*
* query jobs log info
*/
- public DataBase readJobLog(String jobid) {
+ public JobBean readJobLog(String jobid) {
if (jobid == null)
return null;
- StructureJobLog res = db.ReadJobLog(jobid);
- if (res == null)
- return null;
- DataBase query = new DataBase();
- query.setLogInfo(res);
- return query;
+ return db.ReadJobLog(jobid);
}
/*
* query jobs by ipStructureJobLog
*/
- public List<DataBase> readIp(String ip) {
+ public UserBean readIp(String ip) {
if (ip == null)
return null;
- List<Pair<String, String>> res = db.ReadIpWithJobs(ip);
+ Map<String, String[]> res = db.ReadIpWithJobs(ip);
if (res == null)
return null;
- query = new ArrayList<DataBase>();
- for (Pair<String, String> entry : res) {
- DataBase bean = new DataBase();
- bean.setIp(ip);
- bean.setId(entry.getElement0());
- bean.setProt(entry.getElement1());
- query.add(bean);
- }
+ UserBean query = new UserBean(ip);
+ query.setMainInfo(res);
return query;
}
</tr>
</thead>
<tbody>
- <c:forEach items="${results}" var="res" varStatus="status">
+ <c:forEach items="${results.mainInfo}" var="res" varStatus="status">
<tr>
- <td><a href="${jobqueryservlet}?IdJob=${res.id}&Search=Search">${res.id}</a></td>
- <!-- <td style="text-align: left; border-buttom: dotted; font-family: monospace">${res.logInfo.dateStart}</td>-->
- <td style="text-align: left; border-buttom: dotted; font-family: monospace">${res.date}</td>
-
- <c:choose>
- <c:when test="${res.prot==''}">
- <td style="text-align: left; border-buttom: dotted; font-family: monospace">Alignment job</td>
- </c:when>
- <c:otherwise>
- <td style="text-align: left; border-buttom: dotted; font-family: monospace">${res.prot}</td>
- </c:otherwise>
- </c:choose>
+ <td><a href="${jobqueryservlet}?IdJob=${res.key}&Search=Search">${res.key}</a></td>
+
+ <c:forEach items="${res.value}" var="info" varStatus="status">
+ <c:if test="${status.first}">
+ <td style="text-align: left; border-buttom: dotted; font-family: monospace">${info}</td>
+ </c:if>
+ <c:if test="${!status.first}">
+ <c:choose>
+ <c:when test="${info==''}">
+ <td style="text-align: left; border-buttom: dotted; font-family: monospace">Alignment job</td>
+ </c:when>
+ <c:otherwise>
+ <td style="text-align: left; border-buttom: dotted; font-family: monospace">${info}</td>
+ </c:otherwise>
+ </c:choose>
+ </c:if>
+ </c:forEach>
</tr>
</c:forEach>
</tbody>
<tbody>
<c:forEach items="${results}" var="res">
<tr>
- <td>${res.totalId}</td>
- <td><a title="Click to view other jobs" href="${ipquery}?ip=${res.ip}&Search=Search">${res.ip}</a></td>
+ <td>${res.totaljobs}</td>
+ <td><a title="Click to view other jobs" href="${ipquery}?ip=${res.name}&Search=Search">${res.name}</a></td>
</tr>
</c:forEach>
</tbody>
<p style="font-weight:bold;">Information for the job ${IdJob}</p>
</div>
<div class="panel-body">
- <p>Start timestamp : ${result.logInfo.dateStart}</p>
- <p>End timestamp : ${result.logInfo.dateEnd}</p>
- <p>IP: <a title="Click to view other jobs" href="${ipquery}?ip=${result.logInfo.ip}&Search=Search">${result.logInfo.ip}</a></p>
+ <p>Start timestamp : ${result.dateStart}</p>
+ <p>End timestamp : ${result.dateEnd}</p>
+ <p>IP: <a title="Click to view other jobs" href="${ipquery}?ip=${result.ip}&Search=Search">${result.ip}</a></p>
<table class="table table-striped table-hover table-bordered">
<tbody>
<tr>
<td>Sequence</td>
<td style="text-align: left; border-buttom: dotted; font-family: monospace">
- <a title="Click to view other jobs" href="${searchquery}?sequence=${result.logInfo.sequence}&protein=whole&Search=Search">${result.logInfo.sequence}</a>
+ <a title="Click to view other jobs" href="${searchquery}?sequence=${result.sequence}&protein=whole&Search=Search">${result.sequence}</a>
</td>
</tr>
- <c:forEach items="${result.logInfo.prediction}" var="pred">
+ <c:forEach items="${result.prediction}" var="pred">
<tr>
<td>${pred.key}</td>
<td
<p>No jobs for this period</p>
</c:when>
<c:otherwise>
- <c:set var="sum" value="0" />
- <c:set var="sumOK" value="0" />
- <c:set var="sumStopped" value="0" />
- <c:set var="sumError" value="0" />
- <c:set var="sumTimeOut" value="0" />
- <c:forEach items="${result}" var="res">
- <c:set var="tot" value="${res.total}" />
- <c:set var="sum" value="${sum + tot}" />
- <c:set var="totOK" value="${res.totalOK}" />
- <c:set var="sumOK" value="${sumOK + totOK}" />
- <c:set var="totStopped" value="${res.totalStopped}" />
- <c:set var="sumStopped" value="${sumStopped + totStopped}" />
- <c:set var="totError" value="${res.totalError}" />
- <c:set var="sumError" value="${sumError + totError}" />
- <c:set var="totTimeOut" value="${res.totalTimeOut}" />
- <c:set var="sumTimeOut" value="${sumTimeOut + totTimeOut}" />
- </c:forEach>
<div class="table-responsive">
<table class="table table-striped table-hover table-bordered">
<thead>
<tbody>
<tr style="font-weight: bolder;">
<td style="text-align: center">Total:</td>
- <td style="text-align: right">${sum}</td>
- <td style="text-align: right">${sumOK}</td>
- <td style="text-align: right">${sumStopped}</td>
- <td style="text-align: right">${sumError}</td>
- <td style="text-align: right">${sumTimeOut}</td>
+ <c:set var="total" value="${result.wholeTotal}"/>
+ <td style="text-align: right">${total.total}</td>
+ <td style="text-align: right">${total.totalOK}</td>
+ <td style="text-align: right">${total.totalStopped}</td>
+ <td style="text-align: right">${total.totalError}</td>
+ <td style="text-align: right">${total.totalTimeOut}</td>
</tr>
- <c:forEach items="${result}" var="res">
+ <c:forEach items="${result.dateTotal}" var="res">
<tr>
- <td style="text-align: center">${res.date}</td>
- <td style="text-align: right">${res.total}</td>
- <td style="text-align: right"><a href="${onedayquery}?date=${res.date}">${res.totalOK}</a></td>
- <td style="text-align: right">${res.totalStopped}</td>
- <td style="text-align: right">${res.totalError}</td>
- <td style="text-align: right">${res.totalTimeOut}</td>
+ <td style="text-align: center">${res.key}</td>
+ <c:set var="value" value="${res.value}"/>
+ <td style="text-align: right">${value.total}</td>
+ <td style="text-align: right"><a href="${onedayquery}?date=${res.key}">${value.totalOK}</a></td>
+ <td style="text-align: right">${value.totalStopped}</td>
+ <td style="text-align: right">${value.totalError}</td>
+ <td style="text-align: right">${value.totalTimeOut}</td>
</tr>
</c:forEach>
</tbody>
</tr>
</thead>
<tbody>
- <c:forEach items="${results}" var="res" varStatus="status">
+ <c:forEach items="${results.jobidAndSeq}" var="res" varStatus="status">
<tr>
- <td><a href="${jobquery}?IdJob=${res.id}">${res.id}</a></td>
+ <td><a href="${jobquery}?IdJob=${res.key}">${res.key}</a></td>
<c:choose>
- <c:when test="${res.prot == ''}">
+ <c:when test="${res.value == ''}">
<td>Job with alignment</td>
</c:when>
<c:otherwise>
- <td style="text-align: left; border-buttom: dotted; font-family: monospace">${res.prot}</td>
+ <td style="text-align: left; border-buttom: dotted; font-family: monospace">${res.value}</td>
</c:otherwise>
</c:choose>
<tbody>
<c:forEach items="${results}" var="res">
<tr>
- <td>${res.totalId}</td>
+ <td>${res.totaljobs}</td>
<td style="text-align: left; border-buttom: dotted; font-family: monospace">
- <a title="Click to view all jobs" href="${searchquery}?sequence=${res.prot}&protein=whole&Search=Search">${res.prot}</a>
+ <a title="Click to view all jobs" href="${searchquery}?sequence=${res.name}&protein=whole&Search=Search">${res.name}</a>
</td>
</tr>
</c:forEach>