Commit Graph

21 Commits

Author SHA1 Message Date
Ryan Petrello
5dfdef6e6b retain the default interstitial value for TOWER_URL_BASE
to support #5470, check for the presence of this special interstitial
value and replace it with the request hostname for settings OPTIONS
requests
2017-02-23 16:38:16 -05:00
Ryan Petrello
94ad12ab0d set the default in OPTIONS for TOWER_URL_BASE to the request hostname
see: #5470
2017-02-22 11:16:08 -05:00
Ryan Petrello
8615c1e999 add the max_page_size value to the OPTIONS response for list views
see: #4356
2017-02-06 15:18:42 -05:00
Ryan Petrello
afc0f16e58 add a field to OPTIONS that tells if the setting came from a .py file
additionally, update help_text with a helpful message about this

See: #4876
2017-02-02 12:47:53 -05:00
AlanCoding
2146777cc6 reorder terms to avoid pulling full UJT list 2017-01-12 17:32:13 -05:00
Chris Church
ea10ff8b93 Initial pass at related search fields. 2016-12-13 21:44:09 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
sundeep-co-in
78a8ce9479 django i18n 2016-10-18 18:10:39 +05:30
Chris Church
6ebe45b1bd Configure Tower in Tower:
* Add separate Django app for configuration: awx.conf.
* Migrate from existing main.TowerSettings model to conf.Setting.
* Add settings wrapper to allow get/set/del via django.conf.settings.
* Update existing references to tower_settings to use django.conf.settings.
* Add a settings registry to allow for each Django app to register configurable settings.
* Support setting validation and conversion using Django REST Framework fields.
* Add /api/v1/settings/ to display a list of setting categories.
* Add /api/v1/settings/<slug>/ to display all settings in a category as a single object.
* Allow PUT/PATCH to update setting singleton, DELETE to reset to defaults.
* Add "all" category to display all settings across categories.
* Add "changed" category to display only settings configured in the database.
* Support per-user settings via "user" category (/api/v1/settings/user/).
* Support defaults for user settings via "user-defaults" category (/api/v1/settings/user-defaults/).
* Update serializer metadata to support category, category_slug and placeholder on OPTIONS responses.
* Update serializer metadata to handle child fields of a list/dict.
* Hide raw data form in browsable API for OPTIONS and DELETE.
* Combine existing licensing code into single "TaskEnhancer" class.
* Move license helper functions from awx.api.license into awx.conf.license.
* Update /api/v1/config/ to read/verify/update license using TaskEnhancer and settings wrapper.
* Add support for caching settings accessed via settings wrapper.
* Invalidate cached settings when Setting model changes or is deleted.
* Preload all database settings into cache on first access via settings wrapper.
* Add support for read-only settings than can update their value depending on other settings.
* Use setting_changed signal whenever a setting changes.
* Register configurable authentication, jobs, system and ui settings.
* Register configurable LDAP, RADIUS and social auth settings.
* Add custom fields and validators for URL, LDAP, RADIUS and social auth settings.
* Rewrite existing validator for Credential ssh_private_key to support validating private keys, certs or combinations of both.
* Get all unit/functional tests working with above changes.
* Add "migrate_to_database_settings" command to determine settings to be migrated into the database and comment them out when set in Python settings files.
* Add support for migrating license key from file to database.
* Remove database-configuable settings from local_settings.py example files.
* Update setup role to no longer install files for database-configurable settings.

f 94ff6ee More settings work.
f af4c4e0 Even more db settings stuff.
f 96ea9c0 More settings, attempt at singleton serializer for settings.
f 937c760 More work on singleton/category views in API, add code to comment out settings in Python files, work on command to migrate settings to database.
f 425b0d3 Minor fixes for sprint demo.
f ea402a4 Add support for read-only settings, cleanup license engine, get license support working with DB settings.
f ec289e4 Rename migration, minor fixmes, update setup role.
f 603640b Rewrite key/cert validator, finish adding social auth fields, hook up signals for setting_changed, use None to imply a setting is not set.
f 67d1b5a Get functional/unit tests passing.
f 2919b62 Flake8 fixes.
f e62f421 Add redbaron to requirements, get file to database migration working (except for license).
f c564508 Add support for migrating license file.
f 982f767 Add support for regex in social map fields.
2016-09-26 22:14:47 -04:00
Matthew Jones
5895b3a343 Refactor Notification's naming
Notifier -> NotificationTemplate
notifier -> notification_template
2016-05-05 13:53:46 -04:00
Wayne Witzel III
39f05e2f11 Update user roles list API documentation 2016-04-07 10:36:12 -04:00
Wayne Witzel III
554d8ed8a6 add customer API doc fixes:#1390 2016-04-04 12:06:13 -04:00
Chris Church
aedf1d87ab Fix help text in OPTIONS for common, read-only fields. Also fix display of None for foreign key fields in browsable API help. 2016-03-29 11:03:16 -04:00
Matthew Jones
526a6ec7dd Remove unneeded fetch for r/o fields 2016-03-16 13:12:13 -04:00
Matthew Jones
45f95bf2b2 Disallow related elements to be treated as choices
DRF will try to resolve potential candidates into the OPTIONS endpoint.
This is mainly to support their POST field in the browseable API.   We
don't need this and it can yield some expensive queries so we bypass
generating choices for any RelatedField fields
2016-03-16 13:11:05 -04:00
Matthew Jones
99ec07b8a5 Merge branch 'notifications_work' into devel
* notifications_work: (23 commits)
  Updates to notification unit tests after @wwitzel3's feedback
  Fix some notifications issues and write some tests
  Add notification system documentation
  Clean up flake8 related issues
  Fixing up some unicode issues
  Implement tower ui view url on models
  Sanity check and force proper types in admin check
  Proper type for in check
  Adding migration and base notification type
  Add a periodic administrative notification
  Refactor message generator
  Support notification password field encryption
  Notification configuration type checking
  Refactor NotificationTemplate to Notifier
  Implement irc notification backend
  Add webhook notification backend
  Pagerduty and Hipchat backends plus some cleanup
  Notification serializers, views, and tasks
  Implement notification serializer and validations
  Notification endpoints and url expositions
  ...
2016-02-29 16:50:33 -05:00
Chris Meyers
d70615efbd bring back meta choice options lost in upgrade
* status and launch_type OPTIONS choices were lost in the django + drf
upgrade. This brings them back.
2016-02-22 12:58:35 -05:00
Matthew Jones
dde70dafec Refactor NotificationTemplate to Notifier 2016-02-17 15:18:18 +00:00
Chris Church
23feccdbf3 Check if view has a get_serializer method before trying to call it. Fixes OPTIONS issue in #788. 2016-02-05 04:45:14 -05:00
Matthew Jones
319deffc18 Implement notification serializer and validations 2016-02-04 15:52:23 -05:00
Chris Church
60224cdbe4 Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling. 2016-02-02 17:48:04 -05:00