Re: [Freeipa-devel] [PATCH] 832-850 Stage Users Web UI and its prerequisites

2015-05-20 Thread Petr Vobornik

On 05/19/2015 07:22 PM, Petr Vobornik wrote:

On 05/19/2015 05:34 PM, thierry bordaz wrote:

On 05/15/2015 05:38 PM, David Kupka wrote:

On 05/15/2015 12:34 PM, Petr Vobornik wrote:

On 05/15/2015 10:59 AM, Petr Vobornik wrote:

Stage User Web UI is actually just the last four patches(847-850).

I expect that patch 848 - deleter dialog needs some adjustments (was
discussed offline).

The rest are prerequisites, namely:
- update of patternfly
- update navigation code to support multiple entities under one entity
tree (it broke a memory feature/bug of the navigation)
- support for facet tabs in sidebar





Attaching new version of 847-1. The old version did not apply because I
had also a new version of topology plugin UI (will be send later today)
in my git tree.

Hi!
thanks for patches. Please note that I tested only functionality
because I'm not familiar with WebUI internals.

I tried your patch set together with Thierry's ULC patches and found
following issues:

1) Missing all but 'Delete' actions in single stage user view.
'Enable', 'Disable', 'Unlock', 'Add OTP Token' and 'Rebuild auto
membership ' actions are not relevant here.


Fixed in patch 850-1.



2) Missing 'Restore' action in single preserve user view.


Will be added later.



3) When deleting preserved user there are options to preserve or
permanently delete user. This doesn't make sense and don't work.
Preserved user is always permanently removed.


Fixed in patch  new patch 853



4) Action 'Delete' in single user view deletes the user without asking
whether to 'preserve' or 'delete permanently'.


Will be fixed later.



*) I would prefer if the choice between 'preserve' and 'permanently
delete' in delete dialog was done by directly clicking button not
switching 'mode' radio button and then clicking 'delete'.

Otherwise everything seems to work well.

Hello,

Petr this is looking very nice and easy to use. I am not an expert of
the console, so I run the demo use case and was able to complete all the
steps (being a stage adminitrator).
The only remark I have is that when activating a stage user, the message
mentions 'users' be the CLI actually supports only one user.
Are you sure you want to activate selected users


You can select multiple users and activate them in UI. It will call
stageuser_activate for each user.



Except that this is perfect for me.

Thanks a lot
thierry


In this new patch set there are also new icons.

Instead of http://fontawesome.io/icon/plus/
- restore action has http://fontawesome.io/icon/heart/
- activate action has http://fontawesome.io/icon/check/

There are also new icons which indicates user state(in page header) in
stage user details page.
- stage users have http://fontawesome.io/icon/wrench/
- preserved users have http://fontawesome.io/icon/trash-o/



Was agreed offline that just functionality review was OK for this patch 
set. Green light for the push was given on IRC.


Pushed to master:
* a4c0f780b727cc92a9b6fa21e42906a80f4f7d42 webui: update patternfly to 
v1.1.4
* 69bc4f4955c8ee0bdbeea5ca340a003c128e9a58 webui: rename IPA.user_* to 
IPA.user.*
* c352616ac9fbb1685adcbe8834143b24f6e8b5d4 webui: declare search command 
options in search facet
* de374a0d3a1147a650b63bb5c267a857fba015dd webui: register construction 
spec based on existing spec
* ae62bd6914dcdd24667dc1ff149413d9a7adc017 webui: entity facets in facet 
registry
* 2be8eeb04f08cb51a25651794a2f356a2a7b499e webui: entity menu items 
navigate to main entity facet
* 6bcb90ef36f7400e9f1eb197421134d5650c39fe webui: prefer entity fallback 
in menu item select
* 8f6013952061099fff4ec9b8784fc1ee91828c4e webui: navigation: do not 
remember selected childs of menu item
* 6a2b486e500b62abe7ef14e4f34c945726f3256b webui: navigation: unique 
names on entity facet menu items
* 17aafc36b4c94cffa8427c8f4b2aef2292bba40d webui: metadata validator min 
and max value overrides
* 3c2a8b408ec1af284af0ebe218832f3fab85c008 webui: custom facet groups in 
a facet

* 435f9331c633296d72160de1e25bbdc77a81c75e webui: facet groups widget
* 8d8b56d135ad05fbfee35fb88618ce8c5498fd68 webui: allow to replace facet 
tabs with sidebar
* cae2df274a9ba92a4fc8db0259811c1755c648e6 webui: allow to hide facet 
tabs or sidebar
* bf7ee6eeecd71ffeb4740a440fd237a6fac4793f webui: facet policies for all 
facets

* 14525598f97f57d165682247ef7f5cf63f810be5 webui: stageuser plugin
* 64e87d5e34f646f0de5b0b310ccaf02cbb119a2b webui: extend user deleter 
dialog with --permanent and --preserve options
* 52647285f6d286c079090b5bff21f5e423076897 webui: update stageuser/user 
pages based on action in diffrent user search page
* 99d282d38d0c847ebb544140edd49d6572f06cb0 webui: stageusers, display 
page elements based on user state
* 7ddcff3ef71a1d4254d291bdab99075f2cd8f205 webui: prefer search facet's 
deleter dialog

--
Petr Vobornik

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: 

Re: [Freeipa-devel] [PATCH] 832-850 Stage Users Web UI and its prerequisites

2015-05-19 Thread thierry bordaz

On 05/15/2015 05:38 PM, David Kupka wrote:

On 05/15/2015 12:34 PM, Petr Vobornik wrote:

On 05/15/2015 10:59 AM, Petr Vobornik wrote:

Stage User Web UI is actually just the last four patches(847-850).

I expect that patch 848 - deleter dialog needs some adjustments (was
discussed offline).

The rest are prerequisites, namely:
- update of patternfly
- update navigation code to support multiple entities under one entity
tree (it broke a memory feature/bug of the navigation)
- support for facet tabs in sidebar





Attaching new version of 847-1. The old version did not apply because I
had also a new version of topology plugin UI (will be send later today)
in my git tree.

Hi!
thanks for patches. Please note that I tested only functionality 
because I'm not familiar with WebUI internals.


I tried your patch set together with Thierry's ULC patches and found 
following issues:


1) Missing all but 'Delete' actions in single stage user view. 
'Enable', 'Disable', 'Unlock', 'Add OTP Token' and 'Rebuild auto 
membership ' actions are not relevant here.


2) Missing 'Restore' action in single preserve user view.

3) When deleting preserved user there are options to preserve or 
permanently delete user. This doesn't make sense and don't work. 
Preserved user is always permanently removed.


4) Action 'Delete' in single user view deletes the user without asking 
whether to 'preserve' or 'delete permanently'.


*) I would prefer if the choice between 'preserve' and 'permanently 
delete' in delete dialog was done by directly clicking button not 
switching 'mode' radio button and then clicking 'delete'.


Otherwise everything seems to work well.

Hello,

Petr this is looking very nice and easy to use. I am not an expert of 
the console, so I run the demo use case and was able to complete all the 
steps (being a stage adminitrator).
The only remark I have is that when activating a stage user, the message 
mentions 'users' be the CLI actually supports only one user.

Are you sure you want to activate selected users

Except that this is perfect for me.

Thanks a lot
thierry
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [PATCH] 832-850 Stage Users Web UI and its prerequisites

2015-05-19 Thread Petr Vobornik

On 05/19/2015 05:34 PM, thierry bordaz wrote:

On 05/15/2015 05:38 PM, David Kupka wrote:

On 05/15/2015 12:34 PM, Petr Vobornik wrote:

On 05/15/2015 10:59 AM, Petr Vobornik wrote:

Stage User Web UI is actually just the last four patches(847-850).

I expect that patch 848 - deleter dialog needs some adjustments (was
discussed offline).

The rest are prerequisites, namely:
- update of patternfly
- update navigation code to support multiple entities under one entity
tree (it broke a memory feature/bug of the navigation)
- support for facet tabs in sidebar





Attaching new version of 847-1. The old version did not apply because I
had also a new version of topology plugin UI (will be send later today)
in my git tree.

Hi!
thanks for patches. Please note that I tested only functionality
because I'm not familiar with WebUI internals.

I tried your patch set together with Thierry's ULC patches and found
following issues:

1) Missing all but 'Delete' actions in single stage user view.
'Enable', 'Disable', 'Unlock', 'Add OTP Token' and 'Rebuild auto
membership ' actions are not relevant here.


Fixed in patch 850-1.



2) Missing 'Restore' action in single preserve user view.


Will be added later.



3) When deleting preserved user there are options to preserve or
permanently delete user. This doesn't make sense and don't work.
Preserved user is always permanently removed.


Fixed in patch  new patch 853



4) Action 'Delete' in single user view deletes the user without asking
whether to 'preserve' or 'delete permanently'.


Will be fixed later.



*) I would prefer if the choice between 'preserve' and 'permanently
delete' in delete dialog was done by directly clicking button not
switching 'mode' radio button and then clicking 'delete'.

Otherwise everything seems to work well.

Hello,

Petr this is looking very nice and easy to use. I am not an expert of
the console, so I run the demo use case and was able to complete all the
steps (being a stage adminitrator).
The only remark I have is that when activating a stage user, the message
mentions 'users' be the CLI actually supports only one user.
Are you sure you want to activate selected users


You can select multiple users and activate them in UI. It will call 
stageuser_activate for each user.




Except that this is perfect for me.

Thanks a lot
thierry


In this new patch set there are also new icons.

Instead of http://fontawesome.io/icon/plus/
- restore action has http://fontawesome.io/icon/heart/
- activate action has http://fontawesome.io/icon/check/

There are also new icons which indicates user state(in page header) in 
stage user details page.

- stage users have http://fontawesome.io/icon/wrench/
- preserved users have http://fontawesome.io/icon/trash-o/

--
Petr Vobornik
From 76ca6c223b842aecb87c41ee87164cc6eb3b0fb9 Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Tue, 19 May 2015 18:48:06 +0200
Subject: [PATCH] webui: prefer search facet's deleter dialog

Deleter dialog in search facet is now chosen in order as follows:
- facet's, defined as spec, e.g.:
  deleter_dialog: { $factory: IPA.user.deleter_dialog }
- entity's, the same but it entity spec
- default, which is IPA.search_deleter_dialog

Previous didn't allow to override entity dialog with facet one and
also definition by spec was not allowed.
---
 install/ui/src/freeipa/search.js | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js
index 87523b673e9595ec02af2f5ed8fed5838cf8f958..941597561b50e17230a7f56affc9bd853b44b738 100644
--- a/install/ui/src/freeipa/search.js
+++ b/install/ui/src/freeipa/search.js
@@ -22,6 +22,7 @@
  */
 
 define([
+'./builder',
 './ipa',
 './jquery',
 './phases',
@@ -30,7 +31,7 @@ define([
 './spec_util',
 './text',
 './facet'],
-function(IPA, $, phases, reg, rpc, su, text, mod_facet) {
+function(builder, IPA, $, phases, reg, rpc, su, text, mod_facet) {
 
 var exp = {};
 
@@ -111,7 +112,7 @@ IPA.search_facet = function(spec, no_init) {
  */
 that.command_options = spec.command_options || {};
 
-that.deleter_dialog = spec.deleter_dialog || IPA.search_deleter_dialog;
+that.deleter_dialog = spec.deleter_dialog;
 
 that.create_header = function(container) {
 
@@ -191,10 +192,12 @@ IPA.search_facet = function(spec, no_init) {
 return null;
 }
 
-var dialog = that.managed_entity.get_dialog('remove');
-
+var dialog = builder.build('', that.deleter_dialog);
 if (!dialog) {
-dialog = that.deleter_dialog();
+dialog = that.managed_entity.get_dialog('remove');
+}
+if (!dialog) {
+dialog = IPA.search_deleter_dialog();
 }
 
 dialog.entity_name = that.managed_entity.name;
-- 
2.1.0

From 043dd3c66b94fa88a129428d6a261a33128a5e8b Mon Sep 17 00:00:00 2001
From: Petr Vobornik 

Re: [Freeipa-devel] [PATCH] 832-850 Stage Users Web UI and its prerequisites

2015-05-15 Thread Petr Vobornik

On 05/15/2015 10:59 AM, Petr Vobornik wrote:

Stage User Web UI is actually just the last four patches(847-850).

I expect that patch 848 - deleter dialog needs some adjustments (was
discussed offline).

The rest are prerequisites, namely:
- update of patternfly
- update navigation code to support multiple entities under one entity
tree (it broke a memory feature/bug of the navigation)
- support for facet tabs in sidebar





Attaching new version of 847-1. The old version did not apply because I 
had also a new version of topology plugin UI (will be send later today) 
in my git tree.

--
Petr Vobornik
From 4fd0856a3f0a278d44b7dd9501508ab7afc0b58d Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Wed, 22 Apr 2015 14:57:26 +0200
Subject: [PATCH] webui: stageuser plugin

---
 install/ui/doc/categories.json |   1 +
 install/ui/src/freeipa/app.js  |   1 +
 install/ui/src/freeipa/navigation/menu_spec.js |  17 +-
 install/ui/src/freeipa/stageuser.js| 351 +
 install/ui/src/freeipa/user.js |  17 +-
 install/ui/test/data/ipa_init.json |  10 +
 ipalib/plugins/internal.py |  11 +
 7 files changed, 406 insertions(+), 2 deletions(-)
 create mode 100644 install/ui/src/freeipa/stageuser.js

diff --git a/install/ui/doc/categories.json b/install/ui/doc/categories.json
index c84077682eafa42981e8a1c1a2f93c712e6421fd..9de673593765fc828cca07b4ad133ea16a5ccd76 100644
--- a/install/ui/doc/categories.json
+++ b/install/ui/doc/categories.json
@@ -250,6 +250,7 @@
 idviews,
 otptoken,
 radiusproxy,
+stageuser,
 user,
 plugins.load,
 plugins.login,
diff --git a/install/ui/src/freeipa/app.js b/install/ui/src/freeipa/app.js
index 46752fa09e47be9e14e5fa37ce1bd1cbd0b0afdf..140fe938f68975310175fb9fadf0ec36db048b72 100644
--- a/install/ui/src/freeipa/app.js
+++ b/install/ui/src/freeipa/app.js
@@ -48,6 +48,7 @@ define([
 './sudo',
 './trust',
 './user',
+'./stageuser',
 'dojo/domReady!'
 ],function(app_container) {
 return app_container;
diff --git a/install/ui/src/freeipa/navigation/menu_spec.js b/install/ui/src/freeipa/navigation/menu_spec.js
index ca1a290f479fd0cc6a399e6bc93bd3e8ed1fca40..13f533d1a6fbb21c73e1f0e5fe1df2836c99f832 100644
--- a/install/ui/src/freeipa/navigation/menu_spec.js
+++ b/install/ui/src/freeipa/navigation/menu_spec.js
@@ -36,7 +36,22 @@ var nav = {};
 name: 'identity',
 label: '@i18n:tabs.identity',
 children: [
-{ entity: 'user' },
+{
+entity: 'user',
+facet: 'search',
+children: [
+{
+entity: 'stageuser',
+facet: 'search',
+hidden: true
+},
+{
+entity: 'user',
+facet: 'search_preserved',
+hidden: true
+}
+]
+},
 { entity: 'group' },
 { entity: 'host' },
 { entity: 'hostgroup' },
diff --git a/install/ui/src/freeipa/stageuser.js b/install/ui/src/freeipa/stageuser.js
new file mode 100644
index ..8334d556551f2b35a41aa59429d1b9e37995b3b7
--- /dev/null
+++ b/install/ui/src/freeipa/stageuser.js
@@ -0,0 +1,351 @@
+//
+// Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+//
+
+define([
+'dojo/on',
+'./ipa',
+'./jquery',
+'./menu',
+'./phases',
+'./reg',
+'./rpc',
+'./text',
+'./details',
+'./facet',
+'./user',
+'./search',
+'./entity'],
+function(
+on, IPA, $, menu, phases, reg, rpc, text, mod_details, mod_facet, mod_user) {
+/**
+ * Stage user module
+ * @class
+ * @singleton
+ */
+var stageuser = IPA.stageuser = {
+
+search_facet_group: {
+name: 'search',
+label: '@i18n:objects.stageuser.user_categories',
+facets: {
+search_normal: 'user_search',
+search: 'stageuser_search',
+search_preserved: 'user_search_preserved'
+}
+}
+};
+
+var make_stageuser_spec = function() {
+return {
+name: 'stageuser',
+facet_groups: ['settings'],
+facets: [
+{
+$type: 'search',
+disable_facet_tabs: false,
+tabs_in_sidebar: true,
+tab_label: '@i18n:objects.stageuser.label',
+facet_groups: [stageuser.search_facet_group],
+facet_group: 'search',
+columns: [
+'uid',
+'givenname',
+

Re: [Freeipa-devel] [PATCH] 832-850 Stage Users Web UI and its prerequisites

2015-05-15 Thread David Kupka

On 05/15/2015 12:34 PM, Petr Vobornik wrote:

On 05/15/2015 10:59 AM, Petr Vobornik wrote:

Stage User Web UI is actually just the last four patches(847-850).

I expect that patch 848 - deleter dialog needs some adjustments (was
discussed offline).

The rest are prerequisites, namely:
- update of patternfly
- update navigation code to support multiple entities under one entity
tree (it broke a memory feature/bug of the navigation)
- support for facet tabs in sidebar





Attaching new version of 847-1. The old version did not apply because I
had also a new version of topology plugin UI (will be send later today)
in my git tree.

Hi!
thanks for patches. Please note that I tested only functionality because 
I'm not familiar with WebUI internals.


I tried your patch set together with Thierry's ULC patches and found 
following issues:


1) Missing all but 'Delete' actions in single stage user view. 'Enable', 
'Disable', 'Unlock', 'Add OTP Token' and 'Rebuild auto membership ' 
actions are not relevant here.


2) Missing 'Restore' action in single preserve user view.

3) When deleting preserved user there are options to preserve or 
permanently delete user. This doesn't make sense and don't work. 
Preserved user is always permanently removed.


4) Action 'Delete' in single user view deletes the user without asking 
whether to 'preserve' or 'delete permanently'.


*) I would prefer if the choice between 'preserve' and 'permanently 
delete' in delete dialog was done by directly clicking button not 
switching 'mode' radio button and then clicking 'delete'.


Otherwise everything seems to work well.
--
David Kupka

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code