summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-05-20 11:27:58 -0500
committerAdam Young <ayoung@redhat.com>2011-05-20 14:01:02 -0400
commit0238cb845a724969990be3c8a45ef572296b5de1 (patch)
tree0699b9c06681fcce5afdd413b0daac7df4544841 /install
parent887f53cd67d91418d1e64ad1d1b699d26df09f17 (diff)
downloadfreeipa-0238cb845a724969990be3c8a45ef572296b5de1.tar.gz
freeipa-0238cb845a724969990be3c8a45ef572296b5de1.tar.xz
freeipa-0238cb845a724969990be3c8a45ef572296b5de1.zip
Fixed Ajax error handling.
The IPA.command has been modified not to insert a title into the error object thrown by Ajax operation because the object could be immutable. Ticket #1240
Diffstat (limited to 'install')
-rw-r--r--install/ui/associate.js1
-rw-r--r--install/ui/details.js1
-rw-r--r--install/ui/dns.js1
-rw-r--r--install/ui/hbac.js1
-rw-r--r--install/ui/ipa.js14
-rw-r--r--install/ui/search.js1
-rw-r--r--install/ui/webui.js1
-rw-r--r--install/ui/widget.js1
8 files changed, 5 insertions, 16 deletions
diff --git a/install/ui/associate.js b/install/ui/associate.js
index 6f003418..4d9e728d 100644
--- a/install/ui/associate.js
+++ b/install/ui/associate.js
@@ -1021,7 +1021,6 @@ IPA.association_facet = function (spec) {
function on_error(xhr, text_status, error_thrown) {
var summary = $('span[name=summary]', that.table.tfoot).empty();
summary.append('<p>Error: '+error_thrown.name+'</p>');
- summary.append('<p>'+error_thrown.title+'</p>');
summary.append('<p>'+error_thrown.message+'</p>');
}
diff --git a/install/ui/details.js b/install/ui/details.js
index 657d3bc3..ee5b5554 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -621,7 +621,6 @@ IPA.details_facet = function(spec) {
command.on_error = function(xhr, text_status, error_thrown) {
var details = $('.details', that.container).empty();
details.append('<p>Error: '+error_thrown.name+'</p>');
- details.append('<p>'+error_thrown.title+'</p>');
details.append('<p>'+error_thrown.message+'</p>');
};
diff --git a/install/ui/dns.js b/install/ui/dns.js
index b6e6b23d..f295145d 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -476,7 +476,6 @@ IPA.records_facet = function(spec) {
function on_error(xhr, text_status, error_thrown) {
var summary = $('span[name=summary]', that.table.tfoot).empty();
summary.append('<p>Error: '+error_thrown.name+'</p>');
- summary.append('<p>'+error_thrown.title+'</p>');
summary.append('<p>'+error_thrown.message+'</p>');
}
diff --git a/install/ui/hbac.js b/install/ui/hbac.js
index 22c0c7e1..93ff7fbd 100644
--- a/install/ui/hbac.js
+++ b/install/ui/hbac.js
@@ -999,7 +999,6 @@ IPA.hbacrule_accesstime_widget = function (spec) {
function on_error(xhr, text_status, error_thrown) {
var summary = $('span[name=summary]', that.table.tfoot).empty();
summary.append('<p>Error: '+error_thrown.name+'</p>');
- summary.append('<p>'+error_thrown.title+'</p>');
summary.append('<p>'+error_thrown.message+'</p>');
}
diff --git a/install/ui/ipa.js b/install/ui/ipa.js
index f2ffcf1d..8f11b92d 100644
--- a/install/ui/ipa.js
+++ b/install/ui/ipa.js
@@ -298,7 +298,7 @@ IPA.command = function(spec) {
IPA.error_dialog.dialog({
modal: true,
- title: error_thrown.title,
+ title: error_thrown.name,
width: 400,
buttons: buttons,
close: function() {
@@ -333,10 +333,6 @@ IPA.command = function(spec) {
}
}
- if (!error_thrown.title) {
- error_thrown.title = 'AJAX Error: '+error_thrown.name;
- }
-
if (that.retry) {
dialog_open.call(this, xhr, text_status, error_thrown);
@@ -350,7 +346,7 @@ IPA.command = function(spec) {
if (!data) {
IPA.hide_activity_icon();
var error_thrown = {
- title: 'HTTP Error '+xhr.status,
+ name: 'HTTP Error '+xhr.status,
url: this.url,
message: data ? xhr.statusText : "No response"
};
@@ -359,7 +355,7 @@ IPA.command = function(spec) {
} else if (data.error) {
// error_handler() calls IPA.hide_activity_icon()
error_handler.call(this, xhr, text_status, /* error_thrown */ {
- title: 'IPA Error '+data.error.code,
+ name: 'IPA Error '+data.error.code,
message: data.error.message
});
@@ -461,7 +457,7 @@ IPA.batch_command = function (spec) {
if (command.on_error) command.on_error(
xhr, text_status,
{
- title: 'Internal Error '+xhr.status,
+ name: 'Internal Error '+xhr.status,
message: result ? xhr.statusText : "Internal error"
}
);
@@ -471,7 +467,7 @@ IPA.batch_command = function (spec) {
xhr,
text_status,
{
- title: 'IPA Error '+result.error.code,
+ name: 'IPA Error '+result.error.code,
message: result.error.message
}
);
diff --git a/install/ui/search.js b/install/ui/search.js
index 1e218662..8e64adff 100644
--- a/install/ui/search.js
+++ b/install/ui/search.js
@@ -268,7 +268,6 @@ IPA.search_facet = function(spec) {
function on_error(xhr, text_status, error_thrown) {
var summary = $('span[name=summary]', that.table.tfoot).empty();
summary.append('<p>Error: '+error_thrown.name+'</p>');
- summary.append('<p>'+error_thrown.title+'</p>');
summary.append('<p>'+error_thrown.message+'</p>');
}
diff --git a/install/ui/webui.js b/install/ui/webui.js
index ae9a6db8..b9d050c2 100644
--- a/install/ui/webui.js
+++ b/install/ui/webui.js
@@ -156,7 +156,6 @@ $(function() {
function init_on_error(xhr, text_status, error_thrown) {
var container = $('#content').empty();
container.append('<p>Error: '+error_thrown.name+'</p>');
- container.append('<p>'+error_thrown.title+'</p>');
container.append('<p>'+error_thrown.message+'</p>');
}
diff --git a/install/ui/widget.js b/install/ui/widget.js
index 85980ace..c7692193 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -1374,7 +1374,6 @@ IPA.table_widget = function (spec) {
function on_error(xhr, text_status, error_thrown) {
var summary = $('span[name=summary]', that.tfoot).empty();
summary.append('<p>Error: '+error_thrown.name+'</p>');
- summary.append('<p>'+error_thrown.title+'</p>');
summary.append('<p>'+error_thrown.message+'</p>');
}