Author: [log in to unmask] Date: Tue Jan 26 18:33:36 2016 New Revision: 4142 Log: Local updates to dev version of run db webapp. Modified: webapps/trunk/run-webapp/pom.xml webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/AbstractRunServlet.java webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/RunSummaryServlet.java webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/TextDownloadServlet.java webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/TextExportUtilities.java webapps/trunk/run-webapp/src/main/webapp/WEB-INF/web.xml webapps/trunk/run-webapp/src/main/webapp/css/style.css webapps/trunk/run-webapp/src/main/webapp/showDatasets.jsp webapps/trunk/run-webapp/src/main/webapp/showEpics.jsp webapps/trunk/run-webapp/src/main/webapp/showRun.jsp webapps/trunk/run-webapp/src/main/webapp/showRunTable.jsp webapps/trunk/run-webapp/src/main/webapp/showSummary.jsp webapps/trunk/run-webapp/src/main/webapp/showTriggerConfig.jsp Modified: webapps/trunk/run-webapp/pom.xml ============================================================================= --- webapps/trunk/run-webapp/pom.xml (original) +++ webapps/trunk/run-webapp/pom.xml Tue Jan 26 18:33:36 2016 @@ -9,9 +9,9 @@ <description>run web app</description> <packaging>war</packaging> <scm> - <url>http://java.freehep.org/svn/repos/hps/list/java/trunk/run-web/</url> - <connection>scm:svn:svn://svn.freehep.org/hps/java/trunk/run-web/</connection> - <developerConnection>scm:svn:svn://svn.freehep.org/hps/java/trunk/run-web/</developerConnection> + <url>http://java.freehep.org/svn/repos/hps/list/webapps/trunk/run-webapp</url> + <connection>scm:svn:svn://svn.freehep.org/hps/webapps/trunk/run-webapp</connection> + <developerConnection>scm:svn:svn://svn.freehep.org/hps/webapps/trunk/run-webapp</developerConnection> </scm> <repositories> <repository> @@ -55,6 +55,11 @@ </dependency> <dependency> <groupId>javax.servlet</groupId> + <artifactId>jstl</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> @@ -88,7 +93,15 @@ <server>local-tomcat-server</server> <path>/hps-run-webapp</path> </configuration> - </plugin> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>2.7</version> + <configuration> + <encoding>UTF-8</encoding> + </configuration> + </plugin> </plugins> </build> </project> Modified: webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/AbstractRunServlet.java ============================================================================= --- webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/AbstractRunServlet.java (original) +++ webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/AbstractRunServlet.java Tue Jan 26 18:33:36 2016 @@ -52,7 +52,9 @@ } /** - * Child class implements specific behavior. + * Set state of servlet including run number and run db manager. + * <p> + * Subclass should implement specific behavior but call this method first. * * @param request the HTTP request * @param response the HTTP response Modified: webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/RunSummaryServlet.java ============================================================================= --- webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/RunSummaryServlet.java (original) +++ webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/RunSummaryServlet.java Tue Jan 26 18:33:36 2016 @@ -7,6 +7,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +/** + * Setup state to show run summary (nav bar). + * + * @author Jeremy McCormick, SLAC + */ @SuppressWarnings("serial") public class RunSummaryServlet extends AbstractRunServlet { Modified: webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/TextDownloadServlet.java ============================================================================= --- webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/TextDownloadServlet.java (original) +++ webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/TextDownloadServlet.java Tue Jan 26 18:33:36 2016 @@ -32,10 +32,6 @@ super.doGet(request, response); - if (request.getParameter("dataType") == null) { - throw new RuntimeException("Missing required dataType parameter."); - } - String dataType = request.getParameter("dataType"); if (dataType == null) { throw new RuntimeException("Missing required dataType parameter."); @@ -51,7 +47,7 @@ String text = converter.convert(object); cleanupRunManager(); - + writeResponse(response, getRun(), dataType, text); } Modified: webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/TextExportUtilities.java ============================================================================= --- webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/TextExportUtilities.java (original) +++ webapps/trunk/run-webapp/src/main/java/org/hps/webapps/run/TextExportUtilities.java Tue Jan 26 18:33:36 2016 @@ -85,7 +85,7 @@ LinkedHashSet<String> keys = new LinkedHashSet<String>(epicsDataList.get(0).getKeys()); for (String key : keys) { headers.add(key); - } + } printer.printRecord(headers); for (EpicsData epicsData : epicsDataList) { Modified: webapps/trunk/run-webapp/src/main/webapp/WEB-INF/web.xml ============================================================================= --- webapps/trunk/run-webapp/src/main/webapp/WEB-INF/web.xml (original) +++ webapps/trunk/run-webapp/src/main/webapp/WEB-INF/web.xml Tue Jan 26 18:33:36 2016 @@ -13,35 +13,35 @@ <resource-ref> <description>Run Database Connection</description> - <res-ref-name>jdbc/hps_run_db</res-ref-name> + <res-ref-name>jdbc/hps_run_db_dev</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> - - <!-- + +<!-- <context-param> <param-name>datacat</param-name> <param-value>http://hpsweb.jlab.org/datacat</param-value> </context-param> - --> +--> <context-param> <param-name>datacat</param-name> - <param-value>http://ppa-jeremym-l.slac.stanford.edu:8080/datacat-v0.4-SNAPSHOT</param-value> + <param-value>http://ppa-jeremym-l.slac.stanford.edu:8080/datacat-v0.5-SNAPSHOT</param-value> </context-param> - - <!-- + +<!-- <context-param> <param-name>dataquality</param-name> <param-value>http://hpsweb.jlab.org/data-quality</param-value> </context-param> - --> - +--> + <context-param> <param-name>dqm</param-name> <param-value>http://ppa-jeremym-l.slac.stanford.edu:8080/data-quality</param-value> </context-param> - + <!-- Display full run table. --> <servlet> <servlet-name>RunTableServlet</servlet-name> Modified: webapps/trunk/run-webapp/src/main/webapp/css/style.css ============================================================================= --- webapps/trunk/run-webapp/src/main/webapp/css/style.css (original) +++ webapps/trunk/run-webapp/src/main/webapp/css/style.css Tue Jan 26 18:33:36 2016 @@ -37,10 +37,6 @@ padding: 10px; } -form.search { - float: left; -} - div.header { width: 100%; height: 50px; @@ -65,4 +61,8 @@ iframe.nav { margin-right: 5px; +} + +ul.square { + list-style-type: square; } Modified: webapps/trunk/run-webapp/src/main/webapp/showDatasets.jsp ============================================================================= --- webapps/trunk/run-webapp/src/main/webapp/showDatasets.jsp (original) +++ webapps/trunk/run-webapp/src/main/webapp/showDatasets.jsp Tue Jan 26 18:33:36 2016 @@ -38,13 +38,13 @@ </thead> <tbody> <c:forEach var="dataset" items="${datasets}"> - <tr onclick="document.location.href='<%= getServletContext().getInitParameter("datacat") %>/display/datasets/<c:out value="${dataset.path}"/>';"> + <tr onclick="document.location.href='<%=getServletContext().getInitParameter("datacat")%>/display/datasets/<c:out value="${dataset.path}"/>';"> <td> <c:out value="${dataset.path}" /> <c:if test="${dataType == 'DQM'}"> <c:forEach var="location" items="${dataset.viewInfo.locations}" begin="0" end="0"> <a target="_blank" style="font-size: 80%" - href="<%= getServletContext().getInitParameter("dqm") %>/show_plots?file=<c:out value="${location.resource}"/>">Show Plots</a> + href="<%=getServletContext().getInitParameter("dqm")%>/show_plots?file=<c:out value="${location.resource}"/>">Show Plots</a> </c:forEach> </c:if> </td> Modified: webapps/trunk/run-webapp/src/main/webapp/showEpics.jsp ============================================================================= --- webapps/trunk/run-webapp/src/main/webapp/showEpics.jsp (original) +++ webapps/trunk/run-webapp/src/main/webapp/showEpics.jsp Tue Jan 26 18:33:36 2016 @@ -22,9 +22,8 @@ <body> <% - final int run = Integer.parseInt(request.getParameterValues("run")[0]); + final EpicsType epicsType = (EpicsType) request.getAttribute("EpicsType"); final List<EpicsVariable> epicsVariables = (List<EpicsVariable>) request.getAttribute("EpicsVariables"); - final EpicsType epicsType = (EpicsType) request.getAttribute("EpicsType"); final List<EpicsData> epicsDataList = (List<EpicsData>) request.getAttribute("EpicsDataList"); %> <h2>EPICS <%=epicsType.getTypeCode()%>s</h2> Modified: webapps/trunk/run-webapp/src/main/webapp/showRun.jsp ============================================================================= --- webapps/trunk/run-webapp/src/main/webapp/showRun.jsp (original) +++ webapps/trunk/run-webapp/src/main/webapp/showRun.jsp Tue Jan 26 18:33:36 2016 @@ -3,9 +3,9 @@ <%@page language="java" session="true"%> <html> -<link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" /> + <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" /> <head> -<title>HPS Run Database - Run <c:out value="${run}"/></title> + <title>HPS Run Database - Run <c:out value="${run}"/></title> </head> <body> Modified: webapps/trunk/run-webapp/src/main/webapp/showRunTable.jsp ============================================================================= --- webapps/trunk/run-webapp/src/main/webapp/showRunTable.jsp (original) +++ webapps/trunk/run-webapp/src/main/webapp/showRunTable.jsp Tue Jan 26 18:33:36 2016 @@ -5,8 +5,10 @@ <html> -<!-- application stylesheet --> -<link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" /> +<head> + <!-- application stylesheet --> + <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" /> +</head> <!-- include links and scripts for tablesorter jquery plugin --> <%@include file="html/tablesorter.html"%> Modified: webapps/trunk/run-webapp/src/main/webapp/showSummary.jsp ============================================================================= --- webapps/trunk/run-webapp/src/main/webapp/showSummary.jsp (original) +++ webapps/trunk/run-webapp/src/main/webapp/showSummary.jsp Tue Jan 26 18:33:36 2016 @@ -104,38 +104,38 @@ </div> <div id="tabs-2"> <p> - <a target="dataFrame" href="epics?run=<c:out value="${run}"/>&epicsBankType=<%=EpicsType.EPICS_2S%>">EPICS 2s</a> [ - <a class="download" target="_blank" href="download?dataType=EPICS_2S&run=<c:out value="${run}"/>">CSV</a>] + <a target="dataFrame" href="epics?run=<c:out value="${run}"/>&epicsBankType=<%=EpicsType.EPICS_2S%>">EPICS 2s</a> + [<a class="download" target="_blank" href="download?dataType=EPICS_2S&run=<c:out value="${run}"/>">CSV</a>] </p> <p> - <a target="dataFrame" href="epics?run=<c:out value="${run}"/>&epicsBankType=<%=EpicsType.EPICS_20S%>">EPICS 20s</a> [ - <a class="download" target="_blank" href="download?dataType=EPICS_20S&run=<c:out value="${run}"/>">CSV</a>] + <a target="dataFrame" href="epics?run=<c:out value="${run}"/>&epicsBankType=<%=EpicsType.EPICS_20S%>">EPICS 20s</a> + [<a class="download" target="_blank" href="download?dataType=EPICS_20S&run=<c:out value="${run}"/>">CSV</a>] </p> <p> - <a target="dataFrame" href="scalers?run=<c:out value="${run}"/>">Scalers</a> [ - <a class="download" target="_blank" href="download?dataType=SCALERS&run=<c:out value="${run}"/>">CSV</a>] + <a target="dataFrame" href="scalers?run=<c:out value="${run}"/>">Scalers</a> + [<a class="download" target="_blank" href="download?dataType=SCALERS&run=<c:out value="${run}"/>">CSV</a>] </p> </div> <div id="tabs-3"> <p> - <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=RAW&fileFormat=EVIO">EVIO Raw</a> [ - <a class="download" target="_blank" href="download?dataType=RAW_FILES&run=<c:out value="${run}"/>">CSV</a>] + <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=RAW&fileFormat=EVIO">EVIO Raw</a> + [<a class="download" target="_blank" href="download?dataType=RAW_FILES&run=<c:out value="${run}"/>">CSV</a>] </p> <p> - <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=RECON&fileFormat=LCIO">LCIO Recon</a> [ - <a class="download" target="_blank" href="download?dataType=RECON_FILES&run=<c:out value="${run}"/>">CSV</a>] + <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=RECON&fileFormat=LCIO">LCIO Recon</a> + [<a class="download" target="_blank" href="download?dataType=RECON_FILES&run=<c:out value="${run}"/>">CSV</a>] </p> <p> - <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=DST&fileFormat=ROOT">ROOT DST</a> [ - <a class="download" target="_blank" href="download?dataType=DST_FILES&run=<c:out value="${run}"/>">CSV</a>] + <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=DST&fileFormat=ROOT">ROOT DST</a> + [<a class="download" target="_blank" href="download?dataType=DST_FILES&run=<c:out value="${run}"/>">CSV</a>] </p> <p> - <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=DQM&fileFormat=AIDA">AIDA DQM</a> [ - <a class="download" target="_blank" href="download?dataType=AIDA_DQM_FILES&run=<c:out value="${run}"/>">CSV</a>] + <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=DQM&fileFormat=AIDA">AIDA DQM</a> + [<a class="download" target="_blank" href="download?dataType=AIDA_DQM_FILES&run=<c:out value="${run}"/>">CSV</a>] </p> <p> - <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=DQM&fileFormat=ROOT">ROOT DQM</a> [ - <a class="download" target="_blank" href="download?dataType=ROOT_DQM_FILES&run=<c:out value="${run}"/>">CSV</a>] + <a target="dataFrame" href="datasets?run=<c:out value="${run}"/>&dataType=DQM&fileFormat=ROOT">ROOT DQM</a> + [<a class="download" target="_blank" href="download?dataType=ROOT_DQM_FILES&run=<c:out value="${run}"/>">CSV</a>] </p> </div> <div id="tabs-4"> Modified: webapps/trunk/run-webapp/src/main/webapp/showTriggerConfig.jsp ============================================================================= --- webapps/trunk/run-webapp/src/main/webapp/showTriggerConfig.jsp (original) +++ webapps/trunk/run-webapp/src/main/webapp/showTriggerConfig.jsp Tue Jan 26 18:33:36 2016 @@ -7,7 +7,7 @@ <html> <body> <div> - <%= request.getAttribute("daqconfig").toString().replaceAll("\\r?\\n", "<br />") %> + <%=request.getAttribute("daqconfig").toString().replaceAll("\\r?\\n", "<br/>")%> </div> </body> </html>