Commit Graph
47 Commits
Author SHA1 Message Date
Pavel Zuna 1bb412239d Big webUI patch.
Quick summary:
- use jQuery UI and jQuery BBQ libraries
- code restructuring

The patch has so many changes they can't be listed here. Many parts
of the code have been rewritten from scrach.

See freeipa-devel mailing list:
webUI code restructuring [wall of text, diagrams, ... you've been warned!]
2010-09-07
2010-09-17 19:42:40 -04:00
Pavel Zuna f15758dbea Improve serialization to JSON.
- Make it recursive.
- Make Param classes serializable.
- Take python native data types into account.
2010-08-12 09:06:22 -04:00
Rob Crittenden 2d7d047cbf Add optional error message to pattern validator
The pattern validator by default displays the pattern that is being
matched against. This isn't helpful, particularly for very hairy patterns.
This adds a new parameter, pattern_errmsg, that is displayed on errors
if set.

ticket #11
2010-08-06 15:32:37 -04:00
Rob Crittenden 4924270b45 Increase supported weeks per month from 4 to 6 in AccessTime() type 2010-06-03 09:25:25 -04:00
root a3d1b17559 Add weekly periodic schedule to AccessTime param type.
Fix bug #588414
2010-05-04 13:39:42 -04:00
Rob Crittenden 3698dca8e3 Add test cases for AccessTime param and fix some problems in AccessTime 2010-05-03 14:07:34 -06:00
Jason Gerard DeRose c350f84134 Finish deferred translation mechanism 2010-03-16 11:41:22 -06:00
Rob Crittenden f7b512b826 When raising an error about a required attribute, use cli_name not name.
name is an LDAP attribute and may not be easily identifiable (e.g. sn).
2010-03-07 13:04:50 +01:00
Jason Gerard DeRose 8c46e09735 Translatable Param.label, Param.doc 2010-02-24 02:47:39 -07:00
Pavel Zuna 899f318359 Fix bug where parameter cloning didn't clone validation rules. 2010-02-23 17:54:49 -05:00
Rob Crittenden 97b5f2571e Don't iterate over empty values in List params 2010-02-17 12:05:01 -05:00
Rob Crittenden 338578d10a Allow one-character Param names
This is done explicitly to support the l/localityname attribute.
2010-02-12 13:14:29 -07:00
Jason Gerard DeRose b6e4972e7f Take 2: Extensible return values and validation; steps toward a single output_for_cli(); enable more webUI stuff 2009-12-10 08:29:15 -07:00
Pavel Zuna 34deb3fef3 Rename GeneralizedTime to AccessTime. 2009-12-01 10:38:56 -05:00
Pavel Zuna 973f36c496 Fix Bool parameter type. It was impossible to set it to FALSE. 2009-11-30 13:38:23 -05:00
John Dennis 5d2bbf5325 Reading INT parameter class should respect radix prefix
This modifies the original patch by including a unit test, handling floats
when passed as unicode, and handling large magnitude values beyond maxint.

The INT parameter class was not respecting any radix prefix (e.g. 0x) the user
may have supplied. This patch implements _convert_scalar method for the Int
class so that we can pass the special radix base of zero to the int constructor
telling it to determine the radix from the prefix (if present).
2009-11-23 16:53:43 -05:00
Rob Crittenden 680bf7c548 _convert_scalar() should throw an error if passed a tuple or list
A parameter needs to have multivalue set in order to work on lists/tuples
and even then _convert_scalar() will be sent one value at a time.
2009-11-17 09:36:38 -07:00
Pavel Zuna 566a3cb972 Add 'File' parameter type.
Accepts filenames and loads file contents as parameter value.
2009-11-06 16:05:31 -07:00
Jason Gerard DeRose b35849b47d Change Password param so (password, confirm_password) can be passed to _convert_scalar() 2009-10-18 00:35:05 -06:00
Jason Gerard DeRose f58ff2921d Giant webui patch take 2 2009-10-13 11:28:00 -06:00
Pavel Zuna a6eb928f98 Add HBAC plugin and introduce GeneralizedTime parameter type. 2009-10-05 15:55:27 -04:00
Pavel Zuna fa140e7f2a Remove parent_key parameter kwarg.
Also replace a TYPE_ERROR with ValidationError.
2009-09-10 10:01:05 -04:00
Jason Gerard DeRose 22493eef21 Fix three broken unit tests 2009-08-04 00:21:26 -06:00
Rob Crittenden d6e1e15fcd Add a one-character option for parameters 2009-07-10 16:46:34 -04:00
Pavel Zuna 4b08770b78 Add 'parent_key' kwarg in Param class. 2009-06-10 11:53:10 -04:00
Pavel Zuna a1548bc670 Fix bug where List parameters where always cloned with keywords parsed from name. 2009-06-02 16:20:35 -04:00
Jason Gerard DeRose 7e58b29a92 Completed Param.use_in_context() functionality, which is now used by Command and Object 2009-05-21 14:32:45 -04:00
Jason Gerard DeRose 4f9224774f Added Param 'include' and 'exclude' kwargs; added frontend.UsesParams base class with methods implementing the filtering to restrict params to only certain contexts 2009-05-19 13:49:15 -06:00
Pavel Zuna 7d0bd4b895 Rename errors2.py to errors.py. Modify all affected files. 2009-04-23 10:29:14 -04:00
Rob Crittenden a8a2664190 Add new type List that converts delimited values into a tuple 2009-03-20 09:29:44 -04:00
Rob Crittenden dbbae00b17 Add maxvalue and minvalue kwargs and rules to Int and Float 2009-03-03 17:49:15 -05:00
Pavel Zuna e913d7483b Fix multivalue params requiring default to be of type self.type instead of tuple. 2009-02-23 13:49:26 -05:00
Jason Gerard DeRose b5b2e55be5 Add pattern matching to Str and Bytes 2009-02-17 16:03:08 -05:00
Jason Gerard DeRose 114b6b8577 Added some missing parameter unit tests; added docstring about Command._repr_iter() and Param.safe_value() 2009-02-03 15:29:02 -05:00
Jason Gerard DeRose e537dc89cb Fixed a few problems in the CLI interactive prompting (wont prompt for Flag now) 2009-02-03 15:29:02 -05:00
Jason Gerard DeRose 244346dbcb More work on xmlrpc stuff, started migrated more code to use errors2 instead of errors 2009-02-03 15:29:01 -05:00
Jason Gerard DeRose ae39dece13 Added Command.args_options_2_params() method and its unit tests 2009-02-03 15:29:00 -05:00
Jason Gerard DeRose 4febb4dd14 Started roughing out new crud base classes 2009-02-03 15:28:59 -05:00
Jason Gerard DeRose f22f3eabb2 Fixed Param.validate() so that self.query is checked after self.required 2009-01-20 09:38:39 -07:00
Jason Gerard DeRose bae9dd7c07 Added example to StrEnum docstring 2009-01-18 16:03:02 -07:00
Jason Gerard DeRose 364e05def1 Added missing enumerable parameters 2009-01-18 15:55:56 -07:00
Jason Gerard DeRose ec86208a90 Updated passwd plugins module to where it can at least be imported 2009-01-14 22:19:31 -07:00
Jason Gerard DeRose 0327b83899 New Param: all docstring examples now pass under doctests 2009-01-14 20:36:17 -07:00
Jason Gerard DeRose cd3508bace New Param: added Param.query kwarg for crud operations like Retrieve and Search where criteria should not be validated 2009-01-14 14:04:05 -07:00
Jason Gerard DeRose 79422d0489 All unit tests now working (except for doctests and Rob's xmlrpc tests) 2009-01-14 13:51:37 -07:00
Jason Gerard DeRose 3e201dfff6 New Param: split common Bytes/Str functionality into new Data base class; Str no longer subclasses from Bytes 2009-01-14 10:58:05 -07:00
Jason Gerard DeRose 5d1e5a0aa9 New Param: renamed parameter.py to parameters.py 2009-01-14 10:25:33 -07:00