sunspot_solr 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sunspot-solr +2 -6
- data/lib/sunspot/solr/server.rb +2 -3
- data/solr/README.txt +181 -181
- data/solr/bin/post +29 -19
- data/solr/bin/solr +247 -428
- data/solr/bin/solr.cmd +102 -256
- data/solr/bin/solr.in.cmd +15 -7
- data/solr/bin/solr.in.sh +26 -12
- data/solr/server/README.txt +110 -113
- data/solr/server/contexts/solr-jetty-context.xml +8 -8
- data/solr/server/etc/jetty-http.xml +47 -0
- data/solr/server/etc/jetty-https-ssl.xml +175 -159
- data/solr/server/etc/jetty-https.xml +53 -0
- data/solr/server/etc/jetty-ssl.xml +46 -0
- data/solr/server/etc/jetty.xml +189 -167
- data/solr/server/etc/webdefault.xml +527 -527
- data/solr/server/lib/javax.servlet-api-3.1.0.jar +0 -0
- data/solr/server/lib/jetty-continuation-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-deploy-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-http-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-io-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-jmx-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-rewrite-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-security-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-server-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-servlet-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-servlets-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-util-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-webapp-9.2.11.v20150529.jar +0 -0
- data/solr/server/lib/jetty-xml-9.2.11.v20150529.jar +0 -0
- data/solr/server/modules/http.mod +9 -0
- data/solr/server/modules/https.mod +9 -0
- data/solr/server/modules/server.mod +11 -0
- data/solr/server/modules/ssl.mod +9 -0
- data/solr/server/resources/jetty-logging.properties +1 -0
- data/solr/server/resources/log4j.properties +24 -24
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/commons-exec-1.3.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/{hadoop-annotations-2.3.0.jar → hadoop-annotations-2.6.0.jar} +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-auth-2.6.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-common-2.6.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-2.6.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/htrace-core-3.0.4.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpclient-4.4.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpcore-4.4.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpmime-4.4.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-core-2.5.4.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/jackson-dataformat-smile-2.5.4.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-analyzers-common-5.0.0.jar → lucene-analyzers-common-5.3.1.jar} +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-analyzers-kuromoji-5.0.0.jar → lucene-analyzers-kuromoji-5.3.1.jar} +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-analyzers-phonetic-5.0.0.jar → lucene-analyzers-phonetic-5.3.1.jar} +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-backward-codecs-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-codecs-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-core-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-expressions-5.0.0.jar → lucene-expressions-5.3.1.jar} +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-grouping-5.0.0.jar → lucene-grouping-5.3.1.jar} +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-highlighter-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-join-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-memory-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-misc-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queries-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/{lucene-queryparser-5.0.0.jar → lucene-queryparser-5.3.1.jar} +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-sandbox-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-spatial-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-suggest-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet-2.3.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet.ext.servlet-2.3.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-core-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-5.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/t-digest-3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/web.xml +169 -181
- data/solr/server/solr-webapp/webapp/WEB-INF/weblogic.xml +28 -28
- data/solr/server/solr-webapp/webapp/admin.html +164 -163
- data/solr/server/solr-webapp/webapp/css/angular/analysis.css +304 -0
- data/solr/server/solr-webapp/webapp/css/angular/chosen.css +465 -0
- data/solr/server/solr-webapp/webapp/css/angular/cloud.css +398 -0
- data/solr/server/solr-webapp/webapp/css/angular/common.css +724 -0
- data/solr/server/solr-webapp/webapp/css/angular/cores.css +233 -0
- data/solr/server/solr-webapp/webapp/css/angular/dataimport.css +370 -0
- data/solr/server/solr-webapp/webapp/css/angular/documents.css +179 -0
- data/solr/server/solr-webapp/webapp/css/angular/files.css +53 -0
- data/solr/server/solr-webapp/webapp/css/angular/index.css +206 -0
- data/solr/server/solr-webapp/webapp/css/angular/logging.css +376 -0
- data/solr/server/solr-webapp/webapp/css/angular/menu.css +321 -0
- data/solr/server/solr-webapp/webapp/css/angular/plugins.css +212 -0
- data/solr/server/solr-webapp/webapp/css/angular/query.css +162 -0
- data/solr/server/solr-webapp/webapp/css/angular/replication.css +500 -0
- data/solr/server/solr-webapp/webapp/css/angular/schema-browser.css +567 -0
- data/solr/server/solr-webapp/webapp/css/angular/segments.css +173 -0
- data/solr/server/solr-webapp/webapp/css/angular/threads.css +161 -0
- data/solr/server/solr-webapp/webapp/css/chosen.css +421 -421
- data/solr/server/solr-webapp/webapp/css/styles/analysis.css +311 -311
- data/solr/server/solr-webapp/webapp/css/styles/cloud.css +410 -410
- data/solr/server/solr-webapp/webapp/css/styles/common.css +701 -701
- data/solr/server/solr-webapp/webapp/css/styles/cores.css +244 -244
- data/solr/server/solr-webapp/webapp/css/styles/dashboard.css +155 -155
- data/solr/server/solr-webapp/webapp/css/styles/dataimport.css +403 -403
- data/solr/server/solr-webapp/webapp/css/styles/documents.css +197 -197
- data/solr/server/solr-webapp/webapp/css/styles/files.css +54 -54
- data/solr/server/solr-webapp/webapp/css/styles/index.css +207 -207
- data/solr/server/solr-webapp/webapp/css/styles/java-properties.css +52 -52
- data/solr/server/solr-webapp/webapp/css/styles/logging.css +391 -391
- data/solr/server/solr-webapp/webapp/css/styles/menu.css +329 -328
- data/solr/server/solr-webapp/webapp/css/styles/plugins.css +195 -195
- data/solr/server/solr-webapp/webapp/css/styles/query.css +173 -173
- data/solr/server/solr-webapp/webapp/css/styles/replication.css +515 -515
- data/solr/server/solr-webapp/webapp/css/styles/schema-browser.css +578 -578
- data/solr/server/solr-webapp/webapp/css/styles/segments.css +145 -0
- data/solr/server/solr-webapp/webapp/css/styles/threads.css +172 -172
- data/solr/server/solr-webapp/webapp/img/chosen-sprite-2x.png +0 -0
- data/solr/server/solr-webapp/webapp/img/filetypes/README +27 -27
- data/solr/server/solr-webapp/webapp/img/solr.svg +39 -39
- data/solr/server/solr-webapp/webapp/index.html +208 -0
- data/solr/server/solr-webapp/webapp/js/angular/app.js +713 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/analysis.js +199 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/cloud.js +528 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/core-overview.js +225 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/cores.js +465 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/dataimport.js +284 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/documents.js +139 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/files.js +92 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/index.js +95 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/java-properties.js +45 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/logging.js +146 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/plugins.js +166 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/query.js +99 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/replication.js +227 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/schema-browser.js +432 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/segments.js +94 -0
- data/solr/server/solr-webapp/webapp/js/angular/controllers/threads.js +51 -0
- data/solr/server/solr-webapp/webapp/js/angular/services.js +214 -0
- data/solr/server/solr-webapp/webapp/js/lib/ZeroClipboard.js +342 -342
- data/solr/server/solr-webapp/webapp/js/lib/chosen.js +982 -982
- data/solr/server/solr-webapp/webapp/js/lib/console.js +29 -29
- data/solr/server/solr-webapp/webapp/js/lib/d3.js +9373 -9373
- data/solr/server/solr-webapp/webapp/js/lib/highlight.js +31 -31
- data/solr/server/solr-webapp/webapp/js/lib/jquery-1.7.2.min.js +30 -30
- data/solr/server/solr-webapp/webapp/js/lib/jquery.ajaxfileupload.js +184 -184
- data/solr/server/solr-webapp/webapp/js/lib/jquery.blockUI.js +523 -523
- data/solr/server/solr-webapp/webapp/js/lib/jquery.cookie.js +71 -71
- data/solr/server/solr-webapp/webapp/js/lib/jquery.form.js +806 -806
- data/solr/server/solr-webapp/webapp/js/lib/jquery.jstree.js +3534 -3534
- data/solr/server/solr-webapp/webapp/js/lib/jquery.sammy.js +1863 -1863
- data/solr/server/solr-webapp/webapp/js/lib/jquery.timeago.js +189 -189
- data/solr/server/solr-webapp/webapp/js/lib/linker.js +48 -48
- data/solr/server/solr-webapp/webapp/js/lib/naturalSort.js +82 -0
- data/solr/server/solr-webapp/webapp/js/lib/order.js +216 -216
- data/solr/server/solr-webapp/webapp/js/main.js +60 -58
- data/solr/server/solr-webapp/webapp/js/require.js +11349 -11349
- data/solr/server/solr-webapp/webapp/js/scripts/analysis.js +545 -545
- data/solr/server/solr-webapp/webapp/js/scripts/app.js +680 -679
- data/solr/server/solr-webapp/webapp/js/scripts/cloud.js +877 -877
- data/solr/server/solr-webapp/webapp/js/scripts/cores.js +719 -719
- data/solr/server/solr-webapp/webapp/js/scripts/dashboard.js +562 -562
- data/solr/server/solr-webapp/webapp/js/scripts/dataimport.js +812 -812
- data/solr/server/solr-webapp/webapp/js/scripts/documents.js +370 -370
- data/solr/server/solr-webapp/webapp/js/scripts/files.js +265 -265
- data/solr/server/solr-webapp/webapp/js/scripts/index.js +340 -340
- data/solr/server/solr-webapp/webapp/js/scripts/java-properties.js +106 -106
- data/solr/server/solr-webapp/webapp/js/scripts/logging.js +578 -576
- data/solr/server/solr-webapp/webapp/js/scripts/ping.js +72 -72
- data/solr/server/solr-webapp/webapp/js/scripts/plugins.js +462 -462
- data/solr/server/solr-webapp/webapp/js/scripts/query.js +229 -229
- data/solr/server/solr-webapp/webapp/js/scripts/replication.js +527 -527
- data/solr/server/solr-webapp/webapp/js/scripts/schema-browser.js +1229 -1229
- data/solr/server/solr-webapp/webapp/js/scripts/segments.js +206 -0
- data/solr/server/solr-webapp/webapp/js/scripts/threads.js +158 -158
- data/solr/server/solr-webapp/webapp/libs/angular-chosen.js +139 -0
- data/solr/server/solr-webapp/webapp/libs/angular-cookies.js +229 -0
- data/solr/server/solr-webapp/webapp/libs/angular-cookies.min.js +31 -0
- data/solr/server/solr-webapp/webapp/libs/angular-resource.min.js +36 -0
- data/solr/server/solr-webapp/webapp/libs/angular-route.js +1018 -0
- data/solr/server/solr-webapp/webapp/libs/angular-route.min.js +38 -0
- data/solr/server/solr-webapp/webapp/libs/angular-sanitize.js +703 -0
- data/solr/server/solr-webapp/webapp/libs/angular-sanitize.min.js +39 -0
- data/solr/server/solr-webapp/webapp/libs/angular.js +26093 -0
- data/solr/server/solr-webapp/webapp/libs/angular.min.js +273 -0
- data/solr/server/solr-webapp/webapp/libs/chosen.jquery.js +1194 -0
- data/solr/server/solr-webapp/webapp/libs/chosen.jquery.min.js +30 -0
- data/solr/server/solr-webapp/webapp/libs/d3.js +9373 -0
- data/solr/server/solr-webapp/webapp/libs/highlight.js +31 -0
- data/solr/server/solr-webapp/webapp/libs/jquery-2.1.3.min.js +29 -0
- data/solr/server/solr-webapp/webapp/libs/jquery.jstree.js +3534 -0
- data/solr/server/solr-webapp/webapp/libs/ngtimeago.js +102 -0
- data/solr/server/solr-webapp/webapp/partials/analysis.html +128 -0
- data/solr/server/solr-webapp/webapp/partials/cloud.html +104 -0
- data/solr/server/solr-webapp/webapp/partials/core_overview.html +227 -0
- data/solr/server/solr-webapp/webapp/partials/cores.html +231 -0
- data/solr/server/solr-webapp/webapp/partials/dataimport.html +209 -0
- data/solr/server/solr-webapp/webapp/partials/documents.html +118 -0
- data/solr/server/solr-webapp/webapp/partials/files.html +47 -0
- data/solr/server/solr-webapp/webapp/partials/index.html +261 -0
- data/solr/server/solr-webapp/webapp/partials/java-properties.html +27 -0
- data/solr/server/solr-webapp/webapp/partials/logging-levels.html +56 -0
- data/solr/server/solr-webapp/webapp/partials/logging.html +56 -0
- data/solr/server/solr-webapp/webapp/partials/plugins.html +72 -0
- data/solr/server/solr-webapp/webapp/partials/query.html +356 -0
- data/solr/server/solr-webapp/webapp/partials/replication.html +239 -0
- data/solr/server/solr-webapp/webapp/partials/schema-browser.html +206 -0
- data/solr/server/solr-webapp/webapp/partials/segments.html +99 -0
- data/solr/server/solr-webapp/webapp/partials/threads.html +65 -0
- data/solr/server/solr-webapp/webapp/tpl/analysis.html +83 -83
- data/solr/server/solr-webapp/webapp/tpl/cloud.html +87 -87
- data/solr/server/solr-webapp/webapp/tpl/cores.html +226 -226
- data/solr/server/solr-webapp/webapp/tpl/dashboard.html +201 -201
- data/solr/server/solr-webapp/webapp/tpl/dataimport.html +183 -183
- data/solr/server/solr-webapp/webapp/tpl/documents.html +107 -107
- data/solr/server/solr-webapp/webapp/tpl/files.html +44 -44
- data/solr/server/solr-webapp/webapp/tpl/index.html +250 -250
- data/solr/server/solr-webapp/webapp/tpl/logging.html +23 -23
- data/solr/server/solr-webapp/webapp/tpl/plugins.html +39 -39
- data/solr/server/solr-webapp/webapp/tpl/query.html +361 -361
- data/solr/server/solr-webapp/webapp/tpl/replication.html +216 -216
- data/solr/server/solr-webapp/webapp/tpl/schema-browser.html +192 -192
- data/solr/server/solr-webapp/webapp/tpl/segments.html +49 -0
- data/solr/server/solr-webapp/webapp/tpl/threads.html +56 -56
- data/solr/server/solr/README.txt +77 -77
- data/solr/server/solr/solr.xml +51 -51
- data/solr/server/solr/zoo.cfg +17 -17
- data/solr/server/start.jar +0 -0
- data/spec/server_spec.rb +3 -8
- metadata +132 -43
- data/solr/server/lib/jetty-continuation-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-deploy-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-http-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-io-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-jmx-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-security-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-server-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-servlet-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-util-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-webapp-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/jetty-xml-8.1.10.v20130312.jar +0 -0
- data/solr/server/lib/servlet-api-3.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/.gitignore +0 -1
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-auth-2.3.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-common-2.3.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-2.3.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpclient-4.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpcore-4.3.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/httpmime-4.3.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-backward-codecs-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-codecs-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-core-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-highlighter-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-join-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-memory-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-misc-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-queries-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-spatial-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/lucene-suggest-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet-2.1.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/org.restlet.ext.servlet-2.1.1.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-core-5.0.0.jar +0 -0
- data/solr/server/solr-webapp/webapp/WEB-INF/lib/solr-solrj-5.0.0.jar +0 -0
- data/solr/server/webapps/solr.war +0 -0
@@ -0,0 +1,206 @@
|
|
1
|
+
/*
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
+
contributor license agreements. See the NOTICE file distributed with
|
4
|
+
this work for additional information regarding copyright ownership.
|
5
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
+
(the "License"); you may not use this file except in compliance with
|
7
|
+
the License. You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
*/
|
17
|
+
|
18
|
+
|
19
|
+
var get_tooltip = function( segment_response ) {
|
20
|
+
var tooltip =
|
21
|
+
'<div>Segment <b>' + segment_response.name + '</b>:</div>' +
|
22
|
+
'<div class="label">#docs:</div><div>' + number_format(segment_response.size) +'</div>' +
|
23
|
+
'<div class="label">#dels:</div><div>' + number_format(segment_response.delCount) + '</div>' +
|
24
|
+
'<div class="label">size:</div><div>' + number_format(segment_response.sizeInBytes) + ' bytes </div>' +
|
25
|
+
'<div class="label">age:</div><div>' + segment_response.age + '</div>' +
|
26
|
+
'<div class="label">source:</div><div>' + segment_response.source + '</div>';
|
27
|
+
return tooltip;
|
28
|
+
};
|
29
|
+
|
30
|
+
var get_entry = function( segment_response, segment_bytes_max ) {
|
31
|
+
//calcualte dimensions of graph
|
32
|
+
var dims = calculate_dimensions(segment_response.sizeInBytes,
|
33
|
+
segment_bytes_max, segment_response.size, segment_response.delCount)
|
34
|
+
//create entry for segment with given dimensions
|
35
|
+
var entry = get_entry_item(segment_response.name, dims,
|
36
|
+
get_tooltip(segment_response), (segment_response.mergeCandidate)?true:false);
|
37
|
+
|
38
|
+
return entry;
|
39
|
+
};
|
40
|
+
|
41
|
+
var get_entry_item = function(name, dims, tooltip, isMergeCandidate) {
|
42
|
+
var entry = '<li>' + "\n" +
|
43
|
+
' <dl class="clearfix" style="width: ' + dims['size'] + '%;">' + "\n" +
|
44
|
+
' <dt><div>' + name + '</div></dt>' + "\n" +
|
45
|
+
' <dd>';
|
46
|
+
entry += '<div class="live' + ((isMergeCandidate)?' merge-candidate':'') +
|
47
|
+
'" style="width: ' + dims['alive_doc_size'] + '%;"> </div>';
|
48
|
+
entry += '<div class="toolitp">' + tooltip +'</div>';
|
49
|
+
|
50
|
+
if (dims['deleted_doc_size'] > 0.001) {
|
51
|
+
entry += '<div class="deleted" style="width:' + dims['deleted_doc_size']
|
52
|
+
+ '%;margin-left:' + dims['alive_doc_size'] + '%;"> </div>';
|
53
|
+
}
|
54
|
+
entry += '</dd></dl></li>';
|
55
|
+
return entry;
|
56
|
+
};
|
57
|
+
|
58
|
+
var get_footer = function(deletions_count, documents_count) {
|
59
|
+
return '<li><dl><dt></dt><dd>Deletions: ' +
|
60
|
+
(documents_count == 0 ? 0 : round_2(deletions_count/documents_count * 100)) +
|
61
|
+
'% </dd></dl></li>';
|
62
|
+
};
|
63
|
+
|
64
|
+
var calculate_dimensions = function(segment_size_in_bytes, segment_size_in_bytes_max, doc_count, delete_doc_count) {
|
65
|
+
var segment_size_in_bytes_log = Math.log(segment_size_in_bytes);
|
66
|
+
var segment_size_in_bytes_max_log = Math.log(segment_size_in_bytes_max);
|
67
|
+
|
68
|
+
var dims = {};
|
69
|
+
//Normalize to 100% size of bar
|
70
|
+
dims['size'] = Math.floor((segment_size_in_bytes_log / segment_size_in_bytes_max_log ) * 100);
|
71
|
+
//Deleted doc part size
|
72
|
+
dims['deleted_doc_size'] = Math.floor((delete_doc_count/(delete_doc_count + doc_count)) * dims['size']);
|
73
|
+
//Alive doc part size
|
74
|
+
dims['alive_doc_size'] = dims['size'] - dims['deleted_doc_size'];
|
75
|
+
|
76
|
+
return dims;
|
77
|
+
};
|
78
|
+
|
79
|
+
var calculate_max_size_on_disk = function(segment_entries) {
|
80
|
+
var max = 0;
|
81
|
+
$.each(segment_entries, function(idx, obj) {
|
82
|
+
if (obj.sizeInBytes > max) {
|
83
|
+
max = obj.sizeInBytes;
|
84
|
+
}
|
85
|
+
});
|
86
|
+
return max;
|
87
|
+
};
|
88
|
+
|
89
|
+
var round_2 = function(num) {
|
90
|
+
return Math.round(num*100)/100;
|
91
|
+
};
|
92
|
+
|
93
|
+
var number_format = function(x) {
|
94
|
+
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
95
|
+
};
|
96
|
+
|
97
|
+
var prepare_x_axis = function(segment_bytes_max) {
|
98
|
+
var factor = 1024*1024; //for MB
|
99
|
+
|
100
|
+
var segment_bytes_max_log = Math.log(segment_bytes_max);
|
101
|
+
|
102
|
+
var series_entry = '<li>' + "\n" +
|
103
|
+
' <dl class="clearfix" style="width:100%;">' + "\n" +
|
104
|
+
' <dt><div>Size</div></dt>' + "\n" +
|
105
|
+
' <dd>' +
|
106
|
+
' <div class="start">0</div>';
|
107
|
+
var step = 0;
|
108
|
+
for (var j = 0; j < 3; j+=1) {
|
109
|
+
step += segment_bytes_max_log/4;
|
110
|
+
var step_value = number_format(Math.floor((Math.pow(Math.E, step))/factor))
|
111
|
+
series_entry += '<div class="w5">' + ((step_value > 0.001)?step_value : ' ') + '</div>'
|
112
|
+
}
|
113
|
+
series_entry += '<div class="end">' + number_format(Math.floor(segment_bytes_max/factor)) + ' MB </div>' +
|
114
|
+
' </dd>' +
|
115
|
+
' </dl>' +
|
116
|
+
'</li>';
|
117
|
+
return series_entry;
|
118
|
+
};
|
119
|
+
|
120
|
+
// #/:core/admin/segments
|
121
|
+
sammy.get
|
122
|
+
(
|
123
|
+
new RegExp( app.core_regex_base + '\\/(segments)$' ),
|
124
|
+
function( context )
|
125
|
+
{
|
126
|
+
var core_basepath = this.active_core.attr( 'data-basepath' );
|
127
|
+
var content_element = $( '#content' );
|
128
|
+
|
129
|
+
$.get
|
130
|
+
(
|
131
|
+
'tpl/segments.html',
|
132
|
+
function( template )
|
133
|
+
{
|
134
|
+
content_element.html( template );
|
135
|
+
|
136
|
+
var segments_element = $('#segments', content_element);
|
137
|
+
var segments_reload = $( '#segments a.reload' );
|
138
|
+
var url_element = $('#url', segments_element);
|
139
|
+
var result_element = $('#result', segments_element);
|
140
|
+
var response_element = $('#response', result_element);
|
141
|
+
var segments_holder_element = $('.segments-holder', result_element);
|
142
|
+
|
143
|
+
segments_reload
|
144
|
+
.die( 'click' )
|
145
|
+
.live
|
146
|
+
(
|
147
|
+
'click',
|
148
|
+
function( event )
|
149
|
+
{
|
150
|
+
$.ajax
|
151
|
+
(
|
152
|
+
{
|
153
|
+
url : core_basepath + '/admin/segments?wt=json',
|
154
|
+
dataType : 'json',
|
155
|
+
context: this,
|
156
|
+
beforeSend : function( arr, form, options )
|
157
|
+
{
|
158
|
+
loader.show( this );
|
159
|
+
},
|
160
|
+
success : function( response, text_status, xhr )
|
161
|
+
{
|
162
|
+
var segments_response = response['segments'],
|
163
|
+
segments_entries = [],
|
164
|
+
segment_bytes_max = calculate_max_size_on_disk( segments_response );
|
165
|
+
|
166
|
+
//scale
|
167
|
+
segments_entries.push( prepare_x_axis( segment_bytes_max ) );
|
168
|
+
|
169
|
+
var documents_count = 0, deletions_count = 0;
|
170
|
+
|
171
|
+
//elements
|
172
|
+
$.each( segments_response, function( key, segment_response ) {
|
173
|
+
segments_entries.push( get_entry( segment_response, segment_bytes_max ) );
|
174
|
+
|
175
|
+
documents_count += segment_response.size;
|
176
|
+
deletions_count += segment_response.delCount;
|
177
|
+
});
|
178
|
+
|
179
|
+
//footer
|
180
|
+
segments_entries.push( get_footer( deletions_count, documents_count ) );
|
181
|
+
|
182
|
+
$( 'ul', segments_holder_element ).html( segments_entries.join("\n" ) );
|
183
|
+
},
|
184
|
+
error : function( xhr, text_status, error_thrown )
|
185
|
+
{
|
186
|
+
$( this )
|
187
|
+
.attr( 'title', '/admin/segments is not configured (' + xhr.status + ': ' + error_thrown + ')' );
|
188
|
+
|
189
|
+
$( this ).parents( 'li' )
|
190
|
+
.addClass( 'error' );
|
191
|
+
},
|
192
|
+
complete : function( xhr, text_status )
|
193
|
+
{
|
194
|
+
loader.hide( this );
|
195
|
+
}
|
196
|
+
}
|
197
|
+
);
|
198
|
+
return false;
|
199
|
+
}
|
200
|
+
);
|
201
|
+
//initially submit
|
202
|
+
segments_reload.click();
|
203
|
+
}
|
204
|
+
);
|
205
|
+
}
|
206
|
+
);
|
@@ -1,158 +1,158 @@
|
|
1
|
-
/*
|
2
|
-
Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
-
contributor license agreements. See the NOTICE file distributed with
|
4
|
-
this work for additional information regarding copyright ownership.
|
5
|
-
The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
-
(the "License"); you may not use this file except in compliance with
|
7
|
-
the License. You may obtain a copy of the License at
|
8
|
-
|
9
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
|
11
|
-
Unless required by applicable law or agreed to in writing, software
|
12
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
See the License for the specific language governing permissions and
|
15
|
-
limitations under the License.
|
16
|
-
*/
|
17
|
-
|
18
|
-
// #/~threads
|
19
|
-
sammy.get
|
20
|
-
(
|
21
|
-
/^#\/(~threads)$/,
|
22
|
-
function( context )
|
23
|
-
{
|
24
|
-
var content_element = $( '#content' );
|
25
|
-
|
26
|
-
$.get
|
27
|
-
(
|
28
|
-
'tpl/threads.html',
|
29
|
-
function( template )
|
30
|
-
{
|
31
|
-
content_element
|
32
|
-
.html( template );
|
33
|
-
|
34
|
-
$.ajax
|
35
|
-
(
|
36
|
-
{
|
37
|
-
url : app.config.solr_path + '/admin/info/threads?wt=json',
|
38
|
-
dataType : 'json',
|
39
|
-
context : $( '#threads', content_element ),
|
40
|
-
beforeSend : function( xhr, settings )
|
41
|
-
{
|
42
|
-
},
|
43
|
-
success : function( response, text_status, xhr )
|
44
|
-
{
|
45
|
-
var self = this;
|
46
|
-
|
47
|
-
var threadDumpData = response.system.threadDump;
|
48
|
-
var threadDumpContent = [];
|
49
|
-
var c = 0;
|
50
|
-
for( var i = 1; i < threadDumpData.length; i += 2 )
|
51
|
-
{
|
52
|
-
var state = threadDumpData[i].state.esc();
|
53
|
-
var name = '<a title="' + state +'"><span>' + threadDumpData[i].name.esc() + ' (' + threadDumpData[i].id.esc() + ')</span></a>';
|
54
|
-
|
55
|
-
var classes = [state];
|
56
|
-
var details = '';
|
57
|
-
|
58
|
-
if( 0 !== c % 2 )
|
59
|
-
{
|
60
|
-
classes.push( 'odd' );
|
61
|
-
}
|
62
|
-
|
63
|
-
if( threadDumpData[i].lock )
|
64
|
-
{
|
65
|
-
classes.push( 'lock' );
|
66
|
-
name += "\n" + '<p title="Waiting on">' + threadDumpData[i].lock.esc() + '</p>';
|
67
|
-
}
|
68
|
-
|
69
|
-
if( threadDumpData[i].stackTrace && 0 !== threadDumpData[i].stackTrace.length )
|
70
|
-
{
|
71
|
-
classes.push( 'stacktrace' );
|
72
|
-
|
73
|
-
var stack_trace = threadDumpData[i].stackTrace
|
74
|
-
.join( '###' )
|
75
|
-
.esc()
|
76
|
-
.replace( /\(/g, '​(' )
|
77
|
-
.replace( /###/g, '</li><li>' );
|
78
|
-
|
79
|
-
name += '<div>' + "\n"
|
80
|
-
+ '<ul>' + "\n"
|
81
|
-
+ '<li>' + stack_trace + '</li>'
|
82
|
-
+ '</ul>' + "\n"
|
83
|
-
+ '</div>';
|
84
|
-
}
|
85
|
-
|
86
|
-
var item = '<tr class="' + classes.join( ' ' ) +'">' + "\n"
|
87
|
-
+ '<td class="name">' + name + '</td>' + "\n"
|
88
|
-
+ '<td class="time">' + threadDumpData[i].cpuTime.esc() + '<br>' + threadDumpData[i].userTime.esc() + '</td>' + "\n"
|
89
|
-
+ '</tr>';
|
90
|
-
|
91
|
-
threadDumpContent.push( item );
|
92
|
-
c++;
|
93
|
-
}
|
94
|
-
|
95
|
-
var threadDumpBody = $( '#thread-dump tbody', this );
|
96
|
-
|
97
|
-
threadDumpBody
|
98
|
-
.html( threadDumpContent.join( "\n" ) );
|
99
|
-
|
100
|
-
$( '.name a', threadDumpBody )
|
101
|
-
.die( 'click' )
|
102
|
-
.live
|
103
|
-
(
|
104
|
-
'click',
|
105
|
-
function( event )
|
106
|
-
{
|
107
|
-
$( this ).closest( 'tr' )
|
108
|
-
.toggleClass( 'open' );
|
109
|
-
}
|
110
|
-
);
|
111
|
-
|
112
|
-
$( '.controls a', this )
|
113
|
-
.die( 'click' )
|
114
|
-
.live
|
115
|
-
(
|
116
|
-
'click',
|
117
|
-
function( event )
|
118
|
-
{
|
119
|
-
var threads_element = $( self );
|
120
|
-
var is_collapsed = threads_element.hasClass( 'collapsed' );
|
121
|
-
var thread_rows = $( 'tr', threads_element );
|
122
|
-
|
123
|
-
thread_rows
|
124
|
-
.each
|
125
|
-
(
|
126
|
-
function( index, element )
|
127
|
-
{
|
128
|
-
if( is_collapsed )
|
129
|
-
{
|
130
|
-
$( element )
|
131
|
-
.addClass( 'open' );
|
132
|
-
}
|
133
|
-
else
|
134
|
-
{
|
135
|
-
$( element )
|
136
|
-
.removeClass( 'open' );
|
137
|
-
}
|
138
|
-
}
|
139
|
-
);
|
140
|
-
|
141
|
-
threads_element
|
142
|
-
.toggleClass( 'collapsed' )
|
143
|
-
.toggleClass( 'expanded' );
|
144
|
-
}
|
145
|
-
);
|
146
|
-
},
|
147
|
-
error : function( xhr, text_status, error_thrown)
|
148
|
-
{
|
149
|
-
},
|
150
|
-
complete : function( xhr, text_status )
|
151
|
-
{
|
152
|
-
}
|
153
|
-
}
|
154
|
-
);
|
155
|
-
}
|
156
|
-
);
|
157
|
-
}
|
158
|
-
);
|
1
|
+
/*
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
+
contributor license agreements. See the NOTICE file distributed with
|
4
|
+
this work for additional information regarding copyright ownership.
|
5
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
+
(the "License"); you may not use this file except in compliance with
|
7
|
+
the License. You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
*/
|
17
|
+
|
18
|
+
// #/~threads
|
19
|
+
sammy.get
|
20
|
+
(
|
21
|
+
/^#\/(~threads)$/,
|
22
|
+
function( context )
|
23
|
+
{
|
24
|
+
var content_element = $( '#content' );
|
25
|
+
|
26
|
+
$.get
|
27
|
+
(
|
28
|
+
'tpl/threads.html',
|
29
|
+
function( template )
|
30
|
+
{
|
31
|
+
content_element
|
32
|
+
.html( template );
|
33
|
+
|
34
|
+
$.ajax
|
35
|
+
(
|
36
|
+
{
|
37
|
+
url : app.config.solr_path + '/admin/info/threads?wt=json',
|
38
|
+
dataType : 'json',
|
39
|
+
context : $( '#threads', content_element ),
|
40
|
+
beforeSend : function( xhr, settings )
|
41
|
+
{
|
42
|
+
},
|
43
|
+
success : function( response, text_status, xhr )
|
44
|
+
{
|
45
|
+
var self = this;
|
46
|
+
|
47
|
+
var threadDumpData = response.system.threadDump;
|
48
|
+
var threadDumpContent = [];
|
49
|
+
var c = 0;
|
50
|
+
for( var i = 1; i < threadDumpData.length; i += 2 )
|
51
|
+
{
|
52
|
+
var state = threadDumpData[i].state.esc();
|
53
|
+
var name = '<a title="' + state +'"><span>' + threadDumpData[i].name.esc() + ' (' + threadDumpData[i].id.esc() + ')</span></a>';
|
54
|
+
|
55
|
+
var classes = [state];
|
56
|
+
var details = '';
|
57
|
+
|
58
|
+
if( 0 !== c % 2 )
|
59
|
+
{
|
60
|
+
classes.push( 'odd' );
|
61
|
+
}
|
62
|
+
|
63
|
+
if( threadDumpData[i].lock )
|
64
|
+
{
|
65
|
+
classes.push( 'lock' );
|
66
|
+
name += "\n" + '<p title="Waiting on">' + threadDumpData[i].lock.esc() + '</p>';
|
67
|
+
}
|
68
|
+
|
69
|
+
if( threadDumpData[i].stackTrace && 0 !== threadDumpData[i].stackTrace.length )
|
70
|
+
{
|
71
|
+
classes.push( 'stacktrace' );
|
72
|
+
|
73
|
+
var stack_trace = threadDumpData[i].stackTrace
|
74
|
+
.join( '###' )
|
75
|
+
.esc()
|
76
|
+
.replace( /\(/g, '​(' )
|
77
|
+
.replace( /###/g, '</li><li>' );
|
78
|
+
|
79
|
+
name += '<div>' + "\n"
|
80
|
+
+ '<ul>' + "\n"
|
81
|
+
+ '<li>' + stack_trace + '</li>'
|
82
|
+
+ '</ul>' + "\n"
|
83
|
+
+ '</div>';
|
84
|
+
}
|
85
|
+
|
86
|
+
var item = '<tr class="' + classes.join( ' ' ) +'">' + "\n"
|
87
|
+
+ '<td class="name">' + name + '</td>' + "\n"
|
88
|
+
+ '<td class="time">' + threadDumpData[i].cpuTime.esc() + '<br>' + threadDumpData[i].userTime.esc() + '</td>' + "\n"
|
89
|
+
+ '</tr>';
|
90
|
+
|
91
|
+
threadDumpContent.push( item );
|
92
|
+
c++;
|
93
|
+
}
|
94
|
+
|
95
|
+
var threadDumpBody = $( '#thread-dump tbody', this );
|
96
|
+
|
97
|
+
threadDumpBody
|
98
|
+
.html( threadDumpContent.join( "\n" ) );
|
99
|
+
|
100
|
+
$( '.name a', threadDumpBody )
|
101
|
+
.die( 'click' )
|
102
|
+
.live
|
103
|
+
(
|
104
|
+
'click',
|
105
|
+
function( event )
|
106
|
+
{
|
107
|
+
$( this ).closest( 'tr' )
|
108
|
+
.toggleClass( 'open' );
|
109
|
+
}
|
110
|
+
);
|
111
|
+
|
112
|
+
$( '.controls a', this )
|
113
|
+
.die( 'click' )
|
114
|
+
.live
|
115
|
+
(
|
116
|
+
'click',
|
117
|
+
function( event )
|
118
|
+
{
|
119
|
+
var threads_element = $( self );
|
120
|
+
var is_collapsed = threads_element.hasClass( 'collapsed' );
|
121
|
+
var thread_rows = $( 'tr', threads_element );
|
122
|
+
|
123
|
+
thread_rows
|
124
|
+
.each
|
125
|
+
(
|
126
|
+
function( index, element )
|
127
|
+
{
|
128
|
+
if( is_collapsed )
|
129
|
+
{
|
130
|
+
$( element )
|
131
|
+
.addClass( 'open' );
|
132
|
+
}
|
133
|
+
else
|
134
|
+
{
|
135
|
+
$( element )
|
136
|
+
.removeClass( 'open' );
|
137
|
+
}
|
138
|
+
}
|
139
|
+
);
|
140
|
+
|
141
|
+
threads_element
|
142
|
+
.toggleClass( 'collapsed' )
|
143
|
+
.toggleClass( 'expanded' );
|
144
|
+
}
|
145
|
+
);
|
146
|
+
},
|
147
|
+
error : function( xhr, text_status, error_thrown)
|
148
|
+
{
|
149
|
+
},
|
150
|
+
complete : function( xhr, text_status )
|
151
|
+
{
|
152
|
+
}
|
153
|
+
}
|
154
|
+
);
|
155
|
+
}
|
156
|
+
);
|
157
|
+
}
|
158
|
+
);
|