Re: [Freeipa-devel] [PATCH] 102-103 UI part of 'Add last missing bits in new bind-dyndb-ldap'

2012-03-20 Thread Petr Vobornik

On 03/09/2012 05:29 AM, Endi Sukma Dewata wrote:

ACK. There are some minor issues.


Pushed to master, ipa-2-2.



On 3/7/2012 10:10 AM, Petr Vobornik wrote:

1) Add support of new options in dnsconfig

dnsconfig was extended of new attributes, so reflecting it in UI.

New attributes:
* idnsForwardPolicy
* idnsAllowSyncPTR
* idnsZoneRefresh

https://fedorahosted.org/freeipa/ticket/2489


If you click the idnsallowsyncptr checkbox and click again to return to
the original value, it will still show the undo button.


2) DNS forwarder's value can consist of IP address and a port.

The syntax is 'IP ADDRESS port PORT'. A new validator was created
for this purpose. It is based on IP address validator.


The validator is rather strict, it allows exactly a single space between
the words. If someone mistakenly type an additional space, the
validation error could be confusing because two adjacent spaces are
sometimes not very obvious. I think either the UI or the server (or
both) should normalize the space. Another option is to use separate
fields for the IP address and the port in the multivalued field:

Global forwarders: [192.168.1.1 ] port [80 ] Delete
Add




--
Petr Vobornik

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 102-103 UI part of 'Add last missing bits in new bind-dyndb-ldap'

2012-03-08 Thread Endi Sukma Dewata

ACK. There are some minor issues.

On 3/7/2012 10:10 AM, Petr Vobornik wrote:

1) Add support of new options in dnsconfig

dnsconfig was extended of new attributes, so reflecting it in UI.

New attributes:
* idnsForwardPolicy
* idnsAllowSyncPTR
* idnsZoneRefresh

https://fedorahosted.org/freeipa/ticket/2489


If you click the idnsallowsyncptr checkbox and click again to return to 
the original value, it will still show the undo button.



2) DNS forwarder's value can consist of IP address and a port.

The syntax is 'IP ADDRESS port PORT'. A new validator was created
for this purpose. It is based on IP address validator.


The validator is rather strict, it allows exactly a single space between 
the words. If someone mistakenly type an additional space, the 
validation error could be confusing because two adjacent spaces are 
sometimes not very obvious. I think either the UI or the server (or 
both) should normalize the space. Another option is to use separate 
fields for the IP address and the port in the multivalued field:


Global forwarders: [192.168.1.1  ] port [80  ]  Delete
   Add

--
Endi S. Dewata

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] 102-103 UI part of 'Add last missing bits in new bind-dyndb-ldap'

2012-03-07 Thread Petr Vobornik

1) Add support of new options in dnsconfig

dnsconfig was extended of new attributes, so reflecting it in UI.

New attributes:
  * idnsForwardPolicy
  * idnsAllowSyncPTR
  * idnsZoneRefresh

https://fedorahosted.org/freeipa/ticket/2489

2) DNS forwarder's value can consist of IP address and a port.

The syntax is 'IP ADDRESS port PORT'. A new validator was created 
for this purpose. It is based on IP address validator.


https://fedorahosted.org/freeipa/ticket/2490
--
Petr Vobornik
From 852f62746f1a72c272dded430ecaf29dd5af52b7 Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Wed, 7 Mar 2012 09:28:54 +0100
Subject: [PATCH] Add support of new options in dnsconfig

dnsconfig was extended of new attributes, so reflecting it in UI.

New attributes:
  * idnsForwardPolicy
  * idnsAllowSyncPTR
  * idnsZoneRefresh

 https://fedorahosted.org/freeipa/ticket/2489
---
 install/ui/dns.js|   13 -
 install/ui/test/data/dnsconfig_mod.json  |9 +
 install/ui/test/data/dnsconfig_show.json |9 +
 3 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/install/ui/dns.js b/install/ui/dns.js
index 4cc6d4c533fb7c81429a58cf81cfe132812ca2ed..6d147300b75531a8f2b1d8258c3c2fcdf587d0da 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -43,10 +43,21 @@ IPA.dns.config_entity = function(spec) {
 label: IPA.messages.objects.dnsconfig.options,
 fields: [
 {
+type: 'checkbox',
+name: 'idnsallowsyncptr'
+},
+{
 type: 'multivalued',
 name: 'idnsforwarders',
 validators: [IPA.ip_address_validator()]
-}
+},
+{
+type: 'checkboxes',
+name: 'idnsforwardpolicy',
+mutex: true,
+options: IPA.create_options(['only', 'first'])
+},
+'idnszonerefresh'
 ]
 }
 ],
diff --git a/install/ui/test/data/dnsconfig_mod.json b/install/ui/test/data/dnsconfig_mod.json
index e82e0735ed89439e29fed19c188f088e22cc0bc9..d6e1b8c2d4c2cf7085281d0be5658a18026d855b 100644
--- a/install/ui/test/data/dnsconfig_mod.json
+++ b/install/ui/test/data/dnsconfig_mod.json
@@ -17,9 +17,18 @@
 cn: [
 dns
 ],
+idnsallowsyncptr: [
+FALSE
+],
 idnsforwarders: [
 2001:beef::1
 ],
+idnsforwardpolicy: [
+first
+],
+idnszonerefresh: [
+20
+],
 objectclass: [
 idnsConfigObject,
 nsContainer,
diff --git a/install/ui/test/data/dnsconfig_show.json b/install/ui/test/data/dnsconfig_show.json
index e663abcc8b4c63d3a99e6de6f4e40a93e127ab1b..4ee15cd2f0ba290f747dbd7fb739c780e89d9667 100644
--- a/install/ui/test/data/dnsconfig_show.json
+++ b/install/ui/test/data/dnsconfig_show.json
@@ -18,9 +18,18 @@
 dns
 ],
 dn: cn=dns,dc=dev,dc=example,dc=com,
+idnsallowsyncptr: [
+FALSE
+],
 idnsforwarders: [
 2001:beef::1
 ],
+idnsforwardpolicy: [
+first
+],
+idnszonerefresh: [
+20
+],
 objectclass: [
 idnsConfigObject,
 nsContainer,
-- 
1.7.7.6

From 070d1c4085e531e8e84b1ae4e16cd0ab65cb46f5 Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Wed, 7 Mar 2012 14:42:59 +0100
Subject: [PATCH] DNS forwarder validator

DNS forwarder's value can consist of IP address and a port.

The syntax is 'IP ADDRESS port PORT'. A new validator was created for this purpose. It is based on IP address validator.

https://fedorahosted.org/freeipa/ticket/2490
---
 install/ui/dns.js  |   37 +--
 install/ui/test/data/ipa_init.json |1 +
 ipalib/plugins/internal.py |1 +
 3 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/install/ui/dns.js b/install/ui/dns.js
index 6d147300b75531a8f2b1d8258c3c2fcdf587d0da..4212f1d2446eff0d29e0b57225339e79765017fc 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -49,7 +49,7 @@ IPA.dns.config_entity = function(spec) {
 {
 type: 'multivalued',
 name: 'idnsforwarders',
-validators: [IPA.ip_address_validator()]
+validators: [IPA.dnsforwarder_validator()]
 },