directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: [Studio] OpenLDAP configuration editor status
Date Fri, 17 Jul 2015 09:03:27 GMT
Le 16/07/15 21:38, Howard Chu a écrit :
> Emmanuel Lécharny wrote:
>> Hi guys,
>>
>> a quick heads-up on what's going on with this plugin :
>
> Sounds like great progress Emmanuel!

Thanks ! It's a bit slow IMO, though...

Regarding the olcLimits support, here is what I'm on atm. The olcLimits
contains many SizeLimit or TimeLimit, applied on the operation initiator
(any, anonymous, users, DN based or a group). Botom line, we associated
a TimeLimit or a SizeLimit to the defined operation, and those
Time/SizeLimit are the same as the base Time/SizeLimit. This is part of
the olcDatabaseConfig, and it's a MV attribute, ordered. That leads us
to use a Table for presenting its content :

 * | | Limits :                                           | |
 * | |   +------------------------------------+           | |
 * | |   |                                    | (Add...)  | |
 * | |   |                                    | (Edit...) | |
 * | |   |                                    | (Delete)  | |
 * | |   |                                    | --------  | |
 * | |   |                                    | (Up...)   | |
 * | |   |                                    | (Down...) | |
 * | |   +------------------------------------+           | |


Adding or editing an element will pop up a dialog like :

 * +-------------------------------------------------------+
 * | Limits                                                |
 * | .---------------------------------------------------. |
 * | | (o) Any                                           | |
 * | | (o) Anonymous                                     | |
 * | | (o) Users                                         | |
 * | |            .------------------------------------. | |
 * | |            | Type :    [--------------------|v] | | |
 * | | (o) DN     | Style :   [--------------------|v] | | |
 * | |            | Pattern : [----------------------] | | |
 * | |            '------------------------------------' | |
 * | |            .------------------------------------. | |
 * | |            | ObjectClass :   [--------------|v] | | |
 * | | (o) Group  | AttributeType : [--------------|v] | | |
 * | |            | Pattern :       [----------------] | | |
 * | |            '------------------------------------' | |
 * | |                                                   | |
 * | | Limits :                                          | |
 * | | +-------------------------------------+           | |
 * | | |{1}defxyz12                          | (Add...)  | |
 * | | |{2}aaa                               | (Edit...) | |
 * | | |                                     | (Delete)  | |
 * | | |                                     | --------- | |
 * | | |                                     | (Up...)   | |
 * | | |                                     | (Down...) | |
 * | | +-------------------------------------+           | |
 * | '---------------------------------------------------' |
 * | Resulting Limits                                      |
 * | .---------------------------------------------------. |
 * | | <///////////////////////////////////////////////> | |
 * | '---------------------------------------------------' |
 * |                                                       |
 * |  (Cancel)                                      (OK)   |
 * +-------------------------------------------------------+


And again, we have a Limits field which is containing teh Time/SizeLimit
values (as we can see, we can have many). We use a Table again, and as
we don't know which type of content we have, we need to ask teh user to
select the correct type. This is done opening another dialog. Here, I
had 2 options :

o Using a single Dialog that adapt is content depending on the selection
done on top of teh dialog :

 *
+--------------------------------------------------------------------------+
 * |
Limit                                                                    |
 * |
.----------------------------------------------------------------------. |
 * | |   (o) Size Limit                  (o)
TimeLimit                      | |
 * |
'----------------------------------------------------------------------' |
 *
............................................................................
 *
 * SizeLimit :
 *
............................................................................
 * |
.----------------------------------------------------------------------. |
 * | | Soft Limit :          [----------]  []
Unlimited                     | |
 * |
|                                                                      | |
 * | | Hard Limit :          [----------]  [] Unlimited []
Soft             | |
 * |
|                                                                      | |
 * | | Global Limit :        [----------]  []
Unlimited                     | |
 * |
|                                                                      | |
 * | | Unchecked Limit :     [----------]  [] Unlimited []
Disabled         | |
 * |
|                                                                      | |
 * | | Paged Results Limit : [----------]  [] Unlimited [] No
Estimate      | |
 * |
|                                                                      | |
 * | | Paged Results Total : [----------]  [] Unlimited [] Disabled []
Hard | |
 * |
'----------------------------------------------------------------------' |
 *
............................................................................
 * TimeLimit :
 *
............................................................................
 * |
.----------------------------------------------------------------------. |
 * | | Soft Limit :  [----------]  []
Unlimited                             | |
 * |
|                                                                      | |
 * | | Hard Limit :  [----------]  [] Unlimited  []
Soft                    | |
 * |
|                                                                      | |
 * | | Global :      [----------]  []
Unlimited                             | |
 * |
'----------------------------------------------------------------------' |
 *
............................................................................
 * End :
 *
............................................................................
 * | Resulting
Limit                                                          |
 * |
.----------------------------------------------------------------------. |
 * | |
<//////////////////////////////////////////////////////////////////> | |
 * |
'----------------------------------------------------------------------' |
 *
|                                                                          |
 * |  (Cancel)                                                        
(OK)   |
 *
+--------------------------------------------------------------------------+

(We don't present the TimeLimit and SizeLimit form, only one of the two).

That would work, but we don't leverage the work already done for the
dedicated TimeLimitDialog and SizeLimitDialog, which is a bit of a pain
(code duplication, etc).

o The other option is to ask the users to select which type they want to
use, and offer them the possibility of a direct input, or to popup
another dialog :

 *
+--------------------------------------------------------------------------+
 * |
Limit                                                                    |
 * |
.----------------------------------------------------------------------. |
 * | | (o) Size Limit  : [                                      ]
(Edit...) | |
 * | | (o) TimeLimit :   [                                      ]
(Edit...) | |
 * |
'----------------------------------------------------------------------' |
 *
|                                                                          |
 * |  (Cancel)                                                        
(OK)   |
 *
+--------------------------------------------------------------------------+

and the selection of the Edit button will popup other the
TimeLimitDialog or the SizeLimitDialog :

 * +-------------------------------------------------------+
 * | Time Limit                                            |
 * | .---------------------------------------------------. |
 * | | Soft Limit :  [----------]  [] Unlimited          | |
 * | |                                                   | |
 * | | Hard Limit :  [----------]  [] Unlimited  [] Soft | |
 * | |                                                   | |
 * | | Global :      [----------]  [] Unlimited          | |
 * | '---------------------------------------------------' |
 * | Resulting Time Limit                                  |
 * | .---------------------------------------------------. |
 * | | Time Limit  : </////////////////////////////////> | |
 * | '---------------------------------------------------' |
 * |                                                       |
 * |  (Cancel)                                      (OK)   |
 * +-------------------------------------------------------+

or

 *
+--------------------------------------------------------------------------+
 * | Size
Limit                                                               |
 * |
.----------------------------------------------------------------------. |
 * | | Soft Limit :          [----------]  []
Unlimited                     | |
 * |
|                                                                      | |
 * | | Hard Limit :          [----------]  [] Unlimited []
Soft             | |
 * |
|                                                                      | |
 * | | Global Limit :        [----------]  []
Unlimited                     | |
 * |
|                                                                      | |
 * | | Unchecked Limit :     [----------]  [] Unlimited []
Disabled         | |
 * |
|                                                                      | |
 * | | Paged Results Limit : [----------]  [] Unlimited [] No
Estimate      | |
 * |
|                                                                      | |
 * | | Paged Results Total : [----------]  [] Unlimited [] Disabled []
Hard | |
 * |
'----------------------------------------------------------------------' |
 * | Resulting Size
Limit                                                     |
 * |
.----------------------------------------------------------------------. |
 * | | Size Limit  :
<////////////////////////////////////////////////////> | |
 * |
'----------------------------------------------------------------------' |
 *
|                                                                          |
 * |  (Cancel)                                                         
(OK)  |
 *
+--------------------------------------------------------------------------+


Here, we are talking about around 1300 lines of code we can save if we
don't duplicate the code...

I will pick option 2 atm. We could always improve it later if needed,
using teh same mechanism that for the Overlays (where the form is built
based on the user's selection on top of the Dialog).

Who said that GUI were easy to develop ? Not me...




Mime
View raw message