<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8" %> <%-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --%> <%@ page import="java.util.Collection" %> <%@ page import="java.util.Date" %> <%-- do a verbatim include so we can use the local vars --%> <%@include file="header.jsp"%>
(What Is This Page?)
<% final SolrCore solrcore = core; %> <% NamedList slave = null, master = null; if (detailsMap != null) if ("true".equals(detailsMap.get("isSlave"))) if(detailsMap.get("slave") != null){ slave = (NamedList)detailsMap.get("slave");%> <% if (nl != null) { nl = (NamedList) nl.get("master"); if(nl != null){ %> <% } }%> <%}%> <% if (detailsMap != null) if ("true".equals(detailsMap.get("isMaster"))) if(detailsMap.get("master") != null){ master = (NamedList) detailsMap.get("master"); %> <%}%> <% if ("true".equals(detailsMap.get("isSlave"))) if (slave != null) {%> <% if ("true".equals(slave.get("isReplicating"))) { %> <%}%> <%}%> <%-- List the cores (that arent this one) so we can switch --%> <% org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer) request.getAttribute("org.apache.solr.CoreContainer"); if (cores != null) { Collection names = cores.getCoreNames(); if (names.size() > 1) {%> <% } }%>
Master <%=slave.get("masterUrl")%> <% NamedList nl = (NamedList) slave.get("masterDetails"); if(nl == null) out.print(" - Unreachable"); %>
Latest Index Version:<%=nl.get("indexVersion")%>, Generation: <%=nl.get("generation")%>
Replicatable Index Version:<%=nl.get("replicatableIndexVersion")%>, Generation: <%=nl.get("replicatableGeneration")%>
Poll Interval <%=slave.get("pollInterval")%>
Local Index <% if (detailsMap != null) out.println("Index Version: " + detailsMap.get("indexVersion") + ", Generation: " + detailsMap.get("generation")); %>
<% if (null != core.getIndexDir()) { File dir = new File(core.getIndexDir()); out.println("Location: " + dir.getCanonicalPath()); }%>
<% if (detailsMap != null) out.println("Size: " + detailsMap.get("indexSize")); %>
<%out.println("Config Files To Replicate: " + master.get("confFiles"));%>
<%out.println("Trigger Replication On: " + master.get("replicateAfter")); %>
<% out.println("Times Replicated Since Startup: " + slave.get("timesIndexReplicated")); %>
<% out.println("Previous Replication Done At: " + slave.get("indexReplicatedAt")); %>
<% out.println("Config Files Replicated At: " + slave.get("confFilesReplicatedAt")); %>
<% out.println("Config Files Replicated: " + slave.get("confFilesReplicated")); %>
<% out.println("Times Config Files Replicated Since Startup: " + slave.get("timesConfigReplicated")); %>
<% if (slave.get("nextExecutionAt") != null) if (slave.get("nextExecutionAt") != "") out.println("Next Replication Cycle At: " + slave.get("nextExecutionAt")); else if ("true".equals(slave.get("isPollingDisabled"))) out.println("Next Replication Cycle At: Polling disabled."); else { NamedList nl1 = (NamedList) slave.get("masterDetails"); if(nl1 != null){ NamedList nl2 = (NamedList) nl1.get("master"); if(nl2 != null) out.println("Next Replication Cycle At: After " + nl2.get("replicateAfter") + " on master."); } } %>
Current Replication Status <%out.println("Start Time: " + slave.get("replicationStartTime"));%>
<% out.println("Files Downloaded: " + slave.get("numFilesDownloaded") + " / " + slave.get("numFilesToDownload"));%>
<% out.println("Downloaded: " + slave.get("bytesDownloaded") + " / " + slave.get("bytesToDownload") + " [" + slave.get("totalPercent") + "%]");%>
<% out.println("Downloading File: " + slave.get("currentFile") + ", Downloaded: " + slave.get("currentFileSizeDownloaded") + " / " + slave.get("currentFileSize") + " [" + slave.get("currentFileSizePercent") + "%]");%>
<% out.println("Time Elapsed: " + slave.get("timeElapsed") + ", Estimated Time Remaining: " + slave.get("timeRemaining") + ", Speed: " + slave.get("downloadSpeed") + "/s");%>
Controls <% String pollVal = request.getParameter("poll"); if (pollVal != null) if (pollVal.equals("disable")) executeCommand("disablepoll", core, rh); else if (pollVal.equals("enable")) executeCommand("enablepoll", core, rh); if(slave != null) if ("false".equals(slave.get("isPollingDisabled"))) { %>
<%}%> <% if(slave != null) if ("true".equals(slave.get("isPollingDisabled"))) { %>
<% } %>
<% if(slave != null) if ("true".equals(slave.get("isReplicating"))) { %>
<%} else {%> <% } String replicateParam = request.getParameter("replicate"); String abortParam = request.getParameter("abort"); if (replicateParam != null) if (replicateParam.equals("now")) { executeCommand("fetchindex", solrcore, rh); } if (abortParam != null) if (abortParam.equals("stop")) { executeCommand("abortfetch", solrcore, rh); } %>
Cores:
<% for (String name : names) { %>[<%=name%> ]<% }%>

Current Time: <%= new Date() %>
Server Start At: <%= new Date(core.getStartTime()) %>

Return to Admin Page