Commit bdde11a5 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1120: Allow cancellation of running crawls

Task-Url: https://pm.winseda.de/issues/1120
parent 9c57b9a3
......@@ -86,20 +86,19 @@
</li>
</c:if>
</ul>
<c:if test="${crawl.online && _auth.level >= 100}">
<td>
<c:if test="${state=='ok'}">
<button type="button" onclick="editor.performOffline('${crawl.id}');" class="btn btn-link"><i class="fa fa-repeat"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.reindex" /></button><br />
</c:if>
<c:if test="${state=='error'}">
<button type="button" onclick="editor.performOffline('${crawl.id}');" class="btn btn-link"><i class="fa fa-play"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.try_continue" /></button><br />
</c:if>
<c:if test="${_auth.level >= 100}">
<td>
<c:if test="${crawl.online}">
<c:if test="${state=='ok'}">
<button type="button" onclick="editor.performOffline('${crawl.id}');" class="btn btn-link"><i class="fa fa-repeat"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.reindex" /></button><br />
</c:if>
<c:if test="${state=='error'}">
<button type="button" onclick="editor.performOffline('${crawl.id}');" class="btn btn-link"><i class="fa fa-play"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.try_continue" /></button><br />
</c:if>
</c:if>
<c:if test="${state!='info'}">
<button type="button" onclick="editor.removeCrawl('${crawl.id}', this);" class="btn btn-link"><i class="fa fa-trash fa-color-danger"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.remove" /></button>
</c:if>
<c:if test="${state=='info'}">
<button type="button" onclick="editor.cancelCrawl('${crawl.id}', this);" class="btn btn-link"><i class="fa fa-ban fa-color-warning"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.cancel" /></button>
</c:if>
</td>
</c:if>
</tr>
......
......@@ -2,9 +2,12 @@
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<!-- -->
<c:choose>
<c:when test="${crawlState.state=='ACTIVE'}">
<strong><s:message code="~eu.dariah.de.minfba.search.crawling.pipeline.in_progress" /></strong>
<button type="button" onclick="editor.cancelCrawl('${crawl.id}', this);" class="btn btn-link pull-right"><i class="fa fa-ban fa-color-danger"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.cancel" /></button>
<ul class="inner-state-list" style="margin-top: 8px;">
<c:forEach begin="0" end="${crawlState.pipelineLength-1}" var="i">
<li>
......@@ -44,7 +47,7 @@
</c:choose>
</li>
</c:forEach>
</ul>
</ul>
</c:when>
<c:when test="${crawlState.state=='ERROR'}">
<s:message code="~eu.dariah.de.minfba.common.status.error" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment