mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-14 09:34:02 -06:00
Need force option in DNS zone adder dialog
When adding a new DNS zone in the WebUI, IPA server will verify whether the nameserver is in DNS. Sometimes it is necessary to skip the verification. This patch adds a --force option already available in CLI which can skip this the verification. https://fedorahosted.org/freeipa/ticket/1105
This commit is contained in:
parent
d9c1761234
commit
bc6f9accd9
4
API.txt
4
API.txt
@ -493,7 +493,7 @@ option: Int('dnsttl', attribute=True, cli_name='ttl', label=Gettext('Time to liv
|
||||
option: StrEnum('dnsclass', attribute=True, cli_name='class', label=Gettext('Class', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'IN', u'CS', u'CH', u'HS'))
|
||||
option: Str('addattr*', validate_add_attribute, cli_name='addattr', exclude='webui')
|
||||
option: Str('setattr*', validate_set_attribute, cli_name='setattr', exclude='webui')
|
||||
option: Flag('force', autofill=True, default=False, flags=['no_option', 'no_output'])
|
||||
option: Flag('force', autofill=True, default=False, flags=['no_option', 'no_output'], label=Gettext('Force', domain='ipa', localedir=None))
|
||||
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output'])
|
||||
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output'])
|
||||
option: Str('version?', exclude='webui', flags=['no_option', 'no_output'])
|
||||
@ -708,7 +708,7 @@ option: Str('idnsupdatepolicy', attribute=True, cli_name='update_policy', label=
|
||||
option: Flag('idnsallowdynupdate', attribute=True, autofill=True, cli_name='allow_dynupdate', default=False, label=Gettext('Dynamic update', domain='ipa', localedir=None), multivalue=False, required=True)
|
||||
option: Str('addattr*', validate_add_attribute, cli_name='addattr', exclude='webui')
|
||||
option: Str('setattr*', validate_set_attribute, cli_name='setattr', exclude='webui')
|
||||
option: Flag('force', autofill=True, default=False,lag('force', autofill=True, default=False, doc=Gettext('Force DNS zone creation even if nameserver not in DNS.', domain='ipa', localedir=None))
|
||||
option: Flag('force', autofill=True, default=False, label=Gettext('Force', domain='ipa', localedir=None))
|
||||
option: Str('ip_address?', _validate_ipaddr,tr('ip_address?', _validate_ipaddr, doc=Gettext('Add the nameserver to DNS with this IP address', domain='ipa', localedir=None))
|
||||
option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output'])
|
||||
option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output'])
|
||||
|
@ -21,7 +21,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */
|
||||
/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js, widget.js */
|
||||
|
||||
/* DNS */
|
||||
IPA.entity_factories.dnszone = function() {
|
||||
@ -30,7 +30,7 @@ IPA.entity_factories.dnszone = function() {
|
||||
entity('dnszone').
|
||||
search_facet({
|
||||
columns:['idnsname'],
|
||||
add_fields: ['idnsname','idnssoamname','idnssoarname']
|
||||
add_fields: ['idnsname','idnssoamname','idnssoarname', {factory:IPA.force_dnszone_add_checkbox_widget}]
|
||||
}).
|
||||
details_facet({sections:[{
|
||||
name:'identity',
|
||||
@ -57,6 +57,14 @@ IPA.entity_factories.dnszone = function() {
|
||||
build();
|
||||
};
|
||||
|
||||
IPA.force_dnszone_add_checkbox_widget = function (spec){
|
||||
var param_info = IPA.get_method_param('dnszone_add', 'force');
|
||||
spec.name = 'force';
|
||||
spec.label = param_info.label;
|
||||
spec.tooltip = param_info.doc;
|
||||
spec.undo = false;
|
||||
return IPA.checkbox_widget(spec);
|
||||
};
|
||||
|
||||
IPA.records_facet = function (spec){
|
||||
|
||||
|
@ -528,7 +528,7 @@
|
||||
],
|
||||
"hint": null,
|
||||
"include": null,
|
||||
"label": "<force>",
|
||||
"label": "Force",
|
||||
"multivalue": false,
|
||||
"name": "force",
|
||||
"primary_key": false,
|
||||
@ -634,7 +634,7 @@
|
||||
"flags": [],
|
||||
"hint": null,
|
||||
"include": null,
|
||||
"label": "<force>",
|
||||
"label": "Force",
|
||||
"multivalue": false,
|
||||
"name": "force",
|
||||
"primary_key": false,
|
||||
|
@ -346,6 +346,7 @@ class dnszone_add(LDAPCreate):
|
||||
"""
|
||||
takes_options = LDAPCreate.takes_options + (
|
||||
Flag('force',
|
||||
label=_('Force'),
|
||||
doc=_('Force DNS zone creation even if nameserver not in DNS.'),
|
||||
),
|
||||
Str('ip_address?', _validate_ipaddr,
|
||||
@ -639,6 +640,7 @@ class dnsrecord_add(LDAPCreate, dnsrecord_cmd_w_record_options):
|
||||
no_option_msg = 'No options to add a specific record provided.'
|
||||
takes_options = LDAPCreate.takes_options + (
|
||||
Flag('force',
|
||||
label=_('Force'),
|
||||
flags=['no_option', 'no_output'],
|
||||
doc=_('force NS record creation even if its hostname is not in DNS'),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user