index.jsp 3.26 KB
Newer Older
1 2
<!DOCTYPE html>

3
<%@ include file="/WEB-INF/jsp/init.jsp" %>
4 5 6 7 8 9

<html>
  <head>
    <title><spring:message code="admin.page.title" /></title>
  </head>
  <body>
10
    <%@ include file="/WEB-INF/jsp/admin/menu.jsp" %>
11

Matija Obreza's avatar
Cleanup  
Matija Obreza committed
12
		<h3>Accession data</h3>
Matija Obreza's avatar
Matija Obreza committed
13 14 15
		<form method="post" action="<c:url value="/admin/elastic/action" />">
			<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
			<input type="text" name="filter" placeholder="Genesys filter {}" value="{}" />
Matija Obreza's avatar
Cleanup  
Matija Obreza committed
16 17 18 19 20 21 22 23 24 25
			<button type="submit" class="btn btn-default" value="accn" name="reindex">Reindex</button>
			<button type="submit" class="btn btn-default" value="accn" name="regenerate">Regenerate</button>
		</form>
		
		<h3>Content</h3>
		<form method="post" action="<c:url value="/admin/elastic/action" />">
			<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
			<select name="type">
				<option value="All" selected>All content entities</option>
				<c:forEach items="${reindexTypes}" var="type">
Matija Obreza's avatar
Matija Obreza committed
26
					<option value="${type.value}"><c:out value="${type.key}" /></option>
Matija Obreza's avatar
Cleanup  
Matija Obreza committed
27 28 29 30
				</c:forEach>
			</select>
			<button type="submit" class="btn btn-default" value="content" name="reindex">Reindex</button>
			<button type="submit" class="btn btn-default" value="content" name="regenerate">Regenerate</button>
Matija Obreza's avatar
Matija Obreza committed
31
		</form>
Matija Obreza's avatar
Cleanup  
Matija Obreza committed
32
		
Matija Obreza's avatar
Matija Obreza committed
33 34 35 36
		<form method="post" action="<c:url value="/admin/elastic/action" />">
			<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
			<button type="submit" class="btn btn-default" name="clear-queues">Clear ES update queues</button>
		</form>
Matija Obreza's avatar
Cleanup  
Matija Obreza committed
37 38
		
		<h3>Index alias management</h3>
Matija Obreza's avatar
Matija Obreza committed
39 40 41 42 43 44
		<form method="post" action="<c:url value="/admin/elastic/action" />">
			<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
			Alias:<input type="text" name="aliasName" />
			Index:<input type="text" name="indexName" />
			<button type="submit" class="btn btn-primary" value="realias" name="action">Move alias</button>
			<button type="submit" class="btn btn-default" value="delete-alias" name="action">Delete alias</button>
Matija Obreza's avatar
Matija Obreza committed
45
			<button type="submit" class="btn btn-default" value="delete-index" name="action">Delete index</button>
Matija Obreza's avatar
Matija Obreza committed
46
		</form>
47

Matija Obreza's avatar
Cleanup  
Matija Obreza committed
48
	<h3>Indexes and aliases</h3>
49 50 51 52
    <c:if test="${empty indexes}">
      <h5>No indexes found.</h5>
    </c:if>
    <c:forEach items="${indexes}" var="indexMap" varStatus="i">
Matija Obreza's avatar
Matija Obreza committed
53
      <div>Index #<c:out value="${i.count}" />: <c:out value="${indexMap.key}" /></div>
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
      <c:choose>
        <c:when test="${empty indexMap.value}">
          <h5>No aliases found.</h5>
        </c:when>
        <c:otherwise>
          <table>
            <tr>
              <th>#</th>
              <th>Name</th>
              <th>Filter</th>
              <th>Index routing</th>
              <th>Search routing</th>
            </tr>
            <c:forEach items="${indexMap.value}" var="alias" varStatus="j">
              <tr>
Matija Obreza's avatar
Matija Obreza committed
69 70 71 72 73
                <td><c:out value="${j.count}" /></td>
                <td><c:out value="${alias.alias}" /></td>
                <td><c:out value="${alias.filter}" /></td>
                <td><c:out value="${alias.indexRouting}" /></td>
                <td><c:out value="${alias.searchRouting}" /></td>
74 75 76 77 78 79 80 81 82
              </tr>
            </c:forEach>
          </table>
        </c:otherwise>
      </c:choose>
      <br/>
    </c:forEach>
  </body>
</html>