Commit 4f3557e8 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

803: Complete collection view

Task-Url: https://pm.winseda.de/issues/803
parent 6553ce7d
......@@ -43,92 +43,96 @@
<h4><s:message code="~eu.dariah.de.minfba.metamodel.collections" /></h4>
<table id="endpoint-table" class="table-light">
<tbody>
<c:forEach items="${datasources}" var="ds" varStatus="status">
<tr data-detail-target="${ds.combinedId}"<c:if test="${status.index==0}"> class="active"</c:if>>
<td class="state-column state-${ds.stringState}">
<div class="cell-heading">OK</div>
<div class="cell-payload">3m old</div>
</td>
<td class="content-column">
<div class="cell-heading no-break-out">${ds.schemaName}</div>
<div class="cell-payload no-break-out">${ds.url}</div>
</td>
</tr>
<c:set var="i" value="0" />
<c:forEach items="${collection.endpoints}" var="ep">
<c:forEach items="${ep.datasetPojos}" var="ds">
<%@ include file="incl/incl_dataset_table_row.jsp" %>
</c:forEach>
</c:forEach>
</tbody>
</table>
</div>
<div class="table-light-details-container col-sm-7">
<c:set var="index" value="0" />
<c:forEach items="${collection.endpoints}" var="ep">
<c:forEach items="${datasources}" var="ds" varStatus="status">
<div id="table-details${ds.combinedId}" class="table-light-details<c:if test="${status.index!=0}"> hide</c:if>">
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.endpoint_schema_details" /></h4>
<table class="details-table">
<tbody>
<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" /></th>
<td>
<span class="no-break-out">${ds.url}</span>
<c:if test="${ds.method=='OAI-PMH'}">
<a href="${ds.url}?verb=Identify" target="_blank" class="btn btn-link"><i class="fa fa-refresh"></i>Check identify</a>
<c:forEach items="${ep.datasetPojos}" var="ds">
<div id="table-details${ep.id}.${ds.id}" class="table-light-details<c:if test="${index!=0}"> hide</c:if>">
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.endpoint_schema_details" /></h4>
<table class="details-table">
<tbody>
<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" /></th>
<td>
<span class="no-break-out">${ep.url}</span>
<c:if test="${ep.method=='OAI-PMH'}">
<a href="${ep.url}?verb=Identify" target="_blank" class="btn btn-link"><i class="fa fa-refresh"></i>Check identify</a>
</c:if>
</td>
</tr>
<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.type" /></th><td>${ep.method}</td></tr>
<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.schema" /></th><td class="no-break-out">${ds.datamodelPojo.name}</td></tr>
<c:if test="${ep.method=='OAI-PMH'}">
<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.set" /></th><td class="no-break-out">${ep.set}</td></tr>
<c:if test="${ds.available}">
<tr><th><s:message code="~eu.dariah.de.minfba.search.metamodel_view.schema.oaipmh_prefix" /></th>
<td class="no-break-out">
<span class="oaipmh-metadata-prefix">${ds.remoteAlias!=null && fn:length(ds.remoteAlias) > 0 ? ds.remoteAlias : "?"}</span>
<button onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.prefix}', '.oaipmh-metadata-prefix');" class="btn btn-link"><i class="fa fa-pencil-square-o"></i>Set prefix</button>
</td>
</tr>
</c:if>
</td>
</tr>
<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.type" /></th><td>${ds.method}</td></tr>
<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.schema" /></th><td class="no-break-out">${ds.schemaName}</td></tr>
<c:if test="${ds.method=='OAI-PMH'}">
<tr><th><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.set" /></th><td class="no-break-out">${ds.set}</td></tr>
<c:if test="${ds.schemaState!='UNAVAILABLE'}">
<tr><th><s:message code="~eu.dariah.de.minfba.search.metamodel_view.schema.oaipmh_prefix" /></th>
<td class="no-break-out">
<span class="oaipmh-metadata-prefix">${ds.metadataPrefix!=null && fn:length(ds.metadataPrefix) > 0 ? ds.metadataPrefix : "?"}</span>
<button onclick="editor.editPrefix('${ds.endpointId}','${ds.schemaId}','${ds.metadataPrefix}', '.oaipmh-metadata-prefix');" class="btn btn-link"><i class="fa fa-pencil-square-o"></i>Set prefix</button>
</td>
</tr>
</c:if>
</c:if>
<tr><th><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" /></th>
<td>
${s.docs}
<c:if test="${s.docs > 0}"><button onclick="editor.clearEndpointSchemaIndex('${ds.endpointId}','${ds.schemaId}');" class="btn btn-link"><i class="fa fa-trash"></i><s:message code="~eu.dariah.de.minfba.common.actions.clear" /></button><br /></c:if>
</td>
</tr>
<tr><th><s:message code="~eu.dariah.de.minfba.common.status" /></th>
<td class="crawl-state-container">
<s:message code="~eu.dariah.de.minfba.common.status.loading"/>...
</td>
</tr>
</tbody>
</table>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.online_data" /></h4>
<c:choose>
<c:when test="${ds.actionable}">
<table class="details-table">
<tbody>
<tr>
<th><s:message code="~eu.dariah.de.minfba.common.link.actions"/></th>
<td>
<button onclick="editor.crawlOnline('${ds.endpointId}','${ds.schemaId}');" 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('${ds.endpointId}','${ds.schemaId}');" 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:otherwise>
<s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" />
</c:otherwise>
</c:choose>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.existing_crawls" /></h4>
<div class="previous-crawls-container">
</div>
</div>
<tr><th><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" /></th>
<td>
${s.docs}
<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>
</td>
</tr>
<tr><th><s:message code="~eu.dariah.de.minfba.common.status" /></th>
<td class="crawl-state-container">
<s:message code="~eu.dariah.de.minfba.common.status.loading"/>...
</td>
</tr>
</tbody>
</table>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.online_data" /></h4>
<c:choose>
<c:when test="${true}">
<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>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" />
</c:otherwise>
</c:choose>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.existing_crawls" /></h4>
<div class="previous-crawls-container">
</div>
</div>
</c:forEach>
</c:forEach>
</div>
</div>
......
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<c:set var="status" value="ok" />
<c:set var="icon" value="check" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.ok" />
<c:choose>
<c:when test="${ep.error}">
<c:set var="status" value="error" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.endpoint.error" />
</c:when>
<c:when test="${ds.errorLock}">
<c:set var="status" value="error" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.dataset.error" />
</c:when>
<c:when test="${ep.unaccessible}">
<c:set var="status" value="warning" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.endpoint.unaccessible" />
</c:when>
<c:when test="${!ds.datamodelPojo.available}">
<c:set var="status" value="warning" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.datamodel.unavailable" />
</c:when>
<c:when test="${ds.warning}">
<c:set var="status" value="warning" />
<c:set var="icon" value="exclamation" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.dataset.warning" />
</c:when>
<c:when test="${ep.new}">
<c:set var="status" value="info" />
<c:set var="icon" value="clock-o" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.dataset.waiting" />
</c:when>
<c:when test="${ds.busy}">
<c:set var="status" value="info" />
<c:set var="icon" value="clock-o" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.dataset.waiting" />
</c:when>
</c:choose>
<tr data-detail-target="${ep.id}.${ds.id}"<c:if test="${i==0}"> class="active"</c:if>>
<td class="state-column state-${status}">
<div class="cell-heading">
<i class="fa fa-lg fa-exclamation" aria-hidden="true"></i>
</div>
</td>
<td class="content-column">
<div class="cell-heading no-break-out">${ds.datamodelPojo.name}</div>
<div class="cell-payload no-break-out"><strong><s:message code="~eu.dariah.de.minfba.metamodel.endpoint.url" /></strong>: ${ep.url}</div>
<div class="cell-payload no-break-out"><strong><s:message code="~eu.dariah.de.minfba.search.states" /></strong>: <s:message code="${state_message}" /></div>
<div class="cell-payload no-break-out"><strong><s:message code="~eu.dariah.de.minfba.search.model.dataset.documents" /></strong>: ${ds.docs}</div>
<div class="cell-payload no-break-out"><strong><s:message code="~eu.dariah.de.minfba.search.model.dataset.last_online_completed" /></strong>: ${ds.lastCrawlCompleted}</div>
</td>
</tr>
\ No newline at end of file
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