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,284 @@
|
|
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 dataimport_timeout = 2000;
|
19
|
+
|
20
|
+
solrAdminApp.controller('DataImportController',
|
21
|
+
function($scope, $rootScope, $routeParams, $location, $timeout, $interval, $cookies, Mbeans, DataImport) {
|
22
|
+
$scope.resetMenu("dataimport");
|
23
|
+
|
24
|
+
$scope.refresh = function () {
|
25
|
+
Mbeans.info({core: $routeParams.core, cat: 'QUERYHANDLER'}, function (data) {
|
26
|
+
var mbeans = data['solr-mbeans'][1];
|
27
|
+
$scope.handlers = [];
|
28
|
+
for (var key in mbeans) {
|
29
|
+
if (mbeans[key]['class'] !== key && mbeans[key]['class'] === 'org.apache.solr.handler.dataimport.DataImportHandler') {
|
30
|
+
$scope.handlers.push(key);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
$scope.hasHandlers = $scope.handlers.length > 0;
|
34
|
+
|
35
|
+
if (!$routeParams.handler) {
|
36
|
+
$location.path("/" + $routeParams.core + "/dataimport/" + $scope.handlers[0]);
|
37
|
+
} else {
|
38
|
+
$scope.currentHandler = $routeParams.handler;
|
39
|
+
}
|
40
|
+
});
|
41
|
+
|
42
|
+
DataImport.config({core: $routeParams.core}, function (data) {
|
43
|
+
try {
|
44
|
+
var xml = $.parseXML(data.config);
|
45
|
+
} catch (err) {
|
46
|
+
$scope.hasHandlers = false;
|
47
|
+
return;
|
48
|
+
}
|
49
|
+
$scope.config = data.config;
|
50
|
+
$scope.entities = [];
|
51
|
+
$('document > entity', xml).each(function (i, element) {
|
52
|
+
$scope.entities.push($(element).attr('name'));
|
53
|
+
});
|
54
|
+
});
|
55
|
+
|
56
|
+
$scope.lastUpdate = "unknown";
|
57
|
+
$scope.lastUpdateUTC = "";
|
58
|
+
|
59
|
+
$scope.refreshStatus();
|
60
|
+
};
|
61
|
+
|
62
|
+
$scope.toggleDebug = function () {
|
63
|
+
$scope.isDebugMode = !$scope.isDebugMode;
|
64
|
+
$scope.showConfiguration = true;
|
65
|
+
}
|
66
|
+
|
67
|
+
$scope.toggleConfiguration = function () {
|
68
|
+
$scope.showConfiguration = !$scope.showConfiguration;
|
69
|
+
}
|
70
|
+
|
71
|
+
$scope.toggleRawStatus = function () {
|
72
|
+
$scope.showRawStatus = !$scope.showRawStatus;
|
73
|
+
}
|
74
|
+
|
75
|
+
$scope.toggleRawDebug = function () {
|
76
|
+
$scope.showRawDebug = !$scope.showRawDebug;
|
77
|
+
}
|
78
|
+
|
79
|
+
$scope.reload = function () {
|
80
|
+
DataImport.reload({core: $routeParams.core}, function () {
|
81
|
+
$scope.reloaded = true;
|
82
|
+
$timeout(function () {
|
83
|
+
$scope.reloaded = false;
|
84
|
+
}, 5000);
|
85
|
+
$scope.refresh();
|
86
|
+
});
|
87
|
+
}
|
88
|
+
|
89
|
+
$scope.form = {
|
90
|
+
command: "full-import",
|
91
|
+
verbose: false,
|
92
|
+
clean: true,
|
93
|
+
commit: true,
|
94
|
+
optimize: false,
|
95
|
+
showDebug: false,
|
96
|
+
custom: "",
|
97
|
+
core: $routeParams.core
|
98
|
+
};
|
99
|
+
|
100
|
+
$scope.submit = function () {
|
101
|
+
var params = {};
|
102
|
+
for (var key in $scope.form) {
|
103
|
+
params[key] = $scope.form[key];
|
104
|
+
}
|
105
|
+
if (params.custom.length) {
|
106
|
+
var customParams = $scope.form.custom.split("&");
|
107
|
+
for (var i in customParams) {
|
108
|
+
var parts = customParams[i].split("=");
|
109
|
+
params[parts[0]] = parts[1];
|
110
|
+
}
|
111
|
+
}
|
112
|
+
delete params.custom;
|
113
|
+
|
114
|
+
if (params.isDebugMode) {
|
115
|
+
params.dataConfig = $scope.rawConfig;
|
116
|
+
}
|
117
|
+
delete params.showDebug;
|
118
|
+
params.core = $routeParams.core;
|
119
|
+
|
120
|
+
DataImport.post(params, function (data) {
|
121
|
+
$scope.rawResponse = JSON.stringify(data, null, 2);
|
122
|
+
$scope.refreshStatus();
|
123
|
+
});
|
124
|
+
};
|
125
|
+
|
126
|
+
$scope.abort = function () {
|
127
|
+
$scope.isAborting = true;
|
128
|
+
DataImport.abort({core: $routeParams.core}, function () {
|
129
|
+
$timeout(function () {
|
130
|
+
$scope.isAborting = false;
|
131
|
+
$scope.refreshStatus();
|
132
|
+
}, 4000);
|
133
|
+
});
|
134
|
+
}
|
135
|
+
|
136
|
+
$scope.refreshStatus = function () {
|
137
|
+
|
138
|
+
console.log("Refresh Status");
|
139
|
+
|
140
|
+
$scope.isStatusLoading = true;
|
141
|
+
DataImport.status({core: $routeParams.core}, function (data) {
|
142
|
+
if (data[0] == "<") {
|
143
|
+
$scope.hasHandlers = false;
|
144
|
+
return;
|
145
|
+
}
|
146
|
+
|
147
|
+
var now = new Date();
|
148
|
+
$scope.lastUpdate = now.toTimeString().split(' ').shift();
|
149
|
+
$scope.lastUpdateUTC = now.toUTCString();
|
150
|
+
var messages = data.statusMessages;
|
151
|
+
var messagesCount = 0;
|
152
|
+
for( var key in messages ) { messagesCount++; }
|
153
|
+
|
154
|
+
if (data.status == 'busy') {
|
155
|
+
$scope.status = "indexing";
|
156
|
+
|
157
|
+
$scope.timeElapsed = data.statusMessages['Time Elapsed'];
|
158
|
+
$scope.elapsedSeconds = parseSeconds($scope.timeElapsed);
|
159
|
+
|
160
|
+
var info = $scope.timeElapsed ? 'Indexing since ' + $scope.timeElapsed : 'Indexing ...';
|
161
|
+
$scope.info = showInfo(messages, true, info, $scope.elapsedSeconds);
|
162
|
+
|
163
|
+
} else if (messages.RolledBack) {
|
164
|
+
$scope.status = "failure";
|
165
|
+
$scope.info = showInfo(messages, true);
|
166
|
+
} else if (messages.Aborted) {
|
167
|
+
$scope.status = "aborted";
|
168
|
+
$scope.info = showInfo(messages, true, 'Aborting current Import ...');
|
169
|
+
} else if (data.status == "idle" && messagesCount != 0) {
|
170
|
+
$scope.status = "success";
|
171
|
+
$scope.info = showInfo(messages, true);
|
172
|
+
} else {
|
173
|
+
$scope.status = "idle";
|
174
|
+
$scope.info = showInfo(messages, false, 'No information available (idle)');
|
175
|
+
}
|
176
|
+
|
177
|
+
delete data.$promise;
|
178
|
+
delete data.$resolved;
|
179
|
+
|
180
|
+
$scope.rawStatus = JSON.stringify(data, null, 2);
|
181
|
+
|
182
|
+
$scope.isStatusLoading = false;
|
183
|
+
$scope.statusUpdated = true;
|
184
|
+
$timeout(function () {
|
185
|
+
$scope.statusUpdated = false;
|
186
|
+
}, dataimport_timeout / 2);
|
187
|
+
});
|
188
|
+
};
|
189
|
+
|
190
|
+
$scope.updateAutoRefresh = function () {
|
191
|
+
$scope.autorefresh = !$scope.autorefresh;
|
192
|
+
$cookies.dataimport_autorefresh = $scope.autorefresh ? true : null;
|
193
|
+
if ($scope.autorefresh) {
|
194
|
+
$scope.refreshTimeout = $interval($scope.refreshStatus, dataimport_timeout);
|
195
|
+
} else if ($scope.refreshTimeout) {
|
196
|
+
$interval.cancel($scope.refreshTimeout);
|
197
|
+
}
|
198
|
+
$scope.refreshStatus();
|
199
|
+
};
|
200
|
+
|
201
|
+
$scope.refresh();
|
202
|
+
|
203
|
+
});
|
204
|
+
|
205
|
+
var showInfo = function (messages, showFull, info_text, elapsed_seconds) {
|
206
|
+
|
207
|
+
var info = {};
|
208
|
+
if (info_text) {
|
209
|
+
info.text = info_text;
|
210
|
+
} else {
|
211
|
+
info.text = messages[''] || '';
|
212
|
+
// format numbers included in status nicely
|
213
|
+
/* @todo this pretty printing is hard to work out how to do in an Angularesque way:
|
214
|
+
info.text = info.text.replace(/\d{4,}/g,
|
215
|
+
function (match, position, string) {
|
216
|
+
return app.format_number(parseInt(match, 10));
|
217
|
+
}
|
218
|
+
);
|
219
|
+
*/
|
220
|
+
|
221
|
+
var time_taken_text = messages['Time taken'];
|
222
|
+
info.timeTaken = parseSeconds(time_taken_text);
|
223
|
+
}
|
224
|
+
info.showDetails = false;
|
225
|
+
|
226
|
+
if (showFull) {
|
227
|
+
if (!elapsed_seconds) {
|
228
|
+
var time_taken_text = messages['Time taken'];
|
229
|
+
elapsed_seconds = parseSeconds(time_taken_text);
|
230
|
+
}
|
231
|
+
|
232
|
+
info.showDetails = true;
|
233
|
+
|
234
|
+
var document_config = {
|
235
|
+
'Requests': 'Total Requests made to DataSource',
|
236
|
+
'Fetched': 'Total Rows Fetched',
|
237
|
+
'Skipped': 'Total Documents Skipped',
|
238
|
+
'Processed': 'Total Documents Processed'
|
239
|
+
};
|
240
|
+
|
241
|
+
info.docs = [];
|
242
|
+
for (var key in document_config) {
|
243
|
+
var value = parseInt(messages[document_config[key]], 10);
|
244
|
+
var doc = {desc: document_config[key], name: key, value: value};
|
245
|
+
if (elapsed_seconds && key != 'Skipped') {
|
246
|
+
doc.speed = Math.round(value / elapsed_seconds);
|
247
|
+
}
|
248
|
+
info.docs.push(doc);
|
249
|
+
}
|
250
|
+
|
251
|
+
var dates_config = {
|
252
|
+
'Started': 'Full Dump Started',
|
253
|
+
'Aborted': 'Aborted',
|
254
|
+
'Rolledback': 'Rolledback'
|
255
|
+
};
|
256
|
+
|
257
|
+
info.dates = [];
|
258
|
+
for (var key in dates_config) {
|
259
|
+
var value = messages[dates_config[key]];
|
260
|
+
if (value) {
|
261
|
+
value = value.replace(" ", "T")+".000Z";
|
262
|
+
console.log(value);
|
263
|
+
var date = {desc: dates_config[key], name: key, value: value};
|
264
|
+
info.dates.push(date);
|
265
|
+
}
|
266
|
+
}
|
267
|
+
}
|
268
|
+
return info;
|
269
|
+
}
|
270
|
+
|
271
|
+
var parseSeconds = function(time) {
|
272
|
+
var seconds = 0;
|
273
|
+
var arr = new String(time || '').split('.');
|
274
|
+
var parts = arr[0].split(':').reverse();
|
275
|
+
|
276
|
+
for (var i = 0; i < parts.length; i++) {
|
277
|
+
seconds += ( parseInt(parts[i], 10) || 0 ) * Math.pow(60, i);
|
278
|
+
}
|
279
|
+
|
280
|
+
if (arr[1] && 5 <= parseInt(arr[1][0], 10)) {
|
281
|
+
seconds++; // treat more or equal than .5 as additional second
|
282
|
+
}
|
283
|
+
return seconds;
|
284
|
+
}
|
@@ -0,0 +1,139 @@
|
|
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
|
+
//helper for formatting JSON and others
|
18
|
+
|
19
|
+
var DOC_PLACEHOLDER = '<doc>\n' +
|
20
|
+
'<field name="id">change.me</field>' +
|
21
|
+
'<field name="title">change.me</field>' +
|
22
|
+
'</doc>';
|
23
|
+
|
24
|
+
var ADD_PLACEHOLDER = '<add>\n' + DOC_PLACEHOLDER + '</add>\n';
|
25
|
+
|
26
|
+
solrAdminApp.controller('DocumentsController',
|
27
|
+
function($scope, $rootScope, $routeParams, $location, Luke, Update, FileUpload) {
|
28
|
+
$scope.resetMenu("documents");
|
29
|
+
|
30
|
+
$scope.refresh = function () {
|
31
|
+
Luke.schema({core: $routeParams.core}, function(data) {
|
32
|
+
//TODO: handle dynamic fields
|
33
|
+
delete data.schema.fields._version_;
|
34
|
+
$scope.fields = Object.keys(data.schema.fields);
|
35
|
+
});
|
36
|
+
$scope.document = "";
|
37
|
+
$scope.handler = "/update";
|
38
|
+
$scope.type = "json";
|
39
|
+
$scope.commitWithin = 1000;
|
40
|
+
$scope.overwrite = true;
|
41
|
+
$scope.boost = "1.0";
|
42
|
+
};
|
43
|
+
|
44
|
+
$scope.refresh();
|
45
|
+
|
46
|
+
$scope.changeDocumentType = function () {
|
47
|
+
$scope.placeholder = "";
|
48
|
+
if ($scope.type == 'json') {
|
49
|
+
$scope.placeholder = '{"id":"change.me","title":"change.me"}';
|
50
|
+
} else if ($scope.type == 'csv') {
|
51
|
+
$scope.placeholder = "id,title\nchange.me,change.me";
|
52
|
+
} else if ($scope.type == 'solr') {
|
53
|
+
$scope.placeholder = ADD_PLACEHOLDER;
|
54
|
+
} else if ($scope.type == 'xml') {
|
55
|
+
$scope.placeholder = DOC_PLACEHOLDER;
|
56
|
+
}
|
57
|
+
};
|
58
|
+
|
59
|
+
$scope.addWizardField = function () {
|
60
|
+
if ($scope.document == "") $scope.document = "{}";
|
61
|
+
var doc = JSON.parse($scope.document);
|
62
|
+
doc[$scope.fieldName] = $scope.fieldData;
|
63
|
+
$scope.document = JSON.stringify(doc, null, '\t');
|
64
|
+
$scope.fieldData = "";
|
65
|
+
};
|
66
|
+
|
67
|
+
$scope.submit = function () {
|
68
|
+
var contentType = "";
|
69
|
+
var postData = "";
|
70
|
+
var params = {};
|
71
|
+
var doingFileUpload = false;
|
72
|
+
|
73
|
+
if ($scope.handler[0] == '/') {
|
74
|
+
params.handler = $scope.handler.substring(1);
|
75
|
+
} else {
|
76
|
+
params.handler = 'update';
|
77
|
+
params.qt = $scope.handler;
|
78
|
+
}
|
79
|
+
|
80
|
+
params.commitWithin = $scope.commitWithin;
|
81
|
+
params.boost = $scope.boost;
|
82
|
+
params.overwrite = $scope.overwrite;
|
83
|
+
params.core = $routeParams.core;
|
84
|
+
params.wt = "json";
|
85
|
+
|
86
|
+
if ($scope.type == "json" || $scope.type == "wizard") {
|
87
|
+
postData = "[" + $scope.document + "]";
|
88
|
+
contentType = "json";
|
89
|
+
} else if ($scope.type == "csv") {
|
90
|
+
postData = $scope.document;
|
91
|
+
contentType = "csv";
|
92
|
+
} else if ($scope.type == "xml") {
|
93
|
+
postData = "<add>" + $scope.document + "</add>";
|
94
|
+
contentType = "xml";
|
95
|
+
} else if ($scope.type == "upload") {
|
96
|
+
doingFileUpload = true;
|
97
|
+
params.raw = $scope.literalParams;
|
98
|
+
} else if ($scope.type == "solr") {
|
99
|
+
postData = $scope.document;
|
100
|
+
if (postData[0] == "<") {
|
101
|
+
contentType = "xml";
|
102
|
+
} else if (postData[0] == "{" || postData[0] == '[') {
|
103
|
+
contentType = "json";
|
104
|
+
} else {
|
105
|
+
alert("Cannot identify content type")
|
106
|
+
}
|
107
|
+
}
|
108
|
+
if (!doingFileUpload) {
|
109
|
+
var callback = function (success) {
|
110
|
+
$scope.responseStatus = "success";
|
111
|
+
delete success.$promise;
|
112
|
+
delete success.$resolved;
|
113
|
+
$scope.response = JSON.stringify(success, null, ' ');
|
114
|
+
};
|
115
|
+
var failure = function (failure) {
|
116
|
+
$scope.responseStatus = failure;
|
117
|
+
};
|
118
|
+
if (contentType == "json") {
|
119
|
+
Update.postJson(params, postData, callack, failure);
|
120
|
+
} else if (contentType == "xml") {
|
121
|
+
Update.postXml(params, postData, callback, failure);
|
122
|
+
} else if (contentType == "csv") {
|
123
|
+
Update.postCsv(params, postData, callback, failure);
|
124
|
+
}
|
125
|
+
} else {
|
126
|
+
var file = $scope.fileUpload;
|
127
|
+
console.log('file is ' + JSON.stringify(file));
|
128
|
+
var uploadUrl = "/fileUpload";
|
129
|
+
FileUpload.upload(params, $scope.fileUpload, function (success) {
|
130
|
+
$scope.responseStatus = "success";
|
131
|
+
$scope.response = JSON.stringify(success, null, ' ');
|
132
|
+
}, function (failure) {
|
133
|
+
$scope.responseStatus = "failure";
|
134
|
+
$scope.response = JSON.stringify(failure, null, ' ');
|
135
|
+
});
|
136
|
+
}
|
137
|
+
}
|
138
|
+
});
|
139
|
+
|
@@ -0,0 +1,92 @@
|
|
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 contentTypeMap = { xml : 'text/xml', html : 'text/html', js : 'text/javascript', json : 'application/json', 'css' : 'text/css' };
|
19
|
+
var languages = {js: "javascript", xml:"xml", xsl:"xml", vm: "xml", html: "xml", json: "text", css: "css"};
|
20
|
+
|
21
|
+
solrAdminApp.controller('FilesController',
|
22
|
+
function($scope, $rootScope, $routeParams, $location, Files) {
|
23
|
+
$scope.resetMenu("files");
|
24
|
+
|
25
|
+
$scope.file = $location.search().file;
|
26
|
+
$scope.content = null;
|
27
|
+
|
28
|
+
$scope.baseurl = $location.protocol()+ "://" + $location.host() + ":" + $location.port();
|
29
|
+
|
30
|
+
$scope.refresh = function () {
|
31
|
+
|
32
|
+
var process = function (path, tree) {
|
33
|
+
var params = {core: $routeParams.core};
|
34
|
+
if (path.slice(-1) == '/') {
|
35
|
+
params.file = path.slice(0, -1);
|
36
|
+
} else if (path!='') {
|
37
|
+
params.file = path;
|
38
|
+
}
|
39
|
+
|
40
|
+
Files.list(params, function (data) {
|
41
|
+
for (var file in data.files) {
|
42
|
+
var filedata = data.files[file];
|
43
|
+
var state = undefined;
|
44
|
+
var children = undefined;
|
45
|
+
|
46
|
+
if (filedata.directory) {
|
47
|
+
file = file + "/";
|
48
|
+
if ($scope.file && $scope.file.indexOf(path + file) == 0) {
|
49
|
+
state = "open";
|
50
|
+
} else {
|
51
|
+
state = "closed";
|
52
|
+
}
|
53
|
+
children = [];
|
54
|
+
process(path + file, children);
|
55
|
+
}
|
56
|
+
tree.push({
|
57
|
+
data: {
|
58
|
+
title: file,
|
59
|
+
attr: { id: path + file}
|
60
|
+
},
|
61
|
+
children: children,
|
62
|
+
state: state
|
63
|
+
});
|
64
|
+
}
|
65
|
+
});
|
66
|
+
}
|
67
|
+
$scope.tree = [];
|
68
|
+
process("", $scope.tree);
|
69
|
+
|
70
|
+
if ($scope.file && $scope.file != '' && $scope.file.split('').pop()!='/') {
|
71
|
+
var extension = $scope.file.match( /\.(\w+)$/)[1] || '';
|
72
|
+
var contentType = (contentTypeMap[extension] || 'text/plain' ) + ';charset=utf-8';
|
73
|
+
|
74
|
+
Files.get({core: $routeParams.core, file: $scope.file, contentType: contentType}, function(data) {
|
75
|
+
$scope.content = data.data;
|
76
|
+
$scope.url = $scope.baseurl + data.config.url + "?" + $.param(data.config.params);
|
77
|
+
if (contentType.indexOf("text/plain") && data.data.indexOf("<?xml") || data.data.indexOf("<!--")) {
|
78
|
+
$scope.lang = "xml";
|
79
|
+
} else {
|
80
|
+
$scope.lang = languages[extension] || "text";
|
81
|
+
}
|
82
|
+
});
|
83
|
+
}
|
84
|
+
};
|
85
|
+
|
86
|
+
$scope.showTreeLink = function(data) {
|
87
|
+
var file = data.args[0].id;
|
88
|
+
$location.search({file:file});
|
89
|
+
};
|
90
|
+
|
91
|
+
$scope.refresh();
|
92
|
+
});
|