View | Details | Raw Unified | Return to bug 51719
Collapse All | Expand All

(-)management/univention-management-console/www/management/error.html (-6 / +2 lines)
 Lines 23-34    Link Here 
23
					setTimeout(function() { /* dependency problem umc/dialog is not yet require()d in umc/tools*/
23
					setTimeout(function() { /* dependency problem umc/dialog is not yet require()d in umc/tools*/
24
						var data = json.parse(entities.decode(%ERROR%));
24
						var data = json.parse(entities.decode(%ERROR%));
25
						var info = tools.parseError(data);
25
						var info = tools.parseError(data);
26
						var title = info.title || _('HTTP Error %s', info.status);
26
						info.title = info.title || _('HTTP Error %s', info.status);
27
						var traceback = info.traceback || '';
27
						tools.getErrorHandler().displayError(info).always(function() {
28
						var message = info.message;
29
30
						var error_message = title + '\n' + message + '\n' + traceback;
31
						tools.showTracebackDialog(error_message, message, title).always(function() {
32
							setTimeout(function() {
28
							setTimeout(function() {
33
								window.location.href = data.location || '/univention/management/';
29
								window.location.href = data.location || '/univention/management/';
34
							}, 1000);
30
							}, 1000);
(-)management/univention-web/js/tools.js (-4 / +4 lines)
 Lines 485-491   define([ Link Here 
485
			return this._request(lang.mixin({
485
			return this._request(lang.mixin({
486
				url: '/univention/' + command,
486
				url: '/univention/' + command,
487
				data: _body,
487
				data: _body,
488
				errorHandler: this.__getErrorHandler(handleErrors),
488
				errorHandler: this.getErrorHandler(handleErrors),
489
				flavor: flavor,
489
				flavor: flavor,
490
				headers: {},
490
				headers: {},
491
				withCredentials: false,
491
				withCredentials: false,
 Lines 563-569   define([ Link Here 
563
			}
563
			}
564
		},
564
		},
565
565
566
		__getErrorHandler: function(handleErrors) {
566
		getErrorHandler: function(handleErrors) {
567
			var custom = {};
567
			var custom = {};
568
			if (handleErrors === false) {
568
			if (handleErrors === false) {
569
				custom = {
569
				custom = {
 Lines 670-676   define([ Link Here 
670
670
671
				displayTraceback: function(info) {
671
				displayTraceback: function(info) {
672
					topic.publish('/umc/actions', 'error', 'traceback');
672
					topic.publish('/umc/actions', 'error', 'traceback');
673
					tools.showTracebackDialog(info.traceback, info.title + '\n\n' + info.message, null, custom.hideInformVendor);
673
					return tools.showTracebackDialog(info.traceback, info.title + '\n\n' + info.message, null, custom.hideInformVendor);
674
				}
674
				}
675
			}, custom);
675
			}, custom);
676
			return errorHandler;
676
			return errorHandler;
 Lines 865-871   define([ Link Here 
865
			if (401 === info.status) {
865
			if (401 === info.status) {
866
				return; /*already handled*/
866
				return; /*already handled*/
867
			}
867
			}
868
			this.__getErrorHandler(handleErrors ? handleErrors : {}).error(info);
868
			this.getErrorHandler(handleErrors ? handleErrors : {}).error(info);
869
		},
869
		},
870
870
871
		showTracebackDialog: function(message, statusMessage, title, hideInformVendor) {
871
		showTracebackDialog: function(message, statusMessage, title, hideInformVendor) {

Return to bug 51719