summaryrefslogtreecommitdiffstats
path: root/install/ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/src')
-rw-r--r--install/ui/src/freeipa/association.js33
-rw-r--r--install/ui/src/freeipa/search.js4
-rw-r--r--install/ui/src/freeipa/sudo.js14
3 files changed, 41 insertions, 10 deletions
diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js
index 71ee71d48..2921849d2 100644
--- a/install/ui/src/freeipa/association.js
+++ b/install/ui/src/freeipa/association.js
@@ -1025,10 +1025,22 @@ IPA.association_facet = function (spec, no_init) {
other_entity: that.other_entity,
values: dialog.get_selected_values(),
method: that.add_method,
- on_success: function() {
+ on_success: function(data) {
that.refresh();
dialog.close();
- IPA.notify_success('@i18n:association.added');
+ var succeeded = data.result.completed;
+
+ if (!succeeded) {
+ succeeded = 0;
+ for (var i = 0; i< data.result.results.length; i++) {
+ if (data.result.results[i].completed === 1) {
+ succeeded++;
+ }
+ }
+ }
+
+ var msg = text.get('@i18n:association.added').replace('${count}', succeeded);
+ IPA.notify_success(msg);
},
on_error: function() {
that.refresh();
@@ -1077,9 +1089,22 @@ IPA.association_facet = function (spec, no_init) {
other_entity: that.other_entity,
values: values,
method: that.remove_method,
- on_success: function() {
+ on_success: function(data) {
that.refresh();
- IPA.notify_success('@i18n:association.removed');
+
+ var succeeded = data.result.completed;
+
+ if (!succeeded) {
+ succeeded = 0;
+ for (var i = 0; i< data.result.results.length; i++) {
+ if (data.result.results[i].completed === 1) {
+ succeeded++;
+ }
+ }
+ }
+
+ var msg = text.get('@i18n:association.removed').replace('${count}', succeeded);
+ IPA.notify_success(msg);
},
on_error: function() {
that.refresh();
diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js
index 8af5a29d3..a77f1768c 100644
--- a/install/ui/src/freeipa/search.js
+++ b/install/ui/src/freeipa/search.js
@@ -337,7 +337,9 @@ IPA.search_deleter_dialog = function(spec) {
batch.on_success = function(data, text_status, xhr) {
that.facet.refresh();
that.facet.on_update.notify([],that.facet);
- IPA.notify_success('@i18n:search.deleted');
+ var succeeded = batch.commands.length - batch.errors.errors.length;
+ var msg = text.get('@i18n:search.deleted').replace('${count}', succeeded);
+ IPA.notify_success(msg);
};
batch.on_error = function() {
diff --git a/install/ui/src/freeipa/sudo.js b/install/ui/src/freeipa/sudo.js
index 638b2380f..cb620e41b 100644
--- a/install/ui/src/freeipa/sudo.js
+++ b/install/ui/src/freeipa/sudo.js
@@ -881,18 +881,22 @@ IPA.sudo.options_section = function(spec) {
on_success: function(data) {
//last successful result of batch results contains valid data
var result;
- for(var i = data.result.results.length - 1; i > -1; i--) {
- result = data.result.results[i].result;
- if(result) break;
+ var succeeded = 0;
+
+ for (var i = data.result.results.length - 1; i > -1; i--) {
+ var error = data.result.results[i].error;
+ if (!result) result = data.result.results[i].result;
+ if (!error) succeeded++;
}
- if(result) {
+ if (result) {
that.table.load(result);
} else {
that.reload();
}
- IPA.notify_success('@i18n:objects.sudorule.option_removed');
+ var msg = text.get('@i18n:objects.sudorule.option_removed').replace('${count}', succeeded);
+ IPA.notify_success(msg);
},
on_error: function(data) {
that.reload();