Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-03-18 Thread Petr Vobornik

On 03/14/2013 07:32 PM, Rob Crittenden wrote:

Petr Vobornik wrote:

On 03/07/2013 05:32 PM, Petr Vobornik wrote:

On 03/07/2013 02:19 PM, Ana Krivokapic wrote:

On 03/07/2013 12:41 PM, Petr Vobornik wrote:

On 03/06/2013 08:26 PM, Ana Krivokapic wrote:

On 03/06/2013 10:40 AM, Petr Vobornik wrote:

On 03/05/2013 05:52 PM, Ana Krivokapic wrote:

On 02/27/2013 05:10 PM, Petr Vobornik wrote:

On 02/27/2013 04:20 PM, Ana Krivokapic wrote:

Add support for Realm Domains to web UI.

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




8><---



Almost there, as discussed in person:

1. following strings should be add to and obtained from internal.py
plugin:
 title: 'Check DNS',
 message: 'Do you also want to perform DNS check?',
 ok_label: 'Check DNS',


2. the server plugin should report all dns resolution failures, not
just the first one.


Fixed, updated patch is attached.


Works fine, but you forgot to update all related tests
(s/domain/domains/):


==
FAIL: test_realmdomains[8]: realmdomains_mod: Try to replace list of
realm domains with a list with an invalid domain "doesnotexist.test"
--
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py",
line 264, in 
func = lambda: self.check(nice, **test)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py",
line 278, in check
self.check_exception(nice, cmd, args, options, expected)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py",
line 304, in check_exception
assert_deepequal(expected.strerror, e.strerror)
  File "/home/pvoborni/dev/freeipa/tests/util.py", line 343, in
assert_deepequal
VALUE % (doc, expected, got, stack)
AssertionError: assert_deepequal: expected != got.

  expected = u"invalid 'domain': no SOA or NS records found for
domains: doesnotexist.test"
  got = u"invalid 'domain': no SOA or NS records found for domain
doesnotexist.test"
  path = ()

--




False alarm. It was an error on my side.

ACK


Is this ready to be pushed? Do we need an ACK from Kyle too?

rob


Pushed to master, ipa-3-1.

Originally I waited for other patches to push it at once, but it takes 
more time then expected.

--
Petr Vobornik

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


Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-03-14 Thread Rob Crittenden

Petr Vobornik wrote:

On 03/07/2013 05:32 PM, Petr Vobornik wrote:

On 03/07/2013 02:19 PM, Ana Krivokapic wrote:

On 03/07/2013 12:41 PM, Petr Vobornik wrote:

On 03/06/2013 08:26 PM, Ana Krivokapic wrote:

On 03/06/2013 10:40 AM, Petr Vobornik wrote:

On 03/05/2013 05:52 PM, Ana Krivokapic wrote:

On 02/27/2013 05:10 PM, Petr Vobornik wrote:

On 02/27/2013 04:20 PM, Ana Krivokapic wrote:

Add support for Realm Domains to web UI.

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




8><---



Almost there, as discussed in person:

1. following strings should be add to and obtained from internal.py
plugin:
 title: 'Check DNS',
 message: 'Do you also want to perform DNS check?',
 ok_label: 'Check DNS',


2. the server plugin should report all dns resolution failures, not
just the first one.


Fixed, updated patch is attached.


Works fine, but you forgot to update all related tests
(s/domain/domains/):


==
FAIL: test_realmdomains[8]: realmdomains_mod: Try to replace list of
realm domains with a list with an invalid domain "doesnotexist.test"
--
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py",
line 264, in 
func = lambda: self.check(nice, **test)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py",
line 278, in check
self.check_exception(nice, cmd, args, options, expected)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py",
line 304, in check_exception
assert_deepequal(expected.strerror, e.strerror)
  File "/home/pvoborni/dev/freeipa/tests/util.py", line 343, in
assert_deepequal
VALUE % (doc, expected, got, stack)
AssertionError: assert_deepequal: expected != got.

  expected = u"invalid 'domain': no SOA or NS records found for
domains: doesnotexist.test"
  got = u"invalid 'domain': no SOA or NS records found for domain
doesnotexist.test"
  path = ()

--




False alarm. It was an error on my side.

ACK


Is this ready to be pushed? Do we need an ACK from Kyle too?

rob

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


Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-03-07 Thread Petr Vobornik

On 03/07/2013 05:32 PM, Petr Vobornik wrote:

On 03/07/2013 02:19 PM, Ana Krivokapic wrote:

On 03/07/2013 12:41 PM, Petr Vobornik wrote:

On 03/06/2013 08:26 PM, Ana Krivokapic wrote:

On 03/06/2013 10:40 AM, Petr Vobornik wrote:

On 03/05/2013 05:52 PM, Ana Krivokapic wrote:

On 02/27/2013 05:10 PM, Petr Vobornik wrote:

On 02/27/2013 04:20 PM, Ana Krivokapic wrote:

Add support for Realm Domains to web UI.

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




8><---



Almost there, as discussed in person:

1. following strings should be add to and obtained from internal.py
plugin:
 title: 'Check DNS',
 message: 'Do you also want to perform DNS check?',
 ok_label: 'Check DNS',


2. the server plugin should report all dns resolution failures, not
just the first one.


Fixed, updated patch is attached.


Works fine, but you forgot to update all related tests (s/domain/domains/):


==
FAIL: test_realmdomains[8]: realmdomains_mod: Try to replace list of
realm domains with a list with an invalid domain "doesnotexist.test"
--
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in
runTest
self.test(*self.arg)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py",
line 264, in 
func = lambda: self.check(nice, **test)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py",
line 278, in check
self.check_exception(nice, cmd, args, options, expected)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py",
line 304, in check_exception
assert_deepequal(expected.strerror, e.strerror)
  File "/home/pvoborni/dev/freeipa/tests/util.py", line 343, in
assert_deepequal
VALUE % (doc, expected, got, stack)
AssertionError: assert_deepequal: expected != got.

  expected = u"invalid 'domain': no SOA or NS records found for
domains: doesnotexist.test"
  got = u"invalid 'domain': no SOA or NS records found for domain
doesnotexist.test"
  path = ()

--




False alarm. It was an error on my side.

ACK
--
Petr Vobornik

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


Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-03-07 Thread Petr Vobornik

On 03/07/2013 02:19 PM, Ana Krivokapic wrote:

On 03/07/2013 12:41 PM, Petr Vobornik wrote:

On 03/06/2013 08:26 PM, Ana Krivokapic wrote:

On 03/06/2013 10:40 AM, Petr Vobornik wrote:

On 03/05/2013 05:52 PM, Ana Krivokapic wrote:

On 02/27/2013 05:10 PM, Petr Vobornik wrote:

On 02/27/2013 04:20 PM, Ana Krivokapic wrote:

Add support for Realm Domains to web UI.

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




8><---



Almost there, as discussed in person:

1. following strings should be add to and obtained from internal.py
plugin:
 title: 'Check DNS',
 message: 'Do you also want to perform DNS check?',
 ok_label: 'Check DNS',


2. the server plugin should report all dns resolution failures, not
just the first one.


Fixed, updated patch is attached.


Works fine, but you forgot to update all related tests (s/domain/domains/):


==
FAIL: test_realmdomains[8]: realmdomains_mod: Try to replace list of realm domains with a 
list with an invalid domain "doesnotexist.test"
--
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py", line 264, in 

func = lambda: self.check(nice, **test)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py", line 278, 
in check
self.check_exception(nice, cmd, args, options, expected)
  File "/home/pvoborni/dev/freeipa/tests/test_xmlrpc/xmlrpc_test.py", line 304, 
in check_exception
assert_deepequal(expected.strerror, e.strerror)
  File "/home/pvoborni/dev/freeipa/tests/util.py", line 343, in assert_deepequal
VALUE % (doc, expected, got, stack)
AssertionError: assert_deepequal: expected != got.

  expected = u"invalid 'domain': no SOA or NS records found for domains: 
doesnotexist.test"
  got = u"invalid 'domain': no SOA or NS records found for domain 
doesnotexist.test"
  path = ()

--


--
Petr Vobornik

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


Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-03-07 Thread Ana Krivokapic
On 03/07/2013 12:41 PM, Petr Vobornik wrote:
> On 03/06/2013 08:26 PM, Ana Krivokapic wrote:
>> On 03/06/2013 10:40 AM, Petr Vobornik wrote:
>>> On 03/05/2013 05:52 PM, Ana Krivokapic wrote:
 On 02/27/2013 05:10 PM, Petr Vobornik wrote:
> On 02/27/2013 04:20 PM, Ana Krivokapic wrote:
>> Add support for Realm Domains to web UI.
>>
>> https://fedorahosted.org/freeipa/ticket/3407
>
> The patch looks good, but there is a issue we don't have a precedence
> for.
>
> The mod command is doing dns check for new domains. Currently we
> can't
> specify --force option to bypass the check.
>
> I see two possible implementations:
> 1) On update, when user adds or modifies the values, a dialog would
> pop up and ask user whether he wants to force it.
>
> 2) Another option is to disable edit on the list(deletion would be
> still allowed) and move the add operation to separate action in
> action
> list.
>
> I prefer the former. Latter might have issues with two modifications
> (delete and add) at the same time at two different places (facet and
> add dialog).

 Added force option to the error dialog.

 Updated patch is attached.

>>>
>>> 1) I think the dialog with the force should be shown before executing
>>> the operation. Sometimes, DNS check can take several seconds. There is
>>> no point for waiting for the error if you know that it will fail.
>>>
>>> 2) Regardless of #1. I don't think that just adding 'force' button
>>> without explaining the user what it means is the way to go.
>>>
>>> Previously (solution #1) I had in mind to show following dialog after
>>> clicking on 'update':
>>>
>>>
>>> ---
>>> [Check DNS]
>>> ---
>>>
>>> Do you also want to perform DNS check?
>>>
>>>  [Check DNS] [Force Update]
>>> ---
>>>
>>> Default button (confirm button) will be [Check DNS]
>>>
>>
>> Thanks, fixed, and I also added a Cancel button, in case the user wants
>> to back out.
>>
>
> Almost there, as discussed in person:
>
> 1. following strings should be add to and obtained from internal.py
> plugin:
> title: 'Check DNS',
> message: 'Do you also want to perform DNS check?',
> ok_label: 'Check DNS',
>
>
> 2. the server plugin should report all dns resolution failures, not
> just the first one.

Fixed, updated patch is attached.

-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

From 965fd9dfd19bf3539ce050a4490001716d1e1e6b Mon Sep 17 00:00:00 2001
From: Ana Krivokapic 
Date: Thu, 7 Mar 2013 14:12:49 +0100
Subject: [PATCH] Realm Domains page

Add support for Realm Domains to web UI.

https://fedorahosted.org/freeipa/ticket/3407
---
 install/ui/src/freeipa/app.js |   1 +
 install/ui/src/freeipa/realmdomains.js| 103 ++
 install/ui/src/freeipa/webui.js   |   3 +-
 install/ui/test/data/ipa_init.json|   6 ++
 install/ui/test/data/ipa_init_objects.json|  42 +++
 install/ui/test/data/realmdomains_show.json   |  24 ++
 ipalib/plugins/internal.py|   6 ++
 ipalib/plugins/realmdomains.py|   7 +-
 tests/test_xmlrpc/test_realmdomains_plugin.py |   3 +-
 9 files changed, 189 insertions(+), 6 deletions(-)
 create mode 100644 install/ui/src/freeipa/realmdomains.js
 create mode 100644 install/ui/test/data/realmdomains_show.json

diff --git a/install/ui/src/freeipa/app.js b/install/ui/src/freeipa/app.js
index 9d89c1aede857ddfc27ebffa306c41172ed56bca..3dcb10f493824923254636c06b715164e419cce5 100644
--- a/install/ui/src/freeipa/app.js
+++ b/install/ui/src/freeipa/app.js
@@ -41,6 +41,7 @@ define([
 './idrange',
 './netgroup',
 './policy',
+'./realmdomains',
 './rule',
 './selinux',
 './serverconfig',
diff --git a/install/ui/src/freeipa/realmdomains.js b/install/ui/src/freeipa/realmdomains.js
new file mode 100644
index ..ea3997a151b8038276ec9cf3cf8c093dc10b468c
--- /dev/null
+++ b/install/ui/src/freeipa/realmdomains.js
@@ -0,0 +1,103 @@
+/*  Authors:
+ *Ana Krivokapic 
+ *
+ * Copyright (C) 2013 Red Hat
+ * see file 'COPYING' for use and warranty information
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should 

Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-03-07 Thread Petr Vobornik

On 03/06/2013 08:26 PM, Ana Krivokapic wrote:

On 03/06/2013 10:40 AM, Petr Vobornik wrote:

On 03/05/2013 05:52 PM, Ana Krivokapic wrote:

On 02/27/2013 05:10 PM, Petr Vobornik wrote:

On 02/27/2013 04:20 PM, Ana Krivokapic wrote:

Add support for Realm Domains to web UI.

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


The patch looks good, but there is a issue we don't have a precedence
for.

The mod command is doing dns check for new domains. Currently we can't
specify --force option to bypass the check.

I see two possible implementations:
1) On update, when user adds or modifies the values, a dialog would
pop up and ask user whether he wants to force it.

2) Another option is to disable edit on the list(deletion would be
still allowed) and move the add operation to separate action in action
list.

I prefer the former. Latter might have issues with two modifications
(delete and add) at the same time at two different places (facet and
add dialog).


Added force option to the error dialog.

Updated patch is attached.



1) I think the dialog with the force should be shown before executing
the operation. Sometimes, DNS check can take several seconds. There is
no point for waiting for the error if you know that it will fail.

2) Regardless of #1. I don't think that just adding 'force' button
without explaining the user what it means is the way to go.

Previously (solution #1) I had in mind to show following dialog after
clicking on 'update':


---
[Check DNS]
---

Do you also want to perform DNS check?

 [Check DNS] [Force Update]
---

Default button (confirm button) will be [Check DNS]



Thanks, fixed, and I also added a Cancel button, in case the user wants
to back out.



Almost there, as discussed in person:

1. following strings should be add to and obtained from internal.py plugin:
title: 'Check DNS',
message: 'Do you also want to perform DNS check?',
ok_label: 'Check DNS',


2. the server plugin should report all dns resolution failures, not just 
the first one.

--
Petr Vobornik

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


Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-03-06 Thread Ana Krivokapic
On 03/06/2013 10:40 AM, Petr Vobornik wrote:
> On 03/05/2013 05:52 PM, Ana Krivokapic wrote:
>> On 02/27/2013 05:10 PM, Petr Vobornik wrote:
>>> On 02/27/2013 04:20 PM, Ana Krivokapic wrote:
 Add support for Realm Domains to web UI.

 https://fedorahosted.org/freeipa/ticket/3407
>>>
>>> The patch looks good, but there is a issue we don't have a precedence
>>> for.
>>>
>>> The mod command is doing dns check for new domains. Currently we can't
>>> specify --force option to bypass the check.
>>>
>>> I see two possible implementations:
>>> 1) On update, when user adds or modifies the values, a dialog would
>>> pop up and ask user whether he wants to force it.
>>>
>>> 2) Another option is to disable edit on the list(deletion would be
>>> still allowed) and move the add operation to separate action in action
>>> list.
>>>
>>> I prefer the former. Latter might have issues with two modifications
>>> (delete and add) at the same time at two different places (facet and
>>> add dialog).
>>
>> Added force option to the error dialog.
>>
>> Updated patch is attached.
>>
>
> 1) I think the dialog with the force should be shown before executing
> the operation. Sometimes, DNS check can take several seconds. There is
> no point for waiting for the error if you know that it will fail.
>
> 2) Regardless of #1. I don't think that just adding 'force' button
> without explaining the user what it means is the way to go.
>
> Previously (solution #1) I had in mind to show following dialog after
> clicking on 'update':
>
>
> ---
> [Check DNS]
> ---
>
> Do you also want to perform DNS check?
>
> [Check DNS] [Force Update]
> ---
>
> Default button (confirm button) will be [Check DNS]
>

Thanks, fixed, and I also added a Cancel button, in case the user wants
to back out.

-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

From 7060b2082b092004826e9eb1c94c2b6fa3ed1e77 Mon Sep 17 00:00:00 2001
From: Ana Krivokapic 
Date: Wed, 6 Mar 2013 20:11:19 +0100
Subject: [PATCH] Realm Domains page

Add support for Realm Domains to web UI.

https://fedorahosted.org/freeipa/ticket/3407
---
 install/ui/src/freeipa/app.js   |   1 +
 install/ui/src/freeipa/realmdomains.js  | 105 
 install/ui/src/freeipa/webui.js |   3 +-
 install/ui/test/data/ipa_init.json  |   3 +
 install/ui/test/data/ipa_init_objects.json  |  42 +++
 install/ui/test/data/realmdomains_show.json |  24 +++
 ipalib/plugins/internal.py  |   3 +
 7 files changed, 180 insertions(+), 1 deletion(-)
 create mode 100644 install/ui/src/freeipa/realmdomains.js
 create mode 100644 install/ui/test/data/realmdomains_show.json

diff --git a/install/ui/src/freeipa/app.js b/install/ui/src/freeipa/app.js
index 9d89c1aede857ddfc27ebffa306c41172ed56bca..3dcb10f493824923254636c06b715164e419cce5 100644
--- a/install/ui/src/freeipa/app.js
+++ b/install/ui/src/freeipa/app.js
@@ -41,6 +41,7 @@ define([
 './idrange',
 './netgroup',
 './policy',
+'./realmdomains',
 './rule',
 './selinux',
 './serverconfig',
diff --git a/install/ui/src/freeipa/realmdomains.js b/install/ui/src/freeipa/realmdomains.js
new file mode 100644
index ..73d7f39ea33cba1b09f6808413ca89ab8b4cee62
--- /dev/null
+++ b/install/ui/src/freeipa/realmdomains.js
@@ -0,0 +1,105 @@
+/*  Authors:
+ *Ana Krivokapic 
+ *
+ * Copyright (C) 2013 Red Hat
+ * see file 'COPYING' for use and warranty information
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ */
+
+define(['./ipa', './jquery', './details', './search', './association',
+'./entity'], function (IPA, $) {
+
+IPA.realmdomains = {};
+
+IPA.realmdomains.entity = function (spec) {
+
+var that = IPA.entity(spec);
+
+that.init = function () {
+that.entity_init();
+
+that.builder.details_facet({
+factory: IPA.realmdomains_details_facet,
+title: IPA.metadata.objects.realmdomains.label,
+sections: [
+{
+name: 'identity',
+label: IPA.messages.objects.r

Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-03-06 Thread Petr Vobornik

On 03/05/2013 05:52 PM, Ana Krivokapic wrote:

On 02/27/2013 05:10 PM, Petr Vobornik wrote:

On 02/27/2013 04:20 PM, Ana Krivokapic wrote:

Add support for Realm Domains to web UI.

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


The patch looks good, but there is a issue we don't have a precedence
for.

The mod command is doing dns check for new domains. Currently we can't
specify --force option to bypass the check.

I see two possible implementations:
1) On update, when user adds or modifies the values, a dialog would
pop up and ask user whether he wants to force it.

2) Another option is to disable edit on the list(deletion would be
still allowed) and move the add operation to separate action in action
list.

I prefer the former. Latter might have issues with two modifications
(delete and add) at the same time at two different places (facet and
add dialog).


Added force option to the error dialog.

Updated patch is attached.



1) I think the dialog with the force should be shown before executing 
the operation. Sometimes, DNS check can take several seconds. There is 
no point for waiting for the error if you know that it will fail.


2) Regardless of #1. I don't think that just adding 'force' button 
without explaining the user what it means is the way to go.


Previously (solution #1) I had in mind to show following dialog after 
clicking on 'update':



---
[Check DNS]
---

Do you also want to perform DNS check?

[Check DNS] [Force Update]
---

Default button (confirm button) will be [Check DNS]

--
Petr Vobornik

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


Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-03-05 Thread Ana Krivokapic
On 02/27/2013 05:10 PM, Petr Vobornik wrote:
> On 02/27/2013 04:20 PM, Ana Krivokapic wrote:
>> Add support for Realm Domains to web UI.
>>
>> https://fedorahosted.org/freeipa/ticket/3407
>
> The patch looks good, but there is a issue we don't have a precedence
> for.
>
> The mod command is doing dns check for new domains. Currently we can't
> specify --force option to bypass the check.
>
> I see two possible implementations:
> 1) On update, when user adds or modifies the values, a dialog would
> pop up and ask user whether he wants to force it.
>
> 2) Another option is to disable edit on the list(deletion would be
> still allowed) and move the add operation to separate action in action
> list.
>
> I prefer the former. Latter might have issues with two modifications
> (delete and add) at the same time at two different places (facet and
> add dialog).

Added force option to the error dialog.

Updated patch is attached.

-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

From fb6feb8a3a8639a495c5827f8a514f775aa4f7a6 Mon Sep 17 00:00:00 2001
From: Ana Krivokapic 
Date: Tue, 5 Mar 2013 16:40:50 +0100
Subject: [PATCH] Realm Domains page

Add support for Realm Domains to web UI.

https://fedorahosted.org/freeipa/ticket/3407
---
 install/ui/src/freeipa/app.js   |   1 +
 install/ui/src/freeipa/realmdomains.js  | 102 
 install/ui/src/freeipa/webui.js |   3 +-
 install/ui/test/data/ipa_init.json  |   3 +
 install/ui/test/data/ipa_init_objects.json  |  42 
 install/ui/test/data/realmdomains_show.json |  24 +++
 ipalib/plugins/internal.py  |   3 +
 7 files changed, 177 insertions(+), 1 deletion(-)
 create mode 100644 install/ui/src/freeipa/realmdomains.js
 create mode 100644 install/ui/test/data/realmdomains_show.json

diff --git a/install/ui/src/freeipa/app.js b/install/ui/src/freeipa/app.js
index 9d89c1aede857ddfc27ebffa306c41172ed56bca..3dcb10f493824923254636c06b715164e419cce5 100644
--- a/install/ui/src/freeipa/app.js
+++ b/install/ui/src/freeipa/app.js
@@ -41,6 +41,7 @@ define([
 './idrange',
 './netgroup',
 './policy',
+'./realmdomains',
 './rule',
 './selinux',
 './serverconfig',
diff --git a/install/ui/src/freeipa/realmdomains.js b/install/ui/src/freeipa/realmdomains.js
new file mode 100644
index ..16ef491cd68422772063b3a9e4268e3b580bd8e9
--- /dev/null
+++ b/install/ui/src/freeipa/realmdomains.js
@@ -0,0 +1,102 @@
+/*  Authors:
+ *Ana Krivokapic 
+ *
+ * Copyright (C) 2013 Red Hat
+ * see file 'COPYING' for use and warranty information
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ */
+
+define(['./ipa', './jquery', './details', './search', './association',
+'./entity'], function (IPA, $) {
+
+IPA.realmdomains = {};
+
+IPA.realmdomains.entity = function (spec) {
+
+var that = IPA.entity(spec);
+
+that.init = function () {
+that.entity_init();
+
+that.builder.details_facet({
+factory: IPA.realmdomains_details_facet,
+title: IPA.metadata.objects.realmdomains.label,
+sections: [
+{
+name: 'identity',
+label: IPA.messages.objects.realmdomains.identity,
+fields: [
+{
+name: 'associateddomain',
+type: 'multivalued'
+}
+]
+}
+],
+needs_update: true
+});
+};
+return that;
+};
+
+IPA.realmdomains_details_facet = function (spec, no_init) {
+spec = spec || {};
+var that = IPA.details_facet(spec, true);
+
+that.update = function (on_success, on_error) {
+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) {
+var dialog = IPA.error_dialog({
+ 

Re: [Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-02-27 Thread Petr Vobornik

On 02/27/2013 04:20 PM, Ana Krivokapic wrote:

Add support for Realm Domains to web UI.

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


The patch looks good, but there is a issue we don't have a precedence for.

The mod command is doing dns check for new domains. Currently we can't 
specify --force option to bypass the check.


I see two possible implementations:
1) On update, when user adds or modifies the values, a dialog would pop 
up and ask user whether he wants to force it.


2) Another option is to disable edit on the list(deletion would be still 
allowed) and move the add operation to separate action in action list.


I prefer the former. Latter might have issues with two modifications 
(delete and add) at the same time at two different places (facet and add 
dialog).

--
Petr Vobornik

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


[Freeipa-devel] [PATCH] 0007 Web UI: Realm Domains page

2013-02-27 Thread Ana Krivokapic
Add support for Realm Domains to web UI.

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

-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

From a44867fdcd4fda8cce531d689f94f466ca6bb52d Mon Sep 17 00:00:00 2001
From: Ana Krivokapic 
Date: Wed, 27 Feb 2013 14:49:21 +0100
Subject: [PATCH] Realm Domains page

Add support for Realm Domains to web UI.

https://fedorahosted.org/freeipa/ticket/3407
---
 install/ui/src/freeipa/app.js   |  1 +
 install/ui/src/freeipa/realmdomains.js  | 56 +
 install/ui/src/freeipa/webui.js |  3 +-
 install/ui/test/data/ipa_init.json  |  3 ++
 install/ui/test/data/ipa_init_objects.json  | 42 ++
 install/ui/test/data/realmdomains_show.json | 24 +
 ipalib/plugins/internal.py  |  3 ++
 7 files changed, 131 insertions(+), 1 deletion(-)
 create mode 100644 install/ui/src/freeipa/realmdomains.js
 create mode 100644 install/ui/test/data/realmdomains_show.json

diff --git a/install/ui/src/freeipa/app.js b/install/ui/src/freeipa/app.js
index 9d89c1aede857ddfc27ebffa306c41172ed56bca..3dcb10f493824923254636c06b715164e419cce5 100644
--- a/install/ui/src/freeipa/app.js
+++ b/install/ui/src/freeipa/app.js
@@ -41,6 +41,7 @@ define([
 './idrange',
 './netgroup',
 './policy',
+'./realmdomains',
 './rule',
 './selinux',
 './serverconfig',
diff --git a/install/ui/src/freeipa/realmdomains.js b/install/ui/src/freeipa/realmdomains.js
new file mode 100644
index ..f1dbe506d6931b72f174fc637ab567184e0b0293
--- /dev/null
+++ b/install/ui/src/freeipa/realmdomains.js
@@ -0,0 +1,56 @@
+/*  Authors:
+ *Ana Krivokapic 
+ *
+ * Copyright (C) 2013 Red Hat
+ * see file 'COPYING' for use and warranty information
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ */
+
+define(['./ipa', './jquery', './details', './search', './association',
+'./entity'], function (IPA, $) {
+
+IPA.realmdomains = {};
+
+IPA.realmdomains.entity = function (spec) {
+
+var that = IPA.entity(spec);
+
+that.init = function () {
+that.entity_init();
+
+that.builder.details_facet({
+title: IPA.metadata.objects.realmdomains.label,
+sections: [
+{
+name: 'identity',
+label: IPA.messages.objects.realmdomains.identity,
+fields: [
+{
+name: 'associateddomain',
+type: 'multivalued'
+}
+]
+}
+],
+needs_update: true
+});
+};
+return that;
+};
+
+IPA.register('realmdomains', IPA.realmdomains.entity);
+
+return {};
+});
diff --git a/install/ui/src/freeipa/webui.js b/install/ui/src/freeipa/webui.js
index f6c3339ec4b5d3fb8a4cb547407eebf2a19b45af..04b255d8e99f59a777fce6eea230d01b48f52a9f 100644
--- a/install/ui/src/freeipa/webui.js
+++ b/install/ui/src/freeipa/webui.js
@@ -42,7 +42,8 @@ IPA.admin_navigation = function(spec) {
  {entity: 'dnsconfig'},
  {entity: 'dnsrecord', hidden:true}
  ]
-}
+},
+{entity: 'realmdomains'}
 ]},
 {name: 'policy', label: IPA.messages.tabs.policy, children: [
 {name: 'hbac', label: IPA.messages.tabs.hbac, children: [
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index c16bc992e437e6a5e1be918d46ea5dda33b97562..84663c9cb6c996ba9cf9428548a0cc860fdcd323 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -380,6 +380,9 @@
 "type_ad": "Active Directory domain",
 "type_local": "Local domain"
 },
+"realmdomains": {
+"identity": "Realm Domains"
+},
 "role": {
 "identity": "Role Settings"
 },
diff --git a/install/ui/test/data/ipa_init_objects.json b/install/ui/test/data/ipa_init_objects.json
index 6458e4cdaa5c