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

803: Complete collection view

Task-Url: https://pm.winseda.de/issues/803
parent 4f3557e8
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<ul class="breadcrumb">
<li class="active"><s:message code="~eu.dariah.de.minfba.common.titles.administration" /></li>
......@@ -56,83 +53,10 @@
<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="${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>
</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('${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>
<%@ include file="incl/incl_dataset_detail.jsp" %>
</c:forEach>
</c:forEach>
</div>
</div>
......
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ep_status" value="ok" />
<c:set var="ep_icon" value="check" />
<c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.ok" />
<c:choose>
<c:when test="${ep.error}">
<c:set var="ep_status" value="error" />
<c:set var="ep_icon" value="exclamation" />
<c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.error" />
</c:when>
<c:when test="${ep.unaccessible}">
<c:set var="ep_status" value="warning" />
<c:set var="ep_icon" value="exclamation" />
<c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.unaccessible" />
</c:when>
<c:when test="${ep.new}">
<c:set var="ep_status" value="info" />
<c:set var="ep_icon" value="clock-o" />
<c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.dataset.waiting" />
</c:when>
</c:choose>
<c:set var="ds_status" value="ok" />
<c:set var="ds_icon" value="check" />
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.common.status.loading" />
<c:choose>
<c:when test="${ds.errorLock}">
<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.dataset.error" />
</c:when>
<c:when test="${!ds.datamodelPojo.available}">
<c:set var="ds_status" value="warning" />
<c:set var="ds_icon" value="exclamation" />
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.datamodel.unavailable" />
</c:when>
<c:when test="${ds.warning}">
<c:set var="ds_status" value="warning" />
<c:set var="ds_icon" value="exclamation" />
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.warning" />
</c:when>
</c:choose>
<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.details_parameter" /></h4>
<h5><s:message code="~eu.dariah.de.minfba.search.model.endpoint" /></h5>
<table class="details-table state-table">
<tbody>
<tr>
<td class="state-column state-${ep_status}" rowspan="3">
<div class="cell-heading">
<i class="fa fa-lg fa-${ep_icon}" aria-hidden="true"></i>
</div>
</td>
<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>
<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>
<tr><th><s:message code="~eu.dariah.de.minfba.common.status" /></th>
<td class="state-${ep_status}">
<s:message code="${ep_state_message}" />
</td>
</tr>
</tbody>
</table>
<h5><s:message code="~eu.dariah.de.minfba.search.model.dataset" /></h5>
<table class="details-table state-table">
<tbody>
<tr>
<td class="state-column state-${ds_status}" rowspan="3">
<div class="cell-heading">
<i class="fa fa-lg fa-${ds_icon}" aria-hidden="true"></i>
</div>
</td>
<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.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>
<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 state-${ds_status}">
<s:message code="${ds_state_message}" />
</td>
</tr>
</tbody>
</table>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.online_data" /></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>
<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>
\ No newline at end of file
......@@ -48,13 +48,13 @@
<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>
<i class="fa fa-lg fa-${icon}" 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 state-${status}"><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>
......
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