Re: [Freeipa-devel] [PATCH] 335 Added account status into user search facet.

2012-01-06 Thread Petr Vobornik

On 01/06/2012 06:14 AM, Endi Sukma Dewata wrote:

On 1/5/2012 10:21 AM, Endi Sukma Dewata wrote:

The user search facet has been modified to show the account status.
The IPA.boolean_format has been converted into a class to allow
behavior customization.

Ticket #1996


Fixed jslint warning.



ACK and pushed to master. (improvement)

But before closing the ticket I must ask if it covers all parts of the 
ticket?


   Especially the part: easy identifiable from the list they are in.
   For examply by an icon, or in a change in font color.

Right now the information is there, but is it easy identifiable? Should 
we ask UXD for an input?


--
Petr Vobornik

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


Re: [Freeipa-devel] [PATCH] 335 Added account status into user search facet.

2012-01-06 Thread Endi Sukma Dewata

On 1/6/2012 8:33 AM, Petr Vobornik wrote:

ACK and pushed to master. (improvement)

But before closing the ticket I must ask if it covers all parts of the
ticket?

Especially the part: easy identifiable from the list they are in.
For examply by an icon, or in a change in font color.

Right now the information is there, but is it easy identifiable? Should
we ask UXD for an input?


I sent the question to Kyle, waiting for a response now. Using icon or 
color are some methods suggested by the ticket, but I don't think it's a 
requirement. At least this patch addresses the missing functionality 
asked by the ticket: being able to identify disabled entries without 
going into the details page.


--
Endi S. Dewata

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


Re: [Freeipa-devel] [PATCH] 335 Added account status into user search facet.

2012-01-06 Thread Dmitri Pal
On 01/06/2012 09:33 AM, Petr Vobornik wrote:
 On 01/06/2012 06:14 AM, Endi Sukma Dewata wrote:
 On 1/5/2012 10:21 AM, Endi Sukma Dewata wrote:
 The user search facet has been modified to show the account status.
 The IPA.boolean_format has been converted into a class to allow
 behavior customization.

 Ticket #1996

 Fixed jslint warning.


 ACK and pushed to master. (improvement)

 But before closing the ticket I must ask if it covers all parts of the
 ticket?

Especially the part: easy identifiable from the list they are in.
For examply by an icon, or in a change in font color.

 Right now the information is there, but is it easy identifiable?
 Should we ask UXD for an input?

I will ask Kyle.

-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager IPA project,
Red Hat Inc.


---
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/



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


Re: [Freeipa-devel] [PATCH] 335 Added account status into user search facet.

2012-01-05 Thread Endi Sukma Dewata

On 1/5/2012 10:21 AM, Endi Sukma Dewata wrote:

The user search facet has been modified to show the account status.
The IPA.boolean_format has been converted into a class to allow
behavior customization.

Ticket #1996


Fixed jslint warning.

--
Endi S. Dewata
From da2ce1b9f4b78da5bcd70abe116617a3c1992f9e Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata edew...@redhat.com
Date: Thu, 5 Jan 2012 09:10:11 -0600
Subject: [PATCH] Added account status into user search facet.

The user search facet has been modified to show the account status.
The IPA.boolean_format has been converted into a class to allow
behavior customization.

Ticket #1996
---
 install/ui/hbac.js |2 +-
 install/ui/hbactest.js |   21 ++
 install/ui/host.js |   62 
 install/ui/rule.js |2 +-
 install/ui/sudo.js |2 +-
 install/ui/user.js |9 ++
 install/ui/widget.js   |   72 ++--
 7 files changed, 121 insertions(+), 49 deletions(-)

diff --git a/install/ui/hbac.js b/install/ui/hbac.js
index 2a18396aaed0899d5604cf54855c86a18b3e7056..3346d0b01126c24e9c25ccc9db8da829776a3006 100644
--- a/install/ui/hbac.js
+++ b/install/ui/hbac.js
@@ -42,7 +42,7 @@ IPA.hbac.rule_entity = function(spec) {
 'cn',
 {
 name: 'ipaenabledflag',
-format: IPA.boolean_format
+format: IPA.boolean_format()
 },
 'description'
 ]
diff --git a/install/ui/hbactest.js b/install/ui/hbactest.js
index 26aed6e0002307bd6a6d5e2dec3bfa10dd7832ea..26e8085d41f36ac00730095fbe78497143a2d699 100644
--- a/install/ui/hbactest.js
+++ b/install/ui/hbactest.js
@@ -46,7 +46,16 @@ IPA.hbac.test_entity = function(spec) {
 columns: [
 'uid',
 'givenname',
-'sn'
+'sn',
+{
+name: 'nsaccountlock',
+format: IPA.boolean_format({
+true_value: IPA.messages.objects.user.active,
+false_value: IPA.messages.objects.user.inactive,
+invert_value: true
+}),
+label: IPA.messages.objects.user.account_status
+}
 ]
 }).
 facet({
@@ -62,7 +71,7 @@ IPA.hbac.test_entity = function(spec) {
 {
 name: 'has_keytab',
 label: IPA.messages.objects.host.enrolled,
-format: IPA.boolean_format
+format: IPA.boolean_format()
 }
 ]
 }).
@@ -91,7 +100,7 @@ IPA.hbac.test_entity = function(spec) {
 {
 name: 'has_keytab',
 label: IPA.messages.objects.host.enrolled,
-format: IPA.boolean_format
+format: IPA.boolean_format()
 }
 ]
 }).
@@ -106,7 +115,7 @@ IPA.hbac.test_entity = function(spec) {
 'cn',
 {
 name: 'ipaenabledflag',
-format: IPA.boolean_format
+format: IPA.boolean_format()
 },
 'description'
 ]
@@ -123,11 +132,11 @@ IPA.hbac.test_entity = function(spec) {
 {
 name: 'matched',
 label: IPA.messages.objects.hbactest.matched,
-format: IPA.boolean_format
+format: IPA.boolean_format()
 },
 {
 name: 'ipaenabledflag',
-format: IPA.boolean_format
+format: IPA.boolean_format()
 },
 'description'
 ]
diff --git a/install/ui/host.js b/install/ui/host.js
index c23cd9965a991035e049db4b478a1cf6b4bc9822..90e6bde71ef61782ea95de50cac7988ab8879f3c 100644
--- a/install/ui/host.js
+++ b/install/ui/host.js
@@ -40,7 +40,7 @@ IPA.host.entity = function(spec) {
 {
 name: 'has_keytab',
 label: IPA.messages.objects.host.enrolled,
-format: IPA.boolean_format
+format: IPA.boolean_format()
 }
 ]
 }).
@@ -466,30 +466,42 @@ IPA.field_factories['host_dnsrecord_entity_link'] = IPA.host_dnsrecord_entity_li
 IPA.widget_factories['host_dnsrecord_entity_link'] = IPA.link_widget;
 
 /* Take an LDAP format date in UTC and format it */
-IPA.utc_date_column_format = function(value){
-if (!value) {
-return ;
-}
-if (value.length  != 20101119025910Z.length){
-return value;
-}
-/* We only handle GMT */
-if (value.charAt(value.length -1) !== 'Z'){
-return value;
-}
-
-var date = new Date();
-
-date.setUTCFullYear(
-