Commit 0be53833 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1257: Migrate administrative views

Task-Url: https://pm.winseda.de/issues/1257
parent 99bedc93
...@@ -2,28 +2,15 @@ ...@@ -2,28 +2,15 @@
<%@ 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" %>
<ul class="breadcrumb"> <div class="container<c:if test="${fluidLayout==true}">-fluid</c:if>">
<li class="active"><s:message code="~eu.dariah.de.minfba.common.titles.administration" /></li>
<li><a href="<s:url value="/collections" />"><s:message code="~eu.dariah.de.minfba.search.view.titles.collection_management" /></a></li>
<li class="active">${collectionName}</li>
</ul>
<div id="main-content">
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-12">
<h2> <h1>
${collectionName} ${collectionName}
<small> <c:if test="${_auth==null || _auth.auth==false}"><small>&nbsp;<i class="fas fa-lock" data-toggle="tooltip" data-placement="left" title="<s:message code="~eu.dariah.de.minfba.common.notification.limited_access" />"></i></small></c:if>
<c:if test="${_auth==null || _auth.auth==false}"> </h1>
<span class="glyphicon glyphicon-lock" data-toggle="tooltip" data-placement="left" title="<s:message code="~eu.dariah.de.minfba.common.notification.limited_access" />"></span> <h2><s:message code="~eu.dariah.de.minfba.metamodel.collection" /></h2>
</c:if> <table class="simple-table">
</small>
</h2>
<h3><s:message code="~eu.dariah.de.minfba.metamodel.collection" /></h3>
<table class="default-table">
<tbody> <tbody>
<tr> <tr>
<th><s:message code="~eu.dariah.de.minfba.metamodel.common.id" /></th> <th><s:message code="~eu.dariah.de.minfba.metamodel.common.id" /></th>
...@@ -36,27 +23,32 @@ ...@@ -36,27 +23,32 @@
</tbody> </tbody>
</table> </table>
<div id="endpoint-table-container"> <div id="endpoint-table-container" class="mt-4">
<h3><s:message code="~eu.dariah.de.minfba.search.view.dataset.available_datasets" /></h3> <h2><s:message code="~eu.dariah.de.minfba.search.view.dataset.available_datasets" /></h2>
<!-- Nav tabs --> <!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<c:forEach items="${collection.endpoints}" var="ep" varStatus="ep_status"> <c:forEach items="${collection.endpoints}" var="ep" varStatus="ep_status">
<c:forEach items="${ep.datasetPojos}" var="ds" varStatus="ds_status"> <c:forEach items="${ep.datasetPojos}" var="ds" varStatus="ds_status">
<li id="#tab_${ep.id}-${ds.id}" role="presentation"<c:if test="${ep_status.index==0 && ds_status.index==0}">class="active"</c:if>> <li id="#tab_${ep.id}-${ds.id}" class="nav-item">
<a href="#${ep.id}-${ds.id}" aria-controls="${ep.id}-${ds.id}" data-endpoint="${ep.id}" data-dataset="${ds.id}" role="tab" data-toggle="tab">${ds.datamodelPojo.name}</a> <a class="nav-link ${ep_status.index==0 && ds_status.index==0 ? 'active' : ''}" id="s${ep.id}-${ds.id}-tab" href="#s${ep.id}-${ds.id}-panel"
data-toggle="tab" role="tab" aria-controls="${ep.id}-${ds.id}-panel" data-endpoint="${ep.id}" data-dataset="${ds.id}" aria-selected="${ep_status.index==0 && ds_status.index==0 ? 'true' : 'false'}">
${ds.datamodelPojo.name}
</a>
</li> </li>
</c:forEach> </c:forEach>
</c:forEach> </c:forEach>
</ul> </ul>
<!-- Tab panes --> <!-- Tab panes -->
<div class="tab-content"> <div class="tab-content">
<c:forEach items="${collection.endpoints}" var="ep" varStatus="ep_status2"> <c:forEach items="${collection.endpoints}" var="ep" varStatus="ep_status2">
<c:forEach items="${ep.datasetPojos}" var="ds" varStatus="ds_status2"> <c:forEach items="${ep.datasetPojos}" var="ds" varStatus="ds_status2">
<div role="tabpanel" class="tab-pane<c:if test="${ep_status2.index==0 && ds_status2.index==0}"> active</c:if>" id="${ep.id}-${ds.id}"> <div role="tabpanel" class="tab-pane fade<c:if test="${ep_status2.index==0 && ds_status2.index==0}"> show active</c:if>" id="s${ep.id}-${ds.id}-panel" aria-labelledby="${ep.id}-${ds.id}-tab">
<div class="col-sm-12"> <div class="col-12">
<div id="table-details${ep.id}-${ds.id}" class="table-light-details row"> <div id="table-details${ep.id}-${ds.id}" class="table-light-details row">
<div class="col-sm-6 dataset-state-container"> <div class="col-sm-6 dataset-state-container">
<%@ include file="incl/state_dataset.jsp" %> <%@ include file="incl/state_dataset.jsp" %>
...@@ -73,4 +65,5 @@ ...@@ -73,4 +65,5 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %> <%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.crawls" /></h4> <h3><s:message code="~eu.dariah.de.minfba.search.view.titles.crawls" /></h3>
<c:choose> <c:choose>
<c:when test="${crawls!=null && fn:length(crawls)>0}"> <c:when test="${crawls!=null && fn:length(crawls)>0}">
<div class="previous-crawls"> <div class="previous-crawls">
...@@ -16,26 +16,26 @@ ...@@ -16,26 +16,26 @@
<c:choose> <c:choose>
<c:when test="${crawl.error}"> <c:when test="${crawl.error}">
<c:set var="state" value="warning" /> <c:set var="state" value="warning" />
<c:set var="icon" value="exclamation" /> <c:set var="icon" value="fas fa-exclamation-circle" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.crawl.error" /> <c:set var="state_message" value="~eu.dariah.de.minfba.search.states.crawl.error" />
</c:when> </c:when>
<c:when test="${crawl.complete}"> <c:when test="${crawl.complete}">
<c:set var="state" value="ok" /> <c:set var="state" value="ok" />
<c:set var="icon" value="check" /> <c:set var="icon" value="fas fa-check-circle" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.crawl.complete" /> <c:set var="state_message" value="~eu.dariah.de.minfba.search.states.crawl.complete" />
</c:when> </c:when>
<c:when test="${crawl.busy}"> <c:when test="${crawl.busy}">
<c:set var="state" value="info" /> <c:set var="state" value="info" />
<c:set var="icon" value="refresh" /> <c:set var="icon" value="fas fa-sync-alt" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.crawl.busy" /> <c:set var="state_message" value="~eu.dariah.de.minfba.search.states.crawl.busy" />
</c:when> </c:when>
<c:when test="${crawl.waiting}"> <c:when test="${crawl.waiting}">
<c:set var="state" value="info" /> <c:set var="state" value="info" />
<c:set var="icon" value="clock-o" /> <c:set var="icon" value="fas fa-clock" />
<c:set var="state_message" value="~eu.dariah.de.minfba.search.states.crawl.waiting" /> <c:set var="state_message" value="~eu.dariah.de.minfba.search.states.crawl.waiting" />
</c:when> </c:when>
</c:choose> </c:choose>
<tr id="crawl-${crawl.id}" class="state-row-${state}"> <tr id="crawl-${crawl.id}" class="state-row-${state}">
<th class="state-${state}"> <th class="state-${state}">
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<c:if test="${crawl.online}"> <c:if test="${crawl.online}">
<i class="fa fa-lg fa-globe" aria-hidden="true"></i> <i class="fa fa-lg fa-globe" aria-hidden="true"></i>
</c:if> </c:if>
<i class="fa fa-lg fa-${icon}" aria-hidden="true"></i> <i class="${icon} fa-lg" aria-hidden="true"></i>
</div> </div>
</th> </th>
......
...@@ -6,67 +6,67 @@ ...@@ -6,67 +6,67 @@
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ep_status" value="ok" /> <c:set var="ep_status" value="ok" />
<c:set var="ep_icon" value="check" /> <c:set var="ep_icon" value="fas fa-check-circle" />
<c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.accessible" /> <c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.accessible" />
<c:choose> <c:choose>
<c:when test="${ep.error}"> <c:when test="${ep.error}">
<c:set var="ep_status" value="error" /> <c:set var="ep_status" value="error" />
<c:set var="ep_icon" value="exclamation" /> <c:set var="ep_icon" value="fas fa-exclamation-circle" />
<c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.error" /> <c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.error" />
</c:when> </c:when>
<c:when test="${ep.unaccessible}"> <c:when test="${ep.unaccessible}">
<c:set var="ep_status" value="warning" /> <c:set var="ep_status" value="warning" />
<c:set var="ep_icon" value="exclamation" /> <c:set var="ep_icon" value="fas fa-exclamation-circle" />
<c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.unaccessible" /> <c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.unaccessible" />
</c:when> </c:when>
<c:when test="${ep.unprocessed}"> <c:when test="${ep.unprocessed}">
<c:set var="ep_status" value="info" /> <c:set var="ep_status" value="info" />
<c:set var="ep_icon" value="question" /> <c:set var="ep_icon" value="fas fa-question-circle" />
<c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.unprocessed" /> <c:set var="ep_state_message" value="~eu.dariah.de.minfba.search.states.endpoint.unprocessed" />
</c:when> </c:when>
</c:choose> </c:choose>
<c:set var="ds_status" value="ok" /> <c:set var="ds_status" value="ok" />
<c:set var="ds_icon" value="check" /> <c:set var="ds_icon" value="fas fa-check-circle" />
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.ok" /> <c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.ok" />
<c:choose> <c:choose>
<c:when test="${ds.errorLock}"> <c:when test="${ds.errorLock}">
<c:set var="ds_status" value="error" /> <c:set var="ds_status" value="error" />
<c:set var="ds_icon" value="exclamation" /> <c:set var="ds_icon" value="fas fa-exclamation-circle" />
<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="error" /> <c:set var="ds_status" value="error" />
<c:set var="ds_icon" value="exclamation" /> <c:set var="ds_icon" value="fas fa-exclamation-circle" />
<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>
<c:when test="${ds.warning}"> <c:when test="${ds.warning}">
<c:set var="ds_status" value="warning" /> <c:set var="ds_status" value="warning" />
<c:set var="ds_icon" value="exclamation" /> <c:set var="ds_icon" value="fas fa-exclamation-circle" />
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.outdated" /> <c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.outdated" />
</c:when> </c:when>
<c:when test="${ds.processing}"> <c:when test="${ds.processing}">
<c:set var="ds_status" value="info" /> <c:set var="ds_status" value="info" />
<c:set var="ds_icon" value="refresh" /> <c:set var="ds_icon" value="fas fa-sync-alt" />
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.busy" /> <c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.busy" />
</c:when> </c:when>
<c:when test="${ds.waiting}"> <c:when test="${ds.waiting}">
<c:set var="ds_status" value="info" /> <c:set var="ds_status" value="info" />
<c:set var="ds_icon" value="clock-o" /> <c:set var="ds_icon" value="fas fa-clock" />
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.waiting" /> <c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.waiting" />
</c:when> </c:when>
<c:when test="${ds.docs==0}"> <c:when test="${ds.docs==0}">
<c:set var="ds_status" value="info" /> <c:set var="ds_status" value="info" />
<c:set var="ds_icon" value="question" /> <c:set var="ds_icon" value="fas fa-question-circle" />
<c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.unprocessed" /> <c:set var="ds_state_message" value="~eu.dariah.de.minfba.search.states.dataset.unprocessed" />
</c:when> </c:when>
</c:choose> </c:choose>
<h4><s:message code="~eu.dariah.de.minfba.search.model.endpoint" /></h4> <h3><s:message code="~eu.dariah.de.minfba.search.model.endpoint" /></h3>
<table class="state-table"> <table class="table state-table">
<tr class="state-row-${ep_status}"> <tr class="state-row-${ep_status}">
<th class="state-${ep_status}"> <th class="state-${ep_status}">
<i class="fa fa-lg fa-${ep_icon}" aria-hidden="true"></i> <i class="${ep_icon} fa-lg" aria-hidden="true"></i>
</th> </th>
<td> <td>
<ul class="inner-state-list"> <ul class="inner-state-list">
...@@ -102,11 +102,11 @@ ...@@ -102,11 +102,11 @@
</tr> </tr>
</table> </table>
<h4><s:message code="~eu.dariah.de.minfba.search.model.dataset" /></h4> <h3><s:message code="~eu.dariah.de.minfba.search.model.dataset" /></h3>
<table class="state-table"> <table class="table state-table">
<tr class="state-row-${ds_status}"> <tr class="state-row-${ds_status}">
<th class="state-${ds_status}"> <th class="state-${ds_status}">
<i class="fa fa-lg fa-${ds_icon}" aria-hidden="true"></i> <i class="${ds_icon} fa-lg" aria-hidden="true"></i>
</th> </th>
<td> <td>
<ul class="inner-state-list"> <ul class="inner-state-list">
...@@ -170,17 +170,17 @@ ...@@ -170,17 +170,17 @@
</tr> </tr>
</table> </table>
<c:if test="${_auth.level >= 100}"> <c:if test="${_auth.level >= 100}">
<h4><s:message code="~eu.dariah.de.minfba.common.link.available_actions" /></h4> <h3><s:message code="~eu.dariah.de.minfba.common.link.available_actions" /></h3>
<div> <div>
<c:choose> <c:choose>
<c:when test="${currentCrawl!=null}"> <c:when test="${currentCrawl!=null}">
<button class="btn-cancel-crawl btn btn-link" data-crawl-id="${currentCrawl.id}" onclick="editor.cancelCrawl(this);"><i class="fa fa-ban fa-color-danger"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.cancel" /></button> <button class="btn-cancel-crawl btn btn-primary" data-crawl-id="${currentCrawl.id}" onclick="editor.cancelCrawl(this);"><i class="fa fa-ban fa-color-danger"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.cancel" /></button>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<c:if test="${!ep.error && !ep.unaccessible && !ds.errorLock && ds.datamodelPojo.available}"> <c:if test="${!ep.error && !ep.unaccessible && !ds.errorLock && ds.datamodelPojo.available}">
<button class="btn-crawl-online btn btn-link" onclick="editor.crawlOnline('${ep.id}','${ds.id}');"><i class="fa fa-refresh"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.crawl_online" /></button> <button class="btn-crawl-online btn btn-primary" onclick="editor.crawlOnline('${ep.id}','${ds.id}');"><i class="fa fa-refresh"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.crawl_online" /></button>
</c:if> </c:if>
<button class="btn-clear-index btn btn-link" onclick="editor.clearData('${ep.id}','${ds.id}', ${data.exists && data.fileCount>0});"><i class="fa fa-trash "></i> <s:message code="~eu.dariah.de.minfba.search.actions.dataset.clear" /></button> <button class="btn-clear-index btn btn-primary" onclick="editor.clearData('${ep.id}','${ds.id}', ${data.exists && data.fileCount>0});"><i class="fa fa-trash "></i> <s:message code="~eu.dariah.de.minfba.search.actions.dataset.clear" /></button>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</div> </div>
......
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