Re: [Freeipa-devel] [PATCH] 319 Added HBAC Test page.

2011-12-06 Thread Petr Vobornik

On 12/06/2011 06:41 AM, Endi Sukma Dewata wrote:

On 11/21/2011 12:38 PM, Endi Sukma Dewata wrote:

This is the initial implementation of HBAC Test page. Currently it
can select user, source/target group, service, rules, and execute
the test. Other functionalities to be implemented include the search
filter, external users/hosts, back/next buttons, validation, styling,
and internalization.

Ticket #388


Updated patch attached.



ACK

In tables are 3 boolean columns which are not translated. I'll wait with 
pushing my patch #51 and I'll add them there along with some issues you 
mentioned in that patch' review.


--
Petr Vobornik

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


Re: [Freeipa-devel] [PATCH] 319 Added HBAC Test page.

2011-12-06 Thread Endi Sukma Dewata

On 12/6/2011 9:06 AM, Petr Vobornik wrote:

ACK

In tables are 3 boolean columns which are not translated. I'll wait with
pushing my patch #51 and I'll add them there along with some issues you
mentioned in that patch' review.


Thanks. Pushed to master.

--
Endi S. Dewata

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


Re: [Freeipa-devel] [PATCH] 319 Added HBAC Test page.

2011-12-05 Thread Endi Sukma Dewata

On 11/21/2011 12:38 PM, Endi Sukma Dewata wrote:

This is the initial implementation of HBAC Test page. Currently it
can select user, source/target group, service, rules, and execute
the test. Other functionalities to be implemented include the search
filter, external users/hosts, back/next buttons, validation, styling,
and internalization.

Ticket #388


Updated patch attached.

--
Endi S. Dewata
From 68f2702276385a4a64413d18c4ddb98484c3c339 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata edew...@redhat.com
Date: Wed, 16 Nov 2011 21:07:20 -0600
Subject: [PATCH] Added HBAC Test page.

This is the initial implementation of HBAC Test page. Currently it
can select user, source/target group, service, rules, and execute
the test. Other functionalities to be implemented include the search
filter, external users/hosts, back/next buttons, validation, styling,
and internalization.

Ticket #388
---
 install/ui/Makefile.am |1 +
 install/ui/facet.js|   59 ++--
 install/ui/hbactest.js |  510 
 install/ui/index.html  |   13 +-
 install/ui/ipa.css |   20 +-
 install/ui/ipa.js  |   14 +-
 install/ui/search.js   |   18 +-
 install/ui/test/data/hbacrule_find_pkeys.json  |   16 +-
 install/ui/test/data/hbacrule_get_records.json |   83 -
 install/ui/test/data/hbacrule_show.json|4 +-
 install/ui/test/data/hbactest.json |   16 +
 install/ui/webui.js|3 +-
 install/ui/widget.js   |   10 +-
 13 files changed, 710 insertions(+), 57 deletions(-)
 create mode 100644 install/ui/hbactest.js
 create mode 100644 install/ui/test/data/hbactest.json

diff --git a/install/ui/Makefile.am b/install/ui/Makefile.am
index 8b613666c83fec65cafe98ddda704fb9a1729e57..835888d94e65704ae12d4098ead210bfb195ce85 100644
--- a/install/ui/Makefile.am
+++ b/install/ui/Makefile.am
@@ -25,6 +25,7 @@ app_DATA =\
 	field.js			\
 	group.js 			\
 	hbac.js 			\
+	hbactest.js 			\
 	host.js 			\
 	hostgroup.js 			\
 	index.html 			\
diff --git a/install/ui/facet.js b/install/ui/facet.js
index 71ad5c08b2c1ea9105dfff3d5b71673f8e36d348..65ac71ee0ac92a1cbb2d8893fe6c013a0cca9b19 100644
--- a/install/ui/facet.js
+++ b/install/ui/facet.js
@@ -110,6 +110,9 @@ IPA.facet = function(spec) {
 that.header.load(data.result.result);
 };
 
+that.refresh = function() {
+};
+
 that.clear = function() {
 };
 
@@ -320,7 +323,7 @@ IPA.facet_header = function(spec) {
 }).appendTo(container);
 
 var span = $('h3/', {
-text: that.facet.entity.metadata.label
+text: that.facet.entity.label
 }).appendTo(that.title_container);
 
 if (!that.facet.disable_facet_tabs) {
@@ -341,9 +344,6 @@ IPA.facet_header = function(spec) {
 that.load = function(data) {
 if (!that.facet.disable_facet_tabs) {
 var pkey = that.facet.pkey;
-if(!pkey || !data) {
-pkey = '';
-}
 
 var facet_groups = that.facet.entity.facet_groups.values;
 for (var i=0; ifacet_groups.length; i++) {
@@ -353,13 +353,15 @@ IPA.facet_header = function(spec) {
 if (!span.length) continue;
 
 var label = facet_group.label;
-if (label) {
+if (pkey  label) {
 label = label.replace('${primary_key}', pkey);
-
-var label_container = $('.facet-group-label', span);
-label_container.text(label);
+} else {
+label = '';
 }
 
+var label_container = $('.facet-group-label', span);
+label_container.text(label);
+
 var facets = facet_group.facets.values;
 for (var j=0; jfacets.length; j++) {
 var facet = facets[j];
@@ -461,15 +463,13 @@ IPA.table_facet = function(spec) {
 
 that.load_all = function(data) {
 
-that.table.empty();
-
 var result = data.result.result;
+var records = [];
 for (var i=0; iresult.length; i++) {
 var record = that.table.get_record(result[i], 0);
-that.table.add_record(record);
+records.push(record);
 }
-
-that.table.unselect_all();
+that.load_records(records);
 
 if (data.result.truncated) {
 var message = IPA.messages.search.truncated;
@@ -480,7 +480,7 @@ IPA.table_facet = function(spec) {
 }
 };
 
-that.get_pkeys = function(data){
+that.get_pkeys = function(data) {
 return [];
 };
 
@@ -511,9 +511,8 @@ IPA.table_facet = function(spec) {
 that.table.current_page = page;
 
 if (!that.pkeys || !that.pkeys.length) {
-that.table.empty();
+   

Re: [Freeipa-devel] [PATCH] 319 Added HBAC Test page.

2011-11-21 Thread Endi Sukma Dewata

On 11/21/2011 12:38 PM, Endi Sukma Dewata wrote:

This is the initial implementation of HBAC Test page. Currently it
can select user, source/target group, service, rules, and execute
the test. Other functionalities to be implemented include the search
filter, external users/hosts, back/next buttons, validation, styling,
and internalization.

Ticket #388

Demo:
http://edewata.fedorapeople.org/freeipa/install/ui/#hbac=hbactestpolicy=hbacnavigation=policy


Patch attached.

--
Endi S. Dewata
From 51de59d4911f1d735b3f0913c9fbe3287a812878 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata edew...@redhat.com
Date: Wed, 16 Nov 2011 21:07:20 -0600
Subject: [PATCH] Added HBAC Test page.

This is the initial implementation of HBAC Test page. Currently it
can select user, source/target group, service, rules, and execute
the test. Other functionalities to be implemented include the search
filter, external users/hosts, back/next buttons, validation, styling,
and internalization.

Ticket #388
---
 install/ui/Makefile.am |1 +
 install/ui/facet.js|   59 ++--
 install/ui/hbactest.js |  558 
 install/ui/index.html  |   13 +-
 install/ui/ipa.css |   20 +-
 install/ui/ipa.js  |   14 +-
 install/ui/search.js   |   18 +-
 install/ui/test/data/hbacrule_find_pkeys.json  |   16 +-
 install/ui/test/data/hbacrule_get_records.json |   83 -
 install/ui/test/data/hbacrule_show.json|4 +-
 install/ui/test/data/hbactest.json |   16 +
 install/ui/webui.js|3 +-
 install/ui/widget.js   |   10 +-
 13 files changed, 758 insertions(+), 57 deletions(-)
 create mode 100644 install/ui/hbactest.js
 create mode 100644 install/ui/test/data/hbactest.json

diff --git a/install/ui/Makefile.am b/install/ui/Makefile.am
index 
2ec047c34dd4a31ea4ce452f3a74eeaf0ba2f13a..47a197849b05c672a25e59a71414007064ff5d20
 100644
--- a/install/ui/Makefile.am
+++ b/install/ui/Makefile.am
@@ -23,6 +23,7 @@ app_DATA =\
favicon.ico \
group.js\
hbac.js \
+   hbactest.js \
host.js \
hostgroup.js\
index.html  \
diff --git a/install/ui/facet.js b/install/ui/facet.js
index 
71ad5c08b2c1ea9105dfff3d5b71673f8e36d348..65ac71ee0ac92a1cbb2d8893fe6c013a0cca9b19
 100644
--- a/install/ui/facet.js
+++ b/install/ui/facet.js
@@ -110,6 +110,9 @@ IPA.facet = function(spec) {
 that.header.load(data.result.result);
 };
 
+that.refresh = function() {
+};
+
 that.clear = function() {
 };
 
@@ -320,7 +323,7 @@ IPA.facet_header = function(spec) {
 }).appendTo(container);
 
 var span = $('h3/', {
-text: that.facet.entity.metadata.label
+text: that.facet.entity.label
 }).appendTo(that.title_container);
 
 if (!that.facet.disable_facet_tabs) {
@@ -341,9 +344,6 @@ IPA.facet_header = function(spec) {
 that.load = function(data) {
 if (!that.facet.disable_facet_tabs) {
 var pkey = that.facet.pkey;
-if(!pkey || !data) {
-pkey = '';
-}
 
 var facet_groups = that.facet.entity.facet_groups.values;
 for (var i=0; ifacet_groups.length; i++) {
@@ -353,13 +353,15 @@ IPA.facet_header = function(spec) {
 if (!span.length) continue;
 
 var label = facet_group.label;
-if (label) {
+if (pkey  label) {
 label = label.replace('${primary_key}', pkey);
-
-var label_container = $('.facet-group-label', span);
-label_container.text(label);
+} else {
+label = '';
 }
 
+var label_container = $('.facet-group-label', span);
+label_container.text(label);
+
 var facets = facet_group.facets.values;
 for (var j=0; jfacets.length; j++) {
 var facet = facets[j];
@@ -461,15 +463,13 @@ IPA.table_facet = function(spec) {
 
 that.load_all = function(data) {
 
-that.table.empty();
-
 var result = data.result.result;
+var records = [];
 for (var i=0; iresult.length; i++) {
 var record = that.table.get_record(result[i], 0);
-that.table.add_record(record);
+records.push(record);
 }
-
-that.table.unselect_all();
+that.load_records(records);
 
 if (data.result.truncated) {
 var message = IPA.messages.search.truncated;
@@ -480,7 +480,7 @@ IPA.table_facet = function(spec) {
 }
 };
 

Re: [Freeipa-devel] [PATCH] 319 Added HBAC Test page.

2011-11-21 Thread Dmitri Pal
On 11/21/2011 01:38 PM, Endi Sukma Dewata wrote:
 This is the initial implementation of HBAC Test page. Currently it
 can select user, source/target group, service, rules, and execute
 the test. Other functionalities to be implemented include the search
 filter, external users/hosts, back/next buttons, validation, styling,
 and internalization.

 Ticket #388

 Demo:
 http://edewata.fedorapeople.org/freeipa/install/ui/#hbac=hbactestpolicy=hbacnavigation=policy


It is unclear what Back and Next buttons mean on the who screen.
The height of the scrollable part is smaller then on the user page. Just
click Identity panel to see the difference.
In the user list and any other list the size of the scollable part
should be adjusted to the number of lines in the view. Play with Ctrl+
and Ctrl- to see ho the line at the bottom cats through an item in the
list. Looks inaccurate.


-- 
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] 319 Added HBAC Test page.

2011-11-21 Thread Endi Sukma Dewata

On 11/21/2011 1:39 PM, Dmitri Pal wrote:

Demo:
http://edewata.fedorapeople.org/freeipa/install/ui/#hbac=hbactestpolicy=hbacnavigation=policy



It is unclear what Back and Next buttons mean on the who screen.


Here are the mockup images:
http://edewata.fedorapeople.org/images/hbactest/

There shouldn't be a Back button in the Who screen, and there should be 
an arrow in the Next button. This will be fixed in the next patch.



The height of the scrollable part is smaller then on the user page. Just
click Identity panel to see the difference.


Right now this table is using a fixed height, that's why it's smaller. 
We can make it taller but the risk is you might need to scroll down to 
see the Next buttons. To make the table adjust according to the window 
height like in the user page is going to require some CSS tricks. This 
will be addressed a little later.



In the user list and any other list the size of the scollable part
should be adjusted to the number of lines in the view. Play with Ctrl+
and Ctrl- to see ho the line at the bottom cats through an item in the
list. Looks inaccurate.


In general the table body (the scrollable part) does adjust according to 
the window size. But yes, there's a slight overlap between the table 
body and the footer, probably due to the size of the input field in the 
footer. This will be fixed separately.


--
Endi S. Dewata

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