--- /dev/null
+package compbio.controllers;
+
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.UserDetails;
+/*
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+*/
+
+public class BasicController {
+
+ protected String getPrincipalName() {
+ Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
+ if (principal instanceof UserDetails) {
+ return ((UserDetails) principal).getUsername();
+ }
+ return principal.toString();
+ }
+}
package compbio.controllers;
-import java.security.Principal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
* @author Natasha Sherstneva
*/
@Controller
-public class DailyStatisticsController {
+public class DailyStatisticsController extends BasicController {
@RequestMapping(value = "/stat/jobs/query", method = RequestMethod.GET)
- public String initFindForm(Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String initFindForm(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
Calendar cal = Calendar.getInstance();
String date2 = cal.get(Calendar.YEAR) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.DATE);
cal.add(Calendar.DATE, -3);
model.put("date1", date1);
model.put("date2", date2);
- return "queryJobStatistics";
+ return "query/JobStatistics";
}
@RequestMapping(value = "/stat/jobsdaily/results", method = RequestMethod.GET)
public String findJobsInPeriod(@RequestParam("date1") String date1, @RequestParam("date2") String date2,
- @RequestParam("option") String option, Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ @RequestParam("option") String option, Map<String, Object> model) {
+ model.put("username", getPrincipalName());
final long startTime = System.currentTimeMillis();
CassandraRequester cr = new CassandraRequester();
}
@RequestMapping(value = "/stat/jobsoneday/results", method = RequestMethod.GET)
- public String findJobsInOneDay(@RequestParam("date") String date, @RequestParam("status") String status, Map<String, Object> model,
- Principal principal) throws ParseException {
- model.put("username", principal.getName());
+ public String findJobsInOneDay(@RequestParam("date") String date, @RequestParam("status") String status, Map<String, Object> model)
+ throws ParseException {
+ model.put("username", getPrincipalName());
final long startTime = System.currentTimeMillis();
String realdate;
* @author Natasha Sherstneva
*/
@Controller
-public class DBUpdateController {
+public class DatabaseController extends BasicController {
@RequestMapping(value = "/database/remove", method = RequestMethod.GET)
public String initRemoveForm(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
Calendar cal = Calendar.getInstance();
String date2 = cal.get(Calendar.YEAR) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.DATE);
cal.add(Calendar.DATE, -3);
model.put("date2", date2);
model.put("sampleip", "127.0.0.1");
model.put("sampleseq", "ATA");
- return "queryRemoveJobs";
+ return "query/RemoveJobs";
}
@RequestMapping(value = "/database/state", method = RequestMethod.GET)
public String initDBStatRequest(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
// return "queryDBState";
- return "support/Notpermitted";
+ return "support/Denied";
}
@RequestMapping(value = "/database/remove/goreal", method = RequestMethod.GET)
@RequestParam("byDate") String flagDate, @RequestParam("date1") String date1, @RequestParam("date2") String date2,
@RequestParam("byIp") String flagIp, @RequestParam("ip") String ip, @RequestParam("bySequence") String flagSeq,
@RequestParam("seq") String seq, Map<String, Object> model) {
-
+ model.put("username", getPrincipalName());
CassandraRemover cr = new CassandraRemover();
int numberRemover = 0;
if (flagId != null)
@RequestMapping(value = "/database/remove/go", method = RequestMethod.GET)
public String findIPwithCounter(@RequestParam("id") String jobId, @RequestParam("date1") String date1,
@RequestParam("date2") String date2, @RequestParam("ip") String ip, @RequestParam("seq") String seq, Map<String, Object> model) {
-
+ model.put("username", getPrincipalName());
/*
* CassandraRemover cr = new CassandraRemover(); int numberRemover = 0;
* if (flagId != null) numberRemover = cr.RemoveJobById(jobId); if
package compbio.controllers;
-import java.security.Principal;
import java.util.Map;
import org.springframework.stereotype.Controller;
* @author Natasha Sherstneva
*/
@Controller
-public class DocumentationController {
+public class DocumentationController extends BasicController {
@RequestMapping(value = "/help/overview", method = RequestMethod.GET)
- public String formOverviewPage(Map<String, Object> model, Principal principal) {
- model.put("username", getPrincipleName(principal));
+ public String formOverviewPage(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
return "help/Overview";
}
@RequestMapping(value = "/help/howto", method = RequestMethod.GET)
- public String formHowtoPage(Map<String, Object> model, Principal principal) {
- model.put("username", getPrincipleName(principal));
+ public String formHowtoPage(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
return "support/Notimplemented";
}
@RequestMapping(value = "/help/doc", method = RequestMethod.GET)
- public String formDocPage(Map<String, Object> model, Principal principal) {
- model.put("username", getPrincipleName(principal));
+ public String formDocPage(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
return "support/Notimplemented";
}
@RequestMapping(value = "/help/javadoc", method = RequestMethod.GET)
- public String formJavadoc(Map<String, Object> model, Principal principal) {
- model.put("username", getPrincipleName(principal));
+ public String formJavadoc(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
return "support/Notimplemented";
}
- private String getPrincipleName(Principal principal) {
- if (null != principal.getName()) {
- return principal.getName();
- }
- return "unknown";
- }
}
package compbio.controllers;
-import java.security.Principal;
import java.util.List;
import java.util.Map;
* @author Natasha Sherstneva
*/
@Controller
-public class IPDataController {
+public class IPDataController extends BasicController {
@RequestMapping(value = "/admin/ip/counts/query", method = RequestMethod.GET)
- public String initStatisticsForm(Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String initStatisticsForm(Map<String, Object> model) {
+ model.put("username", "name:" + getPrincipalName());
model.put("value", 5);
- return "queryIPStatistics";
+ return "query/IPStatistics";
}
@RequestMapping(value = "/admin/ip/query", method = RequestMethod.GET)
- public String initOneIPForm(Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String initOneIPForm(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
model.put("value", "127.0.0.1");
- return "queryIP";
+ return "query/IP";
}
@RequestMapping(value = "/admin/ip/counts/results", method = RequestMethod.GET)
- public String findIPwithCounter(@RequestParam("JobCounter") String counter, Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String findIPwithCounter(@RequestParam("JobCounter") String counter, Map<String, Object> model) {
+ model.put("username", getPrincipalName());
if (counter.equals("")) {
model.put("error", "The value must not be empty");
model.put("value", counter);
- return "queryIPStatistics";
+ return "query/IPStatistics";
}
int realcounter;
} catch (NumberFormatException e) {
model.put("error", "The value must be an integer number");
model.put("value", counter);
- return "queryIPStatistics";
+ return "query/IPStatistics";
}
if (realcounter < 1) {
model.put("error", "The value must be greater than 0");
model.put("value", counter);
- return "queryIPStatistics";
+ return "query/IPStatistics";
}
final long startTime = System.currentTimeMillis();
}
@RequestMapping(value = "/admin/ip/results", method = RequestMethod.GET)
- public String findIP(@RequestParam("ip") String ip, Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String findIP(@RequestParam("ip") String ip, Map<String, Object> model) {
+ model.put("username", getPrincipalName());
final long startTime = System.currentTimeMillis();
CassandraRequester cr = new CassandraRequester();
UserBean r = cr.readIp(ip);
* @author Natasha Sherstneva
*/
@Controller
-public class JobController {
+public class JobController extends BasicController {
@RequestMapping(value = "/stat/exectime/query", method = RequestMethod.GET)
- public String initFormExecTime(Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String initFormExecTime(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
Calendar cal = Calendar.getInstance();
String date2 = cal.get(Calendar.YEAR) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.DATE);
cal.add(Calendar.DATE, -3);
model.put("date1", date1);
model.put("date2", date2);
- return "queryTimeExecution";
+ return "query/JobTimeExecution";
}
@RequestMapping(value = "/job/query", method = RequestMethod.GET)
- public String initFindForm(Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String initFindForm(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
model.put("value", "jp_NzBOJKo");
- return "queryJobLog";
+ return "query/JobLog";
}
@RequestMapping(value = "/stat/exectime/results", method = RequestMethod.GET)
public String findExecTimeData(@RequestParam("date1") String date1, @RequestParam("date2") String date2,
- @RequestParam(value = "option", required = false) String option, Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ @RequestParam(value = "option", required = false) String option, Map<String, Object> model) {
+ model.put("username", getPrincipalName());
final long startTime = System.currentTimeMillis();
CassandraRequester sp = new CassandraRequester();
}
@RequestMapping(value = "/job/results", method = RequestMethod.GET)
- public String findJob(@RequestParam("IdJob") String jobid, Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String findJob(@RequestParam("IdJob") String jobid, Map<String, Object> model) {
+ model.put("username", getPrincipalName());
final long startTime = System.currentTimeMillis();
CassandraRequester cr = new CassandraRequester();
model.put("result", cr.readJobLog(jobid));
package compbio.controllers;
-import java.security.Principal;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
-public class MainController {
+public class MainController extends BasicController {
@RequestMapping(value = "/index", method = RequestMethod.GET)
- public String printPublicHome(ModelMap model, Principal principal) {
- String name = "";
- // if (null != name ) {
- // name = principal.getName();
- // }
- model.addAttribute("username", name);
+ public String printPublicHome(ModelMap model) {
model.addAttribute("message", "Spring Security Custom Form example");
return "public";
}
}
@RequestMapping(value = "/denied", method = RequestMethod.GET)
- public String denied(ModelMap model, Principal principal) {
- String name = "unknown";
- if (null != principal.getName())
- name = principal.getName();
- model.put("username", name);
+ public String denied(ModelMap model) {
+ model.put("username", getPrincipalName());
return "support/Denied";
}
@RequestMapping(value = "/home", method = RequestMethod.GET)
- public String printHome(ModelMap model, Principal principal) {
- String name = "unknown";
- if (null != name) {
- name = principal.getName();
- }
- model.addAttribute("username", name);
+ public String printHome(ModelMap model ) {
+ model.addAttribute("username", getPrincipalName());
model.addAttribute("message", "Spring Security Custom Form example");
return "home";
}
package compbio.controllers;
-import java.security.Principal;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
*/
@Controller
@RequestMapping("/sequence")
-public class SequenceController {
+public class SequenceController extends BasicController {
/**
* pattern for NON-protein alphabet symbols
private final Pattern NONPROTEIN = Pattern.compile("[^ARNDCQEGHILKMFPSTWYV]+", Pattern.CASE_INSENSITIVE);
@RequestMapping(value = "query", method = RequestMethod.GET)
- public String formSequenceQuery(Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String formSequenceQuery(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
model.put("value", "AAAAA");
- return "queryProteinSequence";
+ return "query/Sequence";
}
@RequestMapping(value = "counts/query", method = RequestMethod.GET)
- public String formCounterQuery(Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String formCounterQuery(Map<String, Object> model) {
+ model.put("username", getPrincipalName());
model.put("value", 5);
- return "queryProteinSequenceCounter";
+ return "query/SequenceCounts";
}
@RequestMapping(value = "sequence/results", method = RequestMethod.GET)
- public String findSequence(@RequestParam("sequence") String sequence, @RequestParam("protein") String flag, Map<String, Object> model,
- Principal principal) {
- model.put("username", principal.getName());
+ public String findSequence(@RequestParam("sequence") String sequence, @RequestParam("searchtype") String searchtype,
+ Map<String, Object> model) {
+ model.put("username", getPrincipalName());
final long startTime = System.currentTimeMillis();
// input checks
if (trimmedsequence.equalsIgnoreCase("")) {
model.put("error", "The sequence cann't be empty");
model.put("value", sequence);
- return "queryProteinSequence";
+ return "query/Sequence";
}
if (NONPROTEIN.matcher(trimmedsequence).find()) {
model.put("error", "The sequence contains symbols not from the standard protein alphabet");
model.put("value", sequence);
- return "queryProteinSequence";
+ return "query/Sequence";
}
model.put("njobs", 0);
model.put("prot", trimmedsequence);
- model.put("flag", flag);
+ model.put("searchtype", searchtype);
if (0 < trimmedsequence.length()) {
CassandraRequester cr = new CassandraRequester();
- List<ProteinBean> r = cr.readProteins(trimmedsequence, flag);
+ List<ProteinBean> r = cr.readProteins(trimmedsequence, searchtype);
model.put("results", r);
if (null != r) {
- if (flag.equals("whole"))
+ if (searchtype.equals("whole"))
model.put("njobs", r.get(0).getJobid().size());
else
model.put("njobs", r.size());
}
@RequestMapping(value = "counts/results", method = RequestMethod.GET)
- public String countSequences(@RequestParam("counterJob") String counter, Map<String, Object> model, Principal principal) {
- model.put("username", principal.getName());
+ public String countSequences(@RequestParam("counterJob") String counter, Map<String, Object> model) {
+ model.put("username", getPrincipalName());
final long startTime = System.currentTimeMillis();
if (counter.equals("")) {
model.put("error", "The value must not be empty");
model.put("value", counter);
- return "queryIPStatistics";
+ return "query/SequenceCounts";
}
int realcounter;
} catch (NumberFormatException e) {
model.put("error", "The value must be an integer number");
model.put("value", counter);
- return "queryIPStatistics";
+ return "query/SequenceCounts";
}
if (realcounter < 1) {
model.put("error", "The value must be greater than 0");
model.put("value", counter);
- return "queryIPStatistics";
+ return "query/SequenceCounts";
}
CassandraRequester cr = new CassandraRequester();
package compbio.controllers;
-import java.security.Principal;
import java.util.Date;
import java.util.regex.Pattern;
// JavaMailSender mailSender;
private final Pattern EMAIL = Pattern.compile("[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}");
- @RequestMapping(value = "/register/query", method = RequestMethod.GET)
- public String printPublicHome(ModelMap model) {
+ @RequestMapping(value = "/register/query", method = RequestMethod.POST)
+ public String RegisterForm(ModelMap model) {
User user = new User();
model.addAttribute(user);
return "Register";
}
+ @RequestMapping(value = "/register/edit/query", method = RequestMethod.GET)
+ public String AccountForm(ModelMap model) {
+ User user = new User();
+ user.setFullName("Sasha Sherstnev");
+ user.setEmail("admin@admin.com");
+ user.setOrganisation("UoD");
+ user.setPosition("cleaner");
+ user.setUpdateByEmail(true);
+ model.addAttribute("u", user);
+ return "Edit";
+ }
+
@RequestMapping(value = "/register/do", method = RequestMethod.POST)
public String addUser(Model model, @ModelAttribute("user") User user, BindingResult bindingResult) {
/*
* query: protein sequence
*/
- public List<ProteinBean> readProteins(String protIn, String flag) {
+ public List<ProteinBean> readProteins(String protIn, String searchtype) {
List<ProteinBean> result;
- if (flag.equals("whole"))
+ if (searchtype.equals("whole"))
result = db.ReadWholeSequence(protIn);
else
result = db.ReadPartOfSequence(protIn);
if (result == null)
return null;
- if (flag.equals("part")) {
+ if (searchtype.equals("partial")) {
for (ProteinBean entry : result) {
entry.setSubProt(CreateSubprot(entry.getSequence(), protIn));
}
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> ${username}<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="<spring:url value="/logout" htmlEscape="true" />">Logout</a></li>
- <li><a href="<spring:url value="/user/account" htmlEscape="true" />">User account</a></li>
+ <li><a href="<spring:url value="/register/edit/query" htmlEscape="true" />">User account</a></li>
</ul>
</li>
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-question-sign"></span> Help<b class="caret"></b></a>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
-<jsp:include page="fragments/header.jsp" />
+<jsp:include page="../fragments/header.jsp" />
<body>
<div class="container">
- <jsp:include page="fragments/mainmenu.jsp" />
+ <jsp:include page="../fragments/mainmenu.jsp" />
<spring:url value="/admin/ip/results" var="query"/>
<div class="panel panel-default">
</form>
</div>
</div>
- <jsp:include page="fragments/footer.jsp"/>
+ <jsp:include page="../fragments/footer.jsp"/>
</div>
</body>
</html>
\ No newline at end of file
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
-<jsp:include page="fragments/header.jsp" />
+<jsp:include page="../fragments/header.jsp" />
<body>
<div class="container">
- <jsp:include page="fragments/mainmenu.jsp" />
+ <jsp:include page="../fragments/mainmenu.jsp" />
<spring:url value="/admin/ip/counts/results" var="query"/>
<div class="panel panel-default">
</div>
</div>
- <jsp:include page="fragments/footer.jsp"/>
+ <jsp:include page="../fragments/footer.jsp"/>
</div>
</body>
</html>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
-<jsp:include page="fragments/header.jsp" />
+<jsp:include page="../fragments/header.jsp" />
<body>
<div class="container">
- <jsp:include page="fragments/mainmenu.jsp" />
+ <jsp:include page="../fragments/mainmenu.jsp" />
<spring:url value="/job/query" var="query"/>
<div class="panel panel-default">
</div>
</div>
- <jsp:include page="fragments/footer.jsp"/>
+ <jsp:include page="../fragments/footer.jsp"/>
</div>
</body>
</html>
\ No newline at end of file
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<html>
-<jsp:include page="fragments/header_database.jsp" />
+<jsp:include page="../fragments/header_database.jsp" />
<body>
<div class="container">
- <jsp:include page="fragments/mainmenu.jsp" />
+ <jsp:include page="../fragments/mainmenu.jsp" />
<spring:url value="/stat/jobsdaily/results" var="query" />
<div class="panel panel-default">
</div>
</div>
- <jsp:include page="fragments/footer.jsp" />
+ <jsp:include page="../fragments/footer.jsp" />
</div>
</body>
</html>
\ No newline at end of file
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
-<jsp:include page="fragments/header_database.jsp" />
+<jsp:include page="../fragments/header_database.jsp" />
<body>
<div class="container">
- <jsp:include page="fragments/mainmenu.jsp" />
+ <jsp:include page="../fragments/mainmenu.jsp" />
<spring:url value="/stat/exectime/results" var="query"/>
<div class="panel panel-default">
</div>
</div>
- <jsp:include page="fragments/footer.jsp"/>
+ <jsp:include page="../fragments/footer.jsp"/>
</div>
</body>
</html>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
-<jsp:include page="fragments/header_database.jsp" />
+<jsp:include page="../fragments/header_database.jsp" />
<body>
<div class="container">
- <jsp:include page="fragments/mainmenu.jsp" />
+ <jsp:include page="../fragments/mainmenu.jsp" />
<spring:url value="/database/remove/go" var="formurl"/>
<div class="panel panel-default">
</div>
</div>
- <jsp:include page="fragments/footer.jsp"/>
+ <jsp:include page="../fragments/footer.jsp"/>
</div>
</body>
</html>
\ No newline at end of file
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
-<jsp:include page="fragments/header.jsp" />
+<jsp:include page="../fragments/header.jsp" />
<body>
<div class="container">
- <jsp:include page="fragments/mainmenu.jsp" />
+ <jsp:include page="../fragments/mainmenu.jsp" />
<spring:url value="/sequence/sequence/results" var="query"/>
<div class="panel panel-default">
<div class="form-group">
<p><textarea class="form-control" rows="3" name="sequence">${value}</textarea></p>
<p><input type="radio" name="protein" value="whole">search for the whole sequence<br/>
- <input type="radio" name="protein" value="part" Checked>search for partial sequence matching</p>
+ <input type="radio" name="searchtype" value="partial" Checked>search for partial sequence matching</p>
<input type="submit" name="Search" value="Search"/>
</div>
</c:when>
<p><textarea class="form-control" rows="3" name="sequence">${value}</textarea></p>
<p class="help-block">${error}</p>
<p><input type="radio" name="protein" value="whole">search for the whole sequence<br/>
- <input type="radio" name="protein" value="part" Checked>search for partial sequence matching</p>
+ <input type="radio" name="searchtype" value="partial" Checked>search for partial sequence matching</p>
<input type="submit" name="Search" value="Search"/>
</div>
</c:otherwise>
</form>
</div>
</div>
- <jsp:include page="fragments/footer.jsp"/>
+ <jsp:include page="../fragments/footer.jsp"/>
</div>
</body>
</html>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
-<jsp:include page="fragments/header.jsp" />
+<jsp:include page="../fragments/header.jsp" />
<body>
<div class="container">
- <jsp:include page="fragments/mainmenu.jsp" />
+ <jsp:include page="../fragments/mainmenu.jsp" />
<spring:url value="/sequence/counts/results" var="query"/>
<div class="panel panel-default">
</form>
</div>
</div>
- <jsp:include page="fragments/footer.jsp"/>
+ <jsp:include page="../fragments/footer.jsp"/>
</div>
</body>
</html>
<div class="panel-body">
<p>Start timestamp : ${result.dateStart}</p>
<p>End timestamp : ${result.dateEnd}</p>
- <p>IP: <a title="Click to view other jobs" href="${ip_query}?ip=${result.ip}&Search=Search">${result.ip}</a></p>
+ <p>IP: <a title="Click to view other jobs" href="${ip_query}?ip=${result.ip}">${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="${sequence_query}?sequence=${result.sequence}&protein=whole&Search=Search">${result.sequence}</a>
+ <a title="Click to view other jobs" href="${sequence_query}?sequence=${result.sequence}&searchtype=whole">${result.sequence}</a>
</td>
</tr>
<c:forEach items="${result.prediction}" var="pred">
<div class="panel panel-default">
<div class="panel-heading">
<c:choose>
- <c:when test="${flag == 'whole'}">
+ <c:when test="${searchtype == 'whole'}">
<p style="font-weight:bold;">Jobs for the protein sequence: ${prot}</p>
</c:when>
<c:otherwise>
<td
style="text-align: center; font-weight: bold; font-family: monospace">Protein
Sequence</td>
- <c:if test="${flag == 'whole'}">
+ <c:if test="${searchtype == 'whole'}">
<td
style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
value="${res.sequence}" /></td>
</c:if>
- <c:if test="${flag == 'part'}">
+ <c:if test="${searchtype == 'partial'}">
<td
style="text-align: left; border-buttom: dotted; font-family: monospace">
<c:forEach items="${res.subProt}" var="seq">
<tr>
<td>${res.totaljobs}</td>
<td style="text-align: left; border-buttom: dotted; font-family: monospace">
- <a title="Click to view all jobs" href="${sequence_query}?sequence=${res.name}&protein=whole&Search=Search">${res.name}</a>
+ <a title="Click to view all jobs" href="${sequence_query}?sequence=${res.name}&searchtype=whole">${res.name}</a>
</td>
</tr>
</c:forEach>