manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kish...@apache.org
Subject svn commit: r1792158 - in /manifoldcf/trunk: ./ framework/crawler-ui/src/main/webapp/ framework/crawler-ui/src/main/webapp/javascript/ framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/
Date Thu, 20 Apr 2017 23:15:46 GMT
Author: kishore
Date: Thu Apr 20 23:15:46 2017
New Revision: 1792158

URL: http://svn.apache.org/viewvc?rev=1792158&view=rev
Log:
Fix for CONNECTORS-1415

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/index.jsp
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js
    manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
    manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_es_ES.properties
    manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
    manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1792158&r1=1792157&r2=1792158&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Apr 20 23:15:46 2017
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 2.8-dev =====================
 
+CONNECTORS-1415: Return descriptive error message when Internal Server Error occurs
+(Kishore Kumar)
+
 CONNECTORS-1414: Return descriptive error message when UI is disconnected
 (Markus Schuch, Kishore Kumar, Karl Wright)
 

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/index.jsp?rev=1792158&r1=1792157&r2=1792158&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/index.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/index.jsp Thu Apr 20 23:15:46 2017
@@ -38,7 +38,8 @@
     
   <script type="text/javascript">
     var MCFError = {
-        ServerDown:"<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"errorCode.ServerDown")%>"
+        ServerDown          :"<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"errorCode.ServerDown")%>",
+        InternalServerError :"<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"errorCode.InternalServerError")%>"
     }
   </script>
   </head>
@@ -86,6 +87,22 @@
         <div class="bounce3"></div>
       </div>
     </div>
+    <!-- Error Modal -->
+    <div class="modal fade" id="exceptionModal" tabindex="-1" role="dialog" aria-labelledby="exceptionModalLabel">
+      <div class="modal-dialog modal-lg" role="document">
+        <div class="modal-content">
+          <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
+            <h4 class="modal-title" id="exceptionModalLabel">Internal Server Exception</h4>
+          </div>
+          <div class="modal-body" style="max-height:calc(100vh - 212px);overflow: auto;">
+          </div>
+          <div class="modal-footer">
+            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+          </div>
+        </div>
+      </div>
+    </div>
     <script src="javascript/jquery.min.js"></script>
     <!-- Bootstrap JS -->
     <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js?rev=1792158&r1=1792157&r2=1792158&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/javascript/mcf.js Thu Apr 20 23:15:46
2017
@@ -363,21 +363,34 @@ function displayError(xhr)
   document.title='Error';
   var msg = xhr.status + " " + xhr.statusText;
   //Proper error message, if the server is down.
-  if(xhr.readyState === 0 && xhr.status === 0)
+  if(xhr.status === 0)
   {
     msg = MCFError.ServerDown;
   }
+  else if(xhr.status === 500)
+  {
+    msg = MCFError.InternalServerError;
+  }
   var errorTemplate = '<div class="box box-solid">' +
                         '<div class="box-body">' +
                           '<div class="alert alert-danger">' +
-                            '<h3><i class="icon fa fa-ban"></i> Error!</h3>'
+
+                            '<h3><i class="fa fa-ban fa-fw"></i> Error!</h3>'
+
                             '<h4>' + msg +'</h4>' +
                           '</div>' +
                         '</div>' +
                         '<div class="box-footer with-border">' +
-                          '<a class="btn btn-primary" href="index.jsp" title="Return"
data-toggle="tooltip">' +
-                            '<i class="fa fa-check fa-fw" aria-hidden="true"></i>OK'
+
-                          '</a>' +
+                          '<div class="btn-group">' +
+                            '<a class="btn btn-default" href="index.jsp" title="Return"
data-toggle="tooltip">' +
+                              '<i class="fa fa-check fa-fw" aria-hidden="true"></i>OK'
+
+                            '</a>';
+  if(xhr.status === 500)
+  {
+    errorTemplate +=        '<button type="button" class="btn btn-default" data-toggle="modal"
data-target="#exceptionModal">' +
+                              '<i class="fa fa-exclamation-triangle fa-fw" aria-hidden="true"></i>See
Exception</button>';
+    $('#exceptionModal .modal-body').empty();
+    $('#exceptionModal .modal-body').html(xhr.responseText);
+  }
+  errorTemplate +=        '</div>' +
                         '</div>' +
                       '</div>';
   $("#content").html(errorTemplate);

Modified: manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties?rev=1792158&r1=1792157&r2=1792158&view=diff
==============================================================================
--- manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
(original)
+++ manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_en_US.properties
Thu Apr 20 23:15:46 2017
@@ -44,6 +44,7 @@ index.Login=Login
 index.LoginFailed=Login failed!
 
 errorCode.ServerDown=Couldn't connect to the server. Please check if the server is up and
running.
+errorCode.InternalServerError=Oops! Looks like something went wrong.
 
 banner.DocumentIngestion=Document Ingestion
 

Modified: manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_es_ES.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_es_ES.properties?rev=1792158&r1=1792157&r2=1792158&view=diff
==============================================================================
--- manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_es_ES.properties
(original)
+++ manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_es_ES.properties
Thu Apr 20 23:15:46 2017
@@ -44,6 +44,7 @@ index.Login=Iniciar sesión
 index.LoginFailed=error de inicio de sesion!
 
 errorCode.ServerDown=Couldn't connect to the server. Please check if the server is up and
running.
+errorCode.InternalServerError=Oops! Looks like something went wrong.
 
 banner.DocumentIngestion=Ingreso de Documento
 

Modified: manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties?rev=1792158&r1=1792157&r2=1792158&view=diff
==============================================================================
--- manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
(original)
+++ manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_ja_JP.properties
Thu Apr 20 23:15:46 2017
@@ -44,6 +44,7 @@ index.Login=ログイン
 index.LoginFailed=ログインに失敗しました!
 
 errorCode.ServerDown=Couldn't connect to the server. Please check if the server is up and
running.
+errorCode.InternalServerError=Oops! Looks like something went wrong.
 
 banner.DocumentIngestion=コンテンツの読込み
 

Modified: manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties?rev=1792158&r1=1792157&r2=1792158&view=diff
==============================================================================
--- manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties
(original)
+++ manifoldcf/trunk/framework/ui-core/src/main/native2ascii/org/apache/manifoldcf/ui/i18n/common_zh_CN.properties
Thu Apr 20 23:15:46 2017
@@ -44,6 +44,7 @@ index.Login=登录
 index.LoginFailed=登录失败!
 
 errorCode.ServerDown=Couldn't connect to the server. Please check if the server is up and
running.
+errorCode.InternalServerError=Oops! Looks like something went wrong.
 
 banner.DocumentIngestion=文档爬取
 



Mime
View raw message