Commit 12ba9e7b authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

803: Complete collection view

Task-Url: https://pm.winseda.de/issues/803
parent c793bafc
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<td <c:if test="${crawl.offline}">colspan="2"</c:if>> <td <c:if test="${crawl.offline}">colspan="2"</c:if>>
<ul> <ul class="inner-state-list">
<li> <li>
<span class="state-heading state-${state}"> <span class="state-heading state-${state}">
<c:choose> <c:choose>
......
...@@ -4,23 +4,23 @@ ...@@ -4,23 +4,23 @@
<s:url value="${actionPath}" var="saveUrl" /> <s:url value="${actionPath}" var="saveUrl" />
<form method="POST" action="${saveUrl}" class="form-horizontal" > <form method="POST" action="${saveUrl}" class="form-horizontal" >
<div class="form-header"> <div class="form-header">
<h3 id="form-header-title"><s:message code="~eu.dariah.de.minfba.search.view.schemas.set_oai_prefix" /></h3> <h3 id="form-header-title"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.set_oaipmh_prefix" /></h3>
<input type="hidden" id="datasourceId" name="datasourceId" value="${datasourceId}" /> <input type="hidden" id="datasourceId" name="datasourceId" value="${datasourceId}" />
<input type="hidden" id="endpointId" name="endpointId" value="${endpointId}" /> <input type="hidden" id="endpointId" name="endpointId" value="${endpointId}" />
<input type="hidden" id="schemaId" name="schemaId" value="${schemaId}" /> <input type="hidden" id="schemaId" name="schemaId" value="${schemaId}" />
</div> </div>
<div class="form-content"> <div class="form-content">
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-3" for="oai_prefix"><s:message code="~eu.dariah.de.minfba.search.model.schema.oai_prefix" /></label> <label class="control-label col-sm-5" for="oai_prefix"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.oaipmh_prefix" /></label>
<div class="col-sm-9"> <div class="col-sm-7">
<input type="text" class="form-control" name="oaiPrefix" id="oaiPrefix" value="${prefix}" /> <input type="text" class="form-control" name="oaiPrefix" id="oaiPrefix" value="${prefix}" />
</div> </div>
</div> </div>
</div> </div>
<div class="form-footer form-group"> <div class="form-footer form-group">
<div class="col-sm-12"> <div class="col-sm-12">
<button class="btn btn-default cancel form-btn-cancel" type="reset"><s:message code="~eu.dariah.de.minfba.common.link.cancel" /></button> <button class="btn btn-default cancel form-btn-cancel" type="reset"><s:message code="~eu.dariah.de.minfba.common.actions.cancel" /></button>
<button class="btn btn-primary start form-btn-submit" type="submit"><s:message code="~eu.dariah.de.minfba.common.link.save" /></button> <button class="btn btn-primary start form-btn-submit" type="submit"><s:message code="~eu.dariah.de.minfba.common.actions.save" /></button>
</div> </div>
</div> </div>
</form> </form>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.error" /> <c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.error" />
</c:when> </c:when>
<c:when test="${!ds.datamodelPojo.available}"> <c:when test="${!ds.datamodelPojo.available}">
<c:set var="ds_status" value="warning" /> <c:set var="ds_status" value="error" />
<c:set var="ds_icon" value="exclamation" /> <c:set var="ds_icon" value="exclamation" />
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.datamodel.unavailable" /> <c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.datamodel.unavailable" />
</c:when> </c:when>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<i class="fa fa-lg fa-${ep_icon}" aria-hidden="true"></i> <i class="fa fa-lg fa-${ep_icon}" aria-hidden="true"></i>
</th> </th>
<td> <td>
<ul> <ul class="inner-state-list">
<li> <li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span>
<span class="no-break-out">${ep.url}</span> <span class="no-break-out">${ep.url}</span>
...@@ -73,6 +73,11 @@ ...@@ -73,6 +73,11 @@
<li> <li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.type" />:</span> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.type" />:</span>
<span class="no-break-out">${ep.method}</span> <span class="no-break-out">${ep.method}</span>
<c:if test="${ep.method=='OAI-PMH'}">
<div class="inline-button ${prefix_state}" onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');">
<a href="${ep.url}?verb=Identify" target="_blank"><i class="fa fa-globe"></i> <s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.check_availability" /></a>
</div>
</c:if>
</li> </li>
<li> <li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span>
...@@ -100,15 +105,27 @@ ...@@ -100,15 +105,27 @@
<i class="fa fa-lg fa-${ds_icon}" aria-hidden="true"></i> <i class="fa fa-lg fa-${ds_icon}" aria-hidden="true"></i>
</th> </th>
<td> <td>
<ul> <ul class="inner-state-list">
<li> <li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.model" />:</span> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.model" />:</span>
<span class="no-break-out">${ds.datamodelPojo.name}</span> <span class="no-break-out">${ds.datamodelPojo.name}</span>
</li> </li>
<c:if test="${ep.method=='OAI-PMH'}"> <c:if test="${ep.method=='OAI-PMH'}">
<li> <li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.schema.oaipmh_prefix" />:</span> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.oaipmh_prefix" />:</span>
<span class="oaipmh-metadata-prefix">${ds.remoteAlias!=null && fn:length(ds.remoteAlias) > 0 ? ds.remoteAlias : "?"}</span> <c:choose>
<c:when test="${ds.remoteAlias!=null && fn:length(ds.remoteAlias) > 0}">
<c:set var="prefix" value="${ds.remoteAlias}" />
<c:set var="prefix_state" value="state-${ds_status}" />
</c:when>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.common.status.undefined" var="prefix" />
<c:set var="prefix_state" value="state-warning" />
</c:otherwise>
</c:choose>
<div class="inline-button ${prefix_state}" onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.remoteAlias}', '.oaipmh-metadata-prefix');">
<i class="fa fa-pencil-square-o"></i> <span class="oaipmh-metadata-prefix">${prefix}</span>
</div>
</li> </li>
</c:if> </c:if>
<li> <li>
...@@ -117,7 +134,12 @@ ...@@ -117,7 +134,12 @@
</li> </li>
<li> <li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" />:</span> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" />:</span>
<span class="no-break-out">${s.docs > 0 ? s.docs : '0'}</span> <span class="no-break-out"><fmt:formatNumber value="${ds.docs}" /></span>
<c:if test="${ds.docs > 0}">
<div class="inline-button ${prefix_state}" onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');">
<i class="fa fa-trash"></i> <s:message code="~eu.dariah.de.minfba.common.actions.clear" />
</div>
<br /></c:if>
</li> </li>
<li> <li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span>
...@@ -128,25 +150,10 @@ ...@@ -128,25 +150,10 @@
</tr> </tr>
</table> </table>
<!-- Push to actions --> <h4><s:message code="~eu.dariah.de.minfba.search.view.titles.crawls" /></h4>
<!-- <a href="${ep.url}?verb=Identify" target="_blank"><i class="fa fa-retweet"></i>~ Check availability</a> -->
<!-- <c:if test="${s.docs > 0}"><button onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');" class="btn btn-link"><i class="fa fa-trash"></i><s:message code="~eu.dariah.de.minfba.common.actions.clear" /></button><br /></c:if> -->
<!-- <button onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.remoteAlias}', '.oaipmh-metadata-prefix');" class="btn btn-link"><i class="fa fa-pencil-square-o"></i>Set prefix</button> -->
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.online_data" /></h4>
<c:choose> <c:choose>
<c:when test="${ep_status=='ok' && ds_status=='ok'}"> <c:when test="${ds_status=='info'}">
<table class="details-table"> <button onclick="editor.crawlOnline('${ep.id}','${ds.id}');" class="btn btn-default"><i class="fa fa-refresh"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.crawl_online" /></button><br />
<tbody>
<tr>
<th><s:message code="~eu.dariah.de.minfba.common.link.actions"/></th>
<td>
<button onclick="editor.crawlOnline('${ep.id}','${ds.id}');" class="btn btn-link"><i class="fa fa-refresh"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.crawl_online" /></button><br />
<button onclick="editor.createEmptyCrawl('${ep.id}','${ds.id}');" class="btn btn-link"><i class="fa fa-asterisk"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.create_empty" /></button>
</td>
</tr>
</tbody>
</table>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" /> <s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" />
...@@ -154,7 +161,6 @@ ...@@ -154,7 +161,6 @@
</c:choose> </c:choose>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.recent_activity" /></h4>
<div class="previous-crawls-container"> <div class="previous-crawls-container">
</div> </div>
......
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="status" value="ok" /> <c:set var="status" value="ok" />
<c:set var="icon" value="check" /> <c:set var="icon" value="check" />
...@@ -52,11 +53,11 @@ ...@@ -52,11 +53,11 @@
<tr data-detail-target="${ep.id}-${ds.id}" class="state-row-${status}<c:if test="${i==selectedIndex}"> active</c:if>"> <tr data-detail-target="${ep.id}-${ds.id}" class="state-row-${status}<c:if test="${i==selectedIndex}"> active</c:if>">
<th class="state-${status}"> <th class="state-${status}">
<i class="fa fa-lg fa-${icon}" aria-hidden="true"></i><br /> <i class="fa fa-lg fa-${icon}" aria-hidden="true"></i><br />
${ds.docs}<br /> <fmt:formatNumber value="${ds.docs}" /><br />
<s:message code="~eu.dariah.de.minfba.search.model.dataset.documents" /> <s:message code="~eu.dariah.de.minfba.search.model.dataset.documents" />
</th> </th>
<td> <td>
<ul> <ul class="inner-state-list">
<li> <li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span> <span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span>
<span class="no-break-out">${ep.url}</span> <span class="no-break-out">${ep.url}</span>
......
...@@ -5,17 +5,17 @@ ...@@ -5,17 +5,17 @@
<c:choose> <c:choose>
<c:when test="${crawlState.state=='ACTIVE'}"> <c:when test="${crawlState.state=='ACTIVE'}">
<strong><s:message code="~eu.dariah.de.minfba.search.crawling.pipeline.in_progress" /></strong> <strong><s:message code="~eu.dariah.de.minfba.search.crawling.pipeline.in_progress" /></strong>
<table> <ul class="inner-state-list" style="margin-top: 8px;">
<c:forEach begin="0" end="${crawlState.pipelineLength-1}" var="i"> <c:forEach begin="0" end="${crawlState.pipelineLength-1}" var="i">
<tr> <li>
<c:choose> <c:choose>
<c:when test="${i<crawlState.pipelineIndex}"> <c:when test="${i<crawlState.pipelineIndex}">
<td><i class="fa fa-check fa-2x"></i></td> <i class="fa fa-check fa-lg"></i>
<td><s:message code="~eu.dariah.de.minfba.common.status.ok" /></td> <s:message code="${crawlState.serviceTitleMessageCode[i]}" />: <s:message code="~eu.dariah.de.minfba.common.status.ok" />
</c:when> </c:when>
<c:when test="${i==crawlState.pipelineIndex}"> <c:when test="${i==crawlState.pipelineIndex}">
<td><i class="fa fa-refresh fa-spin fa-2x"></i></td> <i class="fa fa-refresh fa-spin fa-lg"></i>
<td>
<s:message code="~eu.dariah.de.minfba.common.status.busy" var="counts" /> <s:message code="~eu.dariah.de.minfba.common.status.busy" var="counts" />
<c:choose> <c:choose>
<c:when test="${crawlState.currentSize>0 && crawlState.currentProgress>0}"> <c:when test="${crawlState.currentSize>0 && crawlState.currentProgress>0}">
...@@ -34,17 +34,17 @@ ...@@ -34,17 +34,17 @@
</c:when> </c:when>
</c:choose> </c:choose>
<s:message code="${crawlState.serviceTitleMessageCode[i]}" />... ${counts} <s:message code="${crawlState.serviceTitleMessageCode[i]}" />: ${counts}
</td>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<td><i class="fa fa-clock-o fa-2x"></i></td> <i class="fa fa-clock-o fa-lg"></i>
<td><s:message code="${crawlState.serviceTitleMessageCode[i]}" />... <s:message code="~eu.dariah.de.minfba.common.status.waiting" /></td> <s:message code="${crawlState.serviceTitleMessageCode[i]}" />: <s:message code="~eu.dariah.de.minfba.common.status.waiting" />
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</tr> </li>
</c:forEach> </c:forEach>
</table> </ul>
</c:when> </c:when>
<c:when test="${crawlState.state=='ERROR'}"> <c:when test="${crawlState.state=='ERROR'}">
<s:message code="~eu.dariah.de.minfba.common.status.error" /> <s:message code="~eu.dariah.de.minfba.common.status.error" />
......
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
</div> </div>
</div> </div>
<div class="clearfix"> <div class="clearfix">
<table id="schemas-table" class="table table-striped table-bordered table-condensed"> <table id="schemas-table" class="state-table table-striped">
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th><s:message code="~eu.dariah.de.minfba.metamodel.schema.name" /></th> <th><s:message code="~eu.dariah.de.minfba.metamodel.model.name" /></th>
<th><s:message code="~eu.dariah.de.minfba.metamodel.schema.index_name" /></th> <th><s:message code="~eu.dariah.de.minfba.metamodel.model.index_name" /></th>
<th><s:message code="~eu.dariah.de.minfba.search.metamodel_view.schema.document_count" /></th> <th><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.document_count" /></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
......
Supports Markdown
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