rjack-solr 3.6.2.0-java → 4.0.0.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +5 -0
- data/Manifest.txt +268 -33
- data/NOTICE.txt +1 -1
- data/README.rdoc +6 -6
- data/assembly.xml +2 -2
- data/bin/rjack-solr-fg +1 -1
- data/init/rjack-solr +2 -2
- data/lib/rjack-solr.rb +7 -2
- data/lib/rjack-solr/base.rb +2 -2
- data/lib/rjack-solr/commons-cli-1.2.jar +0 -0
- data/lib/rjack-solr/config.rb +1 -1
- data/lib/rjack-solr/server.rb +1 -1
- data/lib/rjack-solr/solr-core-4.0.0.jar +0 -0
- data/lib/rjack-solr/solr-solrj-4.0.0.jar +0 -0
- data/pom.xml +19 -6
- data/test/test_solr.rb +7 -5
- data/webapp/META-INF/LICENSE.txt +0 -940
- data/webapp/META-INF/MANIFEST.MF +5 -5
- data/webapp/META-INF/NOTICE.txt +160 -93
- data/webapp/WEB-INF/web.xml +57 -43
- data/webapp/admin.html +140 -0
- data/webapp/css/chosen.css +392 -0
- data/webapp/css/styles/analysis.css +293 -0
- data/webapp/css/styles/cloud.css +331 -0
- data/webapp/css/styles/common.css +593 -0
- data/webapp/css/styles/cores.css +203 -0
- data/webapp/css/styles/dashboard.css +127 -0
- data/webapp/css/styles/dataimport.css +222 -0
- data/webapp/css/styles/index.css +195 -0
- data/webapp/css/styles/java-properties.css +33 -0
- data/webapp/css/styles/logging.css +323 -0
- data/webapp/css/styles/menu.css +272 -0
- data/webapp/css/styles/plugins.css +175 -0
- data/webapp/css/styles/query.css +137 -0
- data/webapp/css/styles/replication.css +494 -0
- data/webapp/css/styles/schema-browser.css +476 -0
- data/webapp/css/styles/threads.css +153 -0
- data/webapp/img/ZeroClipboard.swf +0 -0
- data/webapp/img/chosen-sprite.png +0 -0
- data/webapp/img/div.gif +0 -0
- data/webapp/{admin → img}/favicon.ico +0 -0
- data/webapp/img/filetypes/7z.png +0 -0
- data/webapp/img/filetypes/README +27 -0
- data/webapp/img/filetypes/ai.png +0 -0
- data/webapp/img/filetypes/aiff.png +0 -0
- data/webapp/img/filetypes/asc.png +0 -0
- data/webapp/img/filetypes/audio.png +0 -0
- data/webapp/img/filetypes/bin.png +0 -0
- data/webapp/img/filetypes/bz2.png +0 -0
- data/webapp/img/filetypes/c.png +0 -0
- data/webapp/img/filetypes/cfc.png +0 -0
- data/webapp/img/filetypes/cfm.png +0 -0
- data/webapp/img/filetypes/chm.png +0 -0
- data/webapp/img/filetypes/class.png +0 -0
- data/webapp/img/filetypes/conf.png +0 -0
- data/webapp/img/filetypes/cpp.png +0 -0
- data/webapp/img/filetypes/cs.png +0 -0
- data/webapp/img/filetypes/css.png +0 -0
- data/webapp/img/filetypes/csv.png +0 -0
- data/webapp/img/filetypes/deb.png +0 -0
- data/webapp/img/filetypes/divx.png +0 -0
- data/webapp/img/filetypes/doc.png +0 -0
- data/webapp/img/filetypes/dot.png +0 -0
- data/webapp/img/filetypes/eml.png +0 -0
- data/webapp/img/filetypes/enc.png +0 -0
- data/webapp/img/filetypes/file.png +0 -0
- data/webapp/img/filetypes/gif.png +0 -0
- data/webapp/img/filetypes/gz.png +0 -0
- data/webapp/img/filetypes/hlp.png +0 -0
- data/webapp/img/filetypes/htm.png +0 -0
- data/webapp/img/filetypes/html.png +0 -0
- data/webapp/img/filetypes/image.png +0 -0
- data/webapp/img/filetypes/iso.png +0 -0
- data/webapp/img/filetypes/jar.png +0 -0
- data/webapp/img/filetypes/java.png +0 -0
- data/webapp/img/filetypes/jpeg.png +0 -0
- data/webapp/img/filetypes/jpg.png +0 -0
- data/webapp/img/filetypes/js.png +0 -0
- data/webapp/img/filetypes/lua.png +0 -0
- data/webapp/img/filetypes/m.png +0 -0
- data/webapp/img/filetypes/mm.png +0 -0
- data/webapp/img/filetypes/mov.png +0 -0
- data/webapp/img/filetypes/mp3.png +0 -0
- data/webapp/img/filetypes/mpg.png +0 -0
- data/webapp/img/filetypes/odc.png +0 -0
- data/webapp/img/filetypes/odf.png +0 -0
- data/webapp/img/filetypes/odg.png +0 -0
- data/webapp/img/filetypes/odi.png +0 -0
- data/webapp/img/filetypes/odp.png +0 -0
- data/webapp/img/filetypes/ods.png +0 -0
- data/webapp/img/filetypes/odt.png +0 -0
- data/webapp/img/filetypes/ogg.png +0 -0
- data/webapp/img/filetypes/pdf.png +0 -0
- data/webapp/img/filetypes/pgp.png +0 -0
- data/webapp/img/filetypes/php.png +0 -0
- data/webapp/img/filetypes/pl.png +0 -0
- data/webapp/img/filetypes/png.png +0 -0
- data/webapp/img/filetypes/ppt.png +0 -0
- data/webapp/img/filetypes/ps.png +0 -0
- data/webapp/img/filetypes/py.png +0 -0
- data/webapp/img/filetypes/ram.png +0 -0
- data/webapp/img/filetypes/rar.png +0 -0
- data/webapp/img/filetypes/rb.png +0 -0
- data/webapp/img/filetypes/rm.png +0 -0
- data/webapp/img/filetypes/rpm.png +0 -0
- data/webapp/img/filetypes/rtf.png +0 -0
- data/webapp/img/filetypes/sig.png +0 -0
- data/webapp/img/filetypes/sql.png +0 -0
- data/webapp/img/filetypes/swf.png +0 -0
- data/webapp/img/filetypes/sxc.png +0 -0
- data/webapp/img/filetypes/sxd.png +0 -0
- data/webapp/img/filetypes/sxi.png +0 -0
- data/webapp/img/filetypes/sxw.png +0 -0
- data/webapp/img/filetypes/tar.png +0 -0
- data/webapp/img/filetypes/tex.png +0 -0
- data/webapp/img/filetypes/tgz.png +0 -0
- data/webapp/img/filetypes/txt.png +0 -0
- data/webapp/img/filetypes/vcf.png +0 -0
- data/webapp/img/filetypes/video.png +0 -0
- data/webapp/img/filetypes/vsd.png +0 -0
- data/webapp/img/filetypes/wav.png +0 -0
- data/webapp/img/filetypes/wma.png +0 -0
- data/webapp/img/filetypes/wmv.png +0 -0
- data/webapp/img/filetypes/xls.png +0 -0
- data/webapp/img/filetypes/xml.png +0 -0
- data/webapp/img/filetypes/xpi.png +0 -0
- data/webapp/img/filetypes/xvid.png +0 -0
- data/webapp/img/filetypes/zip.png +0 -0
- data/webapp/img/ico/arrow-000-small.png +0 -0
- data/webapp/img/ico/arrow-circle.png +0 -0
- data/webapp/img/ico/arrow-switch.png +0 -0
- data/webapp/img/ico/asterisk.png +0 -0
- data/webapp/img/ico/battery.png +0 -0
- data/webapp/img/ico/block-small.png +0 -0
- data/webapp/img/ico/block.png +0 -0
- data/webapp/img/ico/book-open-text.png +0 -0
- data/webapp/img/ico/box.png +0 -0
- data/webapp/img/ico/bug.png +0 -0
- data/webapp/img/ico/chart.png +0 -0
- data/webapp/img/ico/chevron-small-expand.png +0 -0
- data/webapp/img/ico/chevron-small.png +0 -0
- data/webapp/img/ico/clipboard-list.png +0 -0
- data/webapp/img/ico/clipboard-paste-document-text.png +0 -0
- data/webapp/img/ico/clipboard-paste.png +0 -0
- data/webapp/img/ico/clock-select-remain.png +0 -0
- data/webapp/img/ico/clock-select.png +0 -0
- data/webapp/img/ico/construction.png +0 -0
- data/webapp/img/ico/cross-0.png +0 -0
- data/webapp/img/ico/cross-1.png +0 -0
- data/webapp/img/ico/cross.png +0 -0
- data/webapp/img/ico/dashboard.png +0 -0
- data/webapp/img/ico/database.png +0 -0
- data/webapp/img/ico/databases.png +0 -0
- data/webapp/img/ico/disk-black.png +0 -0
- data/webapp/img/ico/document-convert.png +0 -0
- data/webapp/img/ico/document-import.png +0 -0
- data/webapp/img/ico/document-list.png +0 -0
- data/webapp/img/ico/document-text.png +0 -0
- data/webapp/img/ico/download-cloud.png +0 -0
- data/webapp/img/ico/exclamation-button.png +0 -0
- data/webapp/img/ico/eye.png +0 -0
- data/webapp/img/ico/folder-export.png +0 -0
- data/webapp/img/ico/folder-tree.png +0 -0
- data/webapp/img/ico/folder.png +0 -0
- data/webapp/img/ico/funnel-small.png +0 -0
- data/webapp/img/ico/funnel.png +0 -0
- data/webapp/img/ico/gear.png +0 -0
- data/webapp/img/ico/globe-network.png +0 -0
- data/webapp/img/ico/globe.png +0 -0
- data/webapp/img/ico/hammer-screwdriver.png +0 -0
- data/webapp/img/ico/hand.png +0 -0
- data/webapp/img/ico/highlighter-text.png +0 -0
- data/webapp/img/ico/hourglass--exclamation.png +0 -0
- data/webapp/img/ico/hourglass.png +0 -0
- data/webapp/img/ico/inbox-document-text.png +0 -0
- data/webapp/img/ico/information-button.png +0 -0
- data/webapp/img/ico/information-small.png +0 -0
- data/webapp/img/ico/information-white.png +0 -0
- data/webapp/img/ico/information.png +0 -0
- data/webapp/img/ico/jar.png +0 -0
- data/webapp/img/ico/magnifier.png +0 -0
- data/webapp/img/ico/mail.png +0 -0
- data/webapp/img/ico/memory.png +0 -0
- data/webapp/img/ico/molecule.png +0 -0
- data/webapp/img/ico/network-cloud.png +0 -0
- data/webapp/img/ico/network-status-away.png +0 -0
- data/webapp/img/ico/network-status-busy.png +0 -0
- data/webapp/img/ico/network-status-offline.png +0 -0
- data/webapp/img/ico/network-status.png +0 -0
- data/webapp/img/ico/network.png +0 -0
- data/webapp/img/ico/node-design.png +0 -0
- data/webapp/img/ico/node-master.png +0 -0
- data/webapp/img/ico/node-select.png +0 -0
- data/webapp/img/ico/node-slave.png +0 -0
- data/webapp/img/ico/node.png +0 -0
- data/webapp/img/ico/pencil-small.png +0 -0
- data/webapp/img/ico/plus-button.png +0 -0
- data/webapp/img/ico/processor.png +0 -0
- data/webapp/img/ico/prohibition.png +0 -0
- data/webapp/img/ico/property.png +0 -0
- data/webapp/img/ico/question-small-white.png +0 -0
- data/webapp/img/ico/question-white.png +0 -0
- data/webapp/img/ico/question.png +0 -0
- data/webapp/img/ico/receipt-invoice.png +0 -0
- data/webapp/img/ico/receipt.png +0 -0
- data/webapp/img/ico/script-code.png +0 -0
- data/webapp/img/ico/server-cast.png +0 -0
- data/webapp/img/ico/server.png +0 -0
- data/webapp/img/ico/sitemap.png +0 -0
- data/webapp/img/ico/slash.png +0 -0
- data/webapp/img/ico/status-away.png +0 -0
- data/webapp/img/ico/status-busy.png +0 -0
- data/webapp/img/ico/status-offline.png +0 -0
- data/webapp/img/ico/status.png +0 -0
- data/webapp/img/ico/system-monitor--exclamation.png +0 -0
- data/webapp/img/ico/system-monitor.png +0 -0
- data/webapp/img/ico/table.png +0 -0
- data/webapp/img/ico/terminal.png +0 -0
- data/webapp/img/ico/tick-circle.png +0 -0
- data/webapp/img/ico/tick-red.png +0 -0
- data/webapp/img/ico/tick.png +0 -0
- data/webapp/img/ico/toggle-small-expand.png +0 -0
- data/webapp/img/ico/toggle-small.png +0 -0
- data/webapp/img/ico/toolbox.png +0 -0
- data/webapp/img/ico/ui-accordion.png +0 -0
- data/webapp/img/ico/ui-address-bar.png +0 -0
- data/webapp/img/ico/ui-check-box-uncheck.png +0 -0
- data/webapp/img/ico/ui-check-box.png +0 -0
- data/webapp/img/ico/ui-radio-button-uncheck.png +0 -0
- data/webapp/img/ico/ui-radio-button.png +0 -0
- data/webapp/img/ico/ui-text-field-select.png +0 -0
- data/webapp/img/ico/users.png +0 -0
- data/webapp/img/ico/wooden-box.png +0 -0
- data/webapp/img/ico/zone.png +0 -0
- data/webapp/img/loader-light.gif +0 -0
- data/webapp/img/loader.gif +0 -0
- data/webapp/img/lucene-ico.png +0 -0
- data/webapp/img/solr-ico.png +0 -0
- data/webapp/{admin/solr_small.png → img/solr.png} +0 -0
- data/webapp/img/tree.png +0 -0
- data/webapp/js/lib/ZeroClipboard.js +317 -0
- data/webapp/js/lib/chosen.js +953 -0
- data/webapp/{admin/get-properties.jsp → js/lib/console.js} +13 -10
- data/webapp/js/lib/d3.js +9342 -0
- data/webapp/js/lib/highlight.js +1 -0
- data/webapp/{admin/jquery-1.4.3.min.js → js/lib/jquery-1.7.2.min.js} +0 -0
- data/webapp/js/lib/jquery.blockUI.js +499 -0
- data/webapp/js/lib/jquery.cookie.js +47 -0
- data/webapp/js/lib/jquery.form.js +782 -0
- data/webapp/js/lib/jquery.jstree.js +3510 -0
- data/webapp/js/lib/jquery.sammy.js +1856 -0
- data/webapp/js/lib/jquery.sparkline.js +1271 -0
- data/webapp/js/lib/jquery.timeago.js +165 -0
- data/webapp/js/lib/linker.js +48 -0
- data/webapp/js/lib/order.js +189 -0
- data/webapp/js/main.js +57 -0
- data/webapp/js/require.js +11319 -0
- data/webapp/js/scripts/analysis.js +549 -0
- data/webapp/js/scripts/app.js +368 -0
- data/webapp/js/scripts/cloud.js +719 -0
- data/webapp/js/scripts/cores.js +540 -0
- data/webapp/js/scripts/dashboard.js +540 -0
- data/webapp/js/scripts/dataimport.js +567 -0
- data/webapp/js/scripts/file.js +56 -0
- data/webapp/js/scripts/index.js +344 -0
- data/webapp/js/scripts/java-properties.js +107 -0
- data/webapp/js/scripts/logging.js +519 -0
- data/webapp/js/scripts/ping.js +72 -0
- data/webapp/js/scripts/plugins.js +426 -0
- data/webapp/js/scripts/query.js +170 -0
- data/webapp/js/scripts/replication.js +557 -0
- data/webapp/js/scripts/schema-browser.js +1206 -0
- data/webapp/js/scripts/threads.js +159 -0
- data/webapp/tpl/analysis.html +83 -0
- data/webapp/tpl/cloud.html +54 -0
- data/webapp/tpl/cores.html +215 -0
- data/webapp/tpl/dashboard.html +164 -0
- data/webapp/tpl/dataimport.html +123 -0
- data/webapp/tpl/index.html +250 -0
- data/webapp/tpl/logging.html +23 -0
- data/webapp/tpl/plugins.html +39 -0
- data/webapp/tpl/query.html +318 -0
- data/webapp/tpl/replication.html +207 -0
- data/webapp/tpl/schema-browser.html +178 -0
- data/webapp/tpl/threads.html +56 -0
- metadata +307 -40
- data/lib/rjack-solr/solr-core-3.6.2.jar +0 -0
- data/lib/rjack-solr/solr-solrj-3.6.2.jar +0 -0
- data/webapp/admin/_info.jsp +0 -120
- data/webapp/admin/action.jsp +0 -94
- data/webapp/admin/analysis.jsp +0 -496
- data/webapp/admin/analysis.xsl +0 -179
- data/webapp/admin/dataimport.jsp +0 -53
- data/webapp/admin/debug.jsp +0 -103
- data/webapp/admin/distributiondump.jsp +0 -160
- data/webapp/admin/form.jsp +0 -152
- data/webapp/admin/get-file.jsp +0 -72
- data/webapp/admin/header.jsp +0 -44
- data/webapp/admin/index.jsp +0 -162
- data/webapp/admin/meta.xsl +0 -34
- data/webapp/admin/ping.jsp +0 -52
- data/webapp/admin/ping.xsl +0 -71
- data/webapp/admin/raw-schema.jsp +0 -38
- data/webapp/admin/registry.jsp +0 -107
- data/webapp/admin/registry.xsl +0 -321
- data/webapp/admin/replication/header.jsp +0 -89
- data/webapp/admin/replication/index.jsp +0 -378
- data/webapp/admin/schema.jsp +0 -690
- data/webapp/admin/solr-admin.css +0 -215
- data/webapp/admin/stats.jsp +0 -92
- data/webapp/admin/stats.xsl +0 -220
- data/webapp/admin/tabular.xsl +0 -141
- data/webapp/admin/threaddump.jsp +0 -110
- data/webapp/admin/threaddump.xsl +0 -103
- data/webapp/index.jsp +0 -49
@@ -0,0 +1,540 @@
|
|
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 set_healthcheck_status = function( status )
|
19
|
+
{
|
20
|
+
var hc_button = $( '.healthcheck-status' )
|
21
|
+
if ( status == 'enable' )
|
22
|
+
{
|
23
|
+
hc_button.parents( 'dd' )
|
24
|
+
.removeClass( 'ico-0' )
|
25
|
+
.addClass( 'ico-1' );
|
26
|
+
hc_button
|
27
|
+
.addClass( 'enabled' )
|
28
|
+
.html( 'disable ping' );
|
29
|
+
} else {
|
30
|
+
hc_button.parents( 'dd' )
|
31
|
+
.removeClass( 'ico-1')
|
32
|
+
.addClass( 'ico-0' );
|
33
|
+
hc_button
|
34
|
+
.removeClass( 'enabled' )
|
35
|
+
.html( 'enable ping' );
|
36
|
+
}
|
37
|
+
};
|
38
|
+
|
39
|
+
// #/:core
|
40
|
+
sammy.get
|
41
|
+
(
|
42
|
+
/^#\/([\w\d-]+)$/,
|
43
|
+
function( context )
|
44
|
+
{
|
45
|
+
var core_basepath = this.active_core.attr( 'data-basepath' );
|
46
|
+
var content_element = $( '#content' );
|
47
|
+
|
48
|
+
content_element
|
49
|
+
.removeClass( 'single' );
|
50
|
+
|
51
|
+
var core_menu = this.active_core.closest( 'ul' );
|
52
|
+
if( !core_menu.data( 'admin-extra-loaded' ) )
|
53
|
+
{
|
54
|
+
core_menu.data( 'admin-extra-loaded', new Date() );
|
55
|
+
|
56
|
+
$.get
|
57
|
+
(
|
58
|
+
core_basepath + '/admin/file/?file=admin-extra.menu-top.html',
|
59
|
+
function( menu_extra )
|
60
|
+
{
|
61
|
+
core_menu
|
62
|
+
.prepend( menu_extra );
|
63
|
+
}
|
64
|
+
);
|
65
|
+
|
66
|
+
$.get
|
67
|
+
(
|
68
|
+
core_basepath + '/admin/file/?file=admin-extra.menu-bottom.html',
|
69
|
+
function( menu_extra )
|
70
|
+
{
|
71
|
+
core_menu
|
72
|
+
.append( menu_extra );
|
73
|
+
}
|
74
|
+
);
|
75
|
+
}
|
76
|
+
|
77
|
+
$.get
|
78
|
+
(
|
79
|
+
'tpl/dashboard.html',
|
80
|
+
function( template )
|
81
|
+
{
|
82
|
+
content_element
|
83
|
+
.html( template );
|
84
|
+
|
85
|
+
var dashboard_element = $( '#dashboard' );
|
86
|
+
|
87
|
+
$.ajax
|
88
|
+
(
|
89
|
+
{
|
90
|
+
url : core_basepath + '/admin/luke?wt=json&show=index&numTerms=0',
|
91
|
+
dataType : 'json',
|
92
|
+
context : $( '#statistics', dashboard_element ),
|
93
|
+
beforeSend : function( xhr, settings )
|
94
|
+
{
|
95
|
+
$( 'h2', this )
|
96
|
+
.addClass( 'loader' );
|
97
|
+
|
98
|
+
$( '.message', this )
|
99
|
+
.show()
|
100
|
+
.html( 'Loading ...' );
|
101
|
+
|
102
|
+
$( '.content' )
|
103
|
+
.hide();
|
104
|
+
},
|
105
|
+
success : function( response, text_status, xhr )
|
106
|
+
{
|
107
|
+
$( '.message', this )
|
108
|
+
.empty()
|
109
|
+
.hide();
|
110
|
+
|
111
|
+
$( '.content', this )
|
112
|
+
.show();
|
113
|
+
|
114
|
+
var data = {
|
115
|
+
'index_num-docs' : response['index']['numDocs'],
|
116
|
+
'index_max-doc' : response['index']['maxDoc'],
|
117
|
+
'index_version' : response['index']['version'],
|
118
|
+
'index_segmentCount' : response['index']['segmentCount'],
|
119
|
+
'index_last-modified' : response['index']['lastModified']
|
120
|
+
};
|
121
|
+
|
122
|
+
for( var key in data )
|
123
|
+
{
|
124
|
+
$( '.' + key, this )
|
125
|
+
.show();
|
126
|
+
|
127
|
+
$( '.value.' + key, this )
|
128
|
+
.html( data[key] );
|
129
|
+
}
|
130
|
+
|
131
|
+
var optimized_element = $( '.value.index_optimized', this );
|
132
|
+
if( !response['index']['hasDeletions'] )
|
133
|
+
{
|
134
|
+
optimized_element
|
135
|
+
.addClass( 'ico-1' );
|
136
|
+
|
137
|
+
$( 'span', optimized_element )
|
138
|
+
.html( 'yes' );
|
139
|
+
}
|
140
|
+
else
|
141
|
+
{
|
142
|
+
optimized_element
|
143
|
+
.addClass( 'ico-0' );
|
144
|
+
|
145
|
+
$( 'span', optimized_element )
|
146
|
+
.html( 'no' );
|
147
|
+
}
|
148
|
+
|
149
|
+
var current_element = $( '.value.index_current', this );
|
150
|
+
if( response['index']['current'] )
|
151
|
+
{
|
152
|
+
current_element
|
153
|
+
.addClass( 'ico-1' );
|
154
|
+
|
155
|
+
$( 'span', current_element )
|
156
|
+
.html( 'yes' );
|
157
|
+
}
|
158
|
+
else
|
159
|
+
{
|
160
|
+
current_element
|
161
|
+
.addClass( 'ico-0' );
|
162
|
+
|
163
|
+
$( 'span', current_element )
|
164
|
+
.html( 'no' );
|
165
|
+
}
|
166
|
+
|
167
|
+
$( 'a', optimized_element )
|
168
|
+
.die( 'click' )
|
169
|
+
.live
|
170
|
+
(
|
171
|
+
'click',
|
172
|
+
function( event )
|
173
|
+
{
|
174
|
+
$.ajax
|
175
|
+
(
|
176
|
+
{
|
177
|
+
url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json',
|
178
|
+
dataType : 'json',
|
179
|
+
context : $( this ),
|
180
|
+
beforeSend : function( xhr, settings )
|
181
|
+
{
|
182
|
+
this
|
183
|
+
.addClass( 'loader' );
|
184
|
+
},
|
185
|
+
success : function( response, text_status, xhr )
|
186
|
+
{
|
187
|
+
this.parents( 'dd' )
|
188
|
+
.removeClass( 'ico-0' )
|
189
|
+
.addClass( 'ico-1' );
|
190
|
+
},
|
191
|
+
error : function( xhr, text_status, error_thrown)
|
192
|
+
{
|
193
|
+
console.warn( 'd0h, optimize broken!' );
|
194
|
+
},
|
195
|
+
complete : function( xhr, text_status )
|
196
|
+
{
|
197
|
+
this
|
198
|
+
.removeClass( 'loader' );
|
199
|
+
}
|
200
|
+
}
|
201
|
+
);
|
202
|
+
}
|
203
|
+
);
|
204
|
+
|
205
|
+
$( '.timeago', this )
|
206
|
+
.timeago();
|
207
|
+
},
|
208
|
+
error : function( xhr, text_status, error_thrown )
|
209
|
+
{
|
210
|
+
this
|
211
|
+
.addClass( 'disabled' );
|
212
|
+
|
213
|
+
$( '.message', this )
|
214
|
+
.show()
|
215
|
+
.html( 'Luke is not configured' );
|
216
|
+
},
|
217
|
+
complete : function( xhr, text_status )
|
218
|
+
{
|
219
|
+
$( 'h2', this )
|
220
|
+
.removeClass( 'loader' );
|
221
|
+
}
|
222
|
+
}
|
223
|
+
);
|
224
|
+
|
225
|
+
$.ajax
|
226
|
+
(
|
227
|
+
{
|
228
|
+
url : core_basepath + '/replication?command=details&wt=json',
|
229
|
+
dataType : 'json',
|
230
|
+
context : $( '#replication', dashboard_element ),
|
231
|
+
beforeSend : function( xhr, settings )
|
232
|
+
{
|
233
|
+
$( 'h2', this )
|
234
|
+
.addClass( 'loader' );
|
235
|
+
|
236
|
+
$( '.message', this )
|
237
|
+
.show()
|
238
|
+
.html( 'Loading' );
|
239
|
+
|
240
|
+
$( '.content', this )
|
241
|
+
.hide();
|
242
|
+
},
|
243
|
+
success : function( response, text_status, xhr )
|
244
|
+
{
|
245
|
+
$( '.message', this )
|
246
|
+
.empty()
|
247
|
+
.hide();
|
248
|
+
|
249
|
+
$( '.content', this )
|
250
|
+
.show();
|
251
|
+
|
252
|
+
$( '.replication', context.active_core )
|
253
|
+
.show();
|
254
|
+
|
255
|
+
var data = response.details;
|
256
|
+
var is_slave = 'undefined' !== typeof( data.slave );
|
257
|
+
var headline = $( 'h2 span', this );
|
258
|
+
var details_element = $( '#details', this );
|
259
|
+
var current_type_element = $( ( is_slave ? '.slave' : '.master' ), this );
|
260
|
+
|
261
|
+
if( is_slave )
|
262
|
+
{
|
263
|
+
this
|
264
|
+
.addClass( 'slave' );
|
265
|
+
|
266
|
+
headline
|
267
|
+
.html( headline.html() + ' (Slave)' );
|
268
|
+
}
|
269
|
+
else
|
270
|
+
{
|
271
|
+
this
|
272
|
+
.addClass( 'master' );
|
273
|
+
|
274
|
+
headline
|
275
|
+
.html( headline.html() + ' (Master)' );
|
276
|
+
}
|
277
|
+
|
278
|
+
$( '.version div', current_type_element )
|
279
|
+
.html( data.indexVersion );
|
280
|
+
$( '.generation div', current_type_element )
|
281
|
+
.html( data.generation );
|
282
|
+
$( '.size div', current_type_element )
|
283
|
+
.html( data.indexSize );
|
284
|
+
|
285
|
+
if( is_slave )
|
286
|
+
{
|
287
|
+
var master_element = $( '.master', details_element );
|
288
|
+
$( '.version div', master_element )
|
289
|
+
.html( data.slave.masterDetails.indexVersion );
|
290
|
+
$( '.generation div', master_element )
|
291
|
+
.html( data.slave.masterDetails.generation );
|
292
|
+
$( '.size div', master_element )
|
293
|
+
.html( data.slave.masterDetails.indexSize );
|
294
|
+
|
295
|
+
if( data.indexVersion !== data.slave.masterDetails.indexVersion )
|
296
|
+
{
|
297
|
+
$( '.version', details_element )
|
298
|
+
.addClass( 'diff' );
|
299
|
+
}
|
300
|
+
else
|
301
|
+
{
|
302
|
+
$( '.version', details_element )
|
303
|
+
.removeClass( 'diff' );
|
304
|
+
}
|
305
|
+
|
306
|
+
if( data.generation !== data.slave.masterDetails.generation )
|
307
|
+
{
|
308
|
+
$( '.generation', details_element )
|
309
|
+
.addClass( 'diff' );
|
310
|
+
}
|
311
|
+
else
|
312
|
+
{
|
313
|
+
$( '.generation', details_element )
|
314
|
+
.removeClass( 'diff' );
|
315
|
+
}
|
316
|
+
}
|
317
|
+
},
|
318
|
+
error : function( xhr, text_status, error_thrown)
|
319
|
+
{
|
320
|
+
this
|
321
|
+
.addClass( 'disabled' );
|
322
|
+
|
323
|
+
$( '.message', this )
|
324
|
+
.show()
|
325
|
+
.html( 'Replication is not configured' );
|
326
|
+
},
|
327
|
+
complete : function( xhr, text_status )
|
328
|
+
{
|
329
|
+
$( 'h2', this )
|
330
|
+
.removeClass( 'loader' );
|
331
|
+
}
|
332
|
+
}
|
333
|
+
);
|
334
|
+
|
335
|
+
$.ajax
|
336
|
+
(
|
337
|
+
{
|
338
|
+
url : core_basepath + '/dataimport?command=details&wt=json',
|
339
|
+
dataType : 'json',
|
340
|
+
context : $( '#dataimport', dashboard_element ),
|
341
|
+
beforeSend : function( xhr, settings )
|
342
|
+
{
|
343
|
+
$( 'h2', this )
|
344
|
+
.addClass( 'loader' );
|
345
|
+
|
346
|
+
$( '.message', this )
|
347
|
+
.show()
|
348
|
+
.html( 'Loading' );
|
349
|
+
},
|
350
|
+
success : function( response, text_status, xhr )
|
351
|
+
{
|
352
|
+
$( '.message', this )
|
353
|
+
.empty()
|
354
|
+
.hide();
|
355
|
+
|
356
|
+
$( 'dl', this )
|
357
|
+
.show();
|
358
|
+
|
359
|
+
var data = {
|
360
|
+
'status' : response['status'],
|
361
|
+
'info' : response['statusMessages']['']
|
362
|
+
};
|
363
|
+
|
364
|
+
for( var key in data )
|
365
|
+
{
|
366
|
+
$( '.' + key, this )
|
367
|
+
.show();
|
368
|
+
|
369
|
+
$( '.value.' + key, this )
|
370
|
+
.html( data[key] );
|
371
|
+
}
|
372
|
+
},
|
373
|
+
error : function( xhr, text_status, error_thrown)
|
374
|
+
{
|
375
|
+
this
|
376
|
+
.addClass( 'disabled' );
|
377
|
+
|
378
|
+
$( '.message', this )
|
379
|
+
.show()
|
380
|
+
.html( 'Dataimport is not configured' );
|
381
|
+
},
|
382
|
+
complete : function( xhr, text_status )
|
383
|
+
{
|
384
|
+
$( 'h2', this )
|
385
|
+
.removeClass( 'loader' );
|
386
|
+
}
|
387
|
+
}
|
388
|
+
);
|
389
|
+
|
390
|
+
$.ajax
|
391
|
+
(
|
392
|
+
{
|
393
|
+
url : core_basepath + '/admin/file/?file=admin-extra.html',
|
394
|
+
dataType : 'html',
|
395
|
+
context : $( '#admin-extra', dashboard_element ),
|
396
|
+
beforeSend : function( xhr, settings )
|
397
|
+
{
|
398
|
+
$( 'h2', this )
|
399
|
+
.addClass( 'loader' );
|
400
|
+
|
401
|
+
$( '.message', this )
|
402
|
+
.show()
|
403
|
+
.html( 'Loading' );
|
404
|
+
|
405
|
+
$( '.content', this )
|
406
|
+
.hide();
|
407
|
+
},
|
408
|
+
success : function( response, text_status, xhr )
|
409
|
+
{
|
410
|
+
$( '.message', this )
|
411
|
+
.hide()
|
412
|
+
.empty();
|
413
|
+
|
414
|
+
$( '.content', this )
|
415
|
+
.show()
|
416
|
+
.html( response );
|
417
|
+
},
|
418
|
+
error : function( xhr, text_status, error_thrown)
|
419
|
+
{
|
420
|
+
this
|
421
|
+
.addClass( 'disabled' );
|
422
|
+
|
423
|
+
$( '.message', this )
|
424
|
+
.show()
|
425
|
+
.html( 'We found no "admin-extra.html" file.' );
|
426
|
+
},
|
427
|
+
complete : function( xhr, text_status )
|
428
|
+
{
|
429
|
+
$( 'h2', this )
|
430
|
+
.removeClass( 'loader' );
|
431
|
+
}
|
432
|
+
}
|
433
|
+
);
|
434
|
+
|
435
|
+
$.ajax
|
436
|
+
(
|
437
|
+
{
|
438
|
+
url : core_basepath + '/admin/ping?action=status&wt=json',
|
439
|
+
dataType : 'json',
|
440
|
+
context : $( '#healthcheck', dashboard_element ),
|
441
|
+
beforeSend : function( xhr, settings )
|
442
|
+
{
|
443
|
+
$( 'h2', this )
|
444
|
+
.addClass( 'loader' );
|
445
|
+
|
446
|
+
$( '.message', this )
|
447
|
+
.show()
|
448
|
+
.html( 'Loading' );
|
449
|
+
|
450
|
+
$( '.content', this )
|
451
|
+
.hide();
|
452
|
+
},
|
453
|
+
success : function( response, text_status, xhr )
|
454
|
+
{
|
455
|
+
$( '.message', this )
|
456
|
+
.empty()
|
457
|
+
.hide();
|
458
|
+
|
459
|
+
$( '.content', this )
|
460
|
+
.show();
|
461
|
+
|
462
|
+
var status_element = $( '.value.status', this );
|
463
|
+
var toggle_button = $( '.healthcheck-status', this );
|
464
|
+
var status = response['status'];
|
465
|
+
$( 'span', status_element ).html( status );
|
466
|
+
|
467
|
+
var action = ( response['status'] == 'enabled' ) ? 'enable' : 'disable';
|
468
|
+
set_healthcheck_status(action);
|
469
|
+
|
470
|
+
if( response['status'] == 'enabled' )
|
471
|
+
{
|
472
|
+
status_element
|
473
|
+
.addClass( 'ico-1' );
|
474
|
+
toggle_button
|
475
|
+
.addClass( 'enabled' );
|
476
|
+
}
|
477
|
+
else
|
478
|
+
{
|
479
|
+
status_element
|
480
|
+
.addClass( 'ico-0' );
|
481
|
+
}
|
482
|
+
|
483
|
+
$( '.healthcheck-status', status_element )
|
484
|
+
.die( 'click' )
|
485
|
+
.live
|
486
|
+
(
|
487
|
+
'click',
|
488
|
+
function( event )
|
489
|
+
{
|
490
|
+
var action = $(this).hasClass( 'enabled' ) ? 'disable' : 'enable';
|
491
|
+
$.ajax
|
492
|
+
(
|
493
|
+
{
|
494
|
+
url : core_basepath + '/admin/ping?action=' + action + '&wt=json',
|
495
|
+
dataType : 'json',
|
496
|
+
context : $( this ),
|
497
|
+
beforeSend : function( xhr, settings )
|
498
|
+
{
|
499
|
+
this
|
500
|
+
.addClass( 'loader' );
|
501
|
+
},
|
502
|
+
success : function( response, text_status, xhr )
|
503
|
+
{
|
504
|
+
set_healthcheck_status(action);
|
505
|
+
},
|
506
|
+
error : function( xhr, text_status, error_thrown)
|
507
|
+
{
|
508
|
+
console.warn( 'd0h, enable broken!' );
|
509
|
+
},
|
510
|
+
complete : function( xhr, text_status )
|
511
|
+
{
|
512
|
+
this
|
513
|
+
.removeClass( 'loader' );
|
514
|
+
}
|
515
|
+
}
|
516
|
+
);
|
517
|
+
}
|
518
|
+
);
|
519
|
+
},
|
520
|
+
error : function( xhr, text_status, error_thrown)
|
521
|
+
{
|
522
|
+
this
|
523
|
+
.addClass( 'disabled' );
|
524
|
+
|
525
|
+
$( '.message', this )
|
526
|
+
.show()
|
527
|
+
.html( 'Ping request handler is not configured with a healthcheck file.' );
|
528
|
+
},
|
529
|
+
complete : function( xhr, text_status )
|
530
|
+
{
|
531
|
+
$( 'h2', this )
|
532
|
+
.removeClass( 'loader' );
|
533
|
+
}
|
534
|
+
}
|
535
|
+
);
|
536
|
+
|
537
|
+
}
|
538
|
+
);
|
539
|
+
}
|
540
|
+
);
|