You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2012/07/31 01:26:12 UTC

svn commit: r1367362 - in /lucene/dev/trunk/solr: CHANGES.txt webapp/web/admin.html webapp/web/css/styles/common.css webapp/web/js/scripts/app.js

Author: hossman
Date: Mon Jul 30 23:26:11 2012
New Revision: 1367362

URL: http://svn.apache.org/viewvc?rev=1367362&view=rev
Log:
SOLR-3635: display core init failure info (from CoreAdminHandler) in the web UI

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/webapp/web/admin.html
    lucene/dev/trunk/solr/webapp/web/css/styles/common.css
    lucene/dev/trunk/solr/webapp/web/js/scripts/app.js

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1367362&r1=1367361&r2=1367362&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Mon Jul 30 23:26:11 2012
@@ -97,10 +97,11 @@ New Features
   lib folder. The factories are automatically made available with SPI.
   (Chris Male, Robert Muir, Uwe Schindler)
 
-* SOLR-3634: CoreContainer and CoreAdminHandler will now remember and report 
-  back information about failures to initialize SolrCores.  These failures will 
-  be accessible from the STATUS command until they are "reset" by 
-  creating/renaming a SolrCore with the same name.  (hossman)
+* SOLR-3634, SOLR-3635: CoreContainer and CoreAdminHandler will now remember 
+  and report back information about failures to initialize SolrCores.  These 
+  failures will be accessible from the web UI and CoreAdminHandler STATUS 
+  command until they are "reset" by creating/renaming a SolrCore with the 
+  same name.  (hossman, steffkes)
 
 * SOLR-1280: Added commented-out example of the new script update processor
   to the example configuration.  See http://wiki.apache.org/solr/ScriptUpdateProcessor (ehatcher)

Modified: lucene/dev/trunk/solr/webapp/web/admin.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/admin.html?rev=1367362&r1=1367361&r2=1367362&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/admin.html (original)
+++ lucene/dev/trunk/solr/webapp/web/admin.html Mon Jul 30 23:26:11 2012
@@ -63,7 +63,15 @@ limitations under the License.
     </div>
 
     <div id="main" class="clearfix">
-        
+    
+      <div id="init-failures">
+
+          <h2>SolrCore Initialization Failures</h2>
+          <ul></ul>
+          <p>Please check your logs for more information</p>
+                
+      </div>
+
       <div id="content-wrapper">
         <div id="content">
                   

Modified: lucene/dev/trunk/solr/webapp/web/css/styles/common.css
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/css/styles/common.css?rev=1367362&r1=1367361&r2=1367362&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/css/styles/common.css (original)
+++ lucene/dev/trunk/solr/webapp/web/css/styles/common.css Mon Jul 30 23:26:11 2012
@@ -284,6 +284,38 @@ ul
   border-color: #66b866;
 }
 
+#init-failures
+{
+  border: 1px solid #f00;
+  display: none;
+  margin-left: 150px;
+  margin-bottom: 20px;
+}
+
+#main.error #init-failures
+{
+  margin-left: 0;
+}
+
+#init-failures h2,
+#init-failures ul,
+#init-failures p
+{
+  padding: 10px;
+}
+
+#init-failures h2
+{
+  background-color: #f00;
+  color: #fff;
+  font-weight: bold;
+}
+
+#init-failures p
+{
+  color: #c0c0c0;
+  padding-top: 0;
+}
 
 #content-wrapper
 {

Modified: lucene/dev/trunk/solr/webapp/web/js/scripts/app.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/scripts/app.js?rev=1367362&r1=1367361&r2=1367362&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/scripts/app.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/scripts/app.js Mon Jul 30 23:26:11 2012
@@ -231,6 +231,29 @@ var solr_admin = function( app_config )
               .append( core_tpl );
           }
 
+          if( response.initFailures )
+          {
+            var failures = [];
+            for( var core_name in response.initFailures )
+            {
+              failures.push
+              (
+                '<li>' + 
+                  '<strong>' + core_name.esc() + ':</strong>' + "\n" +
+                  response.initFailures[core_name].esc() + "\n" +
+                '</li>'
+              );
+            }
+
+            if( 0 !== failures.length )
+            {
+              var init_failures = $( '#init-failures' );
+
+              init_failures.show();
+              $( 'ul', init_failures ).html( failures.join( "\n" ) );
+            }
+          }
+
           if( 0 === core_count )
           {
             show_global_error