summaryrefslogtreecommitdiffstats
path: root/install/ui/facet.js
Commit message (Collapse)AuthorAgeFilesLines
* Added missing i18n in action list and action panelPetr Vobornik2012-06-041-1/+1
| | | | | | This patch adds strings to internal.py which were not translated in action list/panel patches. https://fedorahosted.org/freeipa/ticket/2248
* Action panelPetr Vobornik2012-06-041-1/+2
| | | | | | | | This patch implements action panel. Action panel is a box located in facet details section which contains actions related to that object/section. In spec file can be configured actions and title used in action panel. Default title is 'Actions'. Actions are specified by their name. They have to be defined in action collection in facet. https://fedorahosted.org/freeipa/ticket/2248
* Refactored action list and control buttons to use shared list of actionsPetr Vobornik2012-06-041-179/+368
| | | | | | | | | | | This is a first step for implementing action panels which will also use the shared list of actions. This effor changes the way how action list and control buttons are defined. First all actions are defined on facet level - attribute 'actions' in spec file. Implementation of action list widget is not specified on facet level. It is left in facet header. A list of action names used in action list can be now specified in facet spec in 'header_actions' attribute. Control buttons use similar concept. Facet by default is using control_buttons_widget. Details and search facet are defining their own default actions (refresh/add/remove/update/reset). Additional buttons can be defined as array of action names on facet level in control_buttons attribute. state_evaluators and state_listeners were united. They are called state_evaluators but they uses state_listener concept, they are attached to an event. For former state_evaluator the event is post_load. They are defined in spec in state attribute. State object purpose is to aggregate states from all state evaluators. It offers changed event to which can other objects subscribe. It also has summary evaluator which evaluation conditions. Summary evaluator creates summary status with human readable description. It can be used by facet header. https://fedorahosted.org/freeipa/ticket/2248
* Improved calculation of max pkey length in facet headerPetr Vobornik2012-05-151-9/+55
| | | | | | | | | | | | Very long pkeys in facet header were limited to 60 characters. This magic number was good enough but with new action lists it isn't. This patch is adding calculation of maximum characters for pkey in facet header. It fixes regression introduced by Action Lists and also it uses effectively available space. Also this patch is changing limiting of breadcrumbs element to use as much space as possible. It works in three steps. First a threshold is set which is equal to length average. Then a total length of keys with length less than threshold is calculated. From this we can get remaining space for long keys and calculate new threshold. At last keys are limited to new threshold. https://fedorahosted.org/freeipa/ticket/2247 f
* Hide search facet add/delete buttons in self-servicePetr Vobornik2012-05-111-42/+71
| | | | | | Adds hiding/showing capabilities to action_button_widget. This patch is fixing regression caused replacing old details facet buttons with control_buttons_widget. The problem was that some buttons were not hidden in self-service mode. https://fedorahosted.org/freeipa/ticket/2707
* Redefined search control buttonsPetr Vobornik2012-05-111-24/+34
| | | | | | This patch replaces old search facet action buttons with new control_buttons_widget. https://fedorahosted.org/freeipa/ticket/2247
* Control buttonsPetr Vobornik2012-05-111-1/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Control buttons is a widget which contains action buttons. It is located in facet header and are supposed to replace old action buttons created by IPA.action_button(spec) call. The benefit is that now it is possible to define new buttons declaratively in spec definition without a need of inheriting facet and overriding create method. Action buttons are an entry poing for execution facet-wide action so they are tightly bound to facet. Action button options: name: string label: string, human readable label tooltip: string, human readable tooltip href: string, optional icon: string, icon class needs_confirm: boolean, default false confirm_msg: string, human readable confirmation message confirm_dialog: confirmation dialog, optional, custom confirmation dialog action: action, action which will be executed enabled: boolean, optional, default true Control buttons are define in facet spec in control_buttons property. Its a spec object with following attributes: all attributes which normal widget can have buttons: array of action_button specs state_listeners: array of state listener specs In init phase control_buttons_widget should assign a action_button a facet. control_buttons_widget are resposible for evaluation of action_button disable/enable state because they contain state_listeners which creates the state upon the enabled/disabled state is evaluated. State listeners are similar to state_evaluators. The differce is that the state is not evaluated from record set but from facet itself. The execution of evaluation is bound to a facet event. https://fedorahosted.org/freeipa/ticket/2247
* Action listsPetr Vobornik2012-05-111-18/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add support fo Action Lists. Action list is a select widget with actions as options located in facet header. Action can be selected and then executed by clickin on 'apply' button. Actions lists are defined on facet level. Facet header takes them from facet. Action list options actions: list of actions state_evaluator: a state evaluator which is needed for enabling/disabling options. Can encapsulate more evaluators. State evaluator object ---------------------- State evaluator is resposible for evaluating a state from result set. State is a array of strings. Each evaluator should inherit from IPA.state_evaluator and override evaluate method. Methods: evaluate(record): should return string array which represents the state get_description(): human readable representation of a state Action ------ Action is a object which can perform certain action on a facet. Action has enabling and disabling conditions. action options: name: string, required, name of the option label: string, required, human readable name of the option enable_cond: string array, states which need to be present in order to run this action disable_cond: string array, states which must not be present in order to run this action handler: function, contains action's logic needs_confirm: boolean, default false, indicates if action needs user confirmation confirm_msg: string, default generic message, human readable confirmation message. Action list should contain logic which enables/disables action based on facet state and action's enabling/disabling conditions. It should also enforce presence of confirmation. In this patch is also slightly modified facet header, mostly title part. It was revised to contain status icon, title and action list on single line. Facet header is using state evaluator's get_description method to properly set tooltip for state icon. https://fedorahosted.org/freeipa/ticket/2247
* Inter-facet expirationPetr Vobornik2012-03-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When some facet perform action which modifies data, some other facet may become expired. Example: User modifies group's description. Now group search facet contains old data and has to be refreshed. Solution: New event was added to facet: on_update. It should be executed when facet performs action which modifies data ie: details facet update or add entry to dnsrecord. Then entity policies were introduced. Entity policies are a objects which are stored in entity.policies. They have similar function as facet_policies - performing communications and other functionality between facets. This way facets don't have to contain such logic and thus they aren't dependant on each other. This patch adds IPA.facet_update_policy, IPA.adder_facet_update_policy, IPA.search_facet_update_policy, IPA.details_facet_update_policy. IPA.facet_update_policy: On facets_created it bind itself to [current entity].[source facet].[event]. Default event is on_update. When the event is executed it sets expiration flag to [dest entity].[dest facet]. IPA.search_facet_update_policy: IPA.facet_update_policy where source facet = search, dest facet = details, dest entity = current entity. Its a default policy for updatein changes from search facet to details facet. Right now it isn't needed but it will be needed when action lists come to play. IPA.details_facet_update_policy: same as IPA.search_facet_update_policy just reversed. Very important. IPA.adder_facet_update_policy: similar functionality, just source of the event is dialog. Default event is added (new event in entity_adder_dialog). Entity policies should be specified in entity's spec object. If none are specified a default ones are used. Default policies are: IPA.search_facet_update_policy and IPA.details_facet_update_policy. https://fedorahosted.org/freeipa/ticket/2075
* Facet expiration flagPetr Vobornik2012-03-291-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: For performance reason a facet may cache the data in browser's memory. There should be a flag to indicate whether a facet has expired and should be refreshed. The expired flag could be set by these events: 1) any update operation 2) changing search filter in search facet 3) switching page in a multi-paged search/association facet 4) switching direct/indirect view in association facet 5) facet expiration time A facet should be able to use these methods to refresh itself: 6) on demand: an expired facet should be refreshed when a user opens it. 7) automatic: an open facet should automatically refresh itself when it expires. Solution: This patch solves cases: #2, #3, #5, #6. Case #4 works without any change. Case #1 will be solved later. Case #7 is deffered. Default expiration timeout was set to 10 minutes. In this patch are also updated facet.needs_update methods to reflect changes in containing facets. https://fedorahosted.org/freeipa/ticket/2075
* Content is no more overwritten by error messagePetr Vobornik2012-03-191-5/+79
| | | | | | | | | | | | | | | | | When an error which caused calling of report_error occurt, the content of a facet got replaced by error message. There was no way how to force the facet to recreate its content and the facet became unusable. This patch creates a containter for an error message. On error, report_error writes its content to error container, content container is hidden and error container is shown. Older comment in a code suggested to move the error message to facet's footer. A message in a footer could be missed by the user and on top of that a footer is sometimes used by various facet and we would have to solve the same problem again. From experience the cause of an error is usually a missing pkey in a path. Therefore error information suggests user to navigate to top level. It causes to load default facets with default values so errors in navigation state shouldn't happen. Facet content is displayed back on facet_show. If user tries to display same object as before facet's need_update() would return false, therefore need_update was modified to always return true if error is displayed. Reproduction: 1) display any nested entity - ie DNS record 2) delete its parent pkey from path - &dnszone-pkey=example.com 3) reload the page with this path https://fedorahosted.org/freeipa/ticket/2449
* Automember UIPetr Voborník2012-02-011-2/+11
| | | | | | | | | | | | | | | | New UI for automember. Implemented: * search facet core * rule details facet * attribute_table_widget - new base class for tables which contains multivalued attribute with special add/remove commands * adding/removing conditions in details facet TODO: * label translations * UI for defining default rules https://fedorahosted.org/freeipa/ticket/2195
* Navigation and redirection to various facetsPetr Voborník2012-02-011-27/+52
| | | | | | | | | | | | In current implementation target facet of navigation(from menu) and redirection is always one exact facet per entity. There isn't a way to navigate to different facet from menu or redirect to different facets from various facets. This patch adds: * possibility to define menu items which can navigate to different facets of various entities. This also means that now current menu tree can contain leafs with the same entity. * possibility to define redirection target per facet - it is needed to keep breadcrumb navigation consistent with various navigation tree patch leading to same entity leafs. This functionality is needed for Automember UI. Automember UI is designed as if it was for two entities but it is in fact only one. https://fedorahosted.org/freeipa/ticket/2195
* Added icons for status column.Endi Sukma Dewata2012-02-011-1/+1
| | | | | | | | | | | The status formatter was modified to show enabled/disabled icon before the status text. The format classes were renamed to formatter to avoid confusion with the format() method. A new parameter 'type' was added to the formatter to determine the output type (e.g. text/html). Ticket #1996
* Show disabled entries in gray.Endi Sukma Dewata2012-01-231-1/+24
| | | | | | | | The users, HBAC/sudo rules, HBAC test, and SELinux list pages have been modified to show disabled entries in gray. Icons will be added separately. Ticket #1996
* Enabled paging on automount keys.Endi Sukma Dewata2012-01-231-39/+51
| | | | | | | | | | | The automount keys search facet has been modified to support paging. Since the automountkey-find command doesn't support --pkey-only option, the facet is configured such that during a refresh operation it will retrieve all entries (including the key and info attributes) and then display only the ones that are supposed to be visible in the current page. Ticket #2093
* Refactored entity object resolution.Endi S. Dewata2011-12-211-12/+11
| | | | | | | | | | | | | The IPA.get_entity() has been modified to accept either entity name or entity object. If it receives an entity object it will return the object itself. Otherwise, it will resolve the name in the entity registry. The other_entity variables have been modified to store a reference to the entity object instead of its name. The test cases have been modified to use real entity objects instead of just the names. Ticket #2042
* Added facet tabs coloringPetr Vobornik2011-12-141-1/+1
| | | | | | Facet tabs are now colored according to their group. https://fedorahosted.org/freeipa/ticket/1976
* Additional better displaying of long namesPetr Vobornik2011-12-091-17/+6
| | | | | | | | - facet group headers, error dialog, non-scrollable tables, can manage long names Size calculation of scrollable and non-scrollable tables was united. Now these types of tables differ only by style. https://fedorahosted.org/freeipa/ticket/1821
* Fixed matched/unmatched checkboxes in HBAC TestEndi Sukma Dewata2011-12-091-2/+13
| | | | | | | | | The checkboxes in HBAC Test run page have been fixed to show/hide matched or unmatched rules. The New Test button has been fixed to deselect the inputs in all facets. The test data has been updated as well. Ticket #388
* Better displaying of long names in tables and facet headersPetr Vobornik2011-12-091-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Tables columns have computed width. If value in one column is very long it widens the column and shortens others. This change causes that body columns are not aligned with header columns which makes the table less readable. Applying 'word-break: break-all' style breaks the word to multiple lines and solves the problem. Simililar problem is in details facet when displaying text values. Very long values widens the table and a horizontal slider is displayed, which is bad. Applying same solution. In facet headers and breadcrumb navigation breaking the pkey looks bad - there should be only on line of pkey. To solve this, the pkey is limited to 63 characters (empirically measured). Long pkeys are cut. Uncut pkey is set as a title to avoid losing information. Whole breadcrump could be about 140 chars (with current styles). 10 chars is reserved for entity link, 60 for pkey the rest (about 60) for parent pkeys. The assumtion is that the parent pkeys wouldn't be so long so they won't be cut anyway. Column width calculation in tables was iproved. Now it counts with cell spacing, padding, border. It uses these assumtions: cell-spacing: 2px cell-padding: 6px th:right, left; td: left cell-border: th:1px; td:0px It would be better to get these measures dynamically. Right now it is good enough - better than previous calculation. Result: data cells are aligned with their header. This alignment fails if vertical scrollbar is displayed (existing problem). Also added padding to headers in association adder dialog. https://fedorahosted.org/freeipa/ticket/1890
* Added external fields for HBAC Test.Endi Sukma Dewata2011-12-071-1/+5
| | | | | | | A text field has been added for specifying external user, host, and service for HBAC testing. Ticket #388
* Fixed navigation buttons for HBAC Test.Endi Sukma Dewata2011-12-071-0/+12
| | | | | | | The Back, Next, and New Test buttons in HBAC Test have been fixed to work properly. Ticket #388
* Added HBAC Test page.Endi Sukma Dewata2011-12-061-26/+33
| | | | | | | | | | 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
* Refactored facet.load().Endi Sukma Dewata2011-12-061-104/+128
| | | | | | | | | The load() in IPA.facet has been modified to accept the complete data returned by the server instead of just the result. This is needed by HBAC Test to access other attributes returned in the test result. Ticket #388
* Added support for radio buttons in table widget.Endi Sukma Dewata2011-12-061-2/+1
| | | | | | | | | The table widget has been modified to support single-valued attribute using radio buttons needed by some facets in HBAC Test. The widget now uses 'pagination' flag to determine whether to show the pagination control. The test data has also been updated. Ticket #388
* Added paging on search facet.Endi S. Dewata2011-11-111-4/+223
| | | | | | | | | | | | | | | The search facet has been modified to support paging on most entities using the --pkey-only option to get the primary keys and a batch command to get the complete records. Paging on DNS records is not supported because a record may appear as multiple rows. The following entities do not have --pkey-only option: Automount Key, Self-Service Permissions, Delegation. The search and association facet have been refactored to reuse the common code from the table facet base class. Ticket #981
* Moved facet code into facet.js.Endi S. Dewata2011-11-041-0/+588
Facet-related code has been moved from entity.js into a new facet.js because the file is getting too big.