Skip to content

Commit

Permalink
Merge pull request #27 from diging/develop
Browse files Browse the repository at this point in the history
Prepare Release
  • Loading branch information
jdamerow authored Sep 23, 2021
2 parents 09fb31d + a3cee03 commit 334b731
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 5 deletions.
8 changes: 7 additions & 1 deletion cassiopeia/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<spring-security-version>4.1.3.RELEASE</spring-security-version>
<geco.requests.version>0.6</geco.requests.version>
<geco.util.version>0.4.2</geco.util.version>
<geco.september.util.version>0.2</geco.september.util.version>
<geco.september.util.version>0.3</geco.september.util.version>
<geco.kafka-util.version>0.1</geco.kafka-util.version>

<tomcat.deploy.path></tomcat.deploy.path>
<tomcat.app.name>cassiopeia</tomcat.app.name>
Expand Down Expand Up @@ -56,6 +57,11 @@
<artifactId>september-util</artifactId>
<version>${geco.september.util.version}</version>
</dependency>
<dependency>
<groupId>edu.asu.diging.giles-eco</groupId>
<artifactId>kafka-util</artifactId>
<version>${geco.kafka-util.version}</version>
</dependency>


<!-- Spring -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private static class CompositeImageParser extends CompositeParser {
private void doOCR(File input, File output, TesseractOCRConfig config) throws IOException, TikaException {

List<String> cmd = new ArrayList<>(Arrays.asList(config.getTesseractPath() + getTesseractProg(), input.getPath(), output.getPath(), "-l",
config.getLanguage(), "-psm", config.getPageSegMode()));
config.getLanguage(), "--psm", config.getPageSegMode()));

if (createHOCR) {
cmd.add("hocr");
Expand Down Expand Up @@ -350,4 +350,4 @@ static String getTesseractProg() {
return System.getProperty("os.name").startsWith("Windows") ? "tesseract.exe" : "tesseract";
}

}
}
16 changes: 15 additions & 1 deletion cassiopeia/src/main/resources/log4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@
<param name="ConversionPattern" value="%d{dd MMM yyyy HH:mm:ss,SSS} %-5p: %c - %m%n" />
</layout>
</appender>
<appender name="FILE" class="org.apache.log4j.FileAppender">
<param name="file" value="logs/cassiopeia.log"/>
<param name="immediateFlush" value="true"/>

<layout class="org.apache.log4j.PatternLayout">
<param name="conversionPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p: %c - %m%n"/>
</layout>
</appender>


<!-- Application Loggers -->
<logger name="edu.asu.template">
<logger name="edu.asu.diging">
<level value="${log.level}" />
</logger>

Expand All @@ -35,11 +44,16 @@
<logger name="org.springframework.web">
<level value="${log.level}" />
</logger>

<logger name="org.apache.tika">
<level value="debug" />
</logger>

<!-- Root Logger -->
<root>
<priority value="warn" />
<appender-ref ref="console" />
<appender-ref ref="FILE" />
</root>

</log4j:configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">

<mvc:annotation-driven />
<context:component-scan base-package="edu.asu.diging.gilesecosystem.cassiopeia.web,edu.asu.diging.gilesecosystem.cassiopeia.rest,edu.asu.diging.gilesecosystem.kafka.util.web" />


<!-- Handles HTTP GET requests for /resources/** by efficiently serving
Expand Down
2 changes: 1 addition & 1 deletion cassiopeia/src/main/webapp/WEB-INF/spring/root-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">

<mvc:annotation-driven />
<context:component-scan base-package="edu.asu.diging.gilesecosystem.cassiopeia,edu.asu.diging.gilesecosystem.util,edu.asu.diging.gilesecosystem.requests" />
<context:component-scan base-package="edu.asu.diging.gilesecosystem.cassiopeia.core,edu.asu.diging.gilesecosystem.util,edu.asu.diging.gilesecosystem.requests,edu.asu.diging.gilesecosystem.kafka.util.service" />

<import resource="spring-security.xml" />

Expand Down
3 changes: 3 additions & 0 deletions cassiopeia/src/main/webapp/WEB-INF/tiles-defs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@
<definition name="admin/requests/inProgress" extends="base.definition">
<put-attribute name="content" value="/WEB-INF/views/admin/requests_inprogress.jsp" />
</definition>
<definition name="admin/kafka/listeners" extends="base.definition">
<put-attribute name="content" value="/WEB-INF/views/admin/manage_listeners.jsp" />
</definition>

</tiles-definitions>
3 changes: 3 additions & 0 deletions cassiopeia/src/main/webapp/WEB-INF/tiles/skeleton.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
<li role="presentation">
<a href="<c:url value="/admin/requests" />">Requests</a>
</li>
<li role="presentation">
<a href="<c:url value="/admin/kafka/listeners" />">Kafka</a>
</li>
</sec:authorize>

<sec:authorize access="isAuthenticated()">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>



<div class="well">

<h3>
Kafka listeners are currently:
<c:if test="${listenerStatus}">
<span class="label label-success pull-right">Active</span>
</c:if>
<c:if test="${not listenerStatus}">
<span class="label label-danger pull-right">Stopped</span>
</c:if>
</h3>

<div style="margin-top: 70px;"><center>
<c:if test="${listenerStatus}">
<form:form
action="${pageContext.request.contextPath}/admin/kafka/listeners/stop"
method="POST">
<input type="submit" value="Stop Kafka Listeners"
class="btn btn-lg btn-danger" />
</form:form>
<p><br>
Kafka listeners have been started!
</p>
</c:if>

<c:if test="${not listenerStatus}">
<form:form
action="${pageContext.request.contextPath}/admin/kafka/listeners/start"
method="POST">
<input type="submit" value="Start Kafka Listeners"
class="btn btn-lg btn-success" />
</form:form>
<p><br>
Kafka listeners have been stopped!
</p>
</c:if>
</center></div>
</div>

0 comments on commit 334b731

Please sign in to comment.