mirror of https://github.com/apache/lucene.git
Fixes for SOLR-3162 and SOLR-3181, continuing improvements to the new Solr admin UI.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1298010 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6d372fc611
commit
82f53daeb4
|
@ -642,6 +642,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
|
|||
addVal(slave, SnapPuller.REPLICATION_FAILED_AT, props, Date.class);
|
||||
addVal(slave, SnapPuller.PREVIOUS_CYCLE_TIME_TAKEN, props, Long.class);
|
||||
|
||||
slave.add("currentDate", new Date().toString());
|
||||
slave.add("isPollingDisabled", String.valueOf(isPollingDisabled()));
|
||||
boolean isReplicating = isReplicating();
|
||||
slave.add("isReplicating", String.valueOf(isReplicating));
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
|
||||
package org.apache.solr.servlet;
|
||||
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.noggit.CharArr;
|
||||
import org.apache.noggit.JSONWriter;
|
||||
import org.apache.solr.cloud.ZkController;
|
||||
import org.apache.solr.common.cloud.SolrZkClient;
|
||||
import org.apache.solr.common.util.StrUtils;
|
||||
import org.apache.solr.core.CoreContainer;
|
||||
import org.apache.zookeeper.KeeperException;
|
||||
import org.apache.zookeeper.data.Stat;
|
||||
|
@ -34,7 +34,6 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -72,11 +71,16 @@ public final class ZookeeperInfoServlet extends HttpServlet {
|
|||
|
||||
String detailS = request.getParameter("detail");
|
||||
boolean detail = detailS != null && detailS.equals("true");
|
||||
|
||||
String dumpS = request.getParameter("dump");
|
||||
boolean dump = dumpS != null && dumpS.equals("true");
|
||||
|
||||
PrintWriter out = response.getWriter();
|
||||
|
||||
|
||||
ZKPrinter printer = new ZKPrinter(response, out, cores.getZkController(), addr);
|
||||
printer.detail = detail;
|
||||
printer.dump = dump;
|
||||
|
||||
try {
|
||||
printer.print(path);
|
||||
|
@ -103,6 +107,7 @@ public final class ZookeeperInfoServlet extends HttpServlet {
|
|||
boolean indent = true;
|
||||
boolean fullpath = FULLPATH_DEFAULT;
|
||||
boolean detail = false;
|
||||
boolean dump = false;
|
||||
|
||||
String addr; // the address passed to us
|
||||
String keeperAddr; // the address we're connected to
|
||||
|
@ -260,6 +265,7 @@ public final class ZookeeperInfoServlet extends HttpServlet {
|
|||
|
||||
Stat stat = new Stat();
|
||||
try {
|
||||
// Trickily, the call to zkClient.getData fills in the stat variable
|
||||
byte[] data = zkClient.getData(path, null, stat, true);
|
||||
|
||||
if (stat.getEphemeralOwner() != 0) {
|
||||
|
@ -267,6 +273,11 @@ public final class ZookeeperInfoServlet extends HttpServlet {
|
|||
writeKeyValue(json, "version", stat.getVersion(), false);
|
||||
}
|
||||
|
||||
if (dump) {
|
||||
json.writeValueSeparator();
|
||||
printZnode(json, path);
|
||||
}
|
||||
|
||||
/*
|
||||
if (stat.getNumChildren() != 0)
|
||||
{
|
||||
|
@ -275,32 +286,12 @@ public final class ZookeeperInfoServlet extends HttpServlet {
|
|||
}
|
||||
*/
|
||||
|
||||
//if (data != null)
|
||||
if (stat.getDataLength() != 0) {
|
||||
String str;
|
||||
try {
|
||||
str = new String(data, "UTF-8");
|
||||
str = str.replaceAll("\\\"", "\\\\\"");
|
||||
|
||||
//writeKeyValue(json, "content", str, false );
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// not UTF8
|
||||
StringBuilder sb = new StringBuilder("BIN(");
|
||||
sb.append("len=" + data.length);
|
||||
sb.append("hex=");
|
||||
int limit = Math.min(data.length, maxData / 2);
|
||||
for (int i = 0; i < limit; i++) {
|
||||
byte b = data[i];
|
||||
sb.append(StrUtils.HEX_DIGITS[(b >> 4) & 0xf]);
|
||||
sb.append(StrUtils.HEX_DIGITS[b & 0xf]);
|
||||
}
|
||||
if (limit != data.length) {
|
||||
sb.append("...");
|
||||
}
|
||||
sb.append(")");
|
||||
str = sb.toString();
|
||||
//if (stat.getDataLength() != 0)
|
||||
if (data != null) {
|
||||
String str = new BytesRef(data).utf8ToString();
|
||||
//?? writeKeyValue(json, "content", str, false );
|
||||
}
|
||||
// Does nothing now, but on the assumption this will be used later we'll leave it in. If it comes out
|
||||
// the catches below need to be restructured.
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
// path doesn't exist (must have been removed)
|
||||
|
@ -375,6 +366,7 @@ public final class ZookeeperInfoServlet extends HttpServlet {
|
|||
boolean printZnode(JSONWriter json, String path) throws IOException {
|
||||
try {
|
||||
Stat stat = new Stat();
|
||||
// Trickily, the call to zkClient.getData fills in the stat variable
|
||||
byte[] data = zkClient.getData(path, null, stat, true);
|
||||
|
||||
json.writeString("znode");
|
||||
|
@ -400,28 +392,8 @@ public final class ZookeeperInfoServlet extends HttpServlet {
|
|||
writeKeyValue(json, "pzxid", stat.getPzxid(), false);
|
||||
json.endObject();
|
||||
|
||||
if (stat.getDataLength() != 0) {
|
||||
String str;
|
||||
try {
|
||||
str = new String(data, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// The results are unspecified
|
||||
// when the bytes are not properly encoded.
|
||||
|
||||
// not UTF8
|
||||
StringBuilder sb = new StringBuilder(data.length * 2);
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
byte b = data[i];
|
||||
sb.append(StrUtils.HEX_DIGITS[(b >> 4) & 0xf]);
|
||||
sb.append(StrUtils.HEX_DIGITS[b & 0xf]);
|
||||
if ((i & 0x3f) == 0x3f) {
|
||||
sb.append("\n");
|
||||
}
|
||||
}
|
||||
str = sb.toString();
|
||||
}
|
||||
str = str.replaceAll("\\\"", "\\\\\"");
|
||||
writeKeyValue(json, "data", str, false);
|
||||
if (data != null) {
|
||||
writeKeyValue(json, "data", new BytesRef(data).utf8ToString(), false);
|
||||
}
|
||||
json.endObject();
|
||||
} catch (KeeperException e) {
|
||||
|
|
|
@ -19,18 +19,32 @@ limitations under the License.
|
|||
|
||||
<head>
|
||||
|
||||
<title>solr-admin</title>
|
||||
<title>Solr Admin</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/main.css">
|
||||
<link rel="icon" type="image/ico" href="img/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/common.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/analysis.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/cloud.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/cores.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/dashboard.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/dataimport.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/index.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/java-properties.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/logging.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/menu.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/plugins.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/query.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/replication.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/schema-browser.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/styles/threads.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var app_config = {};
|
||||
|
||||
app_config.solr_path = '${contextPath}';
|
||||
app_config.core_admin_path = '${adminPath}';
|
||||
app_config.zookeeper_path = 'zookeeper';
|
||||
app_config.schema_path = '/admin/file?file=schema.xml&contentType=text/xml;charset=utf-8';
|
||||
app_config.config_path = '/admin/file?file=solrconfig.xml&contentType=text/xml;charset=utf-8';
|
||||
|
||||
|
@ -47,7 +61,7 @@ limitations under the License.
|
|||
|
||||
<div id="wip-notice">
|
||||
<p>This interface is work in progress.</p>
|
||||
<p>Please report any <a href="https://issues.apache.org/jira/browse/SOLR-2667">Bugs/Requests/Suggestions: <span>SOLR-2667</span></a></p>
|
||||
<p><a href="https://issues.apache.org/jira/browse/SOLR-3162">Please report any Bugs/Requests/Suggestions: <span>SOLR-3162</span></a></p>
|
||||
</div>
|
||||
|
||||
<p id="environment"> </p>
|
||||
|
@ -69,29 +83,12 @@ limitations under the License.
|
|||
|
||||
<ul>
|
||||
|
||||
<li id="index" class="global">
|
||||
<p><a href="#/">Dashboard</a></p>
|
||||
</li>
|
||||
|
||||
<li id="logging" class="global">
|
||||
<p><a href="#/logging">Logging</a></p>
|
||||
</li>
|
||||
|
||||
<li id="cloud" class="global optional">
|
||||
<p><a href="#/cloud">Cloud</a></p>
|
||||
</li>
|
||||
|
||||
<li id="cores" class="global optional">
|
||||
<p><a href="#/cores">Core Admin</a></p>
|
||||
</li>
|
||||
|
||||
<li id="java-properties" class="global">
|
||||
<p><a href="#/java-properties">Java Properties</a>
|
||||
</li>
|
||||
|
||||
<li id="threads" class="global">
|
||||
<p><a href="#/threads">Thread Dump</a></p>
|
||||
</li>
|
||||
<li id="index" class="global"><p><a href="#/">Dashboard</a></p></li>
|
||||
<li id="logging" class="global"><p><a href="#/logging">Logging</a></p></li>
|
||||
<li id="cloud" class="global optional"><p><a href="#/cloud">Cloud</a></p></li>
|
||||
<li id="cores" class="global optional"><p><a href="#/cores">Core Admin</a></p></li>
|
||||
<li id="java-properties" class="global"><p><a href="#/java-properties">Java Properties</a></li>
|
||||
<li id="threads" class="global"><p><a href="#/threads">Thread Dump</a></p></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -126,6 +126,12 @@
|
|||
padding-left: 35px;
|
||||
}
|
||||
|
||||
#content #analysis .analysis-error .head a
|
||||
{
|
||||
color: #fff;
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
#content #analysis #analysis-result
|
||||
{
|
||||
overflow: auto;
|
||||
|
|
|
@ -18,6 +18,114 @@
|
|||
|
||||
#content #cloud h2 { background-image: url( ../../img/ico/sitemap.png ); }
|
||||
|
||||
#content #cloud
|
||||
{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#content #cloud a.debug
|
||||
{
|
||||
background-color: #c0c0c0;
|
||||
background-image: url( ../../img/ico/exclamation-button.png );
|
||||
background-position: 5px 50%;
|
||||
border-radius: 5px;
|
||||
display: block;
|
||||
padding: 2px 5px;
|
||||
padding-left: 26px;
|
||||
position: absolute;
|
||||
left: 150px;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
#content #cloud a.debug:hover
|
||||
{
|
||||
background-color: #fff;
|
||||
color: #00f;
|
||||
}
|
||||
|
||||
#content #cloud #debug
|
||||
{
|
||||
background-color: #fff;
|
||||
box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-moz-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
display: none;
|
||||
padding: 20px;
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
top: 50px;
|
||||
}
|
||||
|
||||
#content #cloud #debug ul
|
||||
{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#content #cloud #debug ul a
|
||||
{
|
||||
background-position: 4px 50%;
|
||||
display: block;
|
||||
padding: 2px 4px;
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
#content #cloud #debug ul a:hover,
|
||||
#content #cloud #debug ul a.hover
|
||||
{
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
#content #cloud #debug .clipboard
|
||||
{
|
||||
float: left;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#content #cloud #debug .clipboard a
|
||||
{
|
||||
background-image: url( ../../img/ico/clipboard-paste.png );
|
||||
z-index: 98;
|
||||
}
|
||||
|
||||
#content #cloud #debug .clipboard a:hover,
|
||||
#content #cloud #debug .clipboard a.hover,
|
||||
#content #cloud #debug .clipboard.copied a
|
||||
{
|
||||
background-image: url( ../../img/ico/clipboard-paste-document-text.png );
|
||||
}
|
||||
|
||||
#content #cloud #debug .close
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
#content #cloud #debug .close a
|
||||
{
|
||||
background-image: url( ../../img/ico/cross-0.png );
|
||||
padding-left: 21px;
|
||||
}
|
||||
|
||||
#content #cloud #debug .close a:hover
|
||||
{
|
||||
background-image: url( ../../img/ico/cross-1.png );
|
||||
}
|
||||
|
||||
#content #cloud #debug .debug
|
||||
{
|
||||
border: 1px solid #f0f0f0;
|
||||
max-height: 400px;
|
||||
overflow: auto;
|
||||
padding: 5px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
#content #cloud #debug .debug .loader
|
||||
{
|
||||
background-position: 5px 50%;
|
||||
display: block;
|
||||
padding: 10px 26px;
|
||||
}
|
||||
|
||||
#content #cloud .content
|
||||
{
|
||||
padding-left: 0;
|
||||
|
|
|
@ -119,6 +119,31 @@ ul
|
|||
position: relative;
|
||||
}
|
||||
|
||||
#main.error
|
||||
{
|
||||
border: 0;
|
||||
min-height: 0;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
#main.error .message
|
||||
{
|
||||
background-color: #f00;
|
||||
background-image: url( ../../img/ico/construction.png );
|
||||
background-position: 10px 50%;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
padding: 10px;
|
||||
padding-left: 35px;
|
||||
}
|
||||
|
||||
#main.error .code
|
||||
{
|
||||
border: 1px solid #c0c0c0;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#meta
|
||||
{
|
||||
position: absolute;
|
||||
|
|
|
@ -1,158 +1,195 @@
|
|||
#content #index .bar-desc
|
||||
{
|
||||
color: #c0c0c0;
|
||||
font-weight: normal;
|
||||
margin-left: 10px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#content #index .bar-holder
|
||||
{
|
||||
box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-moz-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
#content #index .bar-holder .bar
|
||||
{
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#content #index .bar-holder div .val
|
||||
{
|
||||
border-right: 1px solid #f00;
|
||||
display: block;
|
||||
padding-right: 5px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 35px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#content #index .bar-holder .bar-max.bar
|
||||
{
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
#content #index .bar-holder .bar-max.val
|
||||
{
|
||||
border-color: #f0f0f0;
|
||||
color: #d6d6d6;
|
||||
}
|
||||
|
||||
#content #index .bar-holder .bar-total.bar
|
||||
{
|
||||
background-color: #c0c0c0;
|
||||
}
|
||||
|
||||
#content #index .bar-holder .bar-total.val
|
||||
{
|
||||
border-color: #c0c0c0;
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
#content #index .bar-holder .bar-used.bar
|
||||
{
|
||||
background-color: #969696;
|
||||
}
|
||||
|
||||
#content #index .bar-holder .bar-used.val
|
||||
{
|
||||
border-color: #969696;
|
||||
color: #969696;
|
||||
}
|
||||
|
||||
#content #index .bar-holder.bar-lvl-2 .bar-max.val { padding-top: 25px; }
|
||||
#content #index .bar-holder.bar-lvl-2 .bar-total.val { padding-top: 5px; }
|
||||
#content #index .bar-holder.bar-lvl-2 { margin-bottom: 45px; }
|
||||
|
||||
#content #index .bar-holder.bar-lvl-3 .bar-max.val { padding-top: 45px; }
|
||||
#content #index .bar-holder.bar-lvl-3 .bar-total.val { padding-top: 25px; }
|
||||
#content #index .bar-holder.bar-lvl-3 .bar-used.val { padding-top: 5px; }
|
||||
#content #index .bar-holder.bar-lvl-3 { margin-bottom: 65px; }
|
||||
|
||||
#content #index .loader
|
||||
{
|
||||
background-position: 0 50%;
|
||||
padding-left: 21px;
|
||||
}
|
||||
|
||||
#content #index #data
|
||||
#content #index .index-left
|
||||
{
|
||||
float: left;
|
||||
width: 74%;
|
||||
width: 55%;
|
||||
}
|
||||
|
||||
#content #index #memory
|
||||
#content #index .index-right
|
||||
{
|
||||
float: right;
|
||||
width: 24%;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
#content #index #data h2 { background-image: url( ../../img/ico/server.png ); }
|
||||
#content #index #memory h2 { background-image: url( ../../img/ico/battery.png ); }
|
||||
|
||||
#content #index #data li
|
||||
#content #index .data li
|
||||
{
|
||||
display: none;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
#content #index #data li.odd
|
||||
#content #index .data li.odd
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
#content #index #data li dt
|
||||
#content #index .data li dt
|
||||
{
|
||||
float: left;
|
||||
width: 27%;
|
||||
white-space: nowrap;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
#content #index #data li dd
|
||||
#content #index .data li dd
|
||||
{
|
||||
float: right;
|
||||
width: 72%
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
width: 80%
|
||||
}
|
||||
|
||||
#content #index #data li dd.odd
|
||||
#content #index .data li dd.odd
|
||||
{
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#content #index #data dt span
|
||||
#content #index .data dt span
|
||||
{
|
||||
background-position: 0 50%;
|
||||
background-position: 1px 50%;
|
||||
display: block;
|
||||
padding-left: 21px;
|
||||
padding-left: 22px;
|
||||
}
|
||||
|
||||
#content #index #data .start_time dt span
|
||||
{
|
||||
background-image: url( ../../img/ico/clock-select.png );
|
||||
}
|
||||
#content #index #instance h2 { background-image: url( ../../img/ico/server.png ); }
|
||||
#content #index #instance .start_time dt span { background-image: url( ../../img/ico/clock-select.png ); }
|
||||
#content #index #instance .host dt span { background-image: url( ../../img/ico/globe.png ); }
|
||||
#content #index #instance .dir dt span { background-image: url( ../../img/ico/folder.png ); }
|
||||
|
||||
#content #index #data .host dt span
|
||||
{
|
||||
background-image: url( ../../img/ico/globe.png );
|
||||
}
|
||||
#content #index #versions h2 { background-image: url( ../../img/ico/property.png ); }
|
||||
#content #index #versions .solr span { background-image: url( ../../img/solr-ico.png ); }
|
||||
#content #index #versions .lucene span { background-image: url( ../../img/lucene-ico.png ); }
|
||||
|
||||
#content #index #data .cwd dt span
|
||||
{
|
||||
background-image: url( ../../img/ico/folder-export.png );
|
||||
}
|
||||
#content #index #jvm h2 { background-image: url( ../../img/ico/jar.png ); }
|
||||
#content #index #jvm .jvm_version dt span { background-image: url( ../../img/ico/jar.png ); }
|
||||
#content #index #jvm .processors dt span { background-image: url( ../../img/ico/processor.png ); }
|
||||
#content #index #jvm .command_line_args dt span { background-image: url( ../../img/ico/terminal.png ); }
|
||||
|
||||
#content #index #data .jvm dt span
|
||||
{
|
||||
background-image: url( ../../img/ico/jar.png );
|
||||
}
|
||||
#content #index #system h2 { background-image: url( ../../img/ico/system-monitor.png ); }
|
||||
|
||||
#content #index #data .command_line_args dt span
|
||||
#content #index #system
|
||||
{
|
||||
background-image: url( ../../img/ico/terminal.png );
|
||||
}
|
||||
|
||||
#content #index #data .lucene dt span
|
||||
{
|
||||
background-image: url( ../../img/lucene-ico.png );
|
||||
}
|
||||
|
||||
#content #index #memory #memory-bar
|
||||
{
|
||||
background-color: #00f;
|
||||
box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-moz-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
margin-top: 20px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#content #index #memory .bar
|
||||
{
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#content #index #memory div .value
|
||||
{
|
||||
border-top: 1px solid #f00;
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
line-height: 12px;
|
||||
padding-left: 10px;
|
||||
padding-right: 2px;
|
||||
position: absolute;
|
||||
margin-left: 100px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#content #index #memory div .value.upper
|
||||
{
|
||||
border-top-width: 0;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
#content #index #memory #memory-bar-max
|
||||
{
|
||||
background-color: #f0f0f0;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#content #index #memory #memory-bar-max .value
|
||||
#content #index #system .reload
|
||||
{
|
||||
border-color: #f0f0f0;
|
||||
color: #d6d6d6;
|
||||
background-image: url( ../../img/ico/arrow-circle.png );
|
||||
background-position: 50% 50%;
|
||||
display: block;
|
||||
height: 30px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
#content #index #memory #memory-bar-total
|
||||
#content #index #system .reload.loader
|
||||
{
|
||||
background-color: #c0c0c0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#content #index #memory #memory-bar-total .value
|
||||
#content #index #system .reload span
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #index #system .content p
|
||||
{
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#content #index #system .content .no-info
|
||||
{
|
||||
border-color: #c0c0c0;
|
||||
color: #c0c0c0;
|
||||
display: none;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#content #index #memory #memory-bar-used
|
||||
{
|
||||
background-color: #969696;
|
||||
}
|
||||
#content #index #jvm-memory h2 { background-image: url( ../../img/ico/memory.png ); }
|
||||
|
||||
#content #index #memory #memory-bar-used .value
|
||||
#content #index #jvm-memory-bar
|
||||
{
|
||||
border-color: #969696;
|
||||
color: #969696;
|
||||
margin-top: 20px;
|
||||
}
|
|
@ -4,146 +4,181 @@
|
|||
padding-left: 21px;
|
||||
}
|
||||
|
||||
#content #logging .jstree
|
||||
{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#content #logging .jstree a
|
||||
{
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
#content #logging .jstree .trigger span
|
||||
{
|
||||
background-position: 100% 50%;
|
||||
cursor: pointer;
|
||||
padding-right: 21px;
|
||||
}
|
||||
|
||||
#content #logging .jstree a.trigger:hover span
|
||||
{
|
||||
background-image: url( ../../img/ico/pencil-small.png );
|
||||
}
|
||||
|
||||
#content #logging .jstree .inactive,
|
||||
#content #logging .jstree .inactive .effective_level
|
||||
{
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
#content #logging .jstree li
|
||||
{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#content #logging .jstree .odd
|
||||
#content #logging .jstree a
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
color: #c0c0c0;
|
||||
height: 17px;
|
||||
line-height: 17px;
|
||||
padding: 0;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel
|
||||
#content #logging .jstree a.set
|
||||
{
|
||||
position: absolute;
|
||||
margin-top: 3px;
|
||||
top: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#content #logging .jstree li .loglevel { left: 340px; }
|
||||
#content #logging .jstree li li .loglevel { left: 322px; }
|
||||
#content #logging .jstree li li li .loglevel { left: 304px; }
|
||||
#content #logging .jstree li li li li .loglevel { left: 286px; }
|
||||
#content #logging .jstree li li li li li .loglevel { left: 268px; }
|
||||
#content #logging .jstree li li li li li li .loglevel { left: 250px; }
|
||||
|
||||
#content #logging .jstree .loglevel a
|
||||
#content #logging .jstree a.null
|
||||
{
|
||||
display: block;
|
||||
color: #f0f0f0;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel .effective_level
|
||||
{
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
padding-left: 5px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel.open .effective_level
|
||||
#content #logging .jstree a:hover,
|
||||
#content #logging .jstree a.open
|
||||
{
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel.open .effective_level
|
||||
#content #logging .jstree a:hover
|
||||
{
|
||||
background-image: url( ../../img/ico/arrow-000-small.png );
|
||||
background-position: 75px 50%;
|
||||
color: #008;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel.open .effective_level span
|
||||
#content #logging .jstree a span.ns
|
||||
{
|
||||
background-image: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel ul
|
||||
#content #logging.ns .jstree a span.ns
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#content #logging .jstree a span.name
|
||||
{
|
||||
background-position: 100% 50%;
|
||||
cursor: pointer;
|
||||
padding-right: 21px;
|
||||
}
|
||||
|
||||
#content #logging .jstree a:hover span.name
|
||||
{
|
||||
background-image: url( ../../img/ico/pencil-small.png );
|
||||
}
|
||||
|
||||
#content #logging .jstree .selector-holder
|
||||
{
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
z-index: 700;
|
||||
}
|
||||
|
||||
#content #logging .jstree .selector-holder.open
|
||||
{
|
||||
background-color: #fff;
|
||||
border: 1px solid #f0f0f0;
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 100px;
|
||||
top: 0;
|
||||
margin-left: -19px;
|
||||
z-index: 800;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel.open ul
|
||||
#content #logging .jstree li .selector-holder { left: 440px; }
|
||||
#content #logging .jstree li li .selector-holder { left: 422px; }
|
||||
#content #logging .jstree li li li .selector-holder { left: 404px; }
|
||||
#content #logging .jstree li li li li .selector-holder { left: 386px; }
|
||||
#content #logging .jstree li li li li li .selector-holder { left: 368px; }
|
||||
#content #logging .jstree li li li li li li .selector-holder { left: 350px; }
|
||||
|
||||
#content #logging .jstree .selector
|
||||
{
|
||||
border: 1px solid #fff;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#content #logging .jstree .open .selector
|
||||
{
|
||||
border-color: #f0f0f0;
|
||||
box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-moz-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
}
|
||||
|
||||
#content #logging .jstree .selector a
|
||||
{
|
||||
display: block;
|
||||
padding: 2px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#content #logging .jstree .selector .close
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #logging .jstree .open .selector .close
|
||||
{
|
||||
background-image: url( ../../img/ico/cross-0.png );
|
||||
background-position: 50% 50%;
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: -25px;
|
||||
top: 0;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#content #logging .jstree .open .selector .close:hover
|
||||
{
|
||||
background-image: url( ../../img/ico/cross-1.png );
|
||||
}
|
||||
|
||||
#content #logging .jstree .open .selector .close span
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #logging .jstree .open .selector a.trigger
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #logging .jstree .selector ul
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #logging .jstree .open .selector ul
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel ul li
|
||||
#content #logging .jstree .selector ul li
|
||||
{
|
||||
background-image: none;
|
||||
line-height: auto;
|
||||
background: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel ul li a
|
||||
#content #logging .jstree .selector ul li a
|
||||
{
|
||||
background-image: url( ../../img/ico/ui-radio-button-uncheck.png );
|
||||
background-position: 2px 50%;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
padding-left: 21px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel ul li.selected a
|
||||
#content #logging .jstree .selector ul li a.level
|
||||
{
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
#content #logging .jstree .selector ul li a:hover
|
||||
{
|
||||
background-image: url( ../../img/ico/ui-radio-button.png );
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel ul li a:hover
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
color: #008;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel ul li.unset
|
||||
#content #logging .jstree .selector li.unset
|
||||
{
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel ul li.unset a
|
||||
#content #logging .jstree .selector li.unset a
|
||||
{
|
||||
background-image: url( ../../img/ico/cross-0.png );
|
||||
background-position: 4px 50%;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
#content #logging .jstree .loglevel ul li.unset a:hover
|
||||
#content #logging .jstree .selector li.unset a:hover
|
||||
{
|
||||
background-image: url( ../../img/ico/cross-1.png );
|
||||
color: #800;
|
||||
|
|
|
@ -193,11 +193,6 @@
|
|||
margin-left: 20px;
|
||||
}
|
||||
|
||||
#content #replication #iterations
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #replication #iterations .label span
|
||||
{
|
||||
background-image: url( ../../img/ico/node-design.png );
|
||||
|
@ -412,6 +407,45 @@
|
|||
background-image: url( ../../img/ico/tick.png );
|
||||
}
|
||||
|
||||
#content #replication .timer
|
||||
{
|
||||
box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-moz-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
-webkit-box-shadow: 5px 5px 10px #c0c0c0;
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#content #replication .timer p,
|
||||
#content #replication .timer small
|
||||
{
|
||||
padding-left: 21px;
|
||||
}
|
||||
|
||||
#content #replication .timer p
|
||||
{
|
||||
background-image: url( ../../img/ico/clock-select-remain.png );
|
||||
background-position: 0 50%;
|
||||
}
|
||||
|
||||
#content #replication .timer p .approx
|
||||
{
|
||||
color: #c0c0c0;
|
||||
margin-right: 1px;
|
||||
}
|
||||
|
||||
#content #replication .timer p .tick
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#content #replication .timer small
|
||||
{
|
||||
color: #c0c0c0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #replication #navigation button
|
||||
{
|
||||
background-position: 2px 50%;
|
||||
|
|
|
@ -106,7 +106,12 @@
|
|||
|
||||
#content #schema-browser #data #field .field-options
|
||||
{
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .head h2
|
||||
{
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .options dt,
|
||||
|
@ -128,6 +133,7 @@
|
|||
margin-right: 5px;
|
||||
}
|
||||
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer,
|
||||
#content #schema-browser #data #field .field-options .analyzer li,
|
||||
#content #schema-browser #data #field .field-options .analyzer ul,
|
||||
|
@ -149,6 +155,25 @@
|
|||
width: 100px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer a
|
||||
{
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer .toggle
|
||||
{
|
||||
background-image: url( ../../img/ico/chevron-small-expand.png );
|
||||
background-position: 100% 50%;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
padding-right: 21px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer .open .toggle
|
||||
{
|
||||
background-image: url( ../../img/ico/chevron-small.png );
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer li
|
||||
{
|
||||
border-top: 1px solid #f0f0f0;
|
||||
|
@ -159,11 +184,16 @@
|
|||
#content #schema-browser #data #field .field-options .analyzer ul
|
||||
{
|
||||
clear: left;
|
||||
display: block;
|
||||
display: none;
|
||||
margin-left: 30px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer .open ul
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .analyzer ul li
|
||||
{
|
||||
border-top: 1px solid #f8f8f8;
|
||||
|
@ -207,10 +237,90 @@
|
|||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder
|
||||
#content #schema-browser #data #field .terminfo-holder
|
||||
{
|
||||
border-top: 1px solid #c0c0c0;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .terminfo-holder .trigger
|
||||
{
|
||||
float: left;
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .terminfo-holder .trigger button
|
||||
{
|
||||
background-image: url( ../../img/ico/information.png );
|
||||
background-position: 3px 50%;
|
||||
display: block;
|
||||
padding-left: 23px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .terminfo-holder .status
|
||||
{
|
||||
border-left: 1px solid #f0f0f0;
|
||||
display: none;
|
||||
float: left;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .terminfo-holder.disabled .trigger button
|
||||
{
|
||||
background-color: #f0f0f0;
|
||||
background-image: url( ../../img/ico/prohibition.png );
|
||||
border-color: #fff;
|
||||
color: #c0c0c0;
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .terminfo-holder.disabled .status
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .terminfo-holder .trigger .autoload
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .terminfo-holder.loaded .trigger .autoload
|
||||
{
|
||||
background-image: url( ../../img/ico/ui-check-box-uncheck.png );
|
||||
background-position: 0 50%;
|
||||
color: #c0c0c0;
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
padding-left: 21px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .terminfo-holder .trigger .autoload:hover
|
||||
{
|
||||
color: #008;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .terminfo-holder .trigger .autoload.on
|
||||
{
|
||||
background-image: url( ../../img/ico/ui-check-box.png );
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder
|
||||
{
|
||||
border-left: 1px solid #f0f0f0;
|
||||
display: none;
|
||||
float: left;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .head input
|
||||
{
|
||||
height: 18px;
|
||||
line-height: 16px;
|
||||
text-align: right;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .head .max-holder
|
||||
|
@ -218,95 +328,62 @@
|
|||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder table
|
||||
#content #schema-browser #data #field .topterms-holder .head .max-holder:hover .max
|
||||
{
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
color: #008;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder th,
|
||||
#content #schema-browser #data #field .topterms-holder td
|
||||
#content #schema-browser .topterms-holder li
|
||||
{
|
||||
border: 1px solid #f0f0f0;
|
||||
padding: 1px 4px;
|
||||
border-top: 1px solid #999;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder thead tr
|
||||
#content #schema-browser .topterms-holder li p
|
||||
{
|
||||
background-color: #c0c0c0;
|
||||
background-color: #999;
|
||||
color: #fff;
|
||||
float: left;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder thead th
|
||||
#content #schema-browser .topterms-holder li p span
|
||||
{
|
||||
text-align: left;
|
||||
display: block;
|
||||
padding-right: 2px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder tbody
|
||||
#content #schema-browser .topterms-holder li ul
|
||||
{
|
||||
display: none;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder tbody .odd
|
||||
#content #schema-browser .topterms-holder li li
|
||||
{
|
||||
border-top: 0;
|
||||
margin-bottom: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#content #schema-browser .topterms-holder li li.odd
|
||||
{
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder tbody .position
|
||||
#content #schema-browser .topterms-holder li li span
|
||||
{
|
||||
color: #c0c0c0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .navi
|
||||
{
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .navi a
|
||||
{
|
||||
color: #c0c0c0;
|
||||
display: block;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
width: 49%;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .navi a:hover
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .navi .less
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .navi .less span
|
||||
{
|
||||
background-image: url( ../../img/ico/chevron-small.png );
|
||||
background-position: 0 50%;
|
||||
padding-left: 18px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .navi .more
|
||||
{
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .topterms-holder .navi .more span
|
||||
{
|
||||
background-image: url( ../../img/ico/chevron-small-expand.png );
|
||||
background-position: 100% 50%;
|
||||
padding-right: 18px;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .histogram-holder
|
||||
{
|
||||
border-left: 1px solid #f0f0f0;
|
||||
display: none;
|
||||
float: left;
|
||||
margin-left: 50px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .histogram-holder .histogram
|
||||
|
@ -314,6 +391,11 @@
|
|||
height: 150px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .histogram-holder .histogram.single canvas
|
||||
{
|
||||
background-color: #c0c0c0;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .histogram-holder dt,
|
||||
#content #schema-browser #data #field .histogram-holder dd
|
||||
{
|
||||
|
|
|
@ -0,0 +1,317 @@
|
|||
// Simple Set Clipboard System
|
||||
// Author: Joseph Huckaby
|
||||
|
||||
var ZeroClipboard = {
|
||||
|
||||
version: "1.0.7",
|
||||
clients: {}, // registered upload clients on page, indexed by id
|
||||
moviePath: 'ZeroClipboard.swf', // URL to movie
|
||||
nextId: 1, // ID of next movie
|
||||
|
||||
$: function(thingy) {
|
||||
// simple DOM lookup utility function
|
||||
if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
|
||||
if (!thingy.addClass) {
|
||||
// extend element with a few useful methods
|
||||
thingy.hide = function() { this.style.display = 'none'; };
|
||||
thingy.show = function() { this.style.display = ''; };
|
||||
thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
|
||||
thingy.removeClass = function(name) {
|
||||
var classes = this.className.split(/\s+/);
|
||||
var idx = -1;
|
||||
for (var k = 0; k < classes.length; k++) {
|
||||
if (classes[k] == name) { idx = k; k = classes.length; }
|
||||
}
|
||||
if (idx > -1) {
|
||||
classes.splice( idx, 1 );
|
||||
this.className = classes.join(' ');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
thingy.hasClass = function(name) {
|
||||
return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
|
||||
};
|
||||
}
|
||||
return thingy;
|
||||
},
|
||||
|
||||
setMoviePath: function(path) {
|
||||
// set path to ZeroClipboard.swf
|
||||
this.moviePath = path;
|
||||
},
|
||||
|
||||
dispatch: function(id, eventName, args) {
|
||||
// receive event from flash movie, send to client
|
||||
var client = this.clients[id];
|
||||
if (client) {
|
||||
client.receiveEvent(eventName, args);
|
||||
}
|
||||
},
|
||||
|
||||
register: function(id, client) {
|
||||
// register new client to receive events
|
||||
this.clients[id] = client;
|
||||
},
|
||||
|
||||
getDOMObjectPosition: function(obj, stopObj) {
|
||||
// get absolute coordinates for dom element
|
||||
var info = {
|
||||
left: 0,
|
||||
top: 0,
|
||||
width: obj.width ? obj.width : obj.offsetWidth,
|
||||
height: obj.height ? obj.height : obj.offsetHeight
|
||||
};
|
||||
|
||||
while (obj && (obj != stopObj)) {
|
||||
info.left += obj.offsetLeft;
|
||||
info.top += obj.offsetTop;
|
||||
obj = obj.offsetParent;
|
||||
}
|
||||
|
||||
return info;
|
||||
},
|
||||
|
||||
Client: function(elem) {
|
||||
// constructor for new simple upload client
|
||||
this.handlers = {};
|
||||
|
||||
// unique ID
|
||||
this.id = ZeroClipboard.nextId++;
|
||||
this.movieId = 'ZeroClipboardMovie_' + this.id;
|
||||
|
||||
// register client with singleton to receive flash events
|
||||
ZeroClipboard.register(this.id, this);
|
||||
|
||||
// create movie
|
||||
if (elem) this.glue(elem);
|
||||
}
|
||||
};
|
||||
|
||||
ZeroClipboard.Client.prototype = {
|
||||
|
||||
id: 0, // unique ID for us
|
||||
ready: false, // whether movie is ready to receive events or not
|
||||
movie: null, // reference to movie object
|
||||
clipText: '', // text to copy to clipboard
|
||||
handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
|
||||
cssEffects: true, // enable CSS mouse effects on dom container
|
||||
handlers: null, // user event handlers
|
||||
|
||||
glue: function(elem, appendElem, stylesToAdd) {
|
||||
// glue to DOM element
|
||||
// elem can be ID or actual DOM element object
|
||||
this.domElement = ZeroClipboard.$(elem);
|
||||
|
||||
// float just above object, or zIndex 99 if dom element isn't set
|
||||
var zIndex = 99;
|
||||
if (this.domElement.style.zIndex) {
|
||||
zIndex = parseInt(this.domElement.style.zIndex, 10) + 1;
|
||||
}
|
||||
|
||||
if (typeof(appendElem) == 'string') {
|
||||
appendElem = ZeroClipboard.$(appendElem);
|
||||
}
|
||||
else if (typeof(appendElem) == 'undefined') {
|
||||
appendElem = document.getElementsByTagName('body')[0];
|
||||
}
|
||||
|
||||
// find X/Y position of domElement
|
||||
var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem);
|
||||
|
||||
// create floating DIV above element
|
||||
this.div = document.createElement('div');
|
||||
var style = this.div.style;
|
||||
style.position = 'absolute';
|
||||
style.left = '' + box.left + 'px';
|
||||
style.top = '' + box.top + 'px';
|
||||
style.width = '' + box.width + 'px';
|
||||
style.height = '' + box.height + 'px';
|
||||
style.zIndex = zIndex;
|
||||
|
||||
style.left = '0px';
|
||||
style.top = '0px';
|
||||
|
||||
if (typeof(stylesToAdd) == 'object') {
|
||||
for (addedStyle in stylesToAdd) {
|
||||
style[addedStyle] = stylesToAdd[addedStyle];
|
||||
}
|
||||
}
|
||||
|
||||
// style.backgroundColor = '#f00'; // debug
|
||||
|
||||
appendElem.appendChild(this.div);
|
||||
|
||||
this.div.innerHTML = this.getHTML( box.width, box.height );
|
||||
},
|
||||
|
||||
getHTML: function(width, height) {
|
||||
// return HTML for movie
|
||||
var html = '';
|
||||
var flashvars = 'id=' + this.id +
|
||||
'&width=' + width +
|
||||
'&height=' + height;
|
||||
|
||||
if (navigator.userAgent.match(/MSIE/)) {
|
||||
// IE gets an OBJECT tag
|
||||
var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
|
||||
html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
|
||||
}
|
||||
else {
|
||||
// all other browsers get an EMBED tag
|
||||
html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
|
||||
}
|
||||
return html;
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
// temporarily hide floater offscreen
|
||||
if (this.div) {
|
||||
this.div.style.left = '-2000px';
|
||||
}
|
||||
},
|
||||
|
||||
show: function() {
|
||||
// show ourselves after a call to hide()
|
||||
this.reposition();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
// destroy control and floater
|
||||
if (this.domElement && this.div) {
|
||||
this.hide();
|
||||
this.div.innerHTML = '';
|
||||
|
||||
var body = document.getElementsByTagName('body')[0];
|
||||
try { body.removeChild( this.div ); } catch(e) {;}
|
||||
|
||||
this.domElement = null;
|
||||
this.div = null;
|
||||
}
|
||||
},
|
||||
|
||||
reposition: function(elem) {
|
||||
// reposition our floating div, optionally to new container
|
||||
// warning: container CANNOT change size, only position
|
||||
if (elem) {
|
||||
this.domElement = ZeroClipboard.$(elem);
|
||||
if (!this.domElement) this.hide();
|
||||
}
|
||||
|
||||
console.debug( this.domElement, this.div );
|
||||
|
||||
if (this.domElement && this.div) {
|
||||
var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
|
||||
console.debug( box );
|
||||
var style = this.div.style;
|
||||
style.left = '' + box.left + 'px';
|
||||
style.top = '' + box.top + 'px';
|
||||
}
|
||||
},
|
||||
|
||||
setText: function(newText) {
|
||||
// set text to be copied to clipboard
|
||||
this.clipText = newText;
|
||||
if (this.ready) this.movie.setText(newText);
|
||||
},
|
||||
|
||||
addEventListener: function(eventName, func) {
|
||||
// add user event listener for event
|
||||
// event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel
|
||||
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
|
||||
if (!this.handlers[eventName]) this.handlers[eventName] = [];
|
||||
this.handlers[eventName].push(func);
|
||||
},
|
||||
|
||||
setHandCursor: function(enabled) {
|
||||
// enable hand cursor (true), or default arrow cursor (false)
|
||||
this.handCursorEnabled = enabled;
|
||||
if (this.ready) this.movie.setHandCursor(enabled);
|
||||
},
|
||||
|
||||
setCSSEffects: function(enabled) {
|
||||
// enable or disable CSS effects on DOM container
|
||||
this.cssEffects = !!enabled;
|
||||
},
|
||||
|
||||
receiveEvent: function(eventName, args) {
|
||||
// receive event from flash
|
||||
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
|
||||
|
||||
// special behavior for certain events
|
||||
switch (eventName) {
|
||||
case 'load':
|
||||
// movie claims it is ready, but in IE this isn't always the case...
|
||||
// bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function
|
||||
this.movie = document.getElementById(this.movieId);
|
||||
if (!this.movie) {
|
||||
var self = this;
|
||||
setTimeout( function() { self.receiveEvent('load', null); }, 1 );
|
||||
return;
|
||||
}
|
||||
|
||||
// firefox on pc needs a "kick" in order to set these in certain cases
|
||||
if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
|
||||
var self = this;
|
||||
setTimeout( function() { self.receiveEvent('load', null); }, 100 );
|
||||
this.ready = true;
|
||||
return;
|
||||
}
|
||||
|
||||
this.ready = true;
|
||||
this.movie.setText( this.clipText );
|
||||
this.movie.setHandCursor( this.handCursorEnabled );
|
||||
break;
|
||||
|
||||
case 'mouseover':
|
||||
if (this.domElement && this.cssEffects) {
|
||||
this.domElement.addClass('hover');
|
||||
if (this.recoverActive) this.domElement.addClass('active');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mouseout':
|
||||
if (this.domElement && this.cssEffects) {
|
||||
this.recoverActive = false;
|
||||
if (this.domElement.hasClass('active')) {
|
||||
this.domElement.removeClass('active');
|
||||
this.recoverActive = true;
|
||||
}
|
||||
this.domElement.removeClass('hover');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mousedown':
|
||||
if (this.domElement && this.cssEffects) {
|
||||
this.domElement.addClass('active');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mouseup':
|
||||
if (this.domElement && this.cssEffects) {
|
||||
this.domElement.removeClass('active');
|
||||
this.recoverActive = false;
|
||||
}
|
||||
break;
|
||||
} // switch eventName
|
||||
|
||||
if (this.handlers[eventName]) {
|
||||
for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
|
||||
var func = this.handlers[eventName][idx];
|
||||
|
||||
if (typeof(func) == 'function') {
|
||||
// actual function reference
|
||||
func(this, args);
|
||||
}
|
||||
else if ((typeof(func) == 'object') && (func.length == 2)) {
|
||||
// PHP style object + method, i.e. [myObject, 'myMethod']
|
||||
func[0][ func[1] ](this, args);
|
||||
}
|
||||
else if (typeof(func) == 'string') {
|
||||
// name of function
|
||||
window[func](this, args);
|
||||
}
|
||||
} // foreach event handler defined
|
||||
} // user defined handler for event
|
||||
}
|
||||
|
||||
};
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,47 @@
|
|||
/*!
|
||||
* jQuery Cookie Plugin
|
||||
* https://github.com/carhartl/jquery-cookie
|
||||
*
|
||||
* Copyright 2011, Klaus Hartl
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.opensource.org/licenses/GPL-2.0
|
||||
*/
|
||||
(function($) {
|
||||
$.cookie = function(key, value, options) {
|
||||
|
||||
// key and at least value given, set cookie...
|
||||
if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
|
||||
options = $.extend({}, options);
|
||||
|
||||
if (value === null || value === undefined) {
|
||||
options.expires = -1;
|
||||
}
|
||||
|
||||
if (typeof options.expires === 'number') {
|
||||
var days = options.expires, t = options.expires = new Date();
|
||||
t.setDate(t.getDate() + days);
|
||||
}
|
||||
|
||||
value = String(value);
|
||||
|
||||
return (document.cookie = [
|
||||
encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
|
||||
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
||||
options.path ? '; path=' + options.path : '',
|
||||
options.domain ? '; domain=' + options.domain : '',
|
||||
options.secure ? '; secure' : ''
|
||||
].join(''));
|
||||
}
|
||||
|
||||
// key and possibly options given, get cookie...
|
||||
options = value || {};
|
||||
var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
|
||||
|
||||
var pairs = document.cookie.split('; ');
|
||||
for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
|
||||
if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
|
||||
}
|
||||
return null;
|
||||
};
|
||||
})(jQuery);
|
|
@ -1,14 +1,33 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
require
|
||||
(
|
||||
[
|
||||
'lib/order!lib/console',
|
||||
'lib/order!jquery',
|
||||
'lib/order!lib/jquery.cookie',
|
||||
'lib/order!lib/jquery.form',
|
||||
'lib/order!lib/jquery.jstree',
|
||||
'lib/order!lib/jquery.sammy',
|
||||
'lib/order!lib/jquery.sparkline',
|
||||
'lib/order!lib/jquery.timeago',
|
||||
'lib/order!lib/highlight',
|
||||
'lib/order!lib/ZeroClipboard',
|
||||
'lib/order!scripts/app',
|
||||
|
||||
'lib/order!scripts/analysis',
|
||||
|
@ -27,7 +46,6 @@ require
|
|||
'lib/order!scripts/threads',
|
||||
|
||||
'lib/order!scripts/dashboard'
|
||||
|
||||
],
|
||||
function( $ )
|
||||
{
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// #/:core/analysis
|
||||
sammy.get
|
||||
(
|
||||
|
@ -201,12 +218,20 @@ sammy.get
|
|||
$( '#analysis-error', analysis_element )
|
||||
.show();
|
||||
|
||||
if( error_message )
|
||||
{
|
||||
$( '#analysis-error .head a span', analysis_element )
|
||||
.text( error_message[1] );
|
||||
|
||||
$( '#analysis-error .body', analysis_element )
|
||||
.text( error_message[2].replace( /(\s+at\s+)/g, " at\n" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$( '#analysis-error .head a span', analysis_element )
|
||||
.text( error_thrown );
|
||||
}
|
||||
}
|
||||
},
|
||||
complete : function()
|
||||
{
|
||||
|
@ -240,8 +265,7 @@ sammy.get
|
|||
{
|
||||
analysis_data[type][i+1] = [{ 'text': analysis_data[type][i+1] }]
|
||||
}
|
||||
global_elements_count = Math.max( global_elements_count,
|
||||
analysis_data[type][i+1].length );
|
||||
global_elements_count = Math.max( global_elements_count, analysis_data[type][i+1].length );
|
||||
}
|
||||
|
||||
var content = '<div class="' + type + '">' + "\n";
|
||||
|
@ -309,10 +333,7 @@ sammy.get
|
|||
content += '</table></td></tr></table></td>' + "\n";
|
||||
|
||||
// data
|
||||
var cell_content = '<td class="part data spacer" '
|
||||
+ ' colspan="' + colspan + '">'
|
||||
+ '<div class="holder"> </div>'
|
||||
+ '</td>';
|
||||
var cell_content = '<td class="part data spacer" colspan="' + colspan + '"><div class="holder"> </div></td>';
|
||||
var cells = new Array( elements_count + 1 ).join( cell_content );
|
||||
content += cells + "\n";
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
var loader = {
|
||||
|
||||
show : function( element )
|
||||
|
@ -24,6 +41,15 @@ String.prototype.esc = function()
|
|||
return this.replace( /</g, '<' ).replace( />/g, '>' );
|
||||
}
|
||||
|
||||
SolrDate = function( date )
|
||||
{
|
||||
// ["Sat Mar 03 11:00:00 CET 2012", "Sat", "Mar", "03", "11:00:00", "CET", "2012"]
|
||||
var parts = date.match( /^(\w+)\s+(\w+)\s+(\d+)\s+(\d+\:\d+\:\d+)\s+(\w+)\s+(\d+)$/ );
|
||||
|
||||
// "Sat Mar 03 2012 10:37:33"
|
||||
return new Date( parts[1] + ' ' + parts[2] + ' ' + parts[3] + ' ' + parts[6] + ' ' + parts[4] );
|
||||
}
|
||||
|
||||
var sammy = $.sammy
|
||||
(
|
||||
function()
|
||||
|
@ -192,13 +218,15 @@ var solr_admin = function( app_config )
|
|||
{
|
||||
var command_line_args = response.jvm.jmx.commandLineArgs.join( ' | ' );
|
||||
|
||||
environment_args = command_line_args
|
||||
.match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i );
|
||||
|
||||
cloud_args = command_line_args
|
||||
.match( /-Dzk/i );
|
||||
environment_args = command_line_args.match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i );
|
||||
cloud_args = command_line_args.match( /-Dzk/i );
|
||||
}
|
||||
|
||||
// title
|
||||
|
||||
$( 'title', document )
|
||||
.append( ' (' + response.core.host + ')' );
|
||||
|
||||
// environment
|
||||
|
||||
var environment_element = $( '#environment' );
|
||||
|
@ -240,6 +268,23 @@ var solr_admin = function( app_config )
|
|||
},
|
||||
error : function()
|
||||
{
|
||||
var main = $( '#main' );
|
||||
|
||||
$( 'div[id$="-wrapper"]', main )
|
||||
.remove();
|
||||
|
||||
main
|
||||
.addClass( 'error' )
|
||||
.append
|
||||
(
|
||||
'<div class="message">This interface requires that you activate the admin request handlers, add the following configuration to your <code>solrconfig.xml:</code></div>' +
|
||||
'<div class="code"><pre class="syntax language-xml"><code>' +
|
||||
'<!-- Admin Handlers - This will register all the standard admin RequestHandlers. -->'.esc() + "\n" +
|
||||
'<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />'.esc() +
|
||||
'</code></pre></div>'
|
||||
);
|
||||
|
||||
hljs.highlightBlock( $( 'pre', main ).get(0) );
|
||||
},
|
||||
complete : function()
|
||||
{
|
||||
|
|
|
@ -1,9 +1,27 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// #/cloud
|
||||
sammy.get
|
||||
(
|
||||
/^#\/(cloud)$/,
|
||||
function( context )
|
||||
{
|
||||
var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
|
||||
var content_element = $( '#content' );
|
||||
|
||||
$.get
|
||||
|
@ -17,10 +35,145 @@ sammy.get
|
|||
var cloud_element = $( '#cloud', content_element );
|
||||
var cloud_content = $( '.content', cloud_element );
|
||||
|
||||
var debug_element = $( '#debug', cloud_element );
|
||||
var debug_button = $( 'a.debug', cloud_element );
|
||||
|
||||
var clipboard_element = $( '.clipboard', debug_element );
|
||||
var clipboard_button = $( 'a', clipboard_element );
|
||||
|
||||
debug_button
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
debug_element.trigger( 'show' );
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$( '.close', debug_element )
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
debug_element.trigger( 'hide' );
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$( '.clipboard', debug_element )
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
debug_element
|
||||
.die( 'show' )
|
||||
.live
|
||||
(
|
||||
'show',
|
||||
function( event )
|
||||
{
|
||||
debug_button.hide();
|
||||
debug_element.show();
|
||||
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : app.config.zookeeper_path,
|
||||
url : core_basepath + '/zookeeper?wt=json&dump=true',
|
||||
dataType : 'text',
|
||||
context : debug_element,
|
||||
beforeSend : function( xhr, settings )
|
||||
{
|
||||
$( '.debug', debug_element )
|
||||
.html( '<span class="loader">Loading Dump ...</span>' );
|
||||
|
||||
ZeroClipboard.setMoviePath( 'img/ZeroClipboard.swf' );
|
||||
|
||||
clipboard_client = new ZeroClipboard.Client();
|
||||
|
||||
clipboard_client.addEventListener
|
||||
(
|
||||
'load',
|
||||
function( client )
|
||||
{
|
||||
}
|
||||
);
|
||||
|
||||
clipboard_client.addEventListener
|
||||
(
|
||||
'complete',
|
||||
function( client, text )
|
||||
{
|
||||
clipboard_element
|
||||
.addClass( 'copied' );
|
||||
|
||||
clipboard_button
|
||||
.data( 'text', clipboard_button.text() )
|
||||
.text( clipboard_button.data( 'copied' ) );
|
||||
}
|
||||
);
|
||||
},
|
||||
success : function( response, text_status, xhr )
|
||||
{
|
||||
clipboard_client.glue
|
||||
(
|
||||
clipboard_element.get(0),
|
||||
clipboard_button.get(0)
|
||||
);
|
||||
|
||||
clipboard_client.setText( response.replace( /\\/g, '\\\\' ) );
|
||||
|
||||
$( '.debug', debug_element )
|
||||
.removeClass( 'loader' )
|
||||
.text( response );
|
||||
},
|
||||
error : function( xhr, text_status, error_thrown )
|
||||
{
|
||||
},
|
||||
complete : function( xhr, text_status )
|
||||
{
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
)
|
||||
.die( 'hide' )
|
||||
.live
|
||||
(
|
||||
'hide',
|
||||
function( event )
|
||||
{
|
||||
$( '.debug', debug_element )
|
||||
.empty();
|
||||
|
||||
clipboard_element
|
||||
.removeClass( 'copied' );
|
||||
|
||||
clipboard_button
|
||||
.data( 'copied', clipboard_button.text() )
|
||||
.text( clipboard_button.data( 'text' ) );
|
||||
|
||||
clipboard_client.destroy();
|
||||
|
||||
debug_button.show();
|
||||
debug_element.hide();
|
||||
}
|
||||
);
|
||||
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : core_basepath + '/zookeeper?wt=json',
|
||||
dataType : 'json',
|
||||
context : cloud_content,
|
||||
beforeSend : function( xhr, settings )
|
||||
|
@ -45,6 +198,11 @@ sammy.get
|
|||
"animation" : 0
|
||||
}
|
||||
}
|
||||
)
|
||||
.jstree
|
||||
(
|
||||
'open_node',
|
||||
'li:first'
|
||||
);
|
||||
|
||||
var tree_links = $( '#tree a', this );
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
sammy.bind
|
||||
(
|
||||
'cores_load_data',
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// #/:core
|
||||
sammy.get
|
||||
(
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
sammy.bind
|
||||
(
|
||||
'dataimport_queryhandler_load',
|
||||
|
@ -186,7 +203,7 @@ sammy.get
|
|||
{
|
||||
var code = $(
|
||||
'<pre class="syntax language-xml"><code>' +
|
||||
xhr.responseText.replace( /\</g, '<' ).replace( /\>/g, '>' ) +
|
||||
xhr.responseText.esc() +
|
||||
'</code></pre>'
|
||||
);
|
||||
this.html( code );
|
||||
|
@ -415,16 +432,10 @@ sammy.get
|
|||
// form
|
||||
|
||||
$( 'form', form_element )
|
||||
.die( 'submit' )
|
||||
.live
|
||||
(
|
||||
'submit',
|
||||
function( event )
|
||||
{
|
||||
$.ajax
|
||||
.ajaxForm
|
||||
(
|
||||
{
|
||||
url : handler_url + '?command=full-import',
|
||||
url : handler_url,
|
||||
dataType : 'xml',
|
||||
beforeSend : function( xhr, settings )
|
||||
{
|
||||
|
@ -443,9 +454,6 @@ sammy.get
|
|||
}
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// #/:core/schema, #/:core/config
|
||||
sammy.get
|
||||
(
|
||||
|
|
|
@ -1,3 +1,207 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
var parse_memory_value = function( value )
|
||||
{
|
||||
if( value !== Number( value ) )
|
||||
{
|
||||
var units = 'BKMGTPEZY';
|
||||
var match = value.match( /^(\d+([,\.]\d+)?) (\w)\w?$/ );
|
||||
var value = parseFloat( match[1] ) * Math.pow( 1024, units.indexOf( match[3].toUpperCase() ) );
|
||||
}
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
var generate_bar = function( bar_container, bar_data, convert_label_values )
|
||||
{
|
||||
bar_holder = $( '.bar-holder', bar_container );
|
||||
|
||||
var bar_level = 1;
|
||||
var max_width = Math.round( $( '.bar-max', bar_holder ).width() );
|
||||
$( '.bar-max.val', bar_holder ).text( bar_data['max'] );
|
||||
|
||||
bar_level++;
|
||||
var total_width = Math.round( ( bar_data['total'] * max_width ) / bar_data['max'] );
|
||||
$( '.bar-total.bar', bar_holder ).width( Math.max( total_width, 1 ) );
|
||||
$( '.bar-total.val', bar_holder ).text( bar_data['total'] );
|
||||
|
||||
if( bar_data['used'] )
|
||||
{
|
||||
bar_level++;
|
||||
var used_width = Math.round( ( bar_data['used'] * max_width ) / bar_data['max'] );
|
||||
$( '.bar-used.bar', bar_holder ).width( Math.min( used_width, total_width - 1 ) );
|
||||
$( '.bar-used.val', bar_holder ).text( bar_data['used'] );
|
||||
}
|
||||
|
||||
bar_holder
|
||||
.addClass( 'bar-lvl-' + bar_level );
|
||||
|
||||
var percentage = ( ( ( bar_data['used'] || bar_data['total'] ) / bar_data['max'] ) * 100 ).toFixed(1);
|
||||
|
||||
var hl = $( '[data-desc="' + bar_container.attr( 'id' ) + '"]' );
|
||||
|
||||
$( '.bar-desc', hl )
|
||||
.remove();
|
||||
|
||||
hl
|
||||
.append( ' <small class="bar-desc">' + percentage + '%</small>' );
|
||||
|
||||
if( !!convert_label_values )
|
||||
{
|
||||
$( '.val', bar_holder )
|
||||
.each
|
||||
(
|
||||
function()
|
||||
{
|
||||
var self = $( this );
|
||||
|
||||
var unit = null;
|
||||
var byte_value = parseInt( self.html() );
|
||||
|
||||
self
|
||||
.attr( 'title', 'raw: ' + byte_value + ' B' );
|
||||
|
||||
byte_value /= 1024;
|
||||
byte_value /= 1024;
|
||||
unit = 'MB';
|
||||
|
||||
if( 1024 <= byte_value )
|
||||
{
|
||||
byte_value /= 1024;
|
||||
unit = 'GB';
|
||||
}
|
||||
|
||||
byte_value = byte_value.toFixed( 2 ) + ' ' + unit;
|
||||
|
||||
self
|
||||
.text( byte_value );
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
var system_info = function( element, system_data )
|
||||
{
|
||||
// -- usage
|
||||
|
||||
var load_average = system_data['system']['uptime'].match( /load average: (.+)/ );
|
||||
if( load_average && load_average[1] )
|
||||
{
|
||||
var hl = $( '#system h2', element );
|
||||
|
||||
$( '.bar-desc', hl )
|
||||
.remove();
|
||||
|
||||
hl
|
||||
.append( ' <small class="bar-desc">' + load_average[1].split( ', ' ).join( ' ' ).esc() + '</small>' );
|
||||
}
|
||||
|
||||
// -- physical-memory-bar
|
||||
|
||||
var bar_holder = $( '#physical-memory-bar', element );
|
||||
if( !system_data['system']['totalPhysicalMemorySize'] )
|
||||
{
|
||||
bar_holder.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
bar_holder.show();
|
||||
|
||||
var bar_data = {
|
||||
'max' : parse_memory_value( system_data['system']['totalPhysicalMemorySize'] ),
|
||||
'total' : parse_memory_value( system_data['system']['totalPhysicalMemorySize'] - system_data['system']['freePhysicalMemorySize'] )
|
||||
};
|
||||
|
||||
generate_bar( bar_holder, bar_data, true );
|
||||
}
|
||||
|
||||
// -- swap-space-bar
|
||||
|
||||
var bar_holder = $( '#swap-space-bar', element );
|
||||
if( !system_data['system']['totalSwapSpaceSize'] )
|
||||
{
|
||||
bar_holder.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
bar_holder.show();
|
||||
|
||||
var bar_data = {
|
||||
'max' : parse_memory_value( system_data['system']['totalSwapSpaceSize'] ),
|
||||
'total' : parse_memory_value( system_data['system']['totalSwapSpaceSize'] - system_data['system']['freeSwapSpaceSize'] )
|
||||
};
|
||||
|
||||
generate_bar( bar_holder, bar_data, true );
|
||||
}
|
||||
|
||||
// -- swap-space-bar
|
||||
|
||||
var bar_holder = $( '#file-descriptor-bar', element );
|
||||
if( !system_data['system']['maxFileDescriptorCount'] )
|
||||
{
|
||||
bar_holder.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
bar_holder.show();
|
||||
|
||||
var bar_data = {
|
||||
'max' : parse_memory_value( system_data['system']['maxFileDescriptorCount'] ),
|
||||
'total' : parse_memory_value( system_data['system']['openFileDescriptorCount'] )
|
||||
};
|
||||
|
||||
generate_bar( bar_holder, bar_data );
|
||||
}
|
||||
|
||||
0 === $( '#system div[id$="-bar"]:visible', element ).size()
|
||||
? $( '#system .no-info', element ).show()
|
||||
: $( '#system .no-info', element ).hide();
|
||||
|
||||
// -- memory-bar
|
||||
|
||||
var jvm_memory = $.extend
|
||||
(
|
||||
{
|
||||
'free' : null,
|
||||
'total' : null,
|
||||
'max' : null,
|
||||
'used' : null,
|
||||
'raw' : {
|
||||
'free' : null,
|
||||
'total' : null,
|
||||
'max' : null,
|
||||
'used' : null,
|
||||
'used%' : null
|
||||
}
|
||||
},
|
||||
system_data['jvm']['memory']
|
||||
);
|
||||
|
||||
var bar_holder = $( '#jvm-memory-bar', element );
|
||||
var bar_data = {
|
||||
'max' : parse_memory_value( jvm_memory['raw']['max'] || jvm_memory['max'] ),
|
||||
'total' : parse_memory_value( jvm_memory['raw']['total'] || jvm_memory['total'] ),
|
||||
'used' : parse_memory_value( jvm_memory['raw']['used'] || jvm_memory['used'] )
|
||||
};
|
||||
|
||||
generate_bar( bar_holder, bar_data, true );
|
||||
}
|
||||
|
||||
// #/
|
||||
sammy.get
|
||||
(
|
||||
|
@ -22,54 +226,19 @@ sammy.get
|
|||
},
|
||||
success : function( template )
|
||||
{
|
||||
var self = this;
|
||||
|
||||
this
|
||||
.html( template );
|
||||
|
||||
var jvm_memory = $.extend
|
||||
(
|
||||
{
|
||||
'free' : null,
|
||||
'total' : null,
|
||||
'max' : null,
|
||||
'used' : null,
|
||||
'raw' : {
|
||||
'free' : null,
|
||||
'total' : null,
|
||||
'max' : null,
|
||||
'used' : null,
|
||||
'used%' : null
|
||||
}
|
||||
},
|
||||
app.dashboard_values['jvm']['memory']
|
||||
);
|
||||
|
||||
var parse_memory_value = function( value )
|
||||
{
|
||||
if( value !== Number( value ) )
|
||||
{
|
||||
var units = 'BKMGTPEZY';
|
||||
var match = value.match( /^(\d+([,\.]\d+)?) (\w)\w?$/ );
|
||||
var value = parseFloat( match[1] ) * Math.pow( 1024, units.indexOf( match[3].toUpperCase() ) );
|
||||
}
|
||||
|
||||
return value;
|
||||
};
|
||||
var memory_data = {
|
||||
'memory-bar-max' : parse_memory_value( jvm_memory['raw']['max'] || jvm_memory['max'] ),
|
||||
'memory-bar-total' : parse_memory_value( jvm_memory['raw']['total'] || jvm_memory['total'] ),
|
||||
'memory-bar-used' : parse_memory_value( jvm_memory['raw']['used'] || jvm_memory['used'] )
|
||||
};
|
||||
|
||||
for( var key in memory_data )
|
||||
{
|
||||
$( '.value.' + key, this )
|
||||
.text( memory_data[key] );
|
||||
}
|
||||
|
||||
var data = {
|
||||
'start_time' : app.dashboard_values['jvm']['jmx']['startTime'],
|
||||
'host' : app.dashboard_values['core']['host'],
|
||||
'jvm' : app.dashboard_values['jvm']['name'] + ' (' + app.dashboard_values['jvm']['version'] + ')',
|
||||
'dir_instance' : app.dashboard_values['core']['directory']['instance'],
|
||||
'dir_data' : app.dashboard_values['core']['directory']['data'],
|
||||
'dir_index' : app.dashboard_values['core']['directory']['index'],
|
||||
'jvm_version' : app.dashboard_values['jvm']['name'] + ' (' + app.dashboard_values['jvm']['version'] + ')',
|
||||
'processors' : app.dashboard_values['jvm']['processors'],
|
||||
'solr_spec_version' : app.dashboard_values['lucene']['solr-spec-version'],
|
||||
'solr_impl_version' : app.dashboard_values['lucene']['solr-impl-version'],
|
||||
'lucene_spec_version' : app.dashboard_values['lucene']['lucene-spec-version'],
|
||||
|
@ -78,7 +247,7 @@ sammy.get
|
|||
|
||||
if( app.dashboard_values['core']['directory']['cwd'] )
|
||||
{
|
||||
data['cwd'] = app.dashboard_values['core']['directory']['cwd'];
|
||||
data['dir_cwd'] = app.dashboard_values['core']['directory']['cwd'];
|
||||
}
|
||||
|
||||
for( var key in data )
|
||||
|
@ -86,7 +255,7 @@ sammy.get
|
|||
var value_element = $( '.' + key + ' dd', this );
|
||||
|
||||
value_element
|
||||
.text( data[key] );
|
||||
.text( data[key].esc() );
|
||||
|
||||
value_element.closest( 'li' )
|
||||
.show();
|
||||
|
@ -121,54 +290,45 @@ sammy.get
|
|||
$( '.timeago', this )
|
||||
.timeago();
|
||||
|
||||
$( 'li:visible:odd', this )
|
||||
$( '.index-left .block li:visible:odd', this )
|
||||
.addClass( 'odd' );
|
||||
|
||||
// -- memory bar
|
||||
// -- system_info
|
||||
|
||||
var max_height = Math.round( $( '#memory-bar-max', this ).height() );
|
||||
var total_height = Math.round( ( memory_data['memory-bar-total'] * max_height ) / memory_data['memory-bar-max'] );
|
||||
var used_height = Math.round( ( memory_data['memory-bar-used'] * max_height ) / memory_data['memory-bar-max'] );
|
||||
system_info( this, app.dashboard_values );
|
||||
|
||||
var memory_bar_total_value = $( '#memory-bar-total span', this ).first();
|
||||
|
||||
$( '#memory-bar-total', this )
|
||||
.height( total_height );
|
||||
|
||||
$( '#memory-bar-used', this )
|
||||
.height( used_height );
|
||||
|
||||
if( used_height < total_height + memory_bar_total_value.height() )
|
||||
{
|
||||
memory_bar_total_value
|
||||
.addClass( 'upper' )
|
||||
.css( 'margin-top', memory_bar_total_value.height() * -1 );
|
||||
}
|
||||
|
||||
var memory_percentage = ( ( memory_data['memory-bar-used'] / memory_data['memory-bar-max'] ) * 100 ).toFixed(1);
|
||||
var headline = $( '#memory h2 span', this );
|
||||
|
||||
headline
|
||||
.text( headline.html() + ' (' + memory_percentage + '%)' );
|
||||
|
||||
$( '#memory-bar .value', this )
|
||||
.each
|
||||
$( '#system a.reload', this )
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
function()
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
var self = $( this );
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : environment_basepath + '/admin/system?wt=json',
|
||||
dataType : 'json',
|
||||
context : this,
|
||||
beforeSend : function( arr, form, options )
|
||||
{
|
||||
loader.show( this );
|
||||
},
|
||||
success : function( response )
|
||||
{
|
||||
system_info( self, response );
|
||||
},
|
||||
error : function()
|
||||
{
|
||||
},
|
||||
complete : function()
|
||||
{
|
||||
loader.hide( this );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
var byte_value = parseInt( self.html() );
|
||||
|
||||
self
|
||||
.attr( 'title', 'raw: ' + byte_value + ' B' );
|
||||
|
||||
byte_value /= 1024;
|
||||
byte_value /= 1024;
|
||||
byte_value = byte_value.toFixed( 2 ) + ' MB';
|
||||
|
||||
self
|
||||
.text( byte_value );
|
||||
return false;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// #/java-properties
|
||||
sammy.get
|
||||
(
|
||||
|
@ -43,8 +60,8 @@ sammy.get
|
|||
}
|
||||
}
|
||||
|
||||
var item_content = '<li><dl class="' + item_class + '">' + "\n" +
|
||||
'<dt>' + displayed_key.esc() + '</dt>' + "\n";
|
||||
var item_content = '<li><dl class="' + item_class + '">' + "\n"
|
||||
+ '<dt>' + displayed_key.esc() + '</dt>' + "\n";
|
||||
|
||||
for( var i in displayed_value )
|
||||
{
|
||||
|
|
|
@ -1,59 +1,58 @@
|
|||
// #/logging
|
||||
sammy.get
|
||||
(
|
||||
/^#\/(logging)$/,
|
||||
function( context )
|
||||
{
|
||||
var content_element = $( '#content' );
|
||||
/*
|
||||
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
|
||||
|
||||
content_element
|
||||
.html( '<div id="logging"></div>' );
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : 'logging.json',
|
||||
dataType : 'json',
|
||||
context : $( '#logging', content_element ),
|
||||
beforeSend : function( xhr, settings )
|
||||
{
|
||||
this
|
||||
.html( '<div class="loader">Loading ...</div>' );
|
||||
},
|
||||
success : function( response, text_status, xhr )
|
||||
{
|
||||
var logger = response.logger;
|
||||
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.
|
||||
*/
|
||||
|
||||
var loglevel = '<div class="loglevel %class%">' + "\n";
|
||||
loglevel += '<a class="effective_level trigger"><span>%effective_level%</span></a>' + "\n";
|
||||
loglevel += '<ul>' + "\n";
|
||||
var loglevel_path = null;
|
||||
var logging_handler = function( response, text_status, xhr )
|
||||
{
|
||||
var self = this;
|
||||
var loggers = response.loggers;
|
||||
|
||||
var levels = '<div class="selector-holder"><div class="selector">' + "\n"
|
||||
+ '<a class="trigger"><span><em>null</em></span></a>' + "\n"
|
||||
+ '<ul>' + "\n";
|
||||
|
||||
for( var key in response.levels )
|
||||
{
|
||||
var level = response.levels[key].esc();
|
||||
loglevel += '<li class="' + level + '"><a>' + level + '</a></li>' + "\n";
|
||||
levels += '<li><a href="#" data-level="' + level + '">' + level + '</a></li>' + "\n";
|
||||
}
|
||||
|
||||
loglevel += '<li class="UNSET"><a>UNSET</a></li>' + "\n";
|
||||
loglevel += '</ul>' + "\n";
|
||||
loglevel += '</div>';
|
||||
levels += '<li class="unset"><a href="#" data-level="unset">UNSET</a></li>' + "\n"
|
||||
+ '</ul>' + "\n"
|
||||
+ '<a class="close"><span>[x]</span></a>' + "\n"
|
||||
+ '</div></div>';
|
||||
|
||||
var logger_tree = function( filter )
|
||||
{
|
||||
var logger_content = '';
|
||||
var filter_regex = new RegExp( '^' + filter + '\\.\\w+$' );
|
||||
|
||||
for( var logger_name in logger )
|
||||
for( var i in loggers )
|
||||
{
|
||||
var logger = loggers[i];
|
||||
var continue_matcher = false;
|
||||
|
||||
if( !filter )
|
||||
{
|
||||
continue_matcher = logger_name.indexOf( '.' ) !== -1;
|
||||
continue_matcher = logger.name.indexOf( '.' ) !== -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
continue_matcher = !logger_name.match( filter_regex );
|
||||
continue_matcher = !logger.name.match( filter_regex );
|
||||
}
|
||||
|
||||
if( continue_matcher )
|
||||
|
@ -61,36 +60,43 @@ sammy.get
|
|||
continue;
|
||||
}
|
||||
|
||||
var has_logger_instance = !!logger[logger_name];
|
||||
var logger_class = '';
|
||||
|
||||
var classes = [];
|
||||
if( logger.set )
|
||||
{
|
||||
logger_class = 'set';
|
||||
}
|
||||
|
||||
has_logger_instance
|
||||
? classes.push( 'active' )
|
||||
: classes.push( 'inactive' );
|
||||
if( !logger.level )
|
||||
{
|
||||
logger_class = 'null';
|
||||
}
|
||||
|
||||
logger_content += '<li class="jstree-leaf">';
|
||||
logger_content += '<ins class="jstree-icon"> </ins>';
|
||||
logger_content += '<a class="trigger ' + classes.join( ' ' ) + '" ' + "\n" +
|
||||
'title="' + logger_name.esc() + '"><span>' + "\n" +
|
||||
logger_name.split( '.' ).pop().esc() + "\n" +
|
||||
'</span></a>';
|
||||
var logger_name = logger.name.split( '.' );
|
||||
var display_name = logger_name.pop();
|
||||
|
||||
logger_content += loglevel
|
||||
.replace
|
||||
(
|
||||
/%class%/g,
|
||||
classes.join( ' ' )
|
||||
)
|
||||
.replace
|
||||
(
|
||||
/%effective_level%/g,
|
||||
has_logger_instance
|
||||
? logger[logger_name].effective_level
|
||||
: 'null'
|
||||
);
|
||||
logger_content += '<li class="jstree-leaf" data-logger="' + logger.name.esc() + '">';
|
||||
logger_content += '<ins class="trigger jstree-icon"> </ins>' + "\n";
|
||||
logger_content += '<a href="#" class="trigger '+ logger_class + '"' ;
|
||||
|
||||
var child_logger_content = logger_tree( logger_name );
|
||||
if( logger.level )
|
||||
{
|
||||
logger_content += 'rel="' + logger.level.esc() + '" ';
|
||||
}
|
||||
|
||||
logger_content += 'title="' + logger.name.esc() + '">' + "\n";
|
||||
|
||||
if( 0 !== logger_name.length )
|
||||
{
|
||||
logger_content += '<span class="ns">' + logger_name.join( '.' ).esc() + '.</span>';
|
||||
}
|
||||
|
||||
logger_content += '<span class="name">' + display_name.esc() + '</span>' + "\n";
|
||||
logger_content += '</a>';
|
||||
|
||||
logger_content += levels;
|
||||
|
||||
var child_logger_content = logger_tree( logger.name );
|
||||
if( child_logger_content )
|
||||
{
|
||||
logger_content += '<ul>';
|
||||
|
@ -102,64 +108,128 @@ sammy.get
|
|||
}
|
||||
|
||||
return logger_content;
|
||||
}
|
||||
};
|
||||
|
||||
var logger_content = logger_tree( null );
|
||||
|
||||
var warn = '<div>TODO, this is not yet implemented. For now, use <a href="logging" style="color:00AA00;">the old logging UI</a></div><br/>'
|
||||
|
||||
|
||||
this.html( warn + '<ul class="tree jstree">' + logger_content + '</ul>' );
|
||||
self
|
||||
.html( '<ul class="tree jstree">' + logger_content + '</ul>' );
|
||||
|
||||
$( 'li:last-child', this )
|
||||
.addClass( 'jstree-last' );
|
||||
|
||||
$( '.loglevel', this )
|
||||
$( 'li.jstree-leaf > a', this )
|
||||
.each
|
||||
(
|
||||
function( index, element )
|
||||
{
|
||||
var element = $( element );
|
||||
var effective_level = $( '.effective_level span', element ).text();
|
||||
element = $( element );
|
||||
var level = element.attr( 'rel' );
|
||||
|
||||
element
|
||||
.css( 'z-index', 800 - index );
|
||||
if( level )
|
||||
{
|
||||
var selector = $( '.selector-holder', element.closest( 'li' ) );
|
||||
|
||||
$( 'ul .' + effective_level, element )
|
||||
.addClass( 'selected' );
|
||||
$( 'a.trigger', selector )
|
||||
.text( level.esc() );
|
||||
|
||||
$( 'ul a[data-level="' + level + '"]', selector ).first()
|
||||
.addClass( 'level' );
|
||||
}
|
||||
);
|
||||
}
|
||||
)
|
||||
|
||||
$( '.trigger', this )
|
||||
$( '.trigger, .selector .close', this )
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
$( '.loglevel', $( this ).parents( 'li' ).first() ).first()
|
||||
$( '.selector-holder', $( this ).parents( 'li' ).first() ).first()
|
||||
.trigger( 'toggle' );
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$( '.loglevel', this )
|
||||
$( '.selector-holder', this )
|
||||
.die( 'toggle')
|
||||
.live
|
||||
(
|
||||
'toggle',
|
||||
function( event )
|
||||
{
|
||||
$( this )
|
||||
var row = $( this ).closest( 'li' );
|
||||
|
||||
$( 'a:first', row )
|
||||
.toggleClass( 'open' );
|
||||
|
||||
$( '.selector-holder:first', row )
|
||||
.toggleClass( 'open' );
|
||||
}
|
||||
);
|
||||
},
|
||||
error : function( xhr, text_status, error_thrown)
|
||||
|
||||
$( '.selector ul a', this )
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
},
|
||||
complete : function( xhr, text_status )
|
||||
var element = $( this );
|
||||
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : loglevel_path,
|
||||
dataType : 'json',
|
||||
data : {
|
||||
'wt' : 'json',
|
||||
'set' : $( this ).parents( 'li[data-logger]' ).data( 'logger' ) + ':' + element.data( 'level' )
|
||||
},
|
||||
type : 'POST',
|
||||
context : self,
|
||||
beforeSend : function( xhr, settings )
|
||||
{
|
||||
element
|
||||
.addClass( 'loader' );
|
||||
},
|
||||
success : logging_handler
|
||||
}
|
||||
);
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
// #/logging
|
||||
sammy.get
|
||||
(
|
||||
/^#\/(logging)$/,
|
||||
function( context )
|
||||
{
|
||||
var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
|
||||
loglevel_path = core_basepath + '/admin/loglevel';
|
||||
var content_element = $( '#content' );
|
||||
|
||||
content_element
|
||||
.html( '<div id="logging"></div>' );
|
||||
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : loglevel_path + '?wt=json',
|
||||
dataType : 'json',
|
||||
context : $( '#logging', content_element ),
|
||||
beforeSend : function( xhr, settings )
|
||||
{
|
||||
this
|
||||
.html( '<div class="loader">Loading ...</div>' );
|
||||
},
|
||||
success : logging_handler
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
$( '.ping a', app.menu_element )
|
||||
.live
|
||||
(
|
||||
|
@ -29,10 +46,7 @@ $( '.ping a', app.menu_element )
|
|||
qtime_element = $( '<small class="qtime"> (<span></span>)</small>' );
|
||||
|
||||
$( this )
|
||||
.append
|
||||
(
|
||||
qtime_element
|
||||
);
|
||||
.append( qtime_element );
|
||||
}
|
||||
|
||||
$( 'span', qtime_element )
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
sammy.bind
|
||||
(
|
||||
'plugins_load',
|
||||
|
@ -129,9 +146,7 @@ sammy.get
|
|||
var navigation_content = [];
|
||||
for( var i = 0; i < types.length; i++ )
|
||||
{
|
||||
var type_url = context.params.splat[0] + '/' +
|
||||
context.params.splat[1] + '/' +
|
||||
types[i].toLowerCase();
|
||||
var type_url = context.params.splat[0] + '/' + context.params.splat[1] + '/' + types[i].toLowerCase();
|
||||
|
||||
navigation_content.push
|
||||
(
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// #/:core/query
|
||||
sammy.get
|
||||
(
|
||||
|
@ -30,8 +47,7 @@ sammy.get
|
|||
{
|
||||
var check_iframe_ready_state = function()
|
||||
{
|
||||
var iframe_element = response_element.get(0).contentWindow.document ||
|
||||
response_element.get(0).document;
|
||||
var iframe_element = response_element.get(0).contentWindow.document || response_element.get(0).document;
|
||||
|
||||
if( !iframe_element )
|
||||
{
|
||||
|
@ -119,11 +135,8 @@ sammy.get
|
|||
form_values.push( all_form_values[i] );
|
||||
}
|
||||
|
||||
var query_url = window.location.protocol + '//' +
|
||||
window.location.host +
|
||||
core_basepath +
|
||||
'/select?' +
|
||||
$.param( form_values );
|
||||
var query_url = window.location.protocol + '//' + window.location.host
|
||||
+ core_basepath + '/select?' + $.param( form_values );
|
||||
|
||||
url_element
|
||||
.attr( 'href', query_url )
|
||||
|
|
|
@ -1,25 +1,43 @@
|
|||
// #/:core/replication
|
||||
sammy.get
|
||||
(
|
||||
/^#\/([\w\d-]+)\/(replication)$/,
|
||||
function( context )
|
||||
{
|
||||
var core_basepath = this.active_core.attr( 'data-basepath' );
|
||||
var content_element = $( '#content' );
|
||||
/*
|
||||
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
|
||||
|
||||
$.get
|
||||
(
|
||||
'tpl/replication.html',
|
||||
function( template )
|
||||
{
|
||||
content_element
|
||||
.html( template );
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
var replication_element = $( '#replication', content_element );
|
||||
var navigation_element = $( '#navigation', replication_element );
|
||||
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.
|
||||
*/
|
||||
|
||||
function convert_seconds_to_readable_time( value )
|
||||
var timer_element = null;
|
||||
var timer_timeout = null;
|
||||
|
||||
var core_basepath = null;
|
||||
var navigation_element = null;
|
||||
var replication_element = null;
|
||||
|
||||
var convert_duration_to_seconds = function( str )
|
||||
{
|
||||
var ret = 0;
|
||||
var parts = new String( str ).split( ':' ).reverse();
|
||||
var parts_count = parts.length;
|
||||
|
||||
for( var i = 0; i < parts_count; i++ )
|
||||
{
|
||||
ret += parseInt( parts[i], 10 ) * Math.pow( 60, i );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
var convert_seconds_to_readable_time = function( value )
|
||||
{
|
||||
var text = [];
|
||||
value = parseInt( value );
|
||||
|
||||
|
@ -39,13 +57,52 @@ sammy.get
|
|||
value -= minutes * 60;
|
||||
}
|
||||
|
||||
if( 0 !== value )
|
||||
{
|
||||
text.push( value + 's' );
|
||||
|
||||
return text.join( ' ' );
|
||||
}
|
||||
|
||||
function replication_fetch_status()
|
||||
return text.join( ' ' );
|
||||
}
|
||||
|
||||
var init_timer = function( next_tick )
|
||||
{
|
||||
if( timer_timeout )
|
||||
{
|
||||
window.clearTimeout( timer_timeout );
|
||||
}
|
||||
update_timer( next_tick );
|
||||
}
|
||||
|
||||
var update_timer = function( next_tick )
|
||||
{
|
||||
if( 0 === next_tick )
|
||||
{
|
||||
replication_fetch_status();
|
||||
return false;
|
||||
}
|
||||
|
||||
$( 'p .tick', timer_element )
|
||||
.text( convert_seconds_to_readable_time( next_tick ) );
|
||||
|
||||
timer_timeout = window.setTimeout
|
||||
(
|
||||
'update_timer( ' + --next_tick + ' )',
|
||||
1000
|
||||
);
|
||||
}
|
||||
|
||||
var clear_timer = function()
|
||||
{
|
||||
if( timer_timeout )
|
||||
{
|
||||
window.clearTimeout( timer_timeout );
|
||||
timer_element.hide();
|
||||
}
|
||||
}
|
||||
|
||||
var replication_fetch_status = function()
|
||||
{
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
|
@ -55,6 +112,8 @@ sammy.get
|
|||
{
|
||||
$( '.refresh-status', navigation_element )
|
||||
.addClass( 'loader' );
|
||||
|
||||
clear_timer();
|
||||
},
|
||||
success : function( response, text_status, xhr )
|
||||
{
|
||||
|
@ -148,19 +207,36 @@ sammy.get
|
|||
var iterations_list = $( '.iterations ul', iterations_element );
|
||||
|
||||
var iterations_data = [];
|
||||
$.merge( iterations_data, data.slave.indexReplicatedAtList );
|
||||
$.merge( iterations_data, data.slave.replicationFailedAtList );
|
||||
var iterations_obj = {};
|
||||
|
||||
for( var i in data.slave.indexReplicatedAtList )
|
||||
{
|
||||
var date = data.slave.indexReplicatedAtList[i];
|
||||
if( !iterations_obj[date] )
|
||||
{
|
||||
iterations_obj[date] = true;
|
||||
iterations_data.push( date );
|
||||
}
|
||||
}
|
||||
|
||||
for( var i in data.slave.replicationFailedAtList )
|
||||
{
|
||||
var date = data.slave.replicationFailedAtList[i];
|
||||
if( !iterations_obj[date] )
|
||||
{
|
||||
iterations_obj[date] = true;
|
||||
iterations_data.push( date );
|
||||
}
|
||||
}
|
||||
|
||||
iterations_data.sort().reverse();
|
||||
|
||||
if( 0 !== iterations_data.length )
|
||||
{
|
||||
var iterations = [];
|
||||
for( var i = 0; i < iterations_data.length; i++ )
|
||||
{
|
||||
iterations.push
|
||||
(
|
||||
'<li data-date="' + iterations_data[i] + '">' +
|
||||
iterations_data[i] + '</li>'
|
||||
);
|
||||
iterations.push( '<li data-date="' + iterations_data[i] + '">' + iterations_data[i] + '</li>' );
|
||||
}
|
||||
|
||||
iterations_list
|
||||
|
@ -179,10 +255,7 @@ sammy.get
|
|||
|
||||
if( data.slave.indexReplicatedAt )
|
||||
{
|
||||
$(
|
||||
'li[data-date="' + data.slave.indexReplicatedAt + '"]',
|
||||
iterations_list
|
||||
)
|
||||
$( 'li[data-date="' + data.slave.indexReplicatedAt + '"]', iterations_list )
|
||||
.addClass( 'latest' );
|
||||
}
|
||||
|
||||
|
@ -198,10 +271,7 @@ sammy.get
|
|||
|
||||
if( data.slave.replicationFailedAt )
|
||||
{
|
||||
$(
|
||||
'li[data-date="' + data.slave.replicationFailedAt + '"]',
|
||||
iterations_list
|
||||
)
|
||||
$( 'li[data-date="' + data.slave.replicationFailedAt + '"]', iterations_list )
|
||||
.addClass( 'latest' );
|
||||
}
|
||||
|
||||
|
@ -299,13 +369,60 @@ sammy.get
|
|||
.addClass( polling_ico )
|
||||
.html( polling_content )
|
||||
.parents( 'li' ).show();
|
||||
|
||||
if( 'true' === data.slave.isReplicating )
|
||||
{
|
||||
replication_element
|
||||
.addClass( 'replicating' );
|
||||
|
||||
$( '.replicate-now', navigation_element ).hide();
|
||||
$( '.abort-replication', navigation_element ).show();
|
||||
|
||||
window.setTimeout( replication_fetch_status, 1000 );
|
||||
}
|
||||
else
|
||||
{
|
||||
replication_element
|
||||
.removeClass( 'replicating' );
|
||||
|
||||
$( '.replicate-now', navigation_element ).show();
|
||||
$( '.abort-replication', navigation_element ).hide();
|
||||
|
||||
|
||||
if( 'false' === data.slave.isPollingDisabled && data.slave.pollInterval )
|
||||
{
|
||||
timer_element = $( '.timer', navigation_element );
|
||||
approx_element = $( '.approx', timer_element );
|
||||
|
||||
var next_tick = convert_duration_to_seconds( data.slave.pollInterval );
|
||||
approx_element.show();
|
||||
|
||||
if( data.slave.nextExecutionAt )
|
||||
{
|
||||
var nextExecutionAt = new SolrDate( data.slave.nextExecutionAt );
|
||||
var currentDate = new SolrDate( data.slave.currentDate );
|
||||
|
||||
if( nextExecutionAt.getTime() > currentDate.getTime() )
|
||||
{
|
||||
next_tick = ( nextExecutionAt.getTime() - currentDate.getTime() ) / 1000;
|
||||
approx_element.hide();
|
||||
|
||||
$( 'small', timer_element )
|
||||
.text( data.slave.nextExecutionAt )
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
init_timer( next_tick );
|
||||
|
||||
timer_element
|
||||
.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var master_settings_element = $( '#master-settings', replication_element );
|
||||
|
||||
var master_data = is_slave
|
||||
? data.slave.masterDetails.master
|
||||
: data.master;
|
||||
var master_data = is_slave ? data.slave.masterDetails.master : data.master;
|
||||
|
||||
var replication_icon = 'ico-0';
|
||||
if( 'true' === master_data.replicationEnabled )
|
||||
|
@ -343,9 +460,7 @@ sammy.get
|
|||
if( - 1 !== item.indexOf( ':' ) )
|
||||
{
|
||||
info = item.split( ':' );
|
||||
item = '<abbr title="' + info[0] + ' » ' + info[1] + '">'
|
||||
+ ( is_slave ? info[1] : info[0] )
|
||||
+ '</abbr>';
|
||||
item = '<abbr title="' + info[0] + ' » ' + info[1] + '">' + ( is_slave ? info[1] : info[0] ) + '</abbr>';
|
||||
}
|
||||
|
||||
conf_files.push( item );
|
||||
|
@ -359,28 +474,6 @@ sammy.get
|
|||
|
||||
$( '.block', replication_element ).last()
|
||||
.addClass( 'last' );
|
||||
|
||||
|
||||
|
||||
|
||||
if( 'true' === data.slave.isReplicating )
|
||||
{
|
||||
replication_element
|
||||
.addClass( 'replicating' );
|
||||
|
||||
$( '.replicate-now', navigation_element ).hide();
|
||||
$( '.abort-replication', navigation_element ).show();
|
||||
|
||||
window.setTimeout( replication_fetch_status, 1000 );
|
||||
}
|
||||
else
|
||||
{
|
||||
replication_element
|
||||
.removeClass( 'replicating' );
|
||||
|
||||
$( '.replicate-now', navigation_element ).show();
|
||||
$( '.abort-replication', navigation_element ).hide();
|
||||
}
|
||||
},
|
||||
error : function( xhr, text_status, error_thrown )
|
||||
{
|
||||
|
@ -392,7 +485,28 @@ sammy.get
|
|||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// #/:core/replication
|
||||
sammy.get
|
||||
(
|
||||
/^#\/([\w\d-]+)\/(replication)$/,
|
||||
function( context )
|
||||
{
|
||||
core_basepath = this.active_core.attr( 'data-basepath' );
|
||||
var content_element = $( '#content' );
|
||||
|
||||
$.get
|
||||
(
|
||||
'tpl/replication.html',
|
||||
function( template )
|
||||
{
|
||||
content_element
|
||||
.html( template );
|
||||
|
||||
replication_element = $( '#replication', content_element );
|
||||
navigation_element = $( '#navigation', replication_element );
|
||||
|
||||
replication_fetch_status();
|
||||
|
||||
$( '#iterations a', content_element )
|
||||
|
|
|
@ -1,3 +1,203 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
var cookie_name = 'schema-browser_autoload';
|
||||
|
||||
var luke_array_to_struct = function( array )
|
||||
{
|
||||
var struct = {
|
||||
keys : [],
|
||||
values : []
|
||||
};
|
||||
for( var i = 0; i < array.length; i += 2 )
|
||||
{
|
||||
struct.keys.push( array[i] );
|
||||
struct.values.push( array[i+1] );
|
||||
}
|
||||
return struct;
|
||||
}
|
||||
|
||||
var luke_array_to_hash = function( array )
|
||||
{
|
||||
var hash = {};
|
||||
for( var i = 0; i < array.length; i += 2 )
|
||||
{
|
||||
hash[ array[i] ] = array[i+1];
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
var load_terminfo = function( trigger_element, core_basepath, field, data_element, terminfo_element )
|
||||
{
|
||||
var luke_url = core_basepath + '/admin/luke?wt=json&fl=' + field;
|
||||
var topterms_count_element = $( '.topterms-holder .head input', terminfo_element );
|
||||
|
||||
var term_load_count = parseInt( topterms_count_element.val(), 10 );
|
||||
if( term_load_count )
|
||||
{
|
||||
luke_url += '&numTerms=' + term_load_count;
|
||||
}
|
||||
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : luke_url,
|
||||
dataType : 'json',
|
||||
context : terminfo_element,
|
||||
beforeSend : function( xhr, settings )
|
||||
{
|
||||
trigger_element
|
||||
.addClass( 'loader' );
|
||||
},
|
||||
success : function( response, text_status, xhr )
|
||||
{
|
||||
trigger_element
|
||||
.removeClass( 'loader' );
|
||||
|
||||
var field_data = response.fields[field];
|
||||
|
||||
if( !field_data || !( field_data.topTerms && field_data.histogram ) )
|
||||
{
|
||||
terminfo_element
|
||||
.addClass( 'disabled' );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var topterms_holder_element = $( '.topterms-holder', data_element );
|
||||
var histogram_holder_element = $( '.histogram-holder', data_element );
|
||||
|
||||
if( !field_data.topTerms )
|
||||
{
|
||||
topterms_holder_element
|
||||
.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
topterms_holder_element
|
||||
.show();
|
||||
|
||||
var topterms_table_element = $( 'ul', topterms_holder_element );
|
||||
|
||||
var topterms = field_data.topTerms;
|
||||
var topterms_count = topterms.length;
|
||||
|
||||
var topterms_content = '';
|
||||
var topterms_frq_last = null;
|
||||
|
||||
for( var i = 0; i < topterms_count; i += 2 )
|
||||
{
|
||||
if( topterms_frq_last !== topterms[i+1] )
|
||||
{
|
||||
if( topterms_frq_last )
|
||||
{
|
||||
topterms_content += '</ul></li>' + "\n";
|
||||
}
|
||||
|
||||
topterms_frq_last = topterms[i+1];
|
||||
topterms_content += '<li class="clearfix">'
|
||||
+ '<p><span>' + topterms_frq_last.esc() + '</span></p>' + "\n"
|
||||
+ '<ul>' + "\n";
|
||||
}
|
||||
|
||||
topterms_content += '<li><span>' + topterms[i].esc() + '</span></li>' + "\n";
|
||||
}
|
||||
|
||||
topterms_content += '</li>';
|
||||
|
||||
topterms_count = topterms_count / 2;
|
||||
|
||||
$( 'input', trigger_element )
|
||||
.val( topterms_count );
|
||||
|
||||
topterms_table_element
|
||||
.html( topterms_content );
|
||||
|
||||
topterms_count_element
|
||||
.val( topterms_count );
|
||||
|
||||
$( 'p.head .max', topterms_holder_element )
|
||||
.html( field_data.distinct );
|
||||
|
||||
$( 'ul li:even', topterms_table_element )
|
||||
.addClass( 'odd' );
|
||||
}
|
||||
|
||||
if( !field_data.histogram )
|
||||
{
|
||||
histogram_holder_element
|
||||
.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
histogram_holder_element
|
||||
.show();
|
||||
|
||||
var histogram_element = $( '.histogram', histogram_holder_element );
|
||||
|
||||
var histogram_values = luke_array_to_hash( field_data.histogram );
|
||||
var histogram_legend = '';
|
||||
|
||||
histogram_holder_element
|
||||
.show();
|
||||
|
||||
for( var key in histogram_values )
|
||||
{
|
||||
histogram_legend += '<dt><span>' + key + '</span></dt>' + "\n" +
|
||||
'<dd title="' + key + '">' +
|
||||
'<span>' + histogram_values[key] + '</span>' +
|
||||
'</dd>' + "\n";
|
||||
}
|
||||
|
||||
$( 'dl', histogram_holder_element )
|
||||
.html( histogram_legend );
|
||||
|
||||
var histogram_values = luke_array_to_struct( field_data.histogram ).values;
|
||||
|
||||
histogram_element
|
||||
.sparkline
|
||||
(
|
||||
histogram_values,
|
||||
{
|
||||
type : 'bar',
|
||||
barColor : '#c0c0c0',
|
||||
zeroColor : '#000000',
|
||||
height : histogram_element.height(),
|
||||
barWidth : 46,
|
||||
barSpacing : 3
|
||||
}
|
||||
);
|
||||
|
||||
1 === histogram_values.length
|
||||
? histogram_element.addClass( 'single' )
|
||||
: histogram_element.removClass( 'single' );
|
||||
}
|
||||
|
||||
},
|
||||
error : function( xhr, text_status, error_thrown)
|
||||
{
|
||||
},
|
||||
complete : function( xhr, text_status )
|
||||
{
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
sammy.bind
|
||||
(
|
||||
'schema_browser_navi',
|
||||
|
@ -18,7 +218,7 @@ sammy.bind
|
|||
.show()
|
||||
.after
|
||||
(
|
||||
'<dd class="unique-key-field"><a href="' + sammy_basepath + '/field/' +
|
||||
'<dd class="unique-key-field"><a href="' + sammy_basepath + '?field=' +
|
||||
app.schema_browser_data.unique_key_field + '">' +
|
||||
app.schema_browser_data.unique_key_field + '</a></dd>'
|
||||
);
|
||||
|
@ -30,7 +230,7 @@ sammy.bind
|
|||
.show()
|
||||
.after
|
||||
(
|
||||
'<dd class="default-search-field"><a href="' + sammy_basepath + '/field/' +
|
||||
'<dd class="default-search-field"><a href="' + sammy_basepath + '?field=' +
|
||||
app.schema_browser_data.default_search_field + '">' +
|
||||
app.schema_browser_data.default_search_field + '</a></dd>'
|
||||
);
|
||||
|
@ -42,8 +242,8 @@ sammy.bind
|
|||
|
||||
if( params.route_params )
|
||||
{
|
||||
var type = params.route_params.splat[3];
|
||||
var value = params.route_params.splat[4];
|
||||
var type = params.route_params.type;
|
||||
var value = params.route_params.value;
|
||||
|
||||
var navigation_data = {
|
||||
'fields' : [],
|
||||
|
@ -53,7 +253,7 @@ sammy.bind
|
|||
'types' : []
|
||||
}
|
||||
|
||||
$( 'option[value="' + params.route_params.splat[2] + '"]', related_select_element )
|
||||
$( 'option[value="' + params.route_params.path + '"]', related_select_element )
|
||||
.attr( 'selected', 'selected' );
|
||||
|
||||
if( 'field' === type )
|
||||
|
@ -109,9 +309,8 @@ sammy.bind
|
|||
navigation_content += '<dt class="field">Fields</dt>' + "\n";
|
||||
for( var i in navigation_data.fields )
|
||||
{
|
||||
var href = sammy_basepath + '/field/' + navigation_data.fields[i];
|
||||
navigation_content += '<dd class="field"><a href="' + href + '">' +
|
||||
navigation_data.fields[i] + '</a></dd>' + "\n";
|
||||
var href = sammy_basepath + '?field=' + navigation_data.fields[i];
|
||||
navigation_content += '<dd class="field"><a href="' + href + '">' + navigation_data.fields[i] + '</a></dd>' + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,9 +320,8 @@ sammy.bind
|
|||
navigation_content += '<dt class="copyfield">Copied from</dt>' + "\n";
|
||||
for( var i in navigation_data.copyfield_source )
|
||||
{
|
||||
var href = sammy_basepath + '/field/' + navigation_data.copyfield_source[i];
|
||||
navigation_content += '<dd class="copyfield"><a href="' + href + '">' +
|
||||
navigation_data.copyfield_source[i] + '</a></dd>' + "\n";
|
||||
var href = sammy_basepath + '?field=' + navigation_data.copyfield_source[i];
|
||||
navigation_content += '<dd class="copyfield"><a href="' + href + '">' + navigation_data.copyfield_source[i] + '</a></dd>' + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,9 +331,8 @@ sammy.bind
|
|||
navigation_content += '<dt class="copyfield">Copied to</dt>' + "\n";
|
||||
for( var i in navigation_data.copyfield_dest )
|
||||
{
|
||||
var href = sammy_basepath + '/field/' + navigation_data.copyfield_dest[i];
|
||||
navigation_content += '<dd class="copyfield"><a href="' + href + '">' +
|
||||
navigation_data.copyfield_dest[i] + '</a></dd>' + "\n";
|
||||
var href = sammy_basepath + '?field=' + navigation_data.copyfield_dest[i];
|
||||
navigation_content += '<dd class="copyfield"><a href="' + href + '">' + navigation_data.copyfield_dest[i] + '</a></dd>' + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,9 +342,8 @@ sammy.bind
|
|||
navigation_content += '<dt class="dynamic-field">Dynamic Fields</dt>' + "\n";
|
||||
for( var i in navigation_data.dynamic_fields )
|
||||
{
|
||||
var href = sammy_basepath + '/dynamic-field/' + navigation_data.dynamic_fields[i];
|
||||
navigation_content += '<dd class="dynamic-field"><a href="' + href + '">' +
|
||||
navigation_data.dynamic_fields[i] + '</a></dd>' + "\n";
|
||||
var href = sammy_basepath + '?dynamic-field=' + navigation_data.dynamic_fields[i];
|
||||
navigation_content += '<dd class="dynamic-field"><a href="' + href + '">' + navigation_data.dynamic_fields[i] + '</a></dd>' + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,9 +353,8 @@ sammy.bind
|
|||
navigation_content += '<dt class="type">Types</dt>' + "\n";
|
||||
for( var i in navigation_data.types )
|
||||
{
|
||||
var href = sammy_basepath + '/type/' + navigation_data.types[i];
|
||||
navigation_content += '<dd class="type"><a href="' + href + '">' +
|
||||
navigation_data.types[i] + '</a></dd>' + "\n";
|
||||
var href = sammy_basepath + '?type=' + navigation_data.types[i];
|
||||
navigation_content += '<dd class="type"><a href="' + href + '">' + navigation_data.types[i] + '</a></dd>' + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,30 +470,6 @@ sammy.bind
|
|||
app.schema_browser_data.dynamic_fields = response.schema.dynamicFields;
|
||||
app.schema_browser_data.types = response.schema.types;
|
||||
|
||||
var luke_array_to_struct = function( array )
|
||||
{
|
||||
var struct = {
|
||||
keys : [],
|
||||
values : []
|
||||
};
|
||||
for( var i = 0; i < array.length; i += 2 )
|
||||
{
|
||||
struct.keys.push( array[i] );
|
||||
struct.values.push( array[i+1] );
|
||||
}
|
||||
return struct;
|
||||
}
|
||||
|
||||
var luke_array_to_hash = function( array )
|
||||
{
|
||||
var hash = {};
|
||||
for( var i = 0; i < array.length; i += 2 )
|
||||
{
|
||||
hash[ array[i] ] = array[i+1];
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
for( var field in response.schema.fields )
|
||||
{
|
||||
app.schema_browser_data.fields[field] = $.extend
|
||||
|
@ -389,7 +560,7 @@ sammy.bind
|
|||
{
|
||||
fields.push
|
||||
(
|
||||
'<option value="/field/' + field_name + '">' + field_name + '</option>'
|
||||
'<option value="?field=' + field_name + '">' + field_name + '</option>'
|
||||
);
|
||||
}
|
||||
if( 0 !== fields.length )
|
||||
|
@ -405,7 +576,7 @@ sammy.bind
|
|||
{
|
||||
dynamic_fields.push
|
||||
(
|
||||
'<option value="/dynamic-field/' + type_name + '">' + type_name + '</option>'
|
||||
'<option value="?dynamic-field=' + type_name + '">' + type_name + '</option>'
|
||||
);
|
||||
}
|
||||
if( 0 !== dynamic_fields.length )
|
||||
|
@ -421,7 +592,7 @@ sammy.bind
|
|||
{
|
||||
types.push
|
||||
(
|
||||
'<option value="/type/' + type_name + '">' + type_name + '</option>'
|
||||
'<option value="?type=' + type_name + '">' + type_name + '</option>'
|
||||
);
|
||||
}
|
||||
if( 0 !== types.length )
|
||||
|
@ -487,39 +658,28 @@ sammy.get
|
|||
(
|
||||
/^#\/([\w\d-]+)\/(schema-browser)$/,
|
||||
function( context )
|
||||
{
|
||||
var callback = function( schema_browser_data, data_element )
|
||||
{
|
||||
data_element
|
||||
.hide();
|
||||
};
|
||||
|
||||
delete app.schema_browser_data;
|
||||
|
||||
sammy.trigger
|
||||
(
|
||||
'schema_browser_load',
|
||||
{
|
||||
callback : callback,
|
||||
active_core : this.active_core
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// #/:core/schema-browser/field|dynamic-field|type/$field
|
||||
sammy.get
|
||||
(
|
||||
/^#\/([\w\d-]+)\/(schema-browser)(\/(field|dynamic-field|type)\/(.+))$/,
|
||||
function( context )
|
||||
{
|
||||
var core_basepath = this.active_core.attr( 'data-basepath' );
|
||||
|
||||
var callback = function( schema_browser_data, data_element )
|
||||
{
|
||||
var field = context.params.splat[4];
|
||||
var trigger_params = {
|
||||
active_core : this.active_core
|
||||
};
|
||||
|
||||
var type = context.params.splat[3];
|
||||
var path = context.path.split( '?' );
|
||||
if( path && path[1] )
|
||||
{
|
||||
var param = path[1].split( '=' );
|
||||
trigger_params.route_params = {
|
||||
path : '?' + path[1],
|
||||
type : param[0],
|
||||
value : param[1]
|
||||
}
|
||||
|
||||
trigger_params.callback = function( schema_browser_data, data_element )
|
||||
{
|
||||
var field = trigger_params.route_params.value;
|
||||
|
||||
var type = trigger_params.route_params.type;
|
||||
var is_f = 'field' === type;
|
||||
var is_df = 'dynamic-field' === type;
|
||||
var is_t = 'type' === type;
|
||||
|
@ -576,6 +736,23 @@ sammy.get
|
|||
flags = schema_browser_data.dynamic_fields[field].flags;
|
||||
}
|
||||
|
||||
// -- head
|
||||
|
||||
var head_element = $( '.head', data_element );
|
||||
if( is_f )
|
||||
{
|
||||
$( '.type', head_element ).html( 'Field' );
|
||||
}
|
||||
else if( is_df )
|
||||
{
|
||||
$( '.type', head_element ).html( 'Dynamic Field' );
|
||||
}
|
||||
else if( is_t )
|
||||
{
|
||||
$( '.type', head_element ).html( 'Type' );
|
||||
}
|
||||
$( '.name', head_element ).html( field.esc() );
|
||||
|
||||
// -- properties
|
||||
var properties_element = $( 'dt.properties', options_element );
|
||||
if( flags )
|
||||
|
@ -767,6 +944,19 @@ sammy.get
|
|||
.show()
|
||||
.after( '<dd class="field-type">' + analyzer_data.className + '</dd>' );
|
||||
|
||||
$( '.toggle', analyzer_element )
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
$( this ).closest( 'li' )
|
||||
.toggleClass( 'open' );
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
for( var key in analyzer_data )
|
||||
{
|
||||
|
@ -782,13 +972,8 @@ sammy.get
|
|||
analyzer_element.show();
|
||||
analyzer_key_element.show();
|
||||
|
||||
if( analyzer_key_data.className )
|
||||
{
|
||||
$( 'dl:first dt', analyzer_key_element )
|
||||
.html( analyzer_key_data.className );
|
||||
}
|
||||
|
||||
$( 'ul li', analyzer_key_element )
|
||||
.removeClass( 'data' )
|
||||
.hide();
|
||||
|
||||
for( var type in analyzer_key_data )
|
||||
|
@ -801,7 +986,9 @@ sammy.get
|
|||
var type_element = $( '.' + type, analyzer_key_element );
|
||||
var type_content = [];
|
||||
|
||||
type_element.show();
|
||||
type_element
|
||||
.addClass( 'data' )
|
||||
.show();
|
||||
|
||||
if( analyzer_key_data[type].className )
|
||||
{
|
||||
|
@ -819,11 +1006,123 @@ sammy.get
|
|||
.empty()
|
||||
.append( type_content.join( "\n" ) );
|
||||
}
|
||||
|
||||
var name_element = $( 'dl:first dt a', analyzer_key_element );
|
||||
if( analyzer_key_data.className )
|
||||
{
|
||||
name_element
|
||||
.html( analyzer_key_data.className );
|
||||
}
|
||||
|
||||
0 === $( 'ul li.data', analyzer_key_element ).size()
|
||||
? name_element.removeClass( 'toggle' )
|
||||
: name_element.addClass( 'toggle' );
|
||||
}
|
||||
}
|
||||
|
||||
var terminfo_element = $( '.terminfo-holder', data_element );
|
||||
|
||||
terminfo_element
|
||||
.removeClass( 'disabled' )
|
||||
.removeClass( 'loaded' );
|
||||
|
||||
var trigger_element = $( '.trigger button', terminfo_element );
|
||||
var form_element = $( 'form', terminfo_element );
|
||||
|
||||
trigger_element
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
form_element
|
||||
.trigger( 'submit' );
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
form_element
|
||||
.clearForm()
|
||||
.die( 'submit' )
|
||||
.live
|
||||
(
|
||||
'submit',
|
||||
function( event )
|
||||
{
|
||||
load_terminfo( trigger_element, core_basepath, field, data_element, terminfo_element );
|
||||
|
||||
terminfo_element
|
||||
.addClass( 'loaded' );
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$( '.max-holder', terminfo_element )
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
var element = $( this );
|
||||
|
||||
$( 'input', element.closest( 'form' ) )
|
||||
.val( $( '.max', element ).text() );
|
||||
|
||||
form_element
|
||||
.trigger( 'submit' );
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$( '.trigger .autoload', terminfo_element )
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
$.cookie( cookie_name, $.cookie( cookie_name ) ? null : true );
|
||||
$( this ).trigger( 'state' );
|
||||
|
||||
return false;
|
||||
}
|
||||
)
|
||||
.die( 'state' )
|
||||
.live
|
||||
(
|
||||
'state',
|
||||
function( event )
|
||||
{
|
||||
$.cookie( cookie_name )
|
||||
? $( this ).addClass( 'on' )
|
||||
: $( this ).removeClass( 'on' );
|
||||
}
|
||||
)
|
||||
.die( 'init' )
|
||||
.live
|
||||
(
|
||||
'init',
|
||||
function( event )
|
||||
{
|
||||
if( !$.cookie( cookie_name ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$( this ).trigger( 'state' );
|
||||
trigger_element.trigger( 'click' );
|
||||
}
|
||||
)
|
||||
.trigger( 'init' );
|
||||
|
||||
$( 'div[class$="-holder"]', terminfo_element )
|
||||
.hide();
|
||||
|
||||
if( !is_f )
|
||||
{
|
||||
terminfo_element
|
||||
|
@ -833,220 +1132,24 @@ sammy.get
|
|||
{
|
||||
terminfo_element
|
||||
.show();
|
||||
|
||||
var status_element = $( '.status', terminfo_element );
|
||||
|
||||
$.ajax
|
||||
(
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
url : core_basepath + '/admin/luke?numTerms=50&wt=json&fl=' + field,
|
||||
dataType : 'json',
|
||||
context : terminfo_element,
|
||||
beforeSend : function( xhr, settings )
|
||||
trigger_params.callback = function( schema_browser_data, data_element )
|
||||
{
|
||||
},
|
||||
success : function( response, text_status, xhr )
|
||||
{
|
||||
status_element
|
||||
data_element
|
||||
.hide();
|
||||
|
||||
var field_data = response.fields[field];
|
||||
|
||||
var topterms_holder_element = $( '.topterms-holder', data_element );
|
||||
var histogram_holder_element = $( '.histogram-holder', data_element );
|
||||
|
||||
var luke_array_to_struct = function( array )
|
||||
{
|
||||
var struct = {
|
||||
keys : [],
|
||||
values : []
|
||||
};
|
||||
for( var i = 0; i < array.length; i += 2 )
|
||||
{
|
||||
struct.keys.push( array[i] );
|
||||
struct.values.push( array[i+1] );
|
||||
}
|
||||
return struct;
|
||||
}
|
||||
|
||||
var luke_array_to_hash = function( array )
|
||||
{
|
||||
var hash = {};
|
||||
for( var i = 0; i < array.length; i += 2 )
|
||||
{
|
||||
hash[ array[i] ] = array[i+1];
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
if( !field_data.topTerms )
|
||||
{
|
||||
topterms_holder_element
|
||||
.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
topterms_holder_element
|
||||
.show();
|
||||
|
||||
var topterms_table_element = $( 'table', topterms_holder_element );
|
||||
|
||||
var topterms_navi_less = $( 'p.navi .less', topterms_holder_element );
|
||||
var topterms_navi_more = $( 'p.navi .more', topterms_holder_element );
|
||||
|
||||
var topterms_count = luke_array_to_struct( field_data.topTerms ).keys.length;
|
||||
var topterms_hash = luke_array_to_hash( field_data.topTerms );
|
||||
var topterms_content = '<tbody>';
|
||||
|
||||
var i = 1;
|
||||
for( var term in topterms_hash )
|
||||
{
|
||||
topterms_content += '<tr>' + "\n" +
|
||||
'<td class="position">' + i + '</td>' + "\n" +
|
||||
'<td class="term">' + term + '</td>' + "\n" +
|
||||
'<td class="frequency">' + topterms_hash[term] + '</td>' + "\n" +
|
||||
'</tr>' + "\n";
|
||||
|
||||
if( i !== topterms_count && 0 === i % 10 )
|
||||
{
|
||||
topterms_content += '</tbody><tbody>';
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
topterms_content += '</tbody>';
|
||||
|
||||
topterms_table_element
|
||||
.empty()
|
||||
.append( topterms_content );
|
||||
|
||||
$( 'tbody', topterms_table_element )
|
||||
.die( 'change' )
|
||||
.live
|
||||
(
|
||||
'change',
|
||||
function()
|
||||
{
|
||||
var blocks = $( 'tbody', topterms_table_element );
|
||||
var visible_blocks = blocks.filter( ':visible' );
|
||||
var hidden_blocks = blocks.filter( ':hidden' );
|
||||
|
||||
$( 'p.head .shown', topterms_holder_element )
|
||||
.html( $( 'tr', visible_blocks ).size() );
|
||||
|
||||
0 < hidden_blocks.size()
|
||||
? topterms_navi_more.show()
|
||||
: topterms_navi_more.hide();
|
||||
|
||||
1 < visible_blocks.size()
|
||||
? topterms_navi_less.show()
|
||||
: topterms_navi_less.hide();
|
||||
}
|
||||
);
|
||||
|
||||
$( 'tbody tr:odd', topterms_table_element )
|
||||
.addClass( 'odd' );
|
||||
|
||||
$( 'tbody:first', topterms_table_element )
|
||||
.show()
|
||||
.trigger( 'change' );
|
||||
|
||||
$( 'p.head .max', topterms_holder_element )
|
||||
.html( field_data.distinct );
|
||||
|
||||
topterms_navi_less
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
$( 'tbody:visible', topterms_table_element ).last()
|
||||
.hide()
|
||||
.trigger( 'change' );
|
||||
}
|
||||
);
|
||||
|
||||
topterms_navi_more
|
||||
.die( 'click' )
|
||||
.live
|
||||
(
|
||||
'click',
|
||||
function( event )
|
||||
{
|
||||
$( 'tbody:hidden', topterms_table_element ).first()
|
||||
.show()
|
||||
.trigger( 'change' );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if( !field_data.histogram )
|
||||
{
|
||||
histogram_holder_element
|
||||
.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
histogram_holder_element
|
||||
.show();
|
||||
|
||||
var histogram_element = $( '.histogram', histogram_holder_element );
|
||||
|
||||
var histogram_values = luke_array_to_hash( field_data.histogram );
|
||||
var histogram_legend = '';
|
||||
|
||||
histogram_holder_element
|
||||
.show();
|
||||
|
||||
for( var key in histogram_values )
|
||||
{
|
||||
histogram_legend += '<dt><span>' + key + '</span></dt>' + "\n" +
|
||||
'<dd title="' + key + '">' +
|
||||
'<span>' + histogram_values[key] + '</span>' +
|
||||
'</dd>' + "\n";
|
||||
}
|
||||
|
||||
$( 'dl', histogram_holder_element )
|
||||
.html( histogram_legend );
|
||||
|
||||
histogram_element
|
||||
.sparkline
|
||||
(
|
||||
luke_array_to_struct( field_data.histogram ).values,
|
||||
{
|
||||
type : 'bar',
|
||||
barColor : '#c0c0c0',
|
||||
zeroColor : '#ffffff',
|
||||
height : histogram_element.height(),
|
||||
barWidth : 46,
|
||||
barSpacing : 3
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
},
|
||||
error : function( xhr, text_status, error_thrown)
|
||||
{
|
||||
},
|
||||
complete : function( xhr, text_status )
|
||||
{
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
delete app.schema_browser_data;
|
||||
}
|
||||
|
||||
sammy.trigger
|
||||
(
|
||||
'schema_browser_load',
|
||||
{
|
||||
callback : callback,
|
||||
active_core : this.active_core,
|
||||
route_params : this.params
|
||||
}
|
||||
trigger_params
|
||||
);
|
||||
}
|
||||
);
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// #/threads
|
||||
sammy.get
|
||||
(
|
||||
|
@ -68,10 +85,8 @@ sammy.get
|
|||
}
|
||||
|
||||
var item = '<tr class="' + classes.join( ' ' ) +'">' + "\n"
|
||||
|
||||
+ '<td class="name">' + name + '</td>' + "\n"
|
||||
+ '<td class="time">' + threadDumpData[i].cpuTime.esc() + '<br>' + threadDumpData[i].userTime.esc() + '</td>' + "\n"
|
||||
|
||||
+ '</tr>';
|
||||
|
||||
threadDumpContent.push( item );
|
||||
|
|
|
@ -1,113 +0,0 @@
|
|||
{
|
||||
"levels" : ["FINEST", "FINE", "CONFIG", "INFO", "WARNING", "SEVERE"],
|
||||
"logger" : {
|
||||
"root" : {
|
||||
"level": { "effective_level" : "INFO" },
|
||||
"effective_level" : "INFO"
|
||||
},
|
||||
"global" : { "effective_level" : "INFO" },
|
||||
"javax" : null,
|
||||
"javax.management" : { "effective_level" : "INFO" },
|
||||
"javax.management.mbeanserver" : { "effective_level" : "INFO" },
|
||||
"javax.management.misc" : { "effective_level" : "INFO" },
|
||||
"javax.management.mlet" : { "effective_level" : "INFO" },
|
||||
"javax.management.modelmbean" : { "effective_level" : "INFO" },
|
||||
"javax.management.monitor" : { "effective_level" : "INFO" },
|
||||
"javax.management.notification" : { "effective_level" : "INFO" },
|
||||
"javax.management.relation" : { "effective_level" : "INFO" },
|
||||
"javax.management.snmp" : { "effective_level" : "INFO" },
|
||||
"javax.management.snmp.daemon" : { "effective_level" : "INFO" },
|
||||
"javax.management.timer" : { "effective_level" : "INFO" },
|
||||
"org" : null,
|
||||
"org.apache" : null,
|
||||
"org.apache.solr" : null,
|
||||
"org.apache.solr.analysis" : null,
|
||||
"org.apache.solr.analysis.BaseTokenFilterFactory" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.analysis.BaseTokenStreamFactory" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.analysis.BaseTokenizerFactory" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.cloud" : null,
|
||||
"org.apache.solr.cloud.SolrZkServer" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.cloud.ZkController" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.common" : null,
|
||||
"org.apache.solr.common.cloud" : null,
|
||||
"org.apache.solr.common.cloud.CloudState" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.common.cloud.ConnectionManager" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.common.cloud.DefaultConnectionStrategy" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.common.cloud.SolrZkClient" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.common.cloud.ZkStateReader" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.common.util" : null,
|
||||
"org.apache.solr.common.util.ConcurrentLRUCache" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.common.util.SystemIdResolver" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.core" : null,
|
||||
"org.apache.solr.core.Config" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.core.CoreContainer" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.core.JmxMonitoredMap" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.core.RequestHandlers" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.core.SolrConfig" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.core.SolrCore" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.core.SolrResourceLoader" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.handler" : null,
|
||||
"org.apache.solr.handler.XmlUpdateRequestHandler" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.handler.admin" : null,
|
||||
"org.apache.solr.handler.admin.LukeRequestHandler" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.handler.admin.SystemInfoHandler" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.handler.component" : null,
|
||||
"org.apache.solr.handler.component.QueryElevationComponent" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.handler.component.SearchHandler" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.handler.component.SpellCheckComponent" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.highlight" : null,
|
||||
"org.apache.solr.highlight.DefaultSolrHighlighter" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.highlight.SolrHighlighter" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.response" : null,
|
||||
"org.apache.solr.response.BinaryResponseWriter" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.response.XSLTResponseWriter" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.schema" : null,
|
||||
"org.apache.solr.schema.FieldType" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.schema.IndexSchema" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.search" : null,
|
||||
"org.apache.solr.search.SolrIndexSearcher" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.servlet" : null,
|
||||
"org.apache.solr.servlet.NewLogLevelSelection" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.servlet.SolrDispatchFilter" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.servlet.SolrRequestParsers" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.spelling" : null,
|
||||
"org.apache.solr.spelling.AbstractLuceneSpellChecker" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.spelling.IndexBasedSpellChecker" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.update" : null,
|
||||
"org.apache.solr.update.SolrIndexConfig" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.update.UpdateHandler" : { "effective_level" : "INFO" },
|
||||
"org.apache.solr.util" : null,
|
||||
"org.apache.solr.util.plugin" : null,
|
||||
"org.apache.solr.util.plugin.AbstractPluginLoader" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper" : null,
|
||||
"org.apache.zookeeper.ClientCnxn" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.CreateMode" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.ZooKeeper" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.common" : null,
|
||||
"org.apache.zookeeper.common.PathTrie" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.jmx" : null,
|
||||
"org.apache.zookeeper.jmx.MBeanRegistry" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server" : null,
|
||||
"org.apache.zookeeper.server.ConnectionBean" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.DataTree" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.FinalRequestProcessor" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.NIOServerCnxn" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.PrepRequestProcessor" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.Request" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.SessionTrackerImpl" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.SyncRequestProcessor" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.WatchManager" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.ZKDatabase" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.ZooKeeperServer" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.ZooKeeperServerMain" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.persistence" : null,
|
||||
"org.apache.zookeeper.server.persistence.FileSnap" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.persistence.FileTxnLog" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.persistence.FileTxnSnapLog" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.persistence.Util" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.quorum" : null,
|
||||
"org.apache.zookeeper.server.quorum.QuorumPeerConfig" : { "effective_level" : "INFO" },
|
||||
"org.apache.zookeeper.server.util" : null,
|
||||
"org.apache.zookeeper.server.util.SerializeUtils" : { "effective_level" : "INFO" }
|
||||
}
|
||||
}
|
|
@ -25,9 +25,7 @@ limitations under the License.
|
|||
</div>
|
||||
|
||||
<div class="content clearfix">
|
||||
|
||||
<div id="tree" class="tree">#tree</div>
|
||||
|
||||
<div id="file-content" class="clearfix">
|
||||
|
||||
<div id="prop">
|
||||
|
@ -37,9 +35,18 @@ limitations under the License.
|
|||
<div id="data"></div>
|
||||
|
||||
<a class="close"><span>[x]</span></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<a class="debug"><span>Generate Dump</span></a>
|
||||
<div id="debug">
|
||||
<ul class="clearfix">
|
||||
<li class="clipboard"><a href="#" data-copied="Copied to Clipboard!">Copy to Clipboard (BUGGY!)</a></li>
|
||||
<li class="close"><a href="#">Close</a></li>
|
||||
</ul>
|
||||
<pre class="debug"></pre>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -133,15 +133,7 @@ limitations under the License.
|
|||
<div class="message"></div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<!--
|
||||
status:
|
||||
idle
|
||||
info:
|
||||
-->
|
||||
|
||||
</div>
|
||||
<div class="content"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -14,68 +14,81 @@ 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.
|
||||
-->
|
||||
<div id="index">
|
||||
<div id="index" class="clearfix">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<div class="block" id="data">
|
||||
<div class="index-left">
|
||||
|
||||
<h2><span>Dashboard</span></h2>
|
||||
<div class="block" id="instance">
|
||||
|
||||
<div class="message-container">
|
||||
<div class="message"></div>
|
||||
</div>
|
||||
<h2><span>Instance</span></h2>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<ul class="data">
|
||||
|
||||
<li class="start_time"><dl class="clearfix">
|
||||
<dt><span>startTime</span></dt>
|
||||
<dt><span>Start</span></dt>
|
||||
<dd class="timeago"></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="host"><dl class="clearfix">
|
||||
<dt><span>host</span></dt>
|
||||
<dt><span>Host</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="cwd"><dl class="clearfix">
|
||||
<dt><span>cwd</span></dt>
|
||||
<li class="dir dir_cwd"><dl class="clearfix">
|
||||
<dt><span>CWD</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="jvm"><dl class="clearfix">
|
||||
<dt><span>JVM</span></dt>
|
||||
<li class="dir dir_instance"><dl class="clearfix">
|
||||
<dt><span>Instance</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="command_line_args"><dl class="clearfix">
|
||||
<dt><span>commandLineArgs</span></dt>
|
||||
<li class="dir dir_data"><dl class="clearfix">
|
||||
<dt><span>Data</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="dir dir_index"><dl class="clearfix">
|
||||
<dt><span>Index</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul class="lucene">
|
||||
</div>
|
||||
|
||||
<li class="solr_spec_version"><dl class="clearfix">
|
||||
<dt><span>solr-spec-version</span></dt>
|
||||
</div>
|
||||
|
||||
<div class="block" id="versions">
|
||||
|
||||
<h2><span>Versions</span></h2>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<ul class="data">
|
||||
|
||||
<li class="solr solr_spec_version"><dl class="clearfix">
|
||||
<dt><span>solr-spec</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="solr_impl_version"><dl class="clearfix">
|
||||
<dt class=""><span>solr-impl-version</span></dt>
|
||||
<dt class=""><span>solr-impl</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="lucene_spec_version"><dl class="clearfix">
|
||||
<dt><span>lucene-spec-version</span></dt>
|
||||
<li class="lucene lucene_spec_version"><dl class="clearfix">
|
||||
<dt><span>lucene-spec</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="lucene_impl_version"><dl class="clearfix">
|
||||
<dt><span>lucene-impl-version</span></dt>
|
||||
<dt><span>lucene-impl</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
|
@ -85,26 +98,27 @@ limitations under the License.
|
|||
|
||||
</div>
|
||||
|
||||
<div class="block" id="memory">
|
||||
|
||||
<h2><span>Memory</span></h2>
|
||||
|
||||
<div class="message-container">
|
||||
<div class="message"></div>
|
||||
</div>
|
||||
|
||||
<div class="index-right">
|
||||
|
||||
<div class="block" id="system">
|
||||
|
||||
<h2><span>System</span></h2>
|
||||
<a class="reload"><span>reload</span></a>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<div id="memory-bar">
|
||||
<div id="physical-memory-bar">
|
||||
|
||||
<div id="memory-bar-max">
|
||||
<span class="memory-bar-max value"></span>
|
||||
<p data-desc="physical-memory-bar">Physical Memory</p>
|
||||
<div class="bar-holder">
|
||||
|
||||
<div id="memory-bar-total" class="bar">
|
||||
<span class="memory-bar-total value"></span>
|
||||
<div class="bar-max bar">
|
||||
<span class="bar-max val"></span>
|
||||
|
||||
<div id="memory-bar-used" class="bar">
|
||||
<span class="memory-bar-used value"></span>
|
||||
<div class="bar-total bar">
|
||||
<span class="bar-total val"></span>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -114,6 +128,119 @@ limitations under the License.
|
|||
|
||||
</div>
|
||||
|
||||
<div id="swap-space-bar">
|
||||
|
||||
<p data-desc="swap-space-bar">Swap Space</p>
|
||||
<div class="bar-holder">
|
||||
|
||||
<div class="bar-max bar">
|
||||
<span class="bar-max val"></span>
|
||||
|
||||
<div class="bar-total bar">
|
||||
<span class="bar-total val"></span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="file-descriptor-bar">
|
||||
|
||||
<p data-desc="file-descriptor-bar">File Descriptor Count</p>
|
||||
<div class="bar-holder">
|
||||
|
||||
<div class="bar-max bar">
|
||||
<span class="bar-max val"></span>
|
||||
|
||||
<div class="bar-total bar">
|
||||
<span class="bar-total val"></span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<p class="no-info">Sorry, no information available</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<div class="index-left">
|
||||
|
||||
<div class="block" id="jvm">
|
||||
|
||||
<h2><span>JVM</span></h2>
|
||||
|
||||
<div class="content clearfix">
|
||||
|
||||
<ul class="data">
|
||||
|
||||
<li class="jvm_version"><dl class="clearfix">
|
||||
<dt><span>Runtime</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="processors"><dl class="clearfix">
|
||||
<dt><span>Processors</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
<li class="command_line_args"><dl class="clearfix">
|
||||
<dt><span>Args</span></dt>
|
||||
<dd></dd>
|
||||
</dl></li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="index-right">
|
||||
|
||||
<div class="block" id="jvm-memory">
|
||||
|
||||
<h2><span data-desc="jvm-memory-bar">JVM-Memory</span></h2>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<div id="jvm-memory-bar">
|
||||
<div class="bar-holder">
|
||||
|
||||
<div class="bar-max bar">
|
||||
<span class="bar-max val"></span>
|
||||
|
||||
<div class="bar-total bar">
|
||||
<span class="bar-total val"></span>
|
||||
|
||||
<div class="bar-used bar">
|
||||
<span class="bar-used val"></span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -119,6 +119,44 @@ limitations under the License.
|
|||
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="optional">
|
||||
<legend>
|
||||
<label for="edismax" class="checkbox">
|
||||
<input type="checkbox" name="edismax" id="edismax" value="true">
|
||||
<strong>e</strong>dismax
|
||||
</label>
|
||||
</legend>
|
||||
<div class="fieldset">
|
||||
|
||||
<label for="q_alt">q.alt</label>
|
||||
<input type="text" name="q.alt" id="q_alt">
|
||||
|
||||
<label for="qf">qf</label>
|
||||
<input type="text" name="qf" id="qf">
|
||||
|
||||
<label for="mm">mm</label>
|
||||
<input type="text" name="mm" id="mm">
|
||||
|
||||
<label for="pf">pf</label>
|
||||
<input type="text" name="pf" id="pf">
|
||||
|
||||
<label for="ps">ps</label>
|
||||
<input type="text" name="ps" id="ps">
|
||||
|
||||
<label for="qs">qs</label>
|
||||
<input type="text" name="qs" id="qs">
|
||||
|
||||
<label for="tie">tie</label>
|
||||
<input type="text" name="tie" id="tie">
|
||||
|
||||
<label for="bq">bq</label>
|
||||
<input type="text" name="bq" id="bq">
|
||||
|
||||
<label for="bf">bf</label>
|
||||
<input type="text" name="bf" id="bf">
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="optional">
|
||||
<legend>
|
||||
<label for="hl" class="checkbox">
|
||||
|
|
|
@ -180,6 +180,13 @@ limitations under the License.
|
|||
|
||||
<div id="navigation">
|
||||
|
||||
<div class="timer">
|
||||
|
||||
<p>Next Run: <span class="approx">~</span><span class="tick">15m 8s</span></p>
|
||||
<small>Sat Mar 03 11:00:00 CET 2012</smalL>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="refresh-status">Refresh Status</button>
|
||||
|
||||
<div class="slaveOnly">
|
||||
|
|
|
@ -24,6 +24,13 @@ limitations under the License.
|
|||
|
||||
<div class="field-options">
|
||||
|
||||
<div class="block head">
|
||||
<h2>
|
||||
<span class="type"></span>:
|
||||
<span class="name"></span>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<dl class="options clearfix">
|
||||
|
||||
<dt class="field-type">Field-Type:</dt>
|
||||
|
@ -47,7 +54,7 @@ limitations under the License.
|
|||
|
||||
<p>Index Analyzer:</p>
|
||||
<dl>
|
||||
<dt></dt>
|
||||
<dt><a class="toggle"></a></dt>
|
||||
</dl>
|
||||
|
||||
<ul>
|
||||
|
@ -68,7 +75,7 @@ limitations under the License.
|
|||
|
||||
<p>Query Analyzer:</p>
|
||||
<dl>
|
||||
<dt></dt>
|
||||
<dt><a class="toggle"></a></dt>
|
||||
</dl>
|
||||
|
||||
<ul>
|
||||
|
@ -91,32 +98,28 @@ limitations under the License.
|
|||
|
||||
<div class="terminfo-holder clearfix">
|
||||
|
||||
<div class="status loader">Loading Term Info ...</div>
|
||||
<div class="trigger">
|
||||
|
||||
<button class="submit">Load Term Info</button>
|
||||
|
||||
<a class="autoload" title="Automatically load Term Info?"><span>Autoload™</span></a>
|
||||
|
||||
</div>
|
||||
|
||||
<p class="status">Sorry, no Term Info available :(</p>
|
||||
|
||||
<div class="topterms-holder">
|
||||
|
||||
<p class="head">Top <span class="shown"></span><span class="max-holder">/<span class="max"></span></span> Terms:</p>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<th class="position" title="Position"> </th>
|
||||
<th class="term">Term</th>
|
||||
<th class="frequency" title="Frequency">Frq</th>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
|
||||
<p class="navi clearfix">
|
||||
<a class="less"><span>less</span></a>
|
||||
<a class="more"><span>more</span></a>
|
||||
<form>
|
||||
<p class="head">
|
||||
<input type="text">
|
||||
<a class="max-holder" title="Load all Top-Terms">/<span class="max"></span></a> Top-Terms:
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue