rjack-solr 3.6.2.0-java → 4.0.0.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,56 @@
|
|
|
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
|
+
// #/:core/schema, #/:core/config
|
|
19
|
+
sammy.get
|
|
20
|
+
(
|
|
21
|
+
/^#\/([\w\d-]+)\/(schema|config)$/,
|
|
22
|
+
function( context )
|
|
23
|
+
{
|
|
24
|
+
var core_basepath = this.active_core.attr( 'data-basepath' );
|
|
25
|
+
var filetype = context.params.splat[1]; // either schema or config
|
|
26
|
+
var filename = this.active_core.attr( filetype );
|
|
27
|
+
|
|
28
|
+
$.ajax
|
|
29
|
+
(
|
|
30
|
+
{
|
|
31
|
+
url : core_basepath + "/admin/file?file=" + filename + "&contentType=text/xml;charset=utf-8",
|
|
32
|
+
dataType : 'xml',
|
|
33
|
+
context : $( '#content' ),
|
|
34
|
+
beforeSend : function( xhr, settings )
|
|
35
|
+
{
|
|
36
|
+
this
|
|
37
|
+
.html( '<div class="loader">Loading ...</div>' );
|
|
38
|
+
},
|
|
39
|
+
complete : function( xhr, text_status )
|
|
40
|
+
{
|
|
41
|
+
var code = $(
|
|
42
|
+
'<pre class="syntax language-xml"><code>' +
|
|
43
|
+
xhr.responseText.esc() +
|
|
44
|
+
'</code></pre>'
|
|
45
|
+
);
|
|
46
|
+
this.html( code );
|
|
47
|
+
|
|
48
|
+
if( 'success' === text_status )
|
|
49
|
+
{
|
|
50
|
+
hljs.highlightBlock( code.get(0) );
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
);
|
|
@@ -0,0 +1,344 @@
|
|
|
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 parse_memory_value = function( value )
|
|
19
|
+
{
|
|
20
|
+
if( value !== Number( value ) )
|
|
21
|
+
{
|
|
22
|
+
var units = 'BKMGTPEZY';
|
|
23
|
+
var match = value.match( /^(\d+([,\.]\d+)?) (\w)\w?$/ );
|
|
24
|
+
var value = parseFloat( match[1] ) * Math.pow( 1024, units.indexOf( match[3].toUpperCase() ) );
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return value;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var generate_bar = function( bar_container, bar_data, convert_label_values )
|
|
31
|
+
{
|
|
32
|
+
bar_holder = $( '.bar-holder', bar_container );
|
|
33
|
+
|
|
34
|
+
var bar_level = 1;
|
|
35
|
+
var max_width = Math.round( $( '.bar-max', bar_holder ).width() );
|
|
36
|
+
$( '.bar-max.val', bar_holder ).text( bar_data['max'] );
|
|
37
|
+
|
|
38
|
+
bar_level++;
|
|
39
|
+
var total_width = Math.round( ( bar_data['total'] * max_width ) / bar_data['max'] );
|
|
40
|
+
$( '.bar-total.bar', bar_holder ).width( Math.max( total_width, 1 ) );
|
|
41
|
+
$( '.bar-total.val', bar_holder ).text( bar_data['total'] );
|
|
42
|
+
|
|
43
|
+
if( bar_data['used'] )
|
|
44
|
+
{
|
|
45
|
+
bar_level++;
|
|
46
|
+
var used_width = Math.round( ( bar_data['used'] * max_width ) / bar_data['max'] );
|
|
47
|
+
$( '.bar-used.bar', bar_holder ).width( Math.min( used_width, total_width - 1 ) );
|
|
48
|
+
$( '.bar-used.val', bar_holder ).text( bar_data['used'] );
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
bar_holder
|
|
52
|
+
.addClass( 'bar-lvl-' + bar_level );
|
|
53
|
+
|
|
54
|
+
var percentage = ( ( ( bar_data['used'] || bar_data['total'] ) / bar_data['max'] ) * 100 ).toFixed(1);
|
|
55
|
+
|
|
56
|
+
var hl = $( '[data-desc="' + bar_container.attr( 'id' ) + '"]' );
|
|
57
|
+
|
|
58
|
+
$( '.bar-desc', hl )
|
|
59
|
+
.remove();
|
|
60
|
+
|
|
61
|
+
hl
|
|
62
|
+
.append( ' <small class="bar-desc">' + percentage + '%</small>' );
|
|
63
|
+
|
|
64
|
+
if( !!convert_label_values )
|
|
65
|
+
{
|
|
66
|
+
$( '.val', bar_holder )
|
|
67
|
+
.each
|
|
68
|
+
(
|
|
69
|
+
function()
|
|
70
|
+
{
|
|
71
|
+
var self = $( this );
|
|
72
|
+
|
|
73
|
+
var unit = null;
|
|
74
|
+
var byte_value = parseInt( self.html() );
|
|
75
|
+
|
|
76
|
+
self
|
|
77
|
+
.attr( 'title', 'raw: ' + byte_value + ' B' );
|
|
78
|
+
|
|
79
|
+
byte_value /= 1024;
|
|
80
|
+
byte_value /= 1024;
|
|
81
|
+
unit = 'MB';
|
|
82
|
+
|
|
83
|
+
if( 1024 <= byte_value )
|
|
84
|
+
{
|
|
85
|
+
byte_value /= 1024;
|
|
86
|
+
unit = 'GB';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
byte_value = byte_value.toFixed( 2 ) + ' ' + unit;
|
|
90
|
+
|
|
91
|
+
self
|
|
92
|
+
.text( byte_value );
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
var system_info = function( element, system_data )
|
|
99
|
+
{
|
|
100
|
+
// -- usage
|
|
101
|
+
|
|
102
|
+
var load_average = ( system_data['system']['uptime'] || '' ).match( /load average: (.+)/ );
|
|
103
|
+
if( load_average && load_average[1] )
|
|
104
|
+
{
|
|
105
|
+
var hl = $( '#system h2', element );
|
|
106
|
+
|
|
107
|
+
$( '.bar-desc', hl )
|
|
108
|
+
.remove();
|
|
109
|
+
|
|
110
|
+
hl
|
|
111
|
+
.append( ' <small class="bar-desc">' + load_average[1].split( ', ' ).join( ' ' ).esc() + '</small>' );
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// -- physical-memory-bar
|
|
115
|
+
|
|
116
|
+
var bar_holder = $( '#physical-memory-bar', element );
|
|
117
|
+
if( !system_data['system']['totalPhysicalMemorySize'] )
|
|
118
|
+
{
|
|
119
|
+
bar_holder.hide();
|
|
120
|
+
}
|
|
121
|
+
else
|
|
122
|
+
{
|
|
123
|
+
bar_holder.show();
|
|
124
|
+
|
|
125
|
+
var bar_data = {
|
|
126
|
+
'max' : parse_memory_value( system_data['system']['totalPhysicalMemorySize'] ),
|
|
127
|
+
'total' : parse_memory_value( system_data['system']['totalPhysicalMemorySize'] - system_data['system']['freePhysicalMemorySize'] )
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
generate_bar( bar_holder, bar_data, true );
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// -- swap-space-bar
|
|
134
|
+
|
|
135
|
+
var bar_holder = $( '#swap-space-bar', element );
|
|
136
|
+
if( !system_data['system']['totalSwapSpaceSize'] )
|
|
137
|
+
{
|
|
138
|
+
bar_holder.hide();
|
|
139
|
+
}
|
|
140
|
+
else
|
|
141
|
+
{
|
|
142
|
+
bar_holder.show();
|
|
143
|
+
|
|
144
|
+
var bar_data = {
|
|
145
|
+
'max' : parse_memory_value( system_data['system']['totalSwapSpaceSize'] ),
|
|
146
|
+
'total' : parse_memory_value( system_data['system']['totalSwapSpaceSize'] - system_data['system']['freeSwapSpaceSize'] )
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
generate_bar( bar_holder, bar_data, true );
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// -- swap-space-bar
|
|
153
|
+
|
|
154
|
+
var bar_holder = $( '#file-descriptor-bar', element );
|
|
155
|
+
if( !system_data['system']['maxFileDescriptorCount'] )
|
|
156
|
+
{
|
|
157
|
+
bar_holder.hide();
|
|
158
|
+
}
|
|
159
|
+
else
|
|
160
|
+
{
|
|
161
|
+
bar_holder.show();
|
|
162
|
+
|
|
163
|
+
var bar_data = {
|
|
164
|
+
'max' : parse_memory_value( system_data['system']['maxFileDescriptorCount'] ),
|
|
165
|
+
'total' : parse_memory_value( system_data['system']['openFileDescriptorCount'] )
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
generate_bar( bar_holder, bar_data );
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
0 === $( '#system div[id$="-bar"]:visible', element ).size()
|
|
172
|
+
? $( '#system .no-info', element ).show()
|
|
173
|
+
: $( '#system .no-info', element ).hide();
|
|
174
|
+
|
|
175
|
+
// -- memory-bar
|
|
176
|
+
|
|
177
|
+
var jvm_memory = $.extend
|
|
178
|
+
(
|
|
179
|
+
{
|
|
180
|
+
'free' : null,
|
|
181
|
+
'total' : null,
|
|
182
|
+
'max' : null,
|
|
183
|
+
'used' : null,
|
|
184
|
+
'raw' : {
|
|
185
|
+
'free' : null,
|
|
186
|
+
'total' : null,
|
|
187
|
+
'max' : null,
|
|
188
|
+
'used' : null,
|
|
189
|
+
'used%' : null
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
system_data['jvm']['memory']
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
var bar_holder = $( '#jvm-memory-bar', element );
|
|
196
|
+
var bar_data = {
|
|
197
|
+
'max' : parse_memory_value( jvm_memory['raw']['max'] || jvm_memory['max'] ),
|
|
198
|
+
'total' : parse_memory_value( jvm_memory['raw']['total'] || jvm_memory['total'] ),
|
|
199
|
+
'used' : parse_memory_value( jvm_memory['raw']['used'] || jvm_memory['used'] )
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
generate_bar( bar_holder, bar_data, true );
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// #/
|
|
206
|
+
sammy.get
|
|
207
|
+
(
|
|
208
|
+
/^#\/$/,
|
|
209
|
+
function( context )
|
|
210
|
+
{
|
|
211
|
+
var content_element = $( '#content' );
|
|
212
|
+
|
|
213
|
+
$( '#menu-wrapper #index' )
|
|
214
|
+
.addClass( 'active' );
|
|
215
|
+
|
|
216
|
+
content_element
|
|
217
|
+
.html( '<div id="index"></div>' );
|
|
218
|
+
|
|
219
|
+
$.ajax
|
|
220
|
+
(
|
|
221
|
+
{
|
|
222
|
+
url : 'tpl/index.html',
|
|
223
|
+
context : $( '#index', content_element ),
|
|
224
|
+
beforeSend : function( arr, form, options )
|
|
225
|
+
{
|
|
226
|
+
},
|
|
227
|
+
success : function( template )
|
|
228
|
+
{
|
|
229
|
+
var self = this;
|
|
230
|
+
|
|
231
|
+
this
|
|
232
|
+
.html( template );
|
|
233
|
+
|
|
234
|
+
var data = {
|
|
235
|
+
'start_time' : app.dashboard_values['jvm']['jmx']['startTime'],
|
|
236
|
+
'host' : app.dashboard_values['core']['host'],
|
|
237
|
+
'dir_instance' : app.dashboard_values['core']['directory']['instance'],
|
|
238
|
+
'dir_data' : app.dashboard_values['core']['directory']['data'],
|
|
239
|
+
'dir_index' : app.dashboard_values['core']['directory']['index'],
|
|
240
|
+
'jvm_version' : app.dashboard_values['jvm']['name'] + ' (' + app.dashboard_values['jvm']['version'] + ')',
|
|
241
|
+
'processors' : app.dashboard_values['jvm']['processors'],
|
|
242
|
+
'solr_spec_version' : app.dashboard_values['lucene']['solr-spec-version'] || '-',
|
|
243
|
+
'solr_impl_version' : app.dashboard_values['lucene']['solr-impl-version'] || '-',
|
|
244
|
+
'lucene_spec_version' : app.dashboard_values['lucene']['lucene-spec-version'] || '-',
|
|
245
|
+
'lucene_impl_version' : app.dashboard_values['lucene']['lucene-impl-version'] || '-'
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
if( app.dashboard_values['core']['directory']['cwd'] )
|
|
249
|
+
{
|
|
250
|
+
data['dir_cwd'] = app.dashboard_values['core']['directory']['cwd'];
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
for( var key in data )
|
|
254
|
+
{
|
|
255
|
+
var value_element = $( '.' + key + ' dd', this );
|
|
256
|
+
|
|
257
|
+
value_element
|
|
258
|
+
.text( data[key].esc() );
|
|
259
|
+
|
|
260
|
+
value_element.closest( 'li' )
|
|
261
|
+
.show();
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
var commandLineArgs = app.dashboard_values['jvm']['jmx']['commandLineArgs'];
|
|
265
|
+
if( 0 !== commandLineArgs.length )
|
|
266
|
+
{
|
|
267
|
+
var cmd_arg_element = $( '.command_line_args dt', this );
|
|
268
|
+
var cmd_arg_key_element = $( '.command_line_args dt', this );
|
|
269
|
+
var cmd_arg_element = $( '.command_line_args dd', this );
|
|
270
|
+
|
|
271
|
+
for( var key in commandLineArgs )
|
|
272
|
+
{
|
|
273
|
+
cmd_arg_element = cmd_arg_element.clone();
|
|
274
|
+
cmd_arg_element.text( commandLineArgs[key] );
|
|
275
|
+
|
|
276
|
+
cmd_arg_key_element
|
|
277
|
+
.after( cmd_arg_element );
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
cmd_arg_key_element.closest( 'li' )
|
|
281
|
+
.show();
|
|
282
|
+
|
|
283
|
+
$( '.command_line_args dd:last', this )
|
|
284
|
+
.remove();
|
|
285
|
+
|
|
286
|
+
$( '.command_line_args dd:odd', this )
|
|
287
|
+
.addClass( 'odd' );
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
$( '.timeago', this )
|
|
291
|
+
.timeago();
|
|
292
|
+
|
|
293
|
+
$( '.index-left .block li:visible:odd', this )
|
|
294
|
+
.addClass( 'odd' );
|
|
295
|
+
|
|
296
|
+
// -- system_info
|
|
297
|
+
|
|
298
|
+
system_info( this, app.dashboard_values );
|
|
299
|
+
|
|
300
|
+
$( '#system a.reload', this )
|
|
301
|
+
.die( 'click' )
|
|
302
|
+
.live
|
|
303
|
+
(
|
|
304
|
+
'click',
|
|
305
|
+
function( event )
|
|
306
|
+
{
|
|
307
|
+
$.ajax
|
|
308
|
+
(
|
|
309
|
+
{
|
|
310
|
+
url : environment_basepath + '/admin/system?wt=json',
|
|
311
|
+
dataType : 'json',
|
|
312
|
+
context : this,
|
|
313
|
+
beforeSend : function( arr, form, options )
|
|
314
|
+
{
|
|
315
|
+
loader.show( this );
|
|
316
|
+
},
|
|
317
|
+
success : function( response )
|
|
318
|
+
{
|
|
319
|
+
system_info( self, response );
|
|
320
|
+
},
|
|
321
|
+
error : function()
|
|
322
|
+
{
|
|
323
|
+
},
|
|
324
|
+
complete : function()
|
|
325
|
+
{
|
|
326
|
+
loader.hide( this );
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
},
|
|
335
|
+
error : function( xhr, text_status, error_thrown )
|
|
336
|
+
{
|
|
337
|
+
},
|
|
338
|
+
complete : function( xhr, text_status )
|
|
339
|
+
{
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
);
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
// #/~java-properties
|
|
19
|
+
sammy.get
|
|
20
|
+
(
|
|
21
|
+
/^#\/(~java-properties)$/,
|
|
22
|
+
function( context )
|
|
23
|
+
{
|
|
24
|
+
var core_basepath = $( 'li[data-basepath]', app.menu_element ).attr( 'data-basepath' );
|
|
25
|
+
var content_element = $( '#content' );
|
|
26
|
+
|
|
27
|
+
content_element
|
|
28
|
+
.html( '<div id="java-properties"></div>' );
|
|
29
|
+
|
|
30
|
+
$.ajax
|
|
31
|
+
(
|
|
32
|
+
{
|
|
33
|
+
url : core_basepath + '/admin/properties?wt=json',
|
|
34
|
+
dataType : 'json',
|
|
35
|
+
context : $( '#java-properties', content_element ),
|
|
36
|
+
beforeSend : function( xhr, settings )
|
|
37
|
+
{
|
|
38
|
+
this
|
|
39
|
+
.html( '<div class="loader">Loading ...</div>' );
|
|
40
|
+
},
|
|
41
|
+
success : function( response, text_status, xhr )
|
|
42
|
+
{
|
|
43
|
+
var system_properties = response['system.properties'];
|
|
44
|
+
var properties_data = {};
|
|
45
|
+
var properties_content = [];
|
|
46
|
+
var properties_order = [];
|
|
47
|
+
|
|
48
|
+
var workaround = xhr.responseText.match( /"(line\.separator)"\s*:\s*"(.+?)"/ );
|
|
49
|
+
if( workaround && workaround[2] )
|
|
50
|
+
{
|
|
51
|
+
system_properties[workaround[1]] = workaround[2];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
for( var key in system_properties )
|
|
55
|
+
{
|
|
56
|
+
var displayed_key = key.replace( /\./g, '.​' );
|
|
57
|
+
var displayed_value = [ system_properties[key] ];
|
|
58
|
+
var item_class = 'clearfix';
|
|
59
|
+
|
|
60
|
+
if( -1 !== key.indexOf( '.path' ) || -1 !== key.indexOf( '.dirs' ) )
|
|
61
|
+
{
|
|
62
|
+
displayed_value = system_properties[key].split( system_properties['path.separator'] );
|
|
63
|
+
if( 1 < displayed_value.length )
|
|
64
|
+
{
|
|
65
|
+
item_class += ' multi';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var item_content = '<li><dl class="' + item_class + '">' + "\n"
|
|
70
|
+
+ '<dt>' + displayed_key.esc() + '</dt>' + "\n";
|
|
71
|
+
|
|
72
|
+
for( var i in displayed_value )
|
|
73
|
+
{
|
|
74
|
+
item_content += '<dd>' + displayed_value[i].esc() + '</dd>' + "\n";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
item_content += '</dl></li>';
|
|
78
|
+
|
|
79
|
+
properties_data[key] = item_content;
|
|
80
|
+
properties_order.push( key );
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
properties_order.sort();
|
|
84
|
+
for( var i in properties_order )
|
|
85
|
+
{
|
|
86
|
+
properties_content.push( properties_data[properties_order[i]] );
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
this
|
|
90
|
+
.html( '<ul>' + properties_content.join( "\n" ) + '</ul>' );
|
|
91
|
+
|
|
92
|
+
$( 'li:odd', this )
|
|
93
|
+
.addClass( 'odd' );
|
|
94
|
+
|
|
95
|
+
$( '.multi dd:odd', this )
|
|
96
|
+
.addClass( 'odd' );
|
|
97
|
+
},
|
|
98
|
+
error : function( xhr, text_status, error_thrown)
|
|
99
|
+
{
|
|
100
|
+
},
|
|
101
|
+
complete : function( xhr, text_status )
|
|
102
|
+
{
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
);
|