Commit f19393f2 authored by Michael Ritter's avatar Michael Ritter

#50 Token Ingest ui updates

parent 45e53fd0
......@@ -67,6 +67,10 @@ public class IngestSupervisor implements Runnable {
}
// jsp helpers
public Collection getCollection() {
return coll;
}
public int getQueuedSize() {
return states.get(IngestState.QUEUED).size();
}
......
......@@ -7,3 +7,13 @@
<div class="footer">
Version ${build.identifier} &copy; 2011, University of Maryland Institute for Advanced Computer Studies. All Rights Reserved. <a href="http://adapt.umiacs.umd.edu/ace">ACE Website</a>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"
integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"
integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB"
crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css"/>
\ No newline at end of file
<%--
<%--
Document : ingest
Created on : Jun 4, 2012, 3:29:33 PM
Author : shake
--%>
<%--
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
"http://www.w3.org/TR/html4/loose.dtd">
<%--
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Ingest Token</title>
</head>
<body>
<jsp:include page="header.jsp" />
<div class="standardBody">
<form method="POST">
<input type="text" name="teft"/>
<input type="submit" value="click"/>
<c:if test="${pageContext.request.method=='POST'}">
<c:if test="${param.teft=='test'}">Bingo</c:if>
</c:if>
</form>
</div>
<jsp:include page="footer.jsp" />
</body>
</html>
--%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Ingest Tokens</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<jsp:include page="header.jsp" />
<div class="standardBody">
<h3>Ingest Tokens to collection ${workingCollection.collection.name}</h3>
<FORM name="ingestform" METHOD="POST" ENCTYPE="multipart/form-data" ACTION="Ingest">
<input type="hidden" name="collectionid" value="${workingCollection.collection.id}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Ingest Tokens</title>
<jsp:include page="imports.jsp"/>
<style type="text/css">
button.btn {
height: 100%
}
</style>
</head>
<body>
<jsp:include page="header.jsp"/>
<div class="standardBody">
<h4>Import Tokens</h4>
<h6>
Working Collection is ${workingCollection.collection.group} -
${workingCollection.collection.name}
</h6>
<%-- Might be fun to do peer import some day --%>
<FORM name="ingestform" METHOD="POST" ENCTYPE="multipart/form-data" ACTION="Ingest">
<input type="hidden" name="collectionid" value="${workingCollection.collection.id}">
Select token store to ingest: <input type="file" name="ingested"/><br><br>
<input type="submit" value="Submit" class="submitLink"/>
</FORM>
<div class="form-group">
<label for="fileInput">Select token store to import</label>
<input type="file" class="form-control-file" id="fileInput" name="ingested"/>
</div>
<jsp:include page="footer.jsp" />
<button type="submit" class="btn btn-primary">Submit</button>
</body>
</FORM>
</div>
<jsp:include page="footer.jsp"/>
</body>
</html>
<%--
Document : ingestfinish
Document : ingeststatus
Created on : Jun 11, 2012, 4:20:58 PM
Author : shake
--%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Ingest Store</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery-1.7.1.min.js">
</script>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(".content").hide();
jQuery(".collname").click(function()
{
jQuery(this).next(".content").slideToggle(100);
});
});
</script>
</head>
<body>
<jsp:include page="header.jsp"/>
<div class="standardBody">
<h2>Ingestion Status</h2>
<h3>${results.status}</h3>
<div class="dropDownContainer">
<c:forEach items="${results.ingestedItems}" var="entry">
<p class="collName">Collection: ${entry.key.name}</p>
<div class="ingestContent">
<c:forEach items="${entry.value}" var="token">
<li>${token}</li>
</c:forEach>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Ingest Store</title>
<jsp:include page="imports.jsp"/>
</head>
<body>
<jsp:include page="header.jsp"/>
<%--@elvariable id="results" type="edu.umiacs.ace.monitor.register.IngestThreadPool"--%>
<%--@elvariable id="active" type="edu.umiacs.ace.monitor.register.IngestSupervisor"--%>
<div class="standardBody">
<h2>Token Import Status</h2>
<div class="row">
<div class="col-3">
<div class="nav nav-pills flex-column">
<li class="nav-item">
Active Token Imports
</li>
<c:forEach items="${results.cache}" var="entry">
<c:set var="collection" value="${entry.key}"/>
<li class="nav-item">
<a class="${active != null && entry.key.id == active.collection.id
? 'nav-link active' : 'nav-link'}"
href="TokenImportStatus?active=${entry.key.id}">
${collection.group} - ${collection.name}
</a>
</li>
</c:forEach>
</div>
</div>
<!-- we want to pass the active thread here instead of looping all -->
<div class="col-9">
<div class="tab-content card" id="v-pills-tab-content">
<div class="card-header">
<ul class="nav nav-pills card-header-pills">
<li class="nav-item">
<a class="nav-link active" id="pills-queued-tab" role="tab"
href="#pills-queued" data-toggle="pill"
aria-controls="pills-queued" aria-selected="true">Queued
(${supervisor.queuedSize})</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-new-tab" role="tab"
href="#pills-new" data-toggle="pill"
aria-controls="pills-new" aria-selected="false">New
(${supervisor.newSize})</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-updated-tab" role="tab"
href="#pills-updated" data-toggle="pill"
aria-controls="pills-updated" aria-selected="false">Updated
(${supervisor.updatedSize})</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-match-tab" role="tab"
href="#pills-match" data-toggle="pill"
aira-controls="pills-match" aria-selected="false">
Matched (${supervisor.matchSize})</a>
</li>
<%-- Maybe in the future
<li class="nav-item ml-auto">
<a class="nav-link bg-danger text-white" href="#">Cancel</a>
</li>
--%>
</ul>
</div>
<div class="card-body">
<div class="tab-content" id="pills-content">
<div class="tab-pane fade show active" id="pills-queued"
role="tabpanel"
aria-labelledby="pills-queued-tab">
<ul class="list-group list-group-flush">
<c:forEach items="${supervisor.queued}" var="identifier">
<li class="list-group-item">${identifier}</li>
</c:forEach>
</ul>
</div>
<div class="tab-pane fade" id="pills-new" role="tabpanel"
aria-labelledby="pills-new-tab">
<ul class="list-group list-group-flush">
<c:forEach items="${supervisor.newItems}" var="identifier">
<li class="list-group-item">${identifier}</li>
</c:forEach>
</ul>
</div>
<div class="tab-pane fade" id="pills-updated" role="tabpanel"
aria-labelledby="pills-updated-tab">
<ul class="list-group list-group-flush">
<c:forEach items="${supervisor.updated}" var="identifier">
<li class="list-group-item">${identifier}</li>
</c:forEach>
</ul>
</div>
<div class="tab-pane fade" id="pills-match" role="tabpanel"
aria-labelledby="pills-match-tab">
<ul class="list-group list-group-flush">
<c:forEach items="${supervisor.matched}" var="identifier">
<li class="list-group-item">${identifier}</li>
</c:forEach>
</ul>
</div>
</div>
</div>
</c:forEach>
</div>
<jsp:include page="footer.jsp"/>
</body>
</div>
</div>
</div>
<jsp:include page="footer.jsp"/>
</body>
</html>
......@@ -27,6 +27,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
padding-right: 0px !important;
}
button.btn {
height: 100%
}
a.badge {
font-size: 95%;
}
......@@ -215,7 +219,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
</table>
<!-- Button trigger -->
<button type="button" class="btn btn-primary" data-toggle="modal"
<button type="button" class="btn btn-danger" data-toggle="modal"
data-target="#formModal" style="width: 25%">
Remove Selected
</button>
......
......@@ -172,7 +172,7 @@
<um:Auth role="Collection Modify">
<a href="ManageCollection?collectionid=${workingCollection.collection.id}" title="Configure connection settings for this collection" >Collection Settings</a><br>
<a href="collectionremove.jsp" title="Delete Collection">Remove Collection</a><br>
<a href="ingest_form.jsp" title="Ingest Tokens">Ingest Tokens</a><br>
<a href="ingest_form.jsp" title="Import Tokens">Import Tokens</a><br>
<a href="ManageFilters?collectionid=${workingCollection.collection.id}">Modify Filters</a><BR>
</um:Auth>
<um:Auth role="Modify Activity Reporting">
......
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