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,95 @@
|
|
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
|
+
solrAdminApp.controller('IndexController', ['$scope', 'System', 'Cores', function($scope, System, Cores) {
|
19
|
+
$scope.resetMenu("index", true);
|
20
|
+
$scope.reload = function() {
|
21
|
+
System.get(function(data) {
|
22
|
+
$scope.system = data;
|
23
|
+
|
24
|
+
// load average
|
25
|
+
load_average = ( data.system.uptime || '' ).match( /load averages?: (\d+[.,]\d\d),? (\d+[.,]\d\d),? (\d+[.,]\d\d)/ );
|
26
|
+
for (var i=0;i<2;i++) {
|
27
|
+
load_average[i]=load_average[i].replace(",","."); // for European users
|
28
|
+
}
|
29
|
+
$scope.load_average = load_average.slice(1);
|
30
|
+
|
31
|
+
// physical memory
|
32
|
+
var memoryMax = parse_memory_value(data.system.totalPhysicalMemorySize);
|
33
|
+
$scope.memoryTotal = parse_memory_value(data.system.totalPhysicalMemorySize - data.system.freePhysicalMemorySize);
|
34
|
+
$scope.memoryPercentage = ($scope.memoryTotal / memoryMax * 100).toFixed(1)+ "%";
|
35
|
+
$scope.memoryMax = pretty_print_bytes(memoryMax);
|
36
|
+
$scope.memoryTotalDisplay = pretty_print_bytes($scope.memoryTotal);
|
37
|
+
|
38
|
+
// swap space
|
39
|
+
var swapMax = parse_memory_value(data.system.totalSwapSpaceSize);
|
40
|
+
$scope.swapTotal = parse_memory_value(data.system.totalSwapSpaceSize - data.system.freeSwapSpaceSize);
|
41
|
+
$scope.swapPercentage = ($scope.swapTotal / swapMax * 100).toFixed(1)+ "%";
|
42
|
+
$scope.swapMax = pretty_print_bytes(swapMax);
|
43
|
+
$scope.swapTotalDisplay = pretty_print_bytes($scope.swapTotal);
|
44
|
+
|
45
|
+
// file handles
|
46
|
+
$scope.fileDescriptorPercentage = (data.system.openFileDescriptorCount / data.system.maxFileDescriptorCount *100).toFixed(1) + "%";
|
47
|
+
|
48
|
+
// java memory
|
49
|
+
var javaMemoryMax = parse_memory_value(data.jvm.memory.raw.max || data.jvm.memory.max);
|
50
|
+
$scope.javaMemoryTotal = parse_memory_value(data.jvm.memory.raw.total || data.jvm.memory.total);
|
51
|
+
$scope.javaMemoryUsed = parse_memory_value(data.jvm.memory.raw.used || data.jvm.memory.used);
|
52
|
+
$scope.javaMemoryTotalPercentage = ($scope.javaMemoryTotal / javaMemoryMax *100).toFixed(1) + "%";
|
53
|
+
$scope.javaMemoryUsedPercentage = ($scope.javaMemoryUsed / $scope.javaMemoryTotal *100).toFixed(1) + "%";
|
54
|
+
$scope.javaMemoryPercentage = ($scope.javaMemoryUsed / javaMemoryMax * 100).toFixed(1) + "%";
|
55
|
+
$scope.javaMemoryTotalDisplay = pretty_print_bytes($scope.javaMemoryTotal);
|
56
|
+
$scope.javaMemoryUsedDisplay = pretty_print_bytes($scope.javaMemoryUsed); // @todo These should really be an AngularJS Filter: {{ javaMemoryUsed | bytes }}
|
57
|
+
$scope.javaMemoryMax = pretty_print_bytes(javaMemoryMax);
|
58
|
+
|
59
|
+
// no info bar:
|
60
|
+
$scope.noInfo = !(
|
61
|
+
data.system.totalPhysicalMemorySize && data.system.freePhysicalMemorySize &&
|
62
|
+
data.system.totalSwapSpaceSize && data.system.freeSwapSpaceSize &&
|
63
|
+
data.system.openFileDescriptorCount && data.system.maxFileDescriptorCount);
|
64
|
+
|
65
|
+
// command line args:
|
66
|
+
$scope.commandLineArgs = data.jvm.jmx.commandLineArgs.sort();
|
67
|
+
});
|
68
|
+
};
|
69
|
+
$scope.reload();
|
70
|
+
}]);
|
71
|
+
|
72
|
+
var parse_memory_value = function( value ) {
|
73
|
+
if( value !== Number( value ) )
|
74
|
+
{
|
75
|
+
var units = 'BKMGTPEZY';
|
76
|
+
var match = value.match( /^(\d+([,\.]\d+)?) (\w).*$/ );
|
77
|
+
var value = parseFloat( match[1] ) * Math.pow( 1024, units.indexOf( match[3].toUpperCase() ) );
|
78
|
+
}
|
79
|
+
|
80
|
+
return value;
|
81
|
+
};
|
82
|
+
|
83
|
+
var pretty_print_bytes = function(byte_value) {
|
84
|
+
var unit = null;
|
85
|
+
|
86
|
+
byte_value /= 1024;
|
87
|
+
byte_value /= 1024;
|
88
|
+
unit = 'MB';
|
89
|
+
|
90
|
+
if( 1024 <= byte_value ) {
|
91
|
+
byte_value /= 1024;
|
92
|
+
unit = 'GB';
|
93
|
+
}
|
94
|
+
return byte_value.toFixed( 2 ) + ' ' + unit;
|
95
|
+
};
|
@@ -0,0 +1,45 @@
|
|
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
|
+
solrAdminApp.controller('JavaPropertiesController',
|
19
|
+
function($scope, Properties){
|
20
|
+
$scope.resetMenu("java-props", true);
|
21
|
+
$scope.refresh = function() {
|
22
|
+
Properties.get(function(data) {
|
23
|
+
var sysprops = data["system.properties"];
|
24
|
+
var sep = sysprops["path.separator"]
|
25
|
+
var props = [];
|
26
|
+
for (var key in sysprops) {
|
27
|
+
var value = sysprops[key];
|
28
|
+
var key = key.replace(/\./g, '.​');
|
29
|
+
if (key.indexOf(".path")!=-1 || key.indexOf(".dirs")) {
|
30
|
+
var values = [];
|
31
|
+
var parts = value.split(sep);
|
32
|
+
for (var i in parts) {
|
33
|
+
values.push({pos:i, value:parts[i]})
|
34
|
+
}
|
35
|
+
props.push({name: key, values: values});
|
36
|
+
} else {
|
37
|
+
props.push({name: key, values: [value]});
|
38
|
+
}
|
39
|
+
}
|
40
|
+
$scope.props = props;
|
41
|
+
});
|
42
|
+
};
|
43
|
+
|
44
|
+
$scope.refresh();
|
45
|
+
});
|
@@ -0,0 +1,146 @@
|
|
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
|
+
var format_time_content = function( time, timeZone ) {
|
19
|
+
var format_time_options = {};
|
20
|
+
if (timeZone && timeZone!="Local") {
|
21
|
+
format_time_options.timeZone = timeZone;
|
22
|
+
}
|
23
|
+
return time.toLocaleString( undefined, format_time_options );
|
24
|
+
}
|
25
|
+
|
26
|
+
solrAdminApp.controller('LoggingController',
|
27
|
+
function($scope, $timeout, $cookies, Logging){
|
28
|
+
$scope.resetMenu("logging", true);
|
29
|
+
$scope.timezone = $cookies.logging_timezone || "Local";
|
30
|
+
$scope.refresh = function() {
|
31
|
+
Logging.events(function(data) {
|
32
|
+
$scope.since = new Date();
|
33
|
+
$scope.sinceDisplay = format_time_content($scope.since, "Local");
|
34
|
+
var events = data.history.docs;
|
35
|
+
for (var i=0; i<events.length; i++) {
|
36
|
+
var event = events[i];
|
37
|
+
var time = new Date(event.time);
|
38
|
+
event.local_time = format_time_content(time, "Local");
|
39
|
+
event.utc_time = format_time_content(time, "UTC");
|
40
|
+
event.loggerBase = event.logger.split( '.' ).pop();
|
41
|
+
|
42
|
+
if( !event.trace ) {
|
43
|
+
var lines = event.message.split( "\n" );
|
44
|
+
if( lines.length > 1) {
|
45
|
+
event.trace = event.message;
|
46
|
+
event.message = lines[0];
|
47
|
+
}
|
48
|
+
}
|
49
|
+
event.message = event.message.replace(/,/g, ',​');
|
50
|
+
event.showTrace = false;
|
51
|
+
}
|
52
|
+
$scope.events = events;
|
53
|
+
$scope.watcher = data.watcher;
|
54
|
+
/* @todo sticky_mode
|
55
|
+
// state element is in viewport
|
56
|
+
sticky_mode = ( state.position().top <= $( window ).scrollTop() + $( window ).height() - ( $( 'body' ).height() - state.position().top ) );
|
57
|
+
// initial request
|
58
|
+
if( 0 === since ) {
|
59
|
+
sticky_mode = true;
|
60
|
+
}
|
61
|
+
$scope.loggingEvents = events;
|
62
|
+
|
63
|
+
if( sticky_mode )
|
64
|
+
{
|
65
|
+
$( 'body' )
|
66
|
+
.animate
|
67
|
+
(
|
68
|
+
{ scrollTop: state.position().top },
|
69
|
+
1000
|
70
|
+
);
|
71
|
+
}
|
72
|
+
*/
|
73
|
+
});
|
74
|
+
$timeout($scope.refresh, 10000);
|
75
|
+
};
|
76
|
+
$scope.refresh();
|
77
|
+
|
78
|
+
$scope.toggleTimezone = function() {
|
79
|
+
$scope.timezone = ($scope.timezone=="Local") ? "UTC":"Local";
|
80
|
+
$cookies.logging_timezone = $scope.timezone;
|
81
|
+
}
|
82
|
+
$scope.toggleRow = function(event) {
|
83
|
+
event.showTrace =! event.showTrace;
|
84
|
+
};
|
85
|
+
}
|
86
|
+
)
|
87
|
+
|
88
|
+
.controller('LoggingLevelController',
|
89
|
+
function($scope, Logging) {
|
90
|
+
$scope.resetMenu("logging-levels");
|
91
|
+
|
92
|
+
var packageOf = function(logger) {
|
93
|
+
var parts = logger.name.split(".");
|
94
|
+
return !parts.pop() ? "" : parts.join(".");
|
95
|
+
};
|
96
|
+
|
97
|
+
var shortNameOf = function(logger) {return logger.name.split(".").pop();}
|
98
|
+
|
99
|
+
var makeTree = function(loggers, packag) {
|
100
|
+
var tree = [];
|
101
|
+
for (var i=0; i<loggers.length; i++) {
|
102
|
+
var logger = loggers[i];
|
103
|
+
logger.packag = packageOf(logger);
|
104
|
+
logger.short = shortNameOf(logger);
|
105
|
+
if (logger.packag == packag) {
|
106
|
+
logger.children = makeTree(loggers, logger.name);
|
107
|
+
tree.push(logger);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
return tree;
|
111
|
+
};
|
112
|
+
|
113
|
+
$scope.refresh = function() {
|
114
|
+
Logging.levels(function(data) {
|
115
|
+
$scope.logging = makeTree(data.loggers, "");
|
116
|
+
$scope.watcher = data.watcher;
|
117
|
+
$scope.levels = [];
|
118
|
+
for (level in data.levels) {
|
119
|
+
$scope.levels.push({name:data.levels[level], pos:level});
|
120
|
+
}
|
121
|
+
});
|
122
|
+
};
|
123
|
+
|
124
|
+
$scope.toggleOptions = function(logger) {
|
125
|
+
if (logger.showOptions) {
|
126
|
+
logger.showOptions = false;
|
127
|
+
delete $scope.currentLogger;
|
128
|
+
} else {
|
129
|
+
if ($scope.currentLogger) {
|
130
|
+
$scope.currentLogger.showOptions = false;
|
131
|
+
}
|
132
|
+
logger.showOptions = true;
|
133
|
+
$scope.currentLogger = logger;
|
134
|
+
}
|
135
|
+
};
|
136
|
+
|
137
|
+
$scope.setLevel = function(logger, newLevel) {
|
138
|
+
var setString = logger.name + ":" + newLevel;
|
139
|
+
logger.showOptions = false;
|
140
|
+
Logging.setLevel({set: setString}, function(data) {
|
141
|
+
$scope.refresh();
|
142
|
+
});
|
143
|
+
};
|
144
|
+
|
145
|
+
$scope.refresh();
|
146
|
+
});
|
@@ -0,0 +1,166 @@
|
|
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
|
+
solrAdminApp.controller('PluginsController',
|
19
|
+
function($scope, $rootScope, $routeParams, $location, Mbeans) {
|
20
|
+
$scope.resetMenu("plugins");
|
21
|
+
|
22
|
+
if ($routeParams.legacytype) {
|
23
|
+
// support legacy URLs. Angular cannot change #path without reloading controller
|
24
|
+
$location.path("/"+$routeParams.core+"/plugins");
|
25
|
+
$location.search("type", $routeParams.legacytype);
|
26
|
+
return;
|
27
|
+
}
|
28
|
+
|
29
|
+
$scope.refresh = function() {
|
30
|
+
Mbeans.stats({core: $routeParams.core}, function (data) {
|
31
|
+
var type = $location.search().type;
|
32
|
+
$scope.types = getPluginTypes(data, type);
|
33
|
+
$scope.type = getSelectedType($scope.types, type);
|
34
|
+
|
35
|
+
if ($scope.type && $routeParams.entry) {
|
36
|
+
$scope.plugins = $routeParams.entry.split(",");
|
37
|
+
openPlugins($scope.type, $scope.plugins);
|
38
|
+
} else {
|
39
|
+
$scope.plugins = [];
|
40
|
+
}
|
41
|
+
});
|
42
|
+
};
|
43
|
+
|
44
|
+
$scope.selectPluginType = function(type) {
|
45
|
+
$location.search({entry:null, type: type.lower});
|
46
|
+
$scope.type = type;
|
47
|
+
};
|
48
|
+
|
49
|
+
$scope.selectPlugin = function(plugin) {
|
50
|
+
plugin.open = !plugin.open;
|
51
|
+
|
52
|
+
if (plugin.open) {
|
53
|
+
$scope.plugins.push(plugin.name);
|
54
|
+
} else {
|
55
|
+
$scope.plugins.splice($scope.plugins.indexOf(plugin.name), 1);
|
56
|
+
}
|
57
|
+
|
58
|
+
if ($scope.plugins.length==0) {
|
59
|
+
$location.search("entry", null);
|
60
|
+
} else {
|
61
|
+
$location.search("entry", $scope.plugins.join(','));
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
$scope.startRecording = function() {
|
66
|
+
$scope.isRecording = true;
|
67
|
+
Mbeans.reference({core: $routeParams.core}, function(data) {
|
68
|
+
$scope.reference = data.reference;
|
69
|
+
console.log($scope.reference);
|
70
|
+
})
|
71
|
+
}
|
72
|
+
|
73
|
+
$scope.stopRecording = function() {
|
74
|
+
$scope.isRecording = false;
|
75
|
+
console.log($scope.reference);
|
76
|
+
Mbeans.delta({core: $routeParams.core}, $scope.reference, function(data) {
|
77
|
+
parseDelta($scope.types, data);
|
78
|
+
});
|
79
|
+
}
|
80
|
+
|
81
|
+
$scope.refresh();
|
82
|
+
});
|
83
|
+
|
84
|
+
var getPluginTypes = function(data, selected) {
|
85
|
+
var keys = [];
|
86
|
+
var mbeans = data["solr-mbeans"];
|
87
|
+
for (var i=0; i<mbeans.length; i+=2) {
|
88
|
+
var key = mbeans[i];
|
89
|
+
var lower = key.toLowerCase();
|
90
|
+
var plugins = getPlugins(mbeans[i+1]);
|
91
|
+
keys.push({name: key,
|
92
|
+
selected: lower == selected,
|
93
|
+
changes: 0,
|
94
|
+
lower: lower,
|
95
|
+
plugins: plugins
|
96
|
+
});
|
97
|
+
}
|
98
|
+
keys.sort(function(a,b) {return a.name > b.name});
|
99
|
+
return keys;
|
100
|
+
};
|
101
|
+
|
102
|
+
var getPlugins = function(data) {
|
103
|
+
var plugins = [];
|
104
|
+
for (var key in data) {
|
105
|
+
var pluginProperties = data[key];
|
106
|
+
var stats = pluginProperties.stats;
|
107
|
+
delete pluginProperties.stats;
|
108
|
+
for (var stat in stats) {
|
109
|
+
// add breaking space after a bracket or @ to handle wrap long lines:
|
110
|
+
stats[stat] = new String(stats[stat]).replace( /([\(@])/g, '$1​');
|
111
|
+
}
|
112
|
+
plugin = {name: key, changed: false, stats: stats, open:false};
|
113
|
+
plugin.properties = pluginProperties;
|
114
|
+
plugins.push(plugin);
|
115
|
+
}
|
116
|
+
plugins.sort(function(a,b) {return a.name > b.name});
|
117
|
+
return plugins;
|
118
|
+
};
|
119
|
+
|
120
|
+
var getSelectedType = function(types, selected) {
|
121
|
+
if (selected) {
|
122
|
+
for (var i in types) {
|
123
|
+
if (types[i].lower == selected) {
|
124
|
+
return types[i];
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
128
|
+
};
|
129
|
+
|
130
|
+
var parseDelta = function(types, data) {
|
131
|
+
|
132
|
+
var getByName = function(list, name) {
|
133
|
+
for (var i in list) {
|
134
|
+
if (list[i].name == name) return list[i];
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
var mbeans = data["solr-mbeans"]
|
139
|
+
for (var i=0; i<mbeans.length; i+=2) {
|
140
|
+
var typeName = mbeans[i];
|
141
|
+
var type = getByName(types, typeName);
|
142
|
+
var plugins = mbeans[i+1];
|
143
|
+
for (var key in plugins) {
|
144
|
+
var changedPlugin = plugins[key];
|
145
|
+
if (changedPlugin._changed_) {
|
146
|
+
var plugin = getByName(type.plugins, key);
|
147
|
+
var stats = changedPlugin.stats;
|
148
|
+
delete changedPlugin.stats;
|
149
|
+
plugin.properties = changedPlugin;
|
150
|
+
for (var stat in stats) {
|
151
|
+
// add breaking space after a bracket or @ to handle wrap long lines:
|
152
|
+
plugin.stats[stat] = new String(stats[stat]).replace( /([\(@])/g, '$1​');
|
153
|
+
}
|
154
|
+
plugin.changed = true;
|
155
|
+
type.changes++;
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
};
|
160
|
+
|
161
|
+
var openPlugins = function(type, selected) {
|
162
|
+
for (var i in type.plugins) {
|
163
|
+
var plugin = type.plugins[i];
|
164
|
+
plugin.open = selected.indexOf(plugin.name)>=0;
|
165
|
+
}
|
166
|
+
}
|