summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ui/src/freeipa/dns.js68
-rw-r--r--install/ui/test/data/ipa_init.json5
-rw-r--r--ipalib/plugins/internal.py3
3 files changed, 71 insertions, 5 deletions
diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js
index 675a2d7e8..7b66c8674 100644
--- a/install/ui/src/freeipa/dns.js
+++ b/install/ui/src/freeipa/dns.js
@@ -516,6 +516,55 @@ IPA.dnszone_details_facet = function(spec, no_init) {
return batch;
};
+ that.update = function (on_success, on_error) {
+
+ // If update touches 'idnssoamname', open dialog to allow to skip
+ // DNS resolution check (--force option)
+
+ var command = that.create_update_command();
+
+ command.on_success = function (data, text_status, xhr) {
+ that.update_on_success(data, text_status, xhr);
+ if (on_success) on_success.call(this, data, text_status, xhr);
+ };
+
+ command.on_error = function (xhr, text_status, error_thrown) {
+ that.update_on_error(xhr, text_status, error_thrown);
+ if (on_error) on_error.call(this, xhr, text_status, error_thrown);
+ };
+
+ if (command.options.idnssoamname === undefined) {
+ command.execute();
+ return;
+ }
+
+ var dialog = IPA.confirm_dialog({
+ title: '@i18n:objects.dnszone.soamname_change_title',
+ message: '@i18n:objects.dnszone.soamname_change_message',
+ ok_label: '@i18n:objects.realmdomains.check_dns',
+ on_ok: function () {
+ command.execute();
+ }
+ });
+
+ var cancel_button = dialog.get_button('cancel');
+ dialog.buttons.remove('cancel');
+
+ dialog.create_button({
+ name: 'force',
+ label: '@i18n:objects.realmdomains.force_update',
+ visible: true,
+ click: function () {
+ command.set_option('force', true);
+ command.execute();
+ dialog.close();
+ }
+ });
+
+ dialog.add_button(cancel_button);
+ dialog.open();
+ };
+
that.update_on_success = function(data, text_status, xhr) {
that.refresh();
that.on_update.notify();
@@ -979,9 +1028,16 @@ IPA.dns.get_record_metadata = function() {
{
name: 'nsrecord',
attributes: [
- 'ns_part_hostname'
+ 'ns_part_hostname',
+ {
+ $type: 'checkbox',
+ name: 'force',
+ label: '@i18n:objects.dnszone.skip_dns_check'
+ }
+ ],
+ adder_attributes: [
+ 'force'
],
- adder_attributes: [],
columns: ['ns_part_hostname']
},
{
@@ -1301,8 +1357,12 @@ IPA.dns.record_prepare_editor_for_type = function(type, fields, widgets, update)
}
var metadata = IPA.get_entity_param('dnsrecord', attribute.name);
- if (metadata && update && metadata.flags &&
- metadata.flags.indexOf('no_update') > -1) continue;
+ var no_update = metadata && metadata.flags &&
+ metadata.flags.indexOf('no_update') > -1;
+ var adder_attr = type.adder_attributes &&
+ type.adder_attributes.indexOf(attribute.name) > -1;
+
+ if (update && (no_update || adder_attr)) continue;
//create field
var field = {};
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index ad9449d28..c4ea2acef 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -298,7 +298,10 @@
"add_permission": "Add Permission",
"add_permission_confirm":"Are you sure you want to add permission for DNS Zone ${object}?",
"remove_permission": "Remove Permission",
- "remove_permission_confirm": "Are you sure you want to remove permission for DNS Zone ${object}?"
+ "remove_permission_confirm": "Are you sure you want to remove permission for DNS Zone ${object}?",
+ "skip_dns_check": "Skip DNS check",
+ "soamname_change_message": "Do you want to check if new authoritative nameserver address is in DNS",
+ "soamname_change_title": "Authoritative nameserver change"
},
"group": {
"details": "Group Settings",
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 09e09dc1e..891dc5d75 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -443,6 +443,9 @@ class i18n_messages(Command):
"add_permission_confirm":_("Are you sure you want to add permission for DNS Zone ${object}?"),
"remove_permission": _("Remove Permission"),
"remove_permission_confirm": _("Are you sure you want to remove permission for DNS Zone ${object}?"),
+ "skip_dns_check": _("Skip DNS check"),
+ "soamname_change_message": _("Do you want to check if new authoritative nameserver address is in DNS"),
+ "soamname_change_title": _("Authoritative nameserver change"),
},
"group": {
"details": _("Group Settings"),