Commit Graph
100 Commits
Author SHA1 Message Date
Akita Noek 175c010296 Attach labels instead of erroring on creation if label already exists
If a label already exists, don't error out when trying to post to the
job_templates/n/labels endpoint, instad just lookup the ID and attach
it. This is primarily to benefit the UI, but in general seems like a
good behavior for this endpoint anyways.

 Fixes #2135
2016-06-10 11:56:19 -04:00
Akita Noek 3becfeaaa8 Fixed permissions dialog not opening on job template page
#2263
2016-06-09 16:01:10 -04:00
Akita Noek dd9351b226 jshint 2016-06-09 12:25:39 -04:00
Akita Noek a2137a54a9 Made HTTP Header field full width
To match our style guidelines
2016-06-09 12:18:05 -04:00
Akita Noek a3b297e582 Display error when trying to delete a job you don't have access to
#2076
2016-06-09 10:30:55 -04:00
Akita Noek 2a7c05eeda Fix stdout height issue on firefox
#2028
2016-06-09 09:56:23 -04:00
Akita Noek a65dfde8dc Nuked obsolete multi-org project help tooltip on projects page
#2237
2016-06-08 15:03:46 -04:00
Akita Noek c1f40f9cbf Better "go to parent state" code 2016-06-08 14:33:18 -04:00
Akita Noek f1d915084a jshint 2016-06-08 13:31:50 -04:00
Akita Noek db9a4b8096 Added CodeMirror for notification http headers field
#1752
2016-06-08 13:18:49 -04:00
Akita Noek 5cb403dffd Made survey text fields min length default to 0 instead of 1 2016-06-07 13:54:21 -04:00
Akita Noek 68cfc71899 Fixed show/hide button being slightly too short on default password input field 2016-06-07 13:30:20 -04:00
Akita Noek abcd2219fc Fixed 'show' button working the first click for the default password survey field 2016-06-07 13:21:21 -04:00
Akita Noek aa24608660 Fixed "always invalid" red indicator around survey default password field 2016-06-07 13:19:00 -04:00
Akita Noek 7f6f3febeb jshint 2016-06-07 11:25:33 -04:00
Akita Noek c601ca7738 jshint 2016-06-07 11:22:52 -04:00
Akita Noek f24818148c Navigate to list view if you delete an object you are editing
This patch covers all the cases I could find of places where you could
delete items that you are currently editing. When this happens, we
should now exit the edit mode and return to the list view for whatever
we were viewing.

 Related to #1742
2016-06-07 10:49:34 -04:00
Akita Noek ae06286a01 Added 'type' to credential serializer owner summary fields 2016-06-06 16:22:37 -04:00
Akita Noek aa6e136859 Fixed stdout viewing on management job pages
#1192
2016-06-06 15:56:42 -04:00
Akita Noek 0067e7006f Fix app crash from our pagination when editing invalid things
Addresses the most important part of #1742 , next patch will be to make
it so we just navigate away from the detail page if we delete the item
we're on.
2016-06-06 15:47:25 -04:00
Akita Noek 7e0122615e Added default values to the required job template survey questions
This is really to fix #1445, the problem being that "" does not pass
float validity, and the show/hide was triggering a check which included
the hidden-but-still-there float fields. So this is an easy work around,
and I think it's better UX as well since these values are required to be
filled in in many cases.

Fix survey maker add button after toggling password visibility
2016-06-06 14:53:25 -04:00
Akita Noek 218f93cfdf Fixed missing double quotes 2016-06-06 13:36:28 -04:00
Akita Noek aba2bcb1f3 Fixed stdout fullscreen functionality
Resolved #2167
2016-06-06 11:45:27 -04:00
Akita Noek e2bda8e2ff Styled extra-vars on management jobs 2016-06-06 11:03:18 -04:00
Akita Noek 76fc0f7c95 Fix monkey-punching XSS
Because damn, punching monkeys

  #2162
2016-06-03 16:29:08 -04:00
Akita Noek ab126b1040 Fixed XSS for project and jt scheduling
#2148
2016-06-03 14:50:35 -04:00
Akita Noek 6609732edd Updated UI to account for object_roles changes 2016-06-03 12:26:23 -04:00
Akita Noek cedecb97e4 Refactored thing/n/roles -> thing/n/object_roles 2016-06-03 12:17:52 -04:00
Akita Noek 1bcb80b621 Made stdout window size nicely to fill the remaining height in the browser
Resolves PR feedback and takes care of #1575 along the way
2016-06-03 11:33:45 -04:00
Akita Noek 93ccbdc872 Code organization 2016-06-02 16:57:11 -04:00
Akita Noek a9426aaeb9 stdout sytle updates
* Fixed column width to 50% for both job stdout view and inventory update
script output view
* Fixed scrolling behavior so we don't have two elements doing scrolling
(inner was doing width, outter was doing height)
* Reduced max height for stdout jt output view to 900px down from
1600px
* Flexified inner output window on inventory script output view so the
gray output area always fills the height of the panel

 #2127 @2028
2016-06-02 16:42:06 -04:00
Akita Noek d565faff98 typo fix 2016-06-02 14:33:24 -04:00
Akita Noek e0a00a8705 Fixed verbosity select2 syncing
#2107
2016-06-02 14:01:28 -04:00
Akita Noek cfe450b7be Fixed missed refactor of function name 2016-06-02 14:01:02 -04:00
Akita Noek c15db1eef6 Fixed up multi-org project migrations 2016-06-02 13:34:10 -04:00
Akita Noek 3247fe42c0 Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into jshint 2016-06-01 22:56:31 -04:00
Akita Noek e93969fb10 jshint fix 2016-06-01 16:09:21 -04:00
Akita Noek 3b1639da4f Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into JobDetailHostEvents 2016-06-01 15:06:11 -04:00
Akita Noek 37a7e0a862 Bump to trigger jenkins 2016-06-01 14:41:49 -04:00
Akita Noek 7f9174f4ea Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into JobDetailHostEvents 2016-06-01 14:09:51 -04:00
Akita Noek 4f20ffb328 Typo fix 2016-06-01 12:12:45 -04:00
Akita Noek cc507cee1f Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into JobDetailsAudit 2016-06-01 09:13:29 -04:00
Akita Noek 3c8c72adf9 JSHint fix: unused variable 2016-06-01 09:03:06 -04:00
Akita Noek 8c5086a5e7 Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into 858 2016-06-01 09:00:09 -04:00
Akita Noek d971461ae6 Commented out code cleanup 2016-05-31 17:15:14 -04:00
Akita Noek 44ff9a02bc -console.log 2016-05-31 17:08:08 -04:00
Akita Noek d8dac662a1 Fixed/enhanced scan job type selection process
* Appropriately set project and playbook to default when job type is set
  to 'scan' - #1273
* Add 'RESET' link on the Project label line to reset to Default
  project/playbook #858
* Fixed dropdown option clearing problem #1489
* Remember what project/playbook was set when switching from run/check
  to scan, so if you change back, those options will be auto-selected
  again
2016-05-31 16:03:01 -04:00
Akita Noek 22300347f0 JSHint fixes 2016-05-27 14:39:08 -04:00
Akita Noek e3fcdf9ba8 Unobfuscated some decorators 2016-05-27 14:18:05 -04:00
Akita Noek f6da30dde3 Avoid unnecessary license checks 2016-05-27 09:32:29 -04:00
Akita Noek eedd48c82b == to === 2016-05-26 20:58:08 -04:00
Akita Noek 6b3638c0bb Show stdout download button for canceled jobs
Addresses #733
2016-05-26 16:35:26 -04:00
Akita Noek c5dfde236b Test "fix"
Having this triggers a license feature test, which the jenkins test
system apparently doesn't have.. I don't think it's particularly
important to test this particular field, so meh.
2016-05-26 15:18:23 -04:00
Akita Noek e531bc67e4 Better control what JT admins are allowed to do
This addresses #1981 which says that JT admins can make modifications to
a job template freely if they're just changing non functional things
like name, description, forks, verbosity, etc, while requiring them to
have access to all functional components if they're going to make any
changes to the functionality - in specific, any changes to the
inventory, project, playbook, or credentials requires that the user have
the appropriate use access on all of those things in order to make the
change.
2016-05-26 14:39:16 -04:00
Akita Noek fed8d49d86 Added optional "expect" arg for REST fixtures" 2016-05-26 13:58:26 -04:00
Akita Noek aca858f5b2 Ported some old adhoc tests over to the new system 2016-05-26 13:58:16 -04:00
Akita Noek 5ea372ae43 Updated Job.limit expectation in old tests
See 821c43ba88d18feaded696e9994a9c5277a3195b
2016-05-26 13:58:08 -04:00
Akita Noek aa49e071c6 Disabling RAX test until we get our cert issue figured out
Related to #1706
2016-05-26 13:57:55 -04:00
Akita Noek 1abba522b0 Resurrect global .distinct() call (mostly)
This mostly reverts 3c67971e78a12bd94536aa5464f0bc1ea46ba1ee with
the minor difference that we only apply this when we're filtering,
which is apparently necessary without some notable overhaul since
the filtering we're doing will get stuck in as filters, which will
generate inner joins, which can result in duplicates if the thing
we're joining with is a one to many or many to many, which most
things are.

With this patch we still need to be generating naturally distinct
querysets with any `get_queryset` methods, which will still be much
more effecient when filtering is not involved.

This fixes #2032 and probably a bunch of other undiscovered issues.
2016-05-24 22:19:51 -04:00
Akita Noek 19dcc06c9d Read permissions goes to read_role, not use_role
Dork.
2016-05-24 21:10:43 -04:00
Akita Noek 899ff8ed3b flake8 2016-05-24 13:19:55 -04:00
Akita Noek 81f093b1c0 Opt to rebuild all roles in helper method
This code was fine for the 0009 migrations since we introduced all roles
at once, however with changes in 0017 we can't just patch from the
roots, so this works generically without having to get fancy about
identifying which roles we need to actually update.
2016-05-24 12:46:43 -04:00
Akita Noek 8aa4df1b78 Fix job template migrations again
Eliminated some incorrect wtf filtering in permissions, and fixed up the
credential access checks.
2016-05-24 12:45:22 -04:00
Akita Noek 5dbce56beb When migrating, grant read_role instead of use_role appropriately
Only give read access to folks that didn't have explicit permissions to
use a project in a job template before.
2016-05-24 12:42:51 -04:00
Akita Noek 5eb67411a4 Rebuild role hierarchy after making changes in migrations
Signals don't fire in migrations, so gotta do this step manually
2016-05-24 12:38:25 -04:00
Akita Noek a5bc62d7d4 enforce use_role access on both inventory and project when adding a JT 2016-05-24 12:37:44 -04:00
Akita Noek 4e9e341819 Disable custom inventory script input when you have no access
Also show 'Script contents hidden'

 #1503
2016-05-20 14:53:36 -04:00
Akita Noek fd9c96aa80 Executed the inventory execute_role
Replaced with the 'use_role', which is now useful.

 Completes #1959
2016-05-20 14:10:29 -04:00
Akita Noek 10cb04ae80 Fix access list to return complete team role list
We were just returning the first element before, dur.

 Fixes #1932
2016-05-19 16:37:06 -04:00
Akita Noek 741c6a0cfd Text update for team role removal confirmation message
#1919
2016-05-19 14:46:35 -04:00
Akita Noek 1d8f69c156 Split permissions list into two columns
One for user perms and one for team permissions

 #1986
2016-05-19 14:32:13 -04:00
Akita Noek 49b88dd646 Hide the user type selection for non super users
Completes UI portion of #1974
2016-05-19 13:34:51 -04:00
Akita Noek 23e7e12a04 Support creating system auditors through all 4 of our user creation endpoints 2016-05-19 13:07:58 -04:00
Akita Noek e6322baf20 Show selected playbook in JT's even if you can't read the project
#1955
2016-05-19 12:08:46 -04:00
Akita Noek 01a2590271 Don't allow text selection on checkbox labels nor buttons
Prevents annoying random text selection when you're clicking through
things.
2016-05-19 11:02:43 -04:00
Akita Noek aa9a4925b0 Fix annoying warning message related to license info not loading appropriately
Log it into the console though.

This shouldn't be necessary after #1763 lands, but isn't a bad thing to
be doing in general.
2016-05-19 10:03:42 -04:00
Akita Noek 9fba513c4f Protect against bad posts, fixes some test cases 2016-05-18 17:01:38 -04:00
Akita Noek 49a2f6b535 Default is_system_auditor to False in serializer for API compatibility 2016-05-18 16:50:52 -04:00
Akita Noek 9e562deb0c Copy paste error 2016-05-18 16:50:43 -04:00
Akita Noek 58f142e2e6 Update user add/edit UI to support System Auditor setting
Also moved the LDAP indicator to be inline with the mockups (bubble next
to the uesrname in the upper left)

 #1937
 #1888
2016-05-18 16:08:36 -04:00
Akita Noek d79d8cbfba Don't let Org Admins promote themselves to System Admins
Nor System Auditor
2016-05-18 16:03:36 -04:00
Akita Noek 390ac656fa Bolted is_system_auditor faux-field onto User 2016-05-18 16:02:10 -04:00
Akita Noek 70f561c895 Make tab skip over 'SHOW' buttons next to sensitive / password prompts 2016-05-18 13:53:21 -04:00
Akita Noek e9ea791a85 Brand that cow! 2016-05-17 11:47:49 -04:00
Akita Noek 9026d02be2 Fixed our beloved cow 2016-05-17 11:06:58 -04:00
Akita Noek 802a112106 Fixed project update permissions
Now folks in the update role can update a project as intended, yay!

 #1929
2016-05-17 09:01:17 -04:00
Akita Noek 98412b52f2 Handle non-existent license data in config view 2016-05-16 16:34:01 -04:00
Akita Noek 2c652a7375 Typo 2016-05-16 16:14:53 -04:00
Akita Noek a828e8b005 Implemented team role removal
Also threw in the little fa-users icon when it's a permission coming from a team

 #1919
2016-05-16 15:21:04 -04:00
Akita Noek 06eb13a104 Fixed duplicate users in access_list
Uhg.
2016-05-16 10:52:41 -04:00
Akita Noek ac5bc2aaba Fixed duplicate entries in active_roles (again)
#1692
2016-05-16 10:49:34 -04:00
Akita Noek a2cc2927e6 Turn off activity stream flag in the UI if we have it explicitly disabled in our settings file 2016-05-16 10:38:22 -04:00
Akita Noek 01e01fdb82 Hide AS/Dashboard button for basic licenses
#1791
2016-05-16 10:28:40 -04:00
Akita Noek 60f76de5c3 RBAC doc updates 2016-05-13 12:01:54 -04:00
Akita Noek 6958e81d00 Filled in RBAC descriptions
#1655
2016-05-13 10:11:38 -04:00
Akita Noek 9d46a39e42 Added comment context to caught exception 2016-05-12 16:31:32 -04:00
Akita Noek acc49bbbef Fixed up JT migration tests 2016-05-12 13:46:13 -04:00
Akita Noek 27457239bc Fixed up job template migrations
Massive speed improvement as well as made it not wrong (or at least less wrong).
2016-05-12 13:43:36 -04:00
Akita Noek 4378430c4f Minor migration speed improvement for old access queries 2016-05-12 13:43:36 -04:00
Akita Noek 6c0c789612 Make job queryset only require JT read access to see
As opposed to credential access, since users can see and potentially run
JT's without credential access now.
2016-05-12 13:43:36 -04:00