summaryrefslogtreecommitdiffstats
path: root/install/ui/details.js
Commit message (Collapse)AuthorAgeFilesLines
* Move of core Web UI files to AMD directoryPetr Vobornik2013-01-181-1239/+0
| | | | | | SSIA https://fedorahosted.org/freeipa/ticket/112
* Update of confirmation of actionsPetr Vobornik2012-09-061-6/+5
| | | | | | | | | | | This patch is changing confirmation of actions according to ticket #3035, see the ticket description. It does following changes: * Confirmation of update action was removed. * Action lists resets to first action (which is usually a NOP: '-- select action --') on change of displayed entry. * New confirmation dialog was implemented. It is used for action confirmation. It is used in IPA.action to replace the call of window.confirm(message). The old call is a modal window which blocks all JS functionality and has different style than other dialogs in Web UI. The new one has same design and doesn't block background operations. https://fedorahosted.org/freeipa/ticket/3035
* Fixed problem while deleting entry with unsaved changesPetr Vobornik2012-09-061-0/+9
| | | | | | While deleting an entry it now resets a facet if there are unsaved changes. It prevents pop up of various error dialogs when UI tries to redirect to search page after successful delete. https://fedorahosted.org/freeipa/ticket/3047
* Notify success on add, delete and updatePetr Vobornik2012-09-061-0/+10
| | | | | | | | | | | Notification of success was added to: * details facet: update * association facet and association widget: add, delete items * attribute facet: delete items (notification of add should be handled in entity adder dialog) * sudo rule: add, remove option * dnsrecord: add, update, delete https://fedorahosted.org/freeipa/ticket/2977
* Successful action notificationPetr Vobornik2012-08-291-0/+4
| | | | | | | | | | | | | | | | | | | User was not notified about success of actions executed from action list, action panel or facet cotrol bar. This patch adds IPA.notify_success(message) call. It creates a yellow notification area with supplied message in Web UI header in the middle of the green area (empty space of first level navigation). This area is displayed for 3s and then it fades out (800ms). It also fades out when it is clicked. This call is used(directly or indirectly) in: * search facets: delete, disable, enable actions * details facets: delete action * user details facet: reset password action * host details facet: unprovision, set OTP actions * service details facet: unprovision action * host and service details facet: request, revoke, restore certificates actions * group details facet: change to POSIX/external actions * dns zone details facet: add/remove permission actions https://fedorahosted.org/freeipa/ticket/2977
* Make group externalPetr Vobornik2012-08-141-0/+29
| | | | | | New action for creating plain group external. Posix group can't be made external. https://fedorahosted.org/freeipa/ticket/2895
* IDs and names for dialogsPetr Vobornik2012-07-251-0/+1
| | | | | | | | | | It's hard to detect if or which type dialog is displayed becouse not all dialogs have IDs. On dialog open, it's id or name (if id is not set) is used for containing element id. Many of dialog types were missing id or name so name was added to each dialog type. In HTML, element's id should be unique. Our framework allows opening two dialogs with the same id. It may lead to state where getElementById method may have unpredicted behaviour. Therefore attribute 'data-name' with dialog's name was added to dialog's containing element. Automation framework can search more reliable by using this attribute instead of id. https://fedorahosted.org/freeipa/ticket/2853
* Add and remove dns per-domain permission in Web UIPetr Vobornik2012-07-111-1/+3
| | | | | | | | | | | | | | This patch adds support for new per-domain permissions to Web UI. User with assigned permission (through role,priviledge) can edit DNS zone. These permissions can be added/remove by ipa dnszone-{add/remove}permission $dnszone command. For adding/removing of this permission in Web UI new actions in DNS zone action list were created. DNS zone object doesn't contain information about existance of related permission. Such information is required for enabling/disabling of new actions. Web UI has to search for the permission to get it. DNS zone facet was modified to use batch command, in a same way as user facet, for loading dnszone and the permission at the same time - on load. Batch command has a feature to report all errors. Such behavior is unwanted because we expect that permission-show command will fail when the permission doesn't exist. Batch command was therefore modified to not report commands which has retry attribute set to false. This attr was chosen because it has similar purpose in single command execution. New actions should be enabled only for users with appropriate rights. It is not possible to obtain rights for certain action in advance so an approximation is used: write right for dns zones' managedby attribute. https://fedorahosted.org/freeipa/ticket/2851
* Web UI password is going to expire in n days notificationPetr Vobornik2012-06-291-1/+1
| | | | | | | | This patch adds pending password expiration notification support to Web UI. When user's password is going to expire in less or equal than configure days a bold red text 'Your password expires in N days.' and a link 'Reset your password' are shown in Web UI's header (on the left next to 'Logged in as...'). Clicking on 'Reset your password link' opens IPA.user_password_dialog. Successful reset of own password will reload user's information (whoami) and update header (it will most likely hide the warning and link). https://fedorahosted.org/freeipa/ticket/2625
* Same password validatorPetr Vobornik2012-06-261-0/+1
| | | | | | | | | | This patch adds validator which compares passwords in two fields. In future it should be used in various password reset dialogs. A flags attribute was added to field. It's purpose is to define control flags. This patch uses it in details facet and adder dialog to not include fields to command option if the field has 'no_command' flag. Therefore there is no need to use hacks such as disabling of field or removing a value from command's option map when a non-command field is needed (ie verify password). https://fedorahosted.org/freeipa/ticket/2829
* Action panel for host enrollmentPetr Vobornik2012-06-131-0/+56
| | | | | | Widgets in host enrollment sections were modified. They now serve only for displaying of has_key and has_password status. Functionality for setting otp and unprovisioning was moved to separate dialogs. Execution points for opening of these dialogs are items in new action panel in enrollment section. https://fedorahosted.org/freeipa/ticket/2251
* Removal of illegal options in JSON-RPC callsPetr Vobornik2012-06-041-5/+10
| | | | | | | | | | Ticket https://fedorahosted.org/freeipa/ticket/2509 bans using non existent options. If such option is supplied command ends with error. It uncovered several cases in Web UI. This patch is fixing these cases. Automember, Self-service and Delegation don't support 'pkey-only', 'size-limit' and 'rights' option. Pagination and rights check were disabled for them. Automount map adder dialog was sending options for indirect map even if chosen type was direct (when those for indirect was filled earlier), also it was sending non-existant 'method' option. https://fedorahosted.org/freeipa/ticket/2760
* Enable reset password action according to attribute perrmissionPetr Vobornik2012-06-041-0/+34
| | | | | | | | This patch creates state_evaluator which creates permission states for defined attribute. The state format is: attributeName_permissionChar. This evaluator is used for user_password attribute and it control enabling/disabling of related action in user account action panel. https://fedorahosted.org/freeipa/ticket/2318
* 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-49/+114
| | | | | | | | | | | 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
* General details facet actionsPetr Vobornik2012-05-111-0/+150
| | | | | | This patch adds common action button actions for enabling/disabling/deleting object. https://fedorahosted.org/freeipa/ticket/2707
* Hide search facet add/delete buttons in self-servicePetr Vobornik2012-05-111-0/+1
| | | | | | 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 details control buttonsPetr Vobornik2012-05-111-68/+65
| | | | | | This patch replaces old details facet action buttons with new control_buttons_widget. 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/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Show_content on refresh successPetr Vobornik2012-03-191-0/+1
| | | | | | If an error content is displayed a successfull refresh doesn't show properly populated facet content. This patch adds show_content call to refresh success handlers which solves the problem. https://fedorahosted.org/freeipa/ticket/2449
* Content is no more overwritten by error messagePetr Vobornik2012-03-191-1/+3
| | | | | | | | | | | | | | | | | 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
* Removed CSV creation from UIPetr Vobornik2012-03-021-2/+0
| | | | | | Creating CSV values in UI is unnecessary and error-prone because server converts them back to list. Possible problems with values containing commas may occur. All occurrences of CSV joining were therefore removed. https://fedorahosted.org/freeipa/ticket/2227
* Multiple fields for one attributePetr Voborník2012-02-291-7/+9
| | | | | | | | | | Current implementation has a limitation to have one field per one attribute. This is fine for most cases. For cases where an attribute can have two editor widgets which can be swapped a need for two different types of field may occur. This patch introduces 'param' option which supposes to contain attribute name. If 'param' is not specified it will contain field's name therefore backward compatibility is maintained. This extension allows to have two fields with different name and same param -> two fields get/supply value from/to the same attribute. Needed for: https://fedorahosted.org/freeipa/ticket/2372
* Added refresh button for UIPetr Voborník2012-01-301-2/+13
| | | | | | | | | | | | | | Web UI is caching records. Currently only possible ways how to display updated record which was changed elsewhere - ie. in CLI are: * refresh page in browser (takes really long on slow vpns) * search facet: change filter, find, change filter back, find * entity details: go to search, select other entry, go back to search, select original entry * association facet: same as entity details These are unconvenient methods. This patch adds Refresh button to search, details and association facet. This button executes facets refresh method. https://fedorahosted.org/freeipa/ticket/2051
* Added policies into user details page.Endi Sukma Dewata2012-01-101-18/+28
| | | | | | | | The user details page has been modified to show the password policy and Kerberos ticket policy that apply to the user. The policies are currently displayed as read-only. Ticket #703
* Refactored entity object resolution.Endi S. Dewata2011-12-211-1/+1
| | | | | | | | | | | | | 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
* Refactored facet.load().Endi Sukma Dewata2011-12-061-56/+48
| | | | | | | | | 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
* Removed usage of bitwise assignment operators in logical operationsPetr Vobornik2011-12-051-1/+1
| | | | | | | | | | | | | | | JavaScript &= and |= are bitwise operators. They are shortened version of: foo = foo & bar foo = foo | bar In some places they were used as shortened version of logical operation and assignment. foo = foo && bar It lead to type conversion to Number which is wrong (0 !== false). This patch replaces such occurances with full version of logical operation and asignment. https://fedorahosted.org/freeipa/ticket/2040
* Added possibility to define facet/dialog specific policiesPetr Vobornik2011-12-051-0/+71
| | | | | | | | | | After deleting section as a special type of object a new way of defining inter-field logic is needed. For this purpose a facet_policy was created. It is a simple object with init() method. Init method should contain logic for attaching to fields' or widgets' events. When a policy is added to facet or dialog its container property should be set to that facet or dialog. It gives the policy an access to fields and widgets. Init method should be called after widgets creation. https://fedorahosted.org/freeipa/ticket/2040
* Removing sections as special type of objectPetr Vobornik2011-12-051-426/+92
| | | | | | | | | | Sections are changed into pure widget objects. Introduced IPA.composite_widget, basic widget for widget nesting (it's using IPA.widget_container). It's base class for section widgets. TODO: change old custom sections into custom fields and widgets. Note: usage of section in HBAC and SUDO is kept - whole logic will be removed in #1515 patch. https://fedorahosted.org/freeipa/ticket/2040
* Builders and collections for fields and widgetsPetr Vobornik2011-12-051-0/+133
| | | | | | | | | | | Introduced IPA.field_container and IPA.widget_container. IPA.field_container: collection for fields. Can set logical container (facet, dialog...) to fields. IPA.widget_container: collection for widgets. Has basic searching capability withing widget tree. Introduced field_builder, widget_builder, section_builder, details_builder. All are used for building fields and widgets. Field_builder and widget_builder have the main building logic. Section_builder can create content based on current section spec. Details builder defines a strategy for building content. https://fedorahosted.org/freeipa/ticket/2040
* Removed develop.js.Endi S. Dewata2011-11-141-4/+5
| | | | | | | | | | The develop.js is no longer necessary because the code in it has been merged into the main code. An empty extension.js has been added to provide a place for UI customization. Ticket #2099
* Refactored permission target section.Endi S. Dewata2011-11-141-4/+31
| | | | | | | The permission target section has been modified to use widgets to create the target selection and handle multiple fields. Ticket #2098
* Extending facet's mechanism of gathering changesPetr Vobornik2011-11-041-59/+265
| | | | | | | | | | | | https://fedorahosted.org/freeipa/ticket/2041 Adding option to gathering changes for update from widgets, sections, details facet. Changes are represented by update_info { fields [] ((field_info)), commands [] ((command_info)) } object. * On calling get_update_info() method widget, section and facet returns update_info object which represents all changes in nested objects. Thus usually widgets are creating update_infos, their containers are merging them. * This object can be then used in details facet update method. In order to use it command_mode = 'init' has to be set. Command mode was introduced to support backward compatibility. * command_info consists of command and priority. Priority can be set to specify exact exectuting order of commands. It can be defined on facet level by setting widget's priority. When widgit is creating command_info it should pas its priority to it.
* Fixed blank krbtpolicy and config pages.Endi S. Dewata2011-11-041-0/+1
| | | | | | | | | The details page compares the old and the new primary keys to determine if the page needs to be reloaded. The Kerberos Ticket Policy and Config pages do not use primary keys, so they are never loaded/updated with data. A parameter has been added to force update on these pages. Ticket #1459
* Page is cleared before it is visiblePetr Vobornik2011-11-021-3/+18
| | | | | | | | | https://fedorahosted.org/freeipa/ticket/1459 Changes: * added clear method to widgets, section, search, details, association facets * clear and refresh method in facet are called only if key/filter was changed * added id generator for widgets
* Fixed inconsistent details facet validation.Endi S. Dewata2011-10-271-12/+13
| | | | | | | The details facet validation has been moved out of update() such that all subclasses perform consistent validation. Ticket #1455
* Refactored validation code.Endi S. Dewata2011-10-271-27/+23
| | | | | The validation code in details facet, dialog, and sections have been modified to work more consistently.
* Merged widget's metadata and param_info.Endi S. Dewata2011-10-271-3/+3
| | | | | | | The metadata and param_info attributes in widget have been merged because they are redundant. Ticket #1436
* Fixed inconsistent required/optional attributes.Endi S. Dewata2011-10-251-21/+6
| | | | | | | | | The dialogs and details pages have been modified to use the * symbol to mark required fields. The automount map and the DNS zone dialogs have been modified to update the required fields according to the input type. Ticket #1696, #1973
* Circular entity dependencyPetr Vobornik2011-10-181-0/+23
| | | | | | | | | | | | | | | | | https://fedorahosted.org/freeipa/ticket/1531 Each entity is created together with its dependent objects (e.g. facets and dialog boxes). This causes a circular dependency problem because some of the objects need to obtain a reference to another entity that has not been created. Currently this is handled by storing only the other entity name and resolve it when needed (e.g. during rendering stage). In IPA.search_facet this delays the creation of the table widget, making it more difficult to customize. One solution is to do the object creation in 2 steps: * create all entity objects only * create the dependent objects in each entity Implemented solution: * all entities are created on application start * dependant objects (facets and dialogs) are created at once on their first use in entity.
* Fixed problem displaying special characters.Endi S. Dewata2011-09-231-2/+0
| | | | | | | | Some jQuery objects in various locations have been modified to use text() to show values obtained from the server (except messages). The text() will automatically encode special characters. Ticket #1798
* Modified dialog to use sections.Endi S. Dewata2011-09-231-13/+77
| | | | | | | | | | | | | | | The IPA.dialog has been modified to store sections instead of fields. If there is no sections specified, it will create a default section. The adder dialog for automount map has been modified such that the fields related to indirect map are stored in a section which will only be visible when the map type is set to indirect. The adder dialog for host has been modified such that it uses a custom section for hostname and DNS zone and standard section for the other fields. Ticket #1394
* Fixed missing optional field.Endi S. Dewata2011-09-131-5/+9
| | | | | | | | | | | | The optional uid field in user's adder dialog did not appear when the link is clicked to show the field. This is a regression introduced in the patch for ticket #1648. The click handler for the link field has been moved into a new closure so that the variables point to the correct elements. Note: the duplicate code in IPA.details_table_section.create() and IPA.dialog.create() will be addressed separately in ticket #1394.
* Fixed layout problem in permission adder dialog.Endi S. Dewata2011-09-091-44/+39
| | | | | | | | | | | | | In order to maintain consistent layout between details page and dialog boxes the IPA.details_list_section has been replaced with IPA.details_table_section which is based on table. The IPA.target_section and other subclasses of IPA.details_list_section have been converted to use IPA.details_table_section as well. The unit tests have been updated accordingly. Ticket #1648
* Fixed: JavaScript type error in entitlement pagePetr Vobornik2011-09-071-6/+14
| | | | | | | | | | https://fedorahosted.org/freeipa/ticket/1767 Opening IPA Server/Entitlements causes: "Uncaught TypeError: Cannot call method 'addClass' of undefined" error - Details.js:489 Introduced by patch for #1697 Cause: Details facet of entitlements doesn't contain Reset and Update buttons
* Enable update and reset button only if dirtyPetr Vobornik2011-08-311-4/+50
| | | | | | | | | | | | | | | https://fedorahosted.org/freeipa/ticket/1697 Original problem: WEBUI: Update automount location refer to unknown command Update name of the automount location (Policy -> Automount -> custom_location -> Settings -> Update) in the WEBUI refer to an unknown command. Solution: Tracking dirty state in field -> section -> details facet. 'Reset' and 'Updates' in details facet are enabled only if facet is dirty. Removes the problem above and 'no modification to be performed' annoyance.
* Fixed host keytab status after setting OTP.Endi S. Dewata2011-08-261-0/+2
| | | | | | | The host details page has been modified to update the keytab status based on the data returned by the host-mod command for setting OTP. Ticket #1710
* Validation of details facet before update ↵Petr Vobornik2011-08-251-2/+29
| | | | | | | | https://fedorahosted.org/freeipa/ticket/1676 The ticket is a duplicate of server error, but it revealed few UI errors. Newly performs validation of details facet before update. If validation fails, notification dialog is shown and command isn't executed. Fixed integer minimum and maximum value checking. Read-only and non-writable fields are no longer considered required.