Commit Graph

1184 Commits

Author SHA1 Message Date
Petr Vobornik
bf7ee6eeec webui: facet policies for all facets
Now also facets other than details facet can use facet policies.

Facet policies purpose is to extend facets behavior without
overriding base class. This shared behavior could be reused in
several other facets which may have completely different
base classes.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
cae2df274a webui: allow to hide facet tabs or sidebar
Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
8d8b56d135 webui: allow to replace facet tabs with sidebar
basically implementation of #4625 but atm there is no time to properly
test #4625 in the whole UI, therefore, it will be limited only to
active/stage/preserved user search page.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
435f9331c6 webui: facet groups widget
Refactoring of facet groups. This new widget has an html structure which
could be used for current facet tabs but also for PatternFly two column
layout with either accordion or nav-category
- https://www.patternfly.org/wp-content/uploads/patternfly/tests/form.html
- https://www.patternfly.org/wp-content/uploads/patternfly/tests/tab.html

Will be useful for #4625.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
3c2a8b408e webui: custom facet groups in a facet
Facets use to inherit facet groups from entity. There was no option to define
cross-entity facet groups for different facets which belong one entity.

In other words it was not possible to have 'user search' and 'stage user search'
tab in one facet group.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
17aafc36b4 webui: metadata validator min and max value overrides
Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
6a2b486e50 webui: navigation: unique names on entity facet menu items
Fixes issue where it is not possible to define under the same parent:
  { entity: 'bar', facet: 'baz' }
  { entity: 'foo', facet: 'baz' }

Error reporting of invalid menu item names was improved.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
8f60139520 webui: navigation: do not remember selected childs of menu item
Remove behavior which navigated to previously selected child if navigating
to its parent.

It makes navigation more consistent.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
6bcb90ef36 webui: prefer entity fallback in menu item select
While selecting menu item based on a facet which have an entity defined,
prefer entity fallback over facet name fallback.

It solves an issue which appears when a menu item of a different entity
has the same facet name specified. In such case this menu item was selected
instead of the desired one.

E.g.: there are menu items:
  { entity: 'foo' }
  { entity: 'bar', facet: 'search'}

Showing a foo's search facet resulted in selecting
{ entity: 'bar', facet: 'search'} item.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
2be8eeb04f webui: entity menu items navigate to main entity facet
I.e. remove memory from bare entity navigation

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
ae62bd6914 webui: entity facets in facet registry
All entity facets are automatically registered as a new type in
reg.facet.

The type name is: <entity_name>_<facet_name>

The name of facets is kept same, mainly to support the same url routes.

This change allows to get facet instance by calling, e.g.:
  reg.facet.get('user_details')

It allows to make declarative links to facet which are not yet instantiated.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
de374a0d3a webui: register construction spec based on existing spec
Useful for declarative inheritance. E.g. base new facet on details
facet with all registered preops and default spec object.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
c352616ac9 webui: declare search command options in search facet
A search facet could be defined with an option which is always applied
during entity-find command on facet refresh.

e.g.
  ipa user-find --preserved

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
69bc4f4955 webui: rename IPA.user_* to IPA.user.*
Or in other words, move all objects which belong to user module to the module.
Therefore they no longer pollutes the main 'IPA' module.

Therefore:
  require('freeipa/ipa').user == require('freeipa/user')

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
a4c0f780b7 webui: update patternfly to v1.1.4
Not all functionality is available. Mostly because IPA doesn't require them yet.

Missing: bootstrap combobox, datatables js, PF font with icons, spinner for old IEs
Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
60997b58b8 jQuery.ordered_map: remove map attribute
map attribute is redundant and not used.

Use `get` method instead.

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-12 10:53:40 +02:00
Petr Vobornik
68f04643d6 jQuery.ordered_map: faster creation
Creation of map with e.g. 30K values was very slow. Map checked if a value is
in in the map but it used Array's indexOf method therefore the complexity was
quadratic instead of linear.

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-12 10:53:40 +02:00
Petr Vobornik
b61f4bc538 webui: add pwpolicy link to group details page if group has associated pwpolicy
https://fedorahosted.org/freeipa/ticket/4982

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-07 10:43:23 +02:00
Gabe
d1a0474d18 Unsaved changes dialog internally inconsistent
https://fedorahosted.org/freeipa/ticket/4926

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-05-07 10:38:26 +02:00
Petr Vobornik
efcd48ad01 webui: use no_members option in entity select search
Obtaining member information for entity selects is not needed and it
causes unwanted performance hit, especially with larger groups.

This patch removes it.

https://fedorahosted.org/freeipa/ticket/4948

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-04-14 19:05:20 +02:00
Petr Vobornik
f7eeaa4ce0 webui: unable to select single value in CB by enter key
Fix: If editable combobox has one value, the value is selected and changed by hand, it can't be re-selected by enter key.
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-04-14 19:03:53 +02:00
Petr Vobornik
55413566ca webui: service: add ipakrbrequirespreauth checkbox
Allow to configure missing krb ticket flag - ipakrbrequirespreauth from Web UI.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-02-26 00:26:22 +01:00
Nathaniel McCallum
9549a5984b Expose the disabled User Auth Type
Additionally, fix a small bug in ipa-kdb so that the disabled User
Auth Type is properly handled.

https://fedorahosted.org/freeipa/ticket/4720

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-02-12 10:31:24 +01:00
Petr Vobornik
e4f014dfa0 webui: increase duration of notification messages
by 66%

https://fedorahosted.org/freeipa/ticket/4792

Reviewed-By: Martin Basti <mbasti@redhat.com>
2014-12-09 12:59:32 +01:00
Petr Vobornik
edddb4fb2e webui: fix service unprovisioning
Missed part of field refactoring caused that service could not be unprovisioned.

https://fedorahosted.org/freeipa/ticket/4770

Reviewed-By: Martin Basti <mbasti@redhat.com>
2014-12-09 12:54:49 +01:00
Tomas Babej
d0a781b9c6 hosts: Display assigned ID view by default in host-find and show commands
Makes ipaassignedidview a default attribute and takes care about the
conversion from the DN to the proper ID view name.

https://fedorahosted.org/freeipa/ticket/4774

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2014-12-05 15:55:38 +01:00
Petr Vobornik
4d1ce9e422 webui: add radius fields to user page
add --radius=ID --radius-username=radiusUserName to Web UI

https://fedorahosted.org/freeipa/ticket/4686

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-25 14:05:09 +01:00
Petr Vobornik
b42b1755dc webui: normalize idview tab labels
ID View tab labels are no longer redundant.

https://fedorahosted.org/freeipa/ticket/4650

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-24 15:01:06 +01:00
Petr Vobornik
f70d859b39 webui: use domain name instead of domain SID in idrange adder dialog
It's more user friendly. Almost nobody remembers SIDs.

https://fedorahosted.org/freeipa/ticket/4661

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-24 14:43:09 +01:00
Petr Vobornik
bff97e8b2e webui: fix potential XSS vulnerabilities
Escape user defined text to prevent XSS attacks. Extra precaution was taken
to escape also parts which are unlikely to contain user-defined text.

fixes CVE-2014-7850

https://fedorahosted.org/freeipa/ticket/4742

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-20 15:31:15 +01:00
Petr Vobornik
8248f69627 webui: prohibit setting rid base with ipa-trust-ad-posix type
Base RID is no longer editable for ipa-trust-ad-posix range type

Adder dialog:
- Range type selector was moved up because it affects a field above it

Details page:
- Only fields relevant to range's type are visible

https://fedorahosted.org/freeipa/ticket/4221

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-11 10:56:16 +01:00
Petr Vobornik
34d3f99aae webui: update combobox input on list click
Change event of combobox is not triggered when there is only one value. Calling it's handler even for option's 'click' event makes sure that value of input gets always updated.

https://fedorahosted.org/freeipa/ticket/4655

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-21 10:32:46 +02:00
Petr Vobornik
41a7d0bf47 webui: do not show closed dialog
Fixes issues when dialog is not removed from `IPA.opened_dialogs` registry when dialog.close() is called while the dialog is not shown, i.e., while other dialog is shown. Without it, the dialog is could be incorrectly displayed.

New dialog's property `opened` handles whether dialog is intended to be opened.

How to test:

Add new host with IP address outside of managed reverse zones to get error 4304.

https://fedorahosted.org/freeipa/ticket/4656

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-21 10:29:53 +02:00
Petr Vobornik
df1ed11b48 webui: do not offer ipa users to Default Trust View
https://fedorahosted.org/freeipa/ticket/4616

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-20 12:29:10 +02:00
Petr Vobornik
01a9e7ef9e webui: hide (un)apply buttons for Default Trust View
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-20 12:25:22 +02:00
Petr Vobornik
d3f46d4e78 webui: hide applied to hosts tab for Default Trust View
because applying Default Trust view on hosts is not allowed

https://fedorahosted.org/freeipa/ticket/4615

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-20 12:25:22 +02:00
Petr Vobornik
2e27f1ee69 webui: change order of idview's facet groups
Applied to hosts facet should not be default because, e.g., for Default Trust View it shouldn't be even visible(o use).

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-20 12:25:22 +02:00
Petr Vobornik
896d47c92f webui: make Evented a part of base IPA.object
1. All framework objects to use event interface
2. Framework objects can be part of specification objects but they are not deep-cloned as the rest of specification objects - usually it would cause infinite loop. This make easier to add context as a $pre-op object without a need for $pre-op function.

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-20 12:25:22 +02:00
Petr Vobornik
741c31c2b4 webui: allow --force in dnszone-mod and dnsrecord-add
Allow to use --force when changing authoritative nameserver address in DNS zone.

Same for dnsrecord-add for NS record.

https://fedorahosted.org/freeipa/ticket/4573

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-20 12:06:02 +02:00
Petr Vobornik
d8f05d8841 webui: management of keytab permissions
https://fedorahosted.org/freeipa/ticket/4419

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-20 10:13:47 +02:00
Nathaniel McCallum
560606a991 Display token type when viewing token
When viewing a token from the CLI or UI, the type of the token
should be displayed.

https://fedorahosted.org/freeipa/ticket/4563

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-10-20 09:59:19 +02:00
Petr Vobornik
0a924603d0 webui: add new iduseroverride fields
- add gecos, gidnumber, loginshell, sshkeys fields

https://fedorahosted.org/freeipa/ticket/4617

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-10-17 15:57:11 +02:00
Petr Vobornik
43d3593873 webui: add link to OTP token app
- display info message which points user to FreeOTP project page
- the link or the text can be easily changed by a plugin if needed

https://fedorahosted.org/freeipa/ticket/4469

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-10-17 15:53:34 +02:00
Nathaniel McCallum
c5f7ca58a1 Remove token ID from self-service UI
Also, fix labels to properly use i18n strings for token types.

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2014-10-16 17:53:27 +02:00
Petr Vobornik
00d598bab0 webui: add link from host to idview
https://fedorahosted.org/freeipa/ticket/4535

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-09-30 10:47:03 +02:00
Petr Vobornik
0e76bc1cb6 webui: list only not-applied hosts in "apply to host" dialog
https://fedorahosted.org/freeipa/ticket/4535

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-09-30 10:47:03 +02:00
Petr Vobornik
2cc78acf9b webui: facet group labels for idview's facets
https://fedorahosted.org/freeipa/ticket/4535

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-09-30 10:47:03 +02:00
Petr Vobornik
ae5a34cbbc webui: new ID views section
https://fedorahosted.org/freeipa/ticket/4535

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-09-30 10:47:03 +02:00
Petr Vobornik
749101db74 webui: add simple link column support
Usual link columns are link with primary key of current entity.

This patch allows to create a link to arbitrary non-nested entity.

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-09-30 10:47:03 +02:00
Petr Vobornik
8b0e2ed991 webui: allow to skip link widget link validation
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-09-30 10:47:03 +02:00