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 @@
<td <c:if test="${crawl.offline}">colspan="2"</c:if>>
<ul>
<ul class="inner-state-list">
<li>
<span class="state-heading state-${state}">
<c:choose>
......
......@@ -4,23 +4,23 @@
<s:url value="${actionPath}" var="saveUrl" />
<form method="POST" action="${saveUrl}" class="form-horizontal" >
<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="endpointId" name="endpointId" value="${endpointId}" />
<input type="hidden" id="schemaId" name="schemaId" value="${schemaId}" />
</div>
<div class="form-content">
<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>
<div class="col-sm-9">
<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-7">
<input type="text" class="form-control" name="oaiPrefix" id="oaiPrefix" value="${prefix}" />
</div>
</div>
</div>
<div class="form-footer form-group">
<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-primary start form-btn-submit" type="submit"><s:message code="~eu.dariah.de.minfba.common.link.save" /></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.actions.save" /></button>
</div>
</div>
</form>
......@@ -36,7 +36,7 @@
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.error" />
</c:when>
<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_state_message" value="~eu.dariah.de.minfba.search.states.datamodel.unavailable" />
</c:when>
......@@ -65,7 +65,7 @@
<i class="fa fa-lg fa-${ep_icon}" aria-hidden="true"></i>
</th>
<td>
<ul>
<ul class="inner-state-list">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span>
<span class="no-break-out">${ep.url}</span>
......@@ -73,6 +73,11 @@
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.type" />:</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>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.common.id" />:</span>
......@@ -100,15 +105,27 @@
<i class="fa fa-lg fa-${ds_icon}" aria-hidden="true"></i>
</th>
<td>
<ul>
<ul class="inner-state-list">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.model" />:</span>
<span class="no-break-out">${ds.datamodelPojo.name}</span>
</li>
<c:if test="${ep.method=='OAI-PMH'}">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.schema.oaipmh_prefix" />:</span>
<span class="oaipmh-metadata-prefix">${ds.remoteAlias!=null && fn:length(ds.remoteAlias) > 0 ? ds.remoteAlias : "?"}</span>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.model.oaipmh_prefix" />:</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>
</c:if>
<li>
......@@ -117,7 +134,12 @@
</li>
<li>
<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>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.common.status" />:</span>
......@@ -127,26 +149,11 @@
</td>
</tr>
</table>
<!-- Push to actions -->
<!-- <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>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.crawls" /></h4>
<c:choose>
<c:when test="${ep_status=='ok' && ds_status=='ok'}">
<table class="details-table">
<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 test="${ds_status=='info'}">
<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 />
</c:when>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" />
......@@ -154,7 +161,6 @@
</c:choose>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.recent_activity" /></h4>
<div class="previous-crawls-container">
</div>
......
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ 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="icon" value="check" />
......@@ -52,11 +53,11 @@
<tr data-detail-target="${ep.id}-${ds.id}" class="state-row-${status}<c:if test="${i==selectedIndex}"> active</c:if>">
<th class="state-${status}">
<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" />
</th>
<td>
<ul>
<ul class="inner-state-list">
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" />:</span>
<span class="no-break-out">${ep.url}</span>
......
......@@ -5,17 +5,17 @@
<c:choose>
<c:when test="${crawlState.state=='ACTIVE'}">
<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">
<tr>
<li>
<c:choose>
<c:when test="${i<crawlState.pipelineIndex}">
<td><i class="fa fa-check fa-2x"></i></td>
<td><s:message code="~eu.dariah.de.minfba.common.status.ok" /></td>
<i class="fa fa-check fa-lg"></i>
<s:message code="${crawlState.serviceTitleMessageCode[i]}" />: <s:message code="~eu.dariah.de.minfba.common.status.ok" />
</c:when>
<c:when test="${i==crawlState.pipelineIndex}">
<td><i class="fa fa-refresh fa-spin fa-2x"></i></td>
<td>
<i class="fa fa-refresh fa-spin fa-lg"></i>
<s:message code="~eu.dariah.de.minfba.common.status.busy" var="counts" />
<c:choose>
<c:when test="${crawlState.currentSize>0 && crawlState.currentProgress>0}">
......@@ -34,17 +34,17 @@
</c:when>
</c:choose>
<s:message code="${crawlState.serviceTitleMessageCode[i]}" />... ${counts}
</td>
<s:message code="${crawlState.serviceTitleMessageCode[i]}" />: ${counts}
</c:when>
<c:otherwise>
<td><i class="fa fa-clock-o fa-2x"></i></td>
<td><s:message code="${crawlState.serviceTitleMessageCode[i]}" />... <s:message code="~eu.dariah.de.minfba.common.status.waiting" /></td>
<i class="fa fa-clock-o fa-lg"></i>
<s:message code="${crawlState.serviceTitleMessageCode[i]}" />: <s:message code="~eu.dariah.de.minfba.common.status.waiting" />
</c:otherwise>
</c:choose>
</tr>
</li>
</c:forEach>
</table>
</ul>
</c:when>
<c:when test="${crawlState.state=='ERROR'}">
<s:message code="~eu.dariah.de.minfba.common.status.error" />
......
......@@ -36,13 +36,13 @@
</div>
</div>
<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>
<tr>
<th></th>
<th><s:message code="~eu.dariah.de.minfba.metamodel.schema.name" /></th>
<th><s:message code="~eu.dariah.de.minfba.metamodel.schema.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.metamodel.model.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.model.document_count" /></th>
<th></th>
</tr>
</thead>
......
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