SOLR-3611: We do not show ZooKeeper data in the UI for a node that has children.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1380684 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-09-04 15:40:02 +00:00
parent 7801531900
commit 92592095e6
2 changed files with 26 additions and 28 deletions

View File

@ -110,6 +110,10 @@ Bug Fixes
* SOLR-3782: A leader going down while updates are coming in can cause shard
inconsistency. (Mark Miller)
* SOLR-3611: We do not show ZooKeeper data in the UI for a node that has children.
(Mark Miller)
Other Changes
----------------------

View File

@ -589,41 +589,35 @@ var init_tree = function( tree_element )
var data_element = $( '#data', this );
if( 0 !== parseInt( response.znode.prop.children_count ) )
{
data_element.hide();
}
else
{
var highlight = false;
var data = '<em>File "' + response.znode.path + '" has no Content</em>';
var highlight = false;
var data = '<em>File "' + response.znode.path + '" has no Content</em>';
if( response.znode.data )
if( response.znode.data )
{
var classes = '';
var path = response.znode.path.split( '.' );
if( 1 < path.length )
{
var classes = '';
var path = response.znode.path.split( '.' );
if( 1 < path.length )
{
highlight = true;
classes = 'syntax language-' + path.pop().esc();
}
data = '<pre class="' + classes + '">'
+ response.znode.data.esc()
+ '</pre>';
highlight = true;
classes = 'syntax language-' + path.pop().esc();
}
data = '<pre class="' + classes + '">'
+ response.znode.data.esc()
+ '</pre>';
}
data_element
.show()
.html( data );
data_element
.show()
.html( data );
if( highlight )
{
hljs.highlightBlock( data_element.get(0) );
}
if( highlight )
{
hljs.highlightBlock( data_element.get(0) );
}
},
error : function( xhr, text_status, error_thrown)
{