index.jsp 1.89 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 14 15 16 17 18 19 20 21 22
		<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="{}" />
			<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>
23

Matija Obreza's avatar
Matija Obreza committed
24
	<h3>Indexes and their aliases</h3>
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
    <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>