[icinga-checkins] icinga.org: icinga-web/jmosshammer/default: * Error handler now notices if the web server is down (#fixes 775)

git at icinga.org git at icinga.org
Wed Sep 8 17:08:11 CEST 2010


Module: icinga-web
Branch: jmosshammer/default
Commit: a57cc1bfb64ed1534f5d48d34cbe153d31fa60d0
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=a57cc1bfb64ed1534f5d48d34cbe153d31fa60d0

Author: jmosshammer <jmosshammer at ws-jmosshammer.(none)>
Date:   Wed Sep  8 17:08:24 2010 +0200

* Error handler now notices if the web server is down (#fixes 775)

---

 app/modules/AppKit/lib/js/AppKitErrorHandler.js |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/modules/AppKit/lib/js/AppKitErrorHandler.js b/app/modules/AppKit/lib/js/AppKitErrorHandler.js
index c483679..fa9d58c 100644
--- a/app/modules/AppKit/lib/js/AppKitErrorHandler.js
+++ b/app/modules/AppKit/lib/js/AppKitErrorHandler.js
@@ -288,7 +288,7 @@ Ext.ns("AppKit.errorHandler");
 					AppKit.AjaxErrorHandler.error_500(proxy.url,response);
 					break;
 				default:
-					AppKit.AjaxErrorHandler.error_unknown(proxy.url,response.responseText);
+					AppKit.AjaxErrorHandler.error_unknown(proxy.url,response);
 					break;
 			}
 		}
@@ -323,7 +323,13 @@ Ext.ns("AppKit.errorHandler");
 				trackError(_("Access denied"));
 			},
 			error_unknown : function(target,error) {
-				trackError(_("A error occured when requesting ")+target+" : "+error.length <200 ? error: error.substr(0,200)+"...");
+				if(!(error.status)) {
+					Ext.Msg.alert(_("Critical error"),_("Couldn't connect to web-server!"));
+					window.location.reload();
+				}
+				if(!error)
+					error = "Unkown error";
+				trackError(_("A error occured when requesting ")+target);//+" : "+error.length <200 ? error: error.substr(0,200)+"...");
 			}
 		}
 





More information about the icinga-checkins mailing list