|
139 |
if (umcConfig.anonymousMeta) { |
139 |
if (umcConfig.anonymousMeta) { |
140 |
deferred.resolve(tools.status()); |
140 |
deferred.resolve(tools.status()); |
141 |
} else { |
141 |
} else { |
142 |
require(['umc/dialog'], function(_dialog) { |
142 |
tools.umcpCommand('get/meta?' + timestamp, undefined, undefined, undefined, undefined, {timeout: 10000}).then( |
143 |
// register the real umc/dialog module in the local scope |
143 |
lang.hitch(this, function(meta) { |
144 |
var dialog = _dialog; |
|
|
145 |
|
146 |
var metaData = xhr.get('/univention/get/meta?' + timestamp, {timeout: 10000}); |
147 |
|
148 |
metaData.then(lang.hitch(this, function(meta) { |
149 |
lang.mixin(this._status, meta.result); |
144 |
lang.mixin(this._status, meta.result); |
150 |
deferred.resolve(tools.status()); |
145 |
deferred.resolve(tools.status()); |
151 |
}), function (err){ |
146 |
}), function (err) { |
152 |
var message = _('Login call lasted too long. Please visit the <a href="https://help.univention.com/t/draft-login-call-lasted-too-long/19031">Help</a> to check for possible causes.'); |
147 |
require(['umc/dialog'], function(_dialog) { |
153 |
|
148 |
// register the real umc/dialog module in the local scope |
154 |
dialog.warn(message); |
149 |
var dialog = _dialog; |
155 |
deferred.reject('Timeout occurred'); |
150 |
|
|
|
151 |
var message = _('Login call lasted too long. Please visit the <a href="https://help.univention.com/t/draft-login-call-lasted-too-long/19031" target="_blank">Help</a> to check for possible causes.'); |
152 |
dialog.warn(message); |
153 |
deferred.reject('Timeout occurred'); |
154 |
}); |
156 |
}); |
155 |
}); |
157 |
}); |
|
|
158 |
} |
156 |
} |
159 |
return deferred.promise; |
157 |
return deferred.promise; |
160 |
}, |
158 |
}, |
|
559 |
var call = xhr.post(url, { |
557 |
var call = xhr.post(url, { |
560 |
data: body, |
558 |
data: body, |
561 |
handleAs: 'json', |
559 |
handleAs: 'json', |
|
|
560 |
timeout: (args && args.timeout) ? args.timeout : null, |
562 |
headers: lang.mixin({ |
561 |
headers: lang.mixin({ |
563 |
'Accept-Language': i18nTools.defaultLang(), |
562 |
'Accept-Language': i18nTools.defaultLang(), |
564 |
'Accept': 'application/json; q=1.0, text/html; q=0.3; */*; q=0.1', |
563 |
'Accept': 'application/json; q=1.0, text/html; q=0.3; */*; q=0.1', |
565 |
- |
|
|