summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-01-05 21:20:31 +0700
committerAdam Young <ayoung@redhat.com>2011-01-05 15:33:56 -0500
commite0cf3a8313b2643597c566fec8502ed0f335d22d (patch)
tree5e26a0bb14a9c78f1ad81d88a5d3e85e2dc2f9d0 /install
parent6e5b540db23e51871dfff0be3b2ef7742b18756c (diff)
downloadfreeipa-e0cf3a8313b2643597c566fec8502ed0f335d22d.tar.gz
freeipa-e0cf3a8313b2643597c566fec8502ed0f335d22d.tar.xz
freeipa-e0cf3a8313b2643597c566fec8502ed0f335d22d.zip
Use AJAX status text as default error message.
The ipa_cmd() error handler has been updated to use AJAX status text as the default error message.
Diffstat (limited to 'install')
-rw-r--r--install/static/ipa.js26
1 files changed, 15 insertions, 11 deletions
diff --git a/install/static/ipa.js b/install/static/ipa.js
index ac8a0f265..b340d8350 100644
--- a/install/static/ipa.js
+++ b/install/static/ipa.js
@@ -314,21 +314,25 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname, comm
}
function error_handler(xhr, text_status, error_thrown) {
- if (!error_thrown){
- error_thrown = {name:'unknown'}
+
+ if (!error_thrown) {
+ error_thrown = {
+ name: xhr.responseText || 'Unknown Error',
+ message: xhr.statusText || 'Unknown Error'
+ }
}
- if (xhr.status === 401){
- error_thrown.name = 'Kerberos ticket no longer valid.';
+ if (xhr.status === 401) {
+ error_thrown.name = 'Kerberos ticket no longer valid.';
if (IPA.messages && IPA.messages.ajax){
- error_thrown.message = IPA.messages.ajax["401"];
- }else{
+ error_thrown.message = IPA.messages.ajax["401"];
+ } else {
error_thrown.message =
- "Your kerberos ticket no longer valid."+
- "Please run kinit and then click 'retry'"+
- "If this is your first time running the IPA Web UI"+
- "<a href='/ipa//config/unauthorized.html'> "+
- "Follow these directions</a> to configure your browser."
+ "Your kerberos ticket no longer valid. "+
+ "Please run kinit and then click 'retry'. "+
+ "If this is your first time running the IPA Web UI "+
+ "<a href='/ipa/config/unauthorized.html'>"+
+ "follow these directions</a> to configure your browser."
}
}