mirror of https://github.com/apache/lucene.git
SOLR-4264: Missing Error-Screen on UI's Cloud-Page
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1429254 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
01d27847bf
commit
449296da9d
|
@ -218,6 +218,8 @@ Optimizations
|
|||
* SOLR-4262: Replication Icon on Dashboard does not reflect Master-/Slave-
|
||||
State (steffkes)
|
||||
|
||||
* SOLR-4264: Missing Error-Screen on UI's Cloud-Page (steffkes)
|
||||
|
||||
Bug Fixes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
{
|
||||
background-color: #f00;
|
||||
background-image: url( ../../img/ico/construction.png );
|
||||
background-position: 10px 50%;
|
||||
background-position: 10px 12px;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
|
@ -26,6 +26,13 @@
|
|||
padding-left: 35px;
|
||||
}
|
||||
|
||||
#content #cloud #error .msg
|
||||
{
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#content #cloud #debug
|
||||
{
|
||||
background-color: #fff;
|
||||
|
|
|
@ -9359,7 +9359,9 @@ jQuery.extend({
|
|||
}
|
||||
done( 0, statusText );
|
||||
return this;
|
||||
}
|
||||
},
|
||||
|
||||
url : s.url
|
||||
};
|
||||
|
||||
// Callback for when everything is done
|
||||
|
|
|
@ -15,6 +15,27 @@
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
var zk_error = function zk_error( xhr, text_status, error_thrown )
|
||||
{
|
||||
var zk = null;
|
||||
try
|
||||
{
|
||||
eval( 'zk = ' + xhr.responseText + ';' );
|
||||
}
|
||||
catch( e ) {}
|
||||
|
||||
var message = '<p class="txt">Loading of "<code>' + xhr.url + '</code>" '
|
||||
+ 'failed (HTTP-Status <code>' + xhr.status + '</code>)</p>' + "\n";
|
||||
|
||||
if( zk.error )
|
||||
{
|
||||
message += '<p class="msg">"' + zk.error.esc() + '"</p>' + "\n";
|
||||
}
|
||||
|
||||
this.closest( '#cloud' )
|
||||
.html( '<div class="block" id="error">' + message + '</div>' );
|
||||
};
|
||||
|
||||
var init_debug = function( cloud_element )
|
||||
{
|
||||
var debug_element = $( '#debug', cloud_element );
|
||||
|
@ -633,19 +654,7 @@ var init_tree = function( tree_element )
|
|||
}
|
||||
);
|
||||
},
|
||||
error : function( xhr, text_status, error_thrown )
|
||||
{
|
||||
var message = 'Loading of <code>' + app.config.zookeeper_path + '</code> failed with "' + text_status + '" '
|
||||
+ '(<code>' + error_thrown.message + '</code>)';
|
||||
|
||||
if( 200 !== xhr.status )
|
||||
{
|
||||
message = 'Loading of <code>' + app.config.zookeeper_path + '</code> failed with HTTP-Status ' + xhr.status + ' ';
|
||||
}
|
||||
|
||||
this
|
||||
.html( '<div class="block" id="error">' + message + '</div>' );
|
||||
},
|
||||
error : zk_error,
|
||||
complete : function( xhr, text_status )
|
||||
{
|
||||
}
|
||||
|
@ -710,8 +719,20 @@ sammy.get
|
|||
}
|
||||
);
|
||||
|
||||
$( 'a[href="' + context.path + '"]', navigation_element )
|
||||
.trigger( 'activate' );
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : app.config.solr_path + '/zookeeper?wt=json',
|
||||
dataType : 'json',
|
||||
context : cloud_element,
|
||||
success : function( response, text_status, xhr )
|
||||
{
|
||||
$( 'a[href="' + context.path + '"]', navigation_element )
|
||||
.trigger( 'activate' );
|
||||
},
|
||||
error : zk_error
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue