index.jsp 2.71 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
<!DOCTYPE html>

<%@include file="/WEB-INF/jsp/init.jsp"%>

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

Matija Obreza's avatar
Matija Obreza committed
12 13
		<form method="post" action="<c:url value="/admin/elastic/action" />">
			<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
14

Matija Obreza's avatar
Matija Obreza committed
15
			<input type="text" name="filter" placeholder="Genesys filter {}" value="{}" />
16 17 18 19 20 21 22 23

            <select name="type">
              <option value="All" selected>All entities</option>
              <c:forEach items="${reindexTypes}" var="type">
                <option value="${type.value}">${type.key}</option>
              </c:forEach>
            </select>

Matija Obreza's avatar
Matija Obreza committed
24 25 26 27 28 29 30
			<button type="submit" class="btn btn-default" name="reindex">Reindex</button>
			<button type="submit" class="btn btn-default" name="regenerate">Regenerate</button>
		</form>
		<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
Matija Obreza committed
31 32 33 34 35 36
		<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
37
			<button type="submit" class="btn btn-default" value="delete-index" name="action">Delete index</button>
Matija Obreza's avatar
Matija Obreza committed
38
		</form>
39

Matija Obreza's avatar
Matija Obreza committed
40
	<h3>Indexes and their aliases</h3>
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
    <c:if test="${empty indexes}">
      <h5>No indexes found.</h5>
    </c:if>
    <c:forEach items="${indexes}" var="indexMap" varStatus="i">
      <div>Index #${i.count}: ${indexMap.key}</div>
      <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>
                <td>${j.count}</td>
                <td>${alias.alias}</td>
                <td>${alias.filter}</td>
                <td>${alias.indexRouting}</td>
                <td>${alias.searchRouting}</td>
              </tr>
            </c:forEach>
          </table>
        </c:otherwise>
      </c:choose>
      <br/>
    </c:forEach>
  </body>
</html>