Re: [Freeipa-devel] [PATCH] 197 Fixed search in HBAC test

2012-09-06 Thread Petr Vobornik

On 09/05/2012 07:24 PM, Endi Sukma Dewata wrote:

On 9/3/2012 6:28 AM, Petr Vobornik wrote:

b) force refresh when searching with unchanged filter


I did (b). Updated patch attached.

I don't want to implement 'expiration date' at the moment. It's too
widespread change. Maybe in FreeIPA 3.2.


ACK.


Pushed to master and ipa-3-0.

--
Petr Vobornik

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


Re: [Freeipa-devel] [PATCH] 197 Fixed search in HBAC test

2012-09-05 Thread Endi Sukma Dewata

On 9/3/2012 6:28 AM, Petr Vobornik wrote:

b) force refresh when searching with unchanged filter


I did (b). Updated patch attached.

I don't want to implement 'expiration date' at the moment. It's too
widespread change. Maybe in FreeIPA 3.2.


ACK.

--
Endi S. Dewata

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


Re: [Freeipa-devel] [PATCH] 197 Fixed search in HBAC test

2012-09-03 Thread Petr Vobornik

On 08/28/2012 04:42 PM, Endi Sukma Dewata wrote:

On 8/21/2012 9:03 AM, Petr Vobornik wrote:

Search in HBAC test wasn't working because expired flag wasn't set.

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

Notes: HBAC facets don't have refresh button. They can be refreshed by
changing filter and searching. If one search with same filter, it sets
expired flag but it doesn't refresh (search) because page state isn't
changed. It refreshes when one go to different facet and returns back.
Is this behavior acceptable? Or should we
a) don't set expired flag when searching with unchanged filter
b) force refresh when searching with unchanged filter
c) add refresh button along with a)
I prefer leave it as is or b)


Hmm.. the behavior is consistent with the rest of the UI, but I think
when the user hits Enter or clicks the Search icon in the filter box
he'd expect the UI to run a new search and return the latest result even
if it's the same filter. I agree with option (b). A Refresh button can
be added too, but it's optional.

So this patch is ACKed, but feel free to make a future improvement.
Maybe instead of having an 'expired flag' we could store an 'expiration
date'. If the user returns to the page before it expires, the UI can
show the old data. Otherwise the UI will rerun the search.



I did (b). Updated patch attached.

I don't want to implement 'expiration date' at the moment. It's too 
widespread change. Maybe in FreeIPA 3.2.

--
Petr Vobornik
From 8e0e57de12b73bd35c6d6cb9202071c1a2f1a9a3 Mon Sep 17 00:00:00 2001
From: Petr Vobornik 
Date: Tue, 21 Aug 2012 15:52:30 +0200
Subject: [PATCH] Fixed search in HBAC test

Search in HBAC test wasn't working because expired flag wasn't set.

https://fedorahosted.org/freeipa/ticket/2931
---
 install/ui/hbactest.js | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/install/ui/hbactest.js b/install/ui/hbactest.js
index 4b666ef29306d10cebc37014de444f1797f52103..93d17c7194ccfc4e52f5849e1ef5db095a078b14 100644
--- a/install/ui/hbactest.js
+++ b/install/ui/hbactest.js
@@ -374,10 +374,19 @@ IPA.hbac.test_select_facet = function(spec) {
 };
 
 that.find = function() {
+
+var old_filter = IPA.nav.get_state(that.entity.name+'-'+that.name+'-filter');
 var filter = that.filter.val();
-var state = {};
-state[that.entity.name+'-'+that.name+'-filter'] = filter;
-IPA.nav.push_state(state);
+
+that.set_expired_flag();
+
+if (old_filter === filter) {
+that.refresh();
+} else {
+var state = {};
+state[that.entity.name+'-'+that.name+'-filter'] = filter;
+IPA.nav.push_state(state);
+}
 };
 
 that.get_selected_values = function() {
-- 
1.7.11.4

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

Re: [Freeipa-devel] [PATCH] 197 Fixed search in HBAC test

2012-08-28 Thread Endi Sukma Dewata

On 8/21/2012 9:03 AM, Petr Vobornik wrote:

Search in HBAC test wasn't working because expired flag wasn't set.

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

Notes: HBAC facets don't have refresh button. They can be refreshed by
changing filter and searching. If one search with same filter, it sets
expired flag but it doesn't refresh (search) because page state isn't
changed. It refreshes when one go to different facet and returns back.
Is this behavior acceptable? Or should we
a) don't set expired flag when searching with unchanged filter
b) force refresh when searching with unchanged filter
c) add refresh button along with a)
I prefer leave it as is or b)


Hmm.. the behavior is consistent with the rest of the UI, but I think 
when the user hits Enter or clicks the Search icon in the filter box 
he'd expect the UI to run a new search and return the latest result even 
if it's the same filter. I agree with option (b). A Refresh button can 
be added too, but it's optional.


So this patch is ACKed, but feel free to make a future improvement. 
Maybe instead of having an 'expired flag' we could store an 'expiration 
date'. If the user returns to the page before it expires, the UI can 
show the old data. Otherwise the UI will rerun the search.


--
Endi S. Dewata

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


[Freeipa-devel] [PATCH] 197 Fixed search in HBAC test

2012-08-21 Thread Petr Vobornik

Search in HBAC test wasn't working because expired flag wasn't set.

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

Notes: HBAC facets don't have refresh button. They can be refreshed by 
changing filter and searching. If one search with same filter, it sets 
expired flag but it doesn't refresh (search) because page state isn't 
changed. It refreshes when one go to different facet and returns back. 
Is this behavior acceptable? Or should we

a) don't set expired flag when searching with unchanged filter
b) force refresh when searching with unchanged filter
c) add refresh button along with a)
I prefer leave it as is or b)
--
Petr Vobornik

From adf5382a48a3ecc28f0f397385ff576e7d465326 Mon Sep 17 00:00:00 2001
From: Petr Vobornik 
Date: Tue, 21 Aug 2012 15:52:30 +0200
Subject: [PATCH] Fixed search in HBAC test

Search in HBAC test wasn't working because expired flag wasn't set.

https://fedorahosted.org/freeipa/ticket/2931
---
 install/ui/hbactest.js |1 +
 1 file changed, 1 insertion(+)

diff --git a/install/ui/hbactest.js b/install/ui/hbactest.js
index 4b666ef29306d10cebc37014de444f1797f52103..3cb2458621c8c2d29212b5bd7238fd89ef2400ab 100644
--- a/install/ui/hbactest.js
+++ b/install/ui/hbactest.js
@@ -377,6 +377,7 @@ IPA.hbac.test_select_facet = function(spec) {
 var filter = that.filter.val();
 var state = {};
 state[that.entity.name+'-'+that.name+'-filter'] = filter;
+that.set_expired_flag();
 IPA.nav.push_state(state);
 };
 
-- 
1.7.10.4

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