Commit Graph

55 Commits

Author SHA1 Message Date
Petr Vobornik
6a8d6d3fde Notify success on add, delete and update
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
2012-09-06 09:44:15 +02:00
Petr Vobornik
ade68ec94f Read-only external facet for non-external groups
Added evaluators to decide if attribute facet should be read-only based on attribute level rights.
Default values serves well for group's external member.

https://fedorahosted.org/freeipa/ticket/2895
2012-08-14 08:09:50 +02:00
Petr Vobornik
5d2b0fecd5 Attribute facet
Created new type of facet: attribute facet. This facet is similar to association facet but it serves for displaying object's multivalued attributes which behaves like association attributes. It will serve as a basis for displaying group's externalmember attribute.

https://fedorahosted.org/freeipa/ticket/2895
2012-08-14 08:09:43 +02:00
Petr Vobornik
c2783b9b54 Replace use of attr with prop for booleans
Recommened way of setting boolean HTML attributes is by $.prop(boolean) method not $.attr(boolean) because it sets DOM object property not an attribute. Latter works because of jquery's backward compatibility. This patch makes things clearer.

Some info about prop and attr: http://stackoverflow.com/a/5876747

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:17 +02:00
Petr Vobornik
d46687ea91 Refactored associatin facet to use facet buttons with actions
Association facet was refactored to use new concept of control buttons. It is the last facet type which don't use this concept.
It fixes regression introduced by previous refactoring of table facet (delete button was never enabled).

https://fedorahosted.org/freeipa/ticket/2876
2012-06-29 11:56:04 +02:00
Petr Vobornik
e61d0ada04 Removal of illegal options in association dialog
Association dialogs were using non-existent options for find commands. It causes error when #2509 is implemented.

Now when creating a find command a check for options existence is performend. Option is not used if not present in metadata. It fixes the issue.

https://fedorahosted.org/freeipa/ticket/2760
2012-06-07 11:22:21 +02:00
Petr Vobornik
bbe672a2ae Facet expiration flag
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
2012-03-29 13:39:37 +02:00
Petr Vobornik
66692127c6 Show_content on refresh success
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
2012-03-19 18:37:39 +01:00
Petr Vobornik
646a4ccde3 Content is no more overwritten by error message
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
2012-03-19 18:37:19 +01:00
Petr Vobornik
31eebda584 Removed CSV creation from UI
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
2012-03-02 11:45:21 -06:00
Endi Sukma Dewata
6bd2f5ba35 Fixed host managed-by adder dialog.
The host managed-by adder dialog has been fixed to use the new
--not-man-hosts option to filter out hosts that are already added.

Ticket #1675
2012-01-31 08:40:00 -06:00
Petr Voborník
71f9343480 Added refresh button for UI
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
2012-01-30 17:46:57 -06:00
Endi Sukma Dewata
7c0c39581c Enabled paging on automount keys.
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
2012-01-23 15:38:25 +01:00
Endi S. Dewata
5fc064f13e Refactored entity object resolution.
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
2011-12-21 14:59:49 +01:00
Petr Vobornik
8cb211a24f Distinguishing of external values in association tables
Problem:
Rule association widget was displaying standard records with external records in one table. User couldn't distinguish the values. When clicking on the external record link it navigated to appropriate page for that entity. But for external value there is no record to show so it displayed error.

Solution:
* For tables with possible external values a 'external' column was added. It displays "True" if the value is external and nothing if not. Displaying nothing is intentional. If user sees some text in external column he imidiately knows that the record is external without even reading the "True" text.
* Rows with external values don't have a link for navigating to record page. This prevents showing the error as no record exists.

Additional changes:
* Association table widget was stripped of get_records method. Loading records isn't its resposibility it's a resposibility of field.
* Column was extended by possible suppressing of link creation. It's done by optional suppress_link argument in setup method.
* To allow setting suppress_link attribute in inherited tables a new overridable method was created - setup_column.

Posible future improvements:
* Table is using dynamic setting of width for columns. Each column has the same width. For flag columns such as 'external' the width of the column is too big. It would be better to be able to set smaller fixed width and the rest of the columns width (without the width set) would be computed (to fit the table).
* When a table has displayed buttons in its last column header the cells in column header have different vertical alignmnent. It should be united.

https://fedorahosted.org/freeipa/ticket/1993
2011-12-15 20:00:02 +00:00
Petr Vobornik
187bedafd0 Fixed displaying of external records in rule association widgets
It's a fix for regression introduced by widget refactoring #2040.

https://fedorahosted.org/freeipa/ticket/2040
2011-12-15 19:59:57 +00:00
Endi Sukma Dewata
caa9d52666 Refactored facet.load().
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
2011-12-06 22:08:07 +00:00
Petr Vobornik
ab667912cf Code cleanup of HBAC, Sudo rules
https://fedorahosted.org/freeipa/ticket/1515
2011-12-05 16:01:44 +00:00
Endi S. Dewata
9405e1a9db Added paging on search facet.
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
2011-11-11 14:44:25 +00:00
Endi S. Dewata
6802ea7d70 Fixed problem changing page in association facet.
The association facet has been modified to detect page change to
determine whether the facet needs to be updated.

Ticket #1459
2011-11-07 15:07:02 +01:00
Endi S. Dewata
6c3e1a21d7 Fixed blank krbtpolicy and config pages.
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
2011-11-04 16:51:37 +01:00
Petr Vobornik
9afe4b98da Page is cleared before it is visible
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
2011-11-02 15:37:49 +00:00
Endi S. Dewata
6af5755de5 Fixed "enroll" labels.
Labels using the word "enroll" (except for host enrollment) have
been modified to use more relevant words.

The IPA.add_dialog has been renamed into IPA.entity_adder_dialog
for clarity.

Ticket #1642
2011-10-27 13:47:45 +00:00
Endi S. Dewata
e9c8581ffc Added selectable labels for radio buttons.
The radio buttons in association facet and radio widget are now
linked to their labels so that they can be selected by clicking
the labels.

Ticket #1782
2011-10-05 15:08:07 +02:00
Petr Vobornik
2028a4095d Fixed: Enrolment dialog offers to add entity to reflexive association.
https://fedorahosted.org/freeipa/ticket/1883

It's a regression introduced by patch for #1797

Reproduce:

 * show user group foo
 * click on user groups tab
 * click on enroll button

Result:
User group 'foo' is listed in available list.

Expected result:
User group 'foo' is not listed in available list.
2011-09-27 14:44:00 +00:00
Endi S. Dewata
a2a42c3be8 Fixed duplicate entries in enrollment dialog.
The IPA.association_adder_dialog has been modified not to show
search results that are already selected to prevent duplicates.

Ticket #1859
2011-09-27 14:43:48 +00:00
Endi S. Dewata
390d017e32 Modified dialog to use sections.
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
2011-09-23 13:13:10 +00:00
Endi S. Dewata
63a7a358d4 Fixed problem enrolling member with the same name.
The IPA.association_adder_dialog has been modified to use an exclusion
list to hide entries that are already enrolled.

The IPA.adder_dialog has been modified to store the columns directly
in the available & selected tables.

Ticket #1797
2011-09-22 16:55:47 +00:00
Endi S. Dewata
0882c25c66 Fixed labels for run-as users and groups.
The labels for the run-as users and groups tables in sudo rule details
page have been modified to improve the clarity.

Ticket #1752
2011-09-13 17:32:33 +00:00
Petr Vobornik
9c4b004076 Fixed inconsistency in enabling delete buttons
https://fedorahosted.org/freeipa/ticket/1640

On the HBAC Rules page, where the rules are listed, if no rule is selected, the "Delete" button is not enabled, and cannot be clicked on.
But edit a Rule, and Delete button is enabled in the available sections - regardless of, if an object is selected to be deleted or not, or even if there is no object to be selected to delete.

One can click on this button...but then - there is no message indicating that something should be selected for deletion for this button to do anything.

Notes:
 * fixed association_table_widget and association_facet
2011-09-09 22:43:19 +00:00
Endi S. Dewata
a95b44face Fixed sudo rule association dialogs.
The adder dialog for the user and host tables in sudo rule details
page have been fixed to use --not-in-sudorules to avoid showing
entries that are already added into the rule either directly or
indirectly via groups.

This does not apply to the command and run-as tables because they
do not support such option.

Ticket #1768
2011-09-09 19:47:27 +00:00
Petr Vobornik
50a898855c Modify serial associator to use batch
https://fedorahosted.org/freeipa/ticket/1688

The serial associator is used to execute a command multiple times with different parameters. This is used for adding/removing a user into/from multiple groups. It has some issues:

Each command is executed one-by-one, so it could be slow.
  * If there's a failure the rest of the commands will not be executed.
  * This can be fixed by putting the commands into a batch and execute them at once.
2011-08-25 15:57:00 +00:00
Endi S. Dewata
5f9fcd1be0 Removed unnecessary HBAC/sudo rule category modification.
Since the Add/Delete links in the association table are disabled when
the category is set to 'all', it's no longer necessary to check the
category before showing the add/delete dialogs and modify the category
before adding entries. Thus, the IPA.rule_association_table_widget is
no longer needed.

Ticket #1692
2011-08-23 22:22:41 +00:00
Endi S. Dewata
fca0f4dd65 Updated add and delete association dialog titles.
The association table widget and facet have been modified to accept
titles for the add and delete dialogs. The table and facet definitions
have been modified to specify the appropriate titles.

Some unused code have been removed.

Ticket #1629
2011-08-23 16:11:42 +00:00
Petr Vobornik
4a72593893 Uncheck checkboxes in association after deletion
https://fedorahosted.org/freeipa/ticket/1639
2011-08-19 20:54:22 +00:00
Endi S. Dewata
6bf90a472b Removed 'Hide already enrolled' checkbox.
The 'Hide already enrolled' has been removed from the enrollment
dialog because it is checked by default and entries that are already
enrolled cannot be enrolled again.

Ticket #1638
2011-08-19 16:43:00 +00:00
Endi S. Dewata
966fbd6485 Linked entries in HBAC/sudo details page.
The association tables in HBAC/sudo details page have been modified
to link the entries to the appropriate details page.

Ticket #1535
2011-08-04 11:46:41 -04:00
Endi S. Dewata
9150187ab9 Resizable adder dialog box.
The tables in the adder dialog have been modified to expand
according to the size of the dialog.

This patch also fixes the problem with row height on IE.

Ticket #1542
2011-08-02 22:56:58 -04:00
Adam Young
bb45e51809 use other_entity for adder columns
delay creation of the table until the columns have been set
https://fedorahosted.org/freeipa/ticket/1544
2011-07-29 14:28:56 +00:00
Adam Young
b36df6e9b9 removing setters setup and init
change widget and widget unit tests to hold on to entity, not entity name.
    Replacing entity_name with entity.name  in most places.
       The one exception is columns for table_widget.
       Widgets that refer to other entities have to have late resolution of the entity object, due to circular dependencies.

    cleanup entity assignment.
    removed template and layout,
    merged setup into create
    adder dialogs adjust height for external
    removed init from widget, isection, association, facet, host and service

    Make unit tests use factory.
    fix functional tests to click find link correctly.
    tweak to activation test, but still broken.
    moved initialization code to the end
    use --all for hbacrule find, so the type shows up now

    fixed dns exception code and exception handling for get_entity
    replace metadata look up with value from entity.
    fixed author lines
    removed duplicate columns in managed by facets.
    tweak to nav fix in order to initialize tab.
    more defensive code
    update metadata for true false
    one line init for entity_name in widget
    move init code to end of constructor functions
    moved constants to start of function for adder_dialog
    external fields for dialogs initialized at dialog creation
    sudo sections: move add fields and columns to widget definition.

   The parameter validation in IPA.column ...This is precondition checking.  Note that it merely throws an exception if the entity_name is not set.  I want this stuff at the top of the function so that it is obvious to people looking to use them what is required.  I added a comment to make this clear, but I'd like to keep precondition checking at the top of the function.

   decreased the scope of the pkey_name and moved the initiailzation fof columns into the setup_column function for association_tables

   return false at the end of click handler

   removed blank labels in sudo command section

   fix radio buttons for sudo category

   fixed table side for adder dialogs with external fields
    comments for future direction with add_columns

    https://fedorahosted.org/freeipa/ticket/1451
    https://fedorahosted.org/freeipa/ticket/1462
    https://fedorahosted.org/freeipa/ticket/1493
    https://fedorahosted.org/freeipa/ticket/1497
    https://fedorahosted.org/freeipa/ticket/1532
    https://fedorahosted.org/freeipa/ticket/1534
2011-07-28 14:17:25 -04:00
Endi S. Dewata
740bacdfb9 Fixed navigation problems.
The navigation code has been modified store the facet's state
separately in the facet object itself. The path state is stored
in the navigation object. When the path is changed to view a new
facet, only the path and the state of the new facet will be shown
in the URL, thus keeping the URL short.

This fixes pagination, bookmark and search filter problems as well.

Ticket #1507, 1516, 1517
2011-07-22 12:29:55 -04:00
Endi S. Dewata
ca7395c353 Refactored IPA.current_facet().
The IPA.current_facet() has been merged into IPA.entity.setup()
and replaced by IPA.entity.get_facet(). The setup() will read the
current facet's name from the <entity>-facet URL parameter and store
the facet object in the entity object. The get_facet() without any
parameter will return the current facet object.
2011-07-22 12:13:10 -04:00
Endi S. Dewata
4bd85ceb90 Fixed label capitalization
The CSS text-transform sometimes produces incorrect capitalization,
so the code has been modified to use translated labels that already
contain the correct capitalization.

Ticket #1424
2011-07-14 11:44:48 -04:00
Endi S. Dewata
3229eee074 Added sudo options.
A table has been added into sudo rule details page for managing
sudo options.

Ticket #1447
2011-07-11 22:11:40 +00:00
Endi S. Dewata
078d6dfb1c Fixed dirty dialog problems in HBAC/Sudo rules.
The update() in HBAC/Sudo details facet has been fixed to call the
callback function which will show the dirty dialog properly.

Ticket #1439
2011-07-07 16:27:59 -04:00
Endi S. Dewata
2a52723465 Fixed hard-coded messages.
Hard-coded messages in the UI have been replaced with I18n messages.

Ticket #1396
2011-06-30 14:50:09 -04:00
Adam Young
66eeaceb8c shorten url cache state in a javascript variable, and leave on information about the current entity in the URL hash params
https://fedorahosted.org/freeipa/ticket/674

decrement depth for hidden tabs.

Initialize state from url
useing delete for removing state
stricter attribute matching
not incrementing depth for all hidden tabs.
whitespace cleanup
2011-06-28 22:40:42 +00:00
Endi S. Dewata
7452b6d3cb Fixed entity labels.
The entity labels in the following locations have been fixed:
 - search facet title: plural
 - details facet title: singular
 - association facet title: singular
 - breadcrumb: plural
 - adder dialog title: singular
 - deleter dialog title: plural

Some entity labels have been changed into the correct plural form.
Unused file install/ui/test/data/i18n_messages.json has been removed.

Ticket #1249
Ticket #1387
2011-06-27 12:11:22 -04:00
Endi S. Dewata
1717d638fc Added record count into association facet tabs.
The details and association facets have been modified to show the number of records in each association in the corresponding facet tab.

Ticket #1386
2011-06-24 12:05:51 -04:00
Endi S. Dewata
c8eb76766a Converted entity header into facet header.
The content and the size of entity header changes depending on the
facet being displayed, so the entity header has been converted into
a facet header to allow better control via CSS.

The DNS record facet has been updated to use the same styling and
support scrolling.

To help styling and testing, all buttons have been assigned a name.
2011-06-23 15:50:49 -04:00