Author: kishore
Date: Wed Apr 19 18:53:32 2017
New Revision: 1791952

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

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=1791952&r1=1791951&r2=1791952&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Wed Apr 19 18:53:32 2017
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 2.8-dev =====================
 
+CONNECTORS-1414: Return descriptive error message when UI is disconnected
+(Markus Schuch, Kishore Kumar, Karl Wright)
+
 CONNECTORS-1413: Fix object equality bug at Cmis Authority Connector.
 (Furkan KAMACI, JC)
 

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=1791952&r1=1791951&r2=1791952&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/index.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/index.jsp Wed Apr 19 
18:53:32 2017
@@ -35,6 +35,12 @@
     <link href="bootstrap-select/css/bootstrap-select.min.css" 
rel="stylesheet" type="text/css"/>
     <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
     <link rel="stylesheet" href="css/style.css" type="text/css" 
media="screen"/>
+    
+  <script type="text/javascript">
+    var MCFError = {
+        
ServerDown:"<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"errorCode.ServerDown")%>"
+    }
+  </script>
   </head>
   <body class="fixed skin-black sidebar-mini">
     <div class="wrapper">

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=1791952&r1=1791951&r2=1791952&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 Wed 
Apr 19 18:53:32 2017
@@ -361,11 +361,17 @@ function displayError(xhr)
 {
   $(".content-header #heading").text('Error!');
   document.title='Error';
+  var msg = xhr.status + " " + xhr.statusText;
+  //Proper error message, if the server is down.
+  if(xhr.readyState === 0 && xhr.status === 0)
+  {
+    msg = MCFError.ServerDown;
+  }
   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>' +
-                            '<h4>' + xhr.status + " " + xhr.statusText 
+'</h4>' +
+                            '<h4>' + msg +'</h4>' +
                           '</div>' +
                         '</div>' +
                         '<div class="box-footer with-border">' +

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=1791952&r1=1791951&r2=1791952&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
 Wed Apr 19 18:53:32 2017
@@ -43,6 +43,8 @@ index.PasswordColon=Password:
 index.Login=Login
 index.LoginFailed=Login failed!
 
+errorCode.ServerDown=Couldn't connect to the server. Please check if the 
server is up and running.
+
 banner.DocumentIngestion=Document Ingestion
 
 navigation.LogOut=Log Out

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=1791952&r1=1791951&r2=1791952&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
 Wed Apr 19 18:53:32 2017
@@ -43,6 +43,8 @@ index.PasswordColon=Contraseña:
 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.
+
 banner.DocumentIngestion=Ingreso de Documento
 
 navigation.LogOut=Cerrar la Sesión
@@ -1066,4 +1068,4 @@ editjob.AddANotification=Añadir una n
 viewjob.NotificationsColon=Notificaciones:
 viewjob.NotificationDescription=Descripción
 viewjob.NotificationConnectionName=Nombre de la conexión
-viewjob.NoNotificationConnections=No hay conexiones de notificación
\ No newline at end of file
+viewjob.NoNotificationConnections=No hay conexiones de notificación

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=1791952&r1=1791951&r2=1791952&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
 Wed Apr 19 18:53:32 2017
@@ -43,6 +43,8 @@ index.PasswordColon=パスワã
 index.Login=ログイン
 index.LoginFailed=ログインに失敗しました!
 
+errorCode.ServerDown=Couldn't connect to the server. Please check if the 
server is up and running.
+
 banner.DocumentIngestion=コンテンツの読込み
 
 navigation.LogOut=ログアウト

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=1791952&r1=1791951&r2=1791952&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
 Wed Apr 19 18:53:32 2017
@@ -43,6 +43,8 @@ index.PasswordColon=密码:
 index.Login=登录
 index.LoginFailed=登录失败!
 
+errorCode.ServerDown=Couldn't connect to the server. Please check if the 
server is up and running.
+
 banner.DocumentIngestion=文档爬取
 
 navigation.LogOut=退出


Reply via email to