Commit Graph

19 Commits

Author SHA1 Message Date
Petr Vobornik
b6540e88d8 Fix license in some Web UI files
Modified web ui files had incorrect GPLv2 headers instead of GPLv3 ones.

All of the affected code is of FreeIPA origin.
2013-12-09 10:18:38 +01:00
Petr Vobornik
5d919c9556 Change tests to use AMD loader
Test were modified accordingly to AMD changes.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:37 +01:00
Petr Vobornik
8ce157910a Web UI tests fix
ACI tests were crashing because of misconfigured facet.
Entity link test were crashing because of incorrect jquery selector.

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:17 +02:00
Petr Vobornik
3ca0f6aee5 Fixed evaluating checkbox dirty status
Problem:
When value in checkbox is modified twice in a row (so it is at its original value) an 'undo' button is still visible even when it shouldn't be.

Cause:
IPA server sends boolean values as 'TRUE' or 'FALSE' (strings). Checkbox_widget converts them to JavaScript? boolean (true, false). Save method in checkbox_widget is returning array with a boolean. So test_dirty method always evaluates to dirty because 'FALSE' != false.

This patch is fixing the problem.

https://fedorahosted.org/freeipa/ticket/2494
2012-03-15 16:08:02 +01:00
Petr Voborník
eb87b8c319 UI support for ssh keys
To user and host details pages was added ipasshpubkey attribute.

New widget for ssh public keys was created.

https://fedorahosted.org/freeipa/ticket/2340
2012-02-15 09:23:05 +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
c5ca34f41d Fixed unit tests after widget refactoring
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:02:01 +00:00
Petr Vobornik
4bab6b7e5d Splitting basic widgets into visual widgets and fields
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:00:32 +00:00
Endi S. Dewata
20ad8fe1ba Removed develop.js.
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
2011-11-14 16:47:10 -05:00
Endi S. Dewata
725e2e4624 Merged widget's metadata and param_info.
The metadata and param_info attributes in widget have been merged
because they are redundant.

Ticket #1436
2011-10-27 13:48:17 +00:00
Endi S. Dewata
21cd1857c8 Fixed posix group checkbox.
In the adder dialog for groups the checkbox has been modified to use
the correct field name "nonposix" and be checked by default.

Note: This is a temporary fix to minimize the changes due to release
schedule. Eventually the field label will be changed into "Non-POSIX
group" and the checkbox will be unchecked by default, which is more
consistent with CLI.

Ticket #1799
2011-09-20 18:50:46 +00:00
Endi S. Dewata
05034f13e6 Fixed unit test for entity select widget.
The unit test for IPA.entity_select_widget has been fixed to check
the options after loading the record.
2011-09-07 19:21:23 +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
571274e978 Entity select widget improvements
The IPA.entity_select_widget has been modified into a searchable and
editable drop down list. The base functionality has been extracted
into IPA.combobox_widget.

Ticket #1361
2011-07-18 14:47:57 -04:00
Adam Young
a746c613a4 dnsrecord-mod ui
Brings the DNS record infrastructure in line with the other entities.
Uses widgets, nested search, and a littel bit of overloading for dns specific behavior
The records now have their own page.

simplified link widget and use for dns
links work for nested entities.

change the field in the link widget to other_entity to avoid name collision.
unit test for entity link.

fixed reference to entity for getting pkeys

work around lack of setattr for dns record mod.
update wasn't deducing locked_field type correctly.
don't overwrite param_info in init
data is required on adder dialog
delete works for multiple records
use show instead of find for entity_link_widget.

https://fedorahosted.org/freeipa/ticket/1038
https://fedorahosted.org/freeipa/ticket/1448
https://fedorahosted.org/freeipa/ticket/577
https://fedorahosted.org/freeipa/ticket/1460
2011-07-13 21:57:18 +00:00
Endi S. Dewata
aa29a8a769 Added Update and Reset buttons into Dirty dialog.
The Dirty dialogs have been combined into IPA.dirty_dialog. It
provides the Update and Reset buttons with customizable callback.

Previously the widget's dirty status is computed by comparing the
old values with the new values. This method is sometimes inaccurate,
so the is_dirty() method has been modified to simply return a flag
which is set to true if the widget is changed.

Ticket #896.
2011-05-27 13:06:57 -04:00
Endi S. Dewata
bd493d47a7 Added multi-valued text widget.
A multi-valued text widget has been created to replace the old
IPA.details_field. The old code was designed to handle all data
types, and it uses one <dd> tag for each value, so the code is
still incomplete and complex. The new code was designed to handle
only multi-valued text attributes, and it uses one <dd> tag for
all values, so it's easier to maintain. There are already other
widgets that can be used to handle other data types.

The new code supports line-level undo and line-out for removal
like the old code, but there are some changes:
 - Undoing a newly added line will remove the entire line.
 - Editing the value of a removed line will cancel the removal.
 - It provides 'undo all' link to reset the entire attribute.

The old code will be cleaned up in a subsequent patch.
2011-02-03 20:09:15 -05:00
Adam Young
2518612b0d core widget unit tests baseline set of unit tests for checking that each widget conforms to the contract 2011-02-02 10:59:46 -05:00
Adam Young
c281e786c8 widget unit tests
unit test for basic functionality, text, and checkbox widgets
2011-01-31 13:12:53 -05:00