Skip to content

Commit

Permalink
Release 2021-08-13-1100
Browse files Browse the repository at this point in the history
BEA#143	PIPELINE: data in archive
BEA#147	SDB/BEV/BEI: JS file anti-cache timestamps
BEA#366	NGCHM: html/ngchm?
BEA#390	Data: some legacy data lack titles
BEA#404	Docker: tomcat startup
BEA#405	MBA: duplicate features
BEA#407	MQA: next at last dataset
BEA#408	MBatch: Add UMAP
BEA#409	MQA: Add UMAP
BEA#410	MQA: GUI Buttons
BEA#411	MOB: More MW Data
BEA#412	NGCHM: widget loading
BEA#413	NGCHM/SuperClust: one only?
BEA#414	MQA: Small Space Support
BEA#415	NGCHM: annotation bar height
BEA#417	ALL: WebInspect Remediation
BEA#418	MtOB: allfactors support
BEA#419	MQA: missing somatic mutation data
BEA#420	Docker: PanDoc and TexLive revisit
BEA#428	ALL: CentOS to AlmaLinux
BEA#430	MQA: make query scroll
BEA#433	BEV: resize results better
BEA#434	BEV: no results message locks GUI
BEA#435	MBatch: static PNG legend title
BEA#436	LR: log report CI/CD
BEA#437	MBatch: UTF-8 features and batch names
BEA#439	BEV: fix histogram plots
BEA#440	BEV: handle no results indexes
  • Loading branch information
TDCasasent committed Aug 20, 2021
1 parent 9e31911 commit 0045d76
Show file tree
Hide file tree
Showing 48 changed files with 316,897 additions and 121,552 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,33 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
{
try
{
try
{
// *******************************************************************
// logout user
request.logout();
}
catch (Exception exp)
{
log("AuthOut::processRequest logout", exp);
}
// *******************************************************************
// logout user
request.logout();
// redirect user to main index
String url = request.getHeader("referer");
log("AuthOut referer=" + url);
if ((null==url)||("".equals(url)))
{
url = "/BEI/BEI/index.html";
}
String urlWithSessionID = response.encodeRedirectURL(url);
response.sendRedirect( urlWithSessionID );
}
catch (Exception exp)
catch(Exception exp)
{
log("AuthOut::processRequest failed", exp);
response.setStatus(400);
response.sendError(400);
}
// *******************************************************************
// redirect user to main index
String url = request.getHeader("referer");
log("AuthOut referer=" + url);
if ((null==url)||("".equals(url)))
{
url = "/BEI/BEI/index.html";
}
String urlWithSessionID = response.encodeRedirectURL(url);
response.sendRedirect( urlWithSessionID );
}

// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,47 +52,56 @@ synchronized protected void processRequest(HttpServletRequest request, HttpServl
// TODO: replace synchronized if needed to speed up login process
try
{
// *******************************************************************
// Update User List and Role Information
log("request.getRemoteUser() = " + request.getRemoteUser());
String userName = getUserName(request);
if (null==userName)
{
log("nobody logged in");
}
else
try
{
Properties props = new Properties();
if (new File(BEIUtils.M_PROPS, "user.properties").exists())
// *******************************************************************
// Update User List and Role Information
log("request.getRemoteUser() = " + request.getRemoteUser());
String userName = getUserName(request);
if (null==userName)
{
try (FileInputStream is = new FileInputStream(new File(BEIUtils.M_PROPS, "user.properties")))
{
props.loadFromXML(is);
}
log("nobody logged in");
}
props.setProperty(userName, getUserRoleString(request));
try (FileOutputStream os = new FileOutputStream(new File(BEIUtils.M_PROPS, "user.properties")))
else
{
props.storeToXML(os, "user properties");
Properties props = new Properties();
if (new File(BEIUtils.M_PROPS, "user.properties").exists())
{
try (FileInputStream is = new FileInputStream(new File(BEIUtils.M_PROPS, "user.properties")))
{
props.loadFromXML(is);
}
}
props.setProperty(userName, getUserRoleString(request));
try (FileOutputStream os = new FileOutputStream(new File(BEIUtils.M_PROPS, "user.properties")))
{
props.storeToXML(os, "user properties");
}
log("AuthUpdate::processRequest updateUserAndRoleData");
UserAndRoleData.updateUserAndRoleData(props);
}
log("AuthUpdate::processRequest updateUserAndRoleData");
UserAndRoleData.updateUserAndRoleData(props);
}
catch (Exception exp)
{
log("AuthUpdate::processRequest failed", exp);
}
// *******************************************************************
// redirect user to main index
String url = request.getHeader("referer");
log("AuthOut referer=" + url);
if ((null==url)||("".equals(url)))
{
url = "/BEI/BEI/index.html";
}
String urlWithSessionID = response.encodeRedirectURL(url);
response.sendRedirect( urlWithSessionID );
}
catch (Exception exp)
catch(Exception exp)
{
log("AuthUpdate::processRequest failed", exp);
response.setStatus(400);
response.sendError(400);
}
// *******************************************************************
// redirect user to main index
String url = request.getHeader("referer");
log("AuthOut referer=" + url);
if ((null==url)||("".equals(url)))
{
url = "/BEI/BEI/index.html";
}
String urlWithSessionID = response.encodeRedirectURL(url);
response.sendRedirect( urlWithSessionID );
}

static public String getUserName(HttpServletRequest request)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public AuthUser()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// return to user handled in parent class
theBuffer.append("{");
String userName = "";
if (null!=request.getRemoteUser())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import edu.mda.bcb.bei.utils.BEIUtils;
import edu.mda.bcb.bei.authorization.Authorization;
import edu.mda.bcb.bei.status.JobStatus;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
Expand Down Expand Up @@ -69,6 +70,10 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
log("version = " + edu.mda.bcb.bei.utils.BEIUtils.M_VERSION);
String jobId = request.getParameter("jobId");
log("passed in jobId is " + jobId);
if (null!=jobId)
{
JobStatus.checkJobId(jobId);
}
if ((null!=jobId)&&(false!=mCheckUserAuthorization))
{
log("auth jobId is " + jobId);
Expand Down Expand Up @@ -97,8 +102,8 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
{
log("BEIServletMixin::processRequest failed", exp);
response.setContentType("text;charset=UTF-8");
response.setStatus(500);
response.sendError(500, exp.getMessage());
response.setStatus(400);
response.sendError(400);
if (null!=mErrorFile)
{
Files.write(mErrorFile.toPath(), exp.getMessage().getBytes(), StandardOpenOption.CREATE, StandardOpenOption.APPEND);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public BEIproperties()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// return to user handled in parent
long start = System.currentTimeMillis();
theBuffer.append(getResponseString(this));
long finish = System.currentTimeMillis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import edu.mda.bcb.bei.processes.BatchdataObj;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import edu.mda.bcb.bei.status.JobStatus;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
Expand Down Expand Up @@ -43,8 +44,10 @@ public Batchdata()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// return to user handled in parent
String jobId = request.getParameter("jobId");
log("passed in jobId is " + jobId);
JobStatus.checkJobId(jobId);
String isAlternate = request.getParameter("isAlternate");
// NO, YES, YES-IGNORE
log("passed in isAlternate is " + isAlternate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public GDCdatasets()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// return to user handled in parent
long start = System.currentTimeMillis();
theBuffer.append(getResponseString(this));
long finish = System.currentTimeMillis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

package edu.mda.bcb.bei.servlets;

import edu.mda.bcb.bei.status.JobStatus;
import edu.mda.bcb.bei.utils.BEIUtils;
import java.io.BufferedWriter;
import java.io.File;
Expand Down Expand Up @@ -44,8 +45,10 @@ public MBatchConfig()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// return to user handled in parent
String jobId = request.getParameter("jobId");
log("passed in jobId is " + jobId);
JobStatus.checkJobId(jobId);
String action = request.getParameter("action");
log("passed in action is " + action);
// action options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public MWdatasets()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// return to user handled in parent
long start = System.currentTimeMillis();
theBuffer.append(getResponseString(this));
long finish = System.currentTimeMillis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,28 @@ public class RBNConfig extends HttpServlet
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter())
try
{
/* TODO output your page here. You may use following sample code. */
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet RBNConfig</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet RBNConfig at " + request.getContextPath() + "</h1>");
out.println("</body>");
out.println("</html>");
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter())
{
/* TODO output your page here. You may use following sample code. */
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet RBNConfig</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet RBNConfig at " + request.getContextPath() + "</h1>");
out.println("</body>");
out.println("</html>");
}
}
catch(Exception exp)
{
log("RBNConfig::processRequest failed", exp);
response.setStatus(400);
response.sendError(400);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public UploadBatch()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// return to user handled in parent
String jobId = request.getParameter("jobId");
JobStatus.checkJobId(jobId);
boolean keepOriginal = paramStringToBool(request.getParameter("keepOriginal"));
// No rectangle flag should be logically inverted
boolean noRectangle = !paramStringToBool(request.getParameter("noRectangle"));
Expand Down Expand Up @@ -168,15 +170,15 @@ public static String saveFileUpload(Part thePart, String theSavePath, HttpServle
message = "You either did not specify a file to upload or are trying to upload a file to a protected or nonexistent location. "
+ fne.getMessage();
theServlet.log("Problems during file upload. Error: " + fne.getMessage(), fne);
//response.setStatus(500);
//response.sendError(500, exp.getMessage());
//response.setStatus(400);
//response.sendError(400, exp.getMessage());
}
catch (Exception exp)
{
message = exp.getMessage();
theServlet.log("Problems during file upload. Error: " + exp.getMessage(), exp);
//response.setStatus(500);
//response.sendError(500, exp.getMessage());
//response.setStatus(400);
//response.sendError(400, exp.getMessage());
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// MD Anderson Cancer Center Bioinformatics at MDA <https://www.mdanderson.org/research/departments-labs-institutes/departments-divisions/bioinformatics-and-computational-biology.html>
package edu.mda.bcb.bei.servlets;

import edu.mda.bcb.bei.status.JobStatus;
import edu.mda.bcb.bei.utils.BEIUtils;
import java.io.File;
import java.io.FileNotFoundException;
Expand Down Expand Up @@ -58,7 +59,9 @@ public UploadLinkMap()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// reutnr to user handled in parent
String jobId = request.getParameter("jobId");
JobStatus.checkJobId(jobId);
String isAlternate = request.getParameter("isAlternate");
boolean isAlternateP = isAlternate.equals("YES");
File jobDir = new File(BEIUtils.M_OUTPUT, jobId);
Expand Down Expand Up @@ -118,15 +121,15 @@ public static String saveFileUpload(Part thePart, String theSavePath, HttpServle
message = "You either did not specify a file to upload or are trying to upload a file to a protected or nonexistent location. "
+ fne.getMessage();
theServlet.log("Problems during file upload. Error: " + fne.getMessage(), fne);
//response.setStatus(500);
//response.sendError(500, exp.getMessage());
//response.setStatus(400);
//response.sendError(400, exp.getMessage());
}
catch (Exception exp)
{
message = exp.getMessage();
theServlet.log("Problems during file upload. Error: " + exp.getMessage(), exp);
//response.setStatus(500);
//response.sendError(500, exp.getMessage());
//response.setStatus(400);
//response.sendError(400, exp.getMessage());
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public UploadManifest()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// return to user handled in parent
String jobId = request.getParameter("jobId");
JobStatus.checkJobId(jobId);
String isAlternate = request.getParameter("isAlternate");
String dataset = request.getParameter("dataset");
String dstype = request.getParameter("dstype");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public UploadMatrix()
@Override
protected void internalProcess(HttpServletRequest request, StringBuffer theBuffer) throws Exception
{
// return to user handled in parent
String jobId = request.getParameter("jobId");
JobStatus.checkJobId(jobId);
boolean keepOriginalFlag = paramStringToBool(request.getParameter("keepOriginal"));
// No rectangle flag should be logically inverted
boolean noRectangleFlag = !paramStringToBool(request.getParameter("noRectangle"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ protected void internalProcess(HttpServletRequest request, StringBuffer theBuffe
{
////////////////////////////////////////////////////////////////////
String jobId = request.getParameter("jobId");
JobStatus.checkJobId(jobId);
log("passed in jobId is " + jobId);
String isAlternate = request.getParameter("isAlternate");
log("passed in isAlternate is " + isAlternate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ protected void internalProcess(HttpServletRequest request, StringBuffer theBuffe
////////////////////////////////////////////////////////////////////
String jobId = request.getParameter("jobId");
log("passed in jobId is " + jobId);
JobStatus.checkJobId(jobId);
String isAlternate = request.getParameter("isAlternate");
log("passed in isAlternate is " + isAlternate);
File jobDir = new File(BEIUtils.M_OUTPUT, jobId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ protected void internalProcess(HttpServletRequest request, StringBuffer theBuffe
{
String jobId = request.getParameter("jobId");
log("passed in jobId is " + jobId);
JobStatus.checkJobId(jobId);
JobStatus.setJobStatus(jobId, JOB_STATUS.MBATCHCONFIG_END, request, this);
JobStatus.setJobStatus(jobId, JOB_STATUS.MBATCHRUN_START_WAIT, request, this);
theBuffer.append(jobId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ protected void internalProcess(HttpServletRequest request, StringBuffer theBuffe
{
String jobId = request.getParameter("jobId");
log("passed in jobId is " + jobId);
JobStatus.checkJobId(jobId);
if ((jobId!=null)&&!("".equals(jobId)))
{
File jobDir = new File(BEIUtils.M_OUTPUT, jobId);
Expand Down
Loading

0 comments on commit 0045d76

Please sign in to comment.