Commit Graph
100 Commits
Author SHA1 Message Date
Chris Meyers a94c8ef1e3 add functional tests for host_filter 2017-04-04 09:13:56 -04:00
Chris Meyers 443f14ed85 flake8 is hard 2017-04-03 16:14:43 -04:00
Chris Meyers 80e89b1116 spelling is hard 2017-04-03 15:53:54 -04:00
Chris Meyers 6cbdb8d0e6 faster first time parse generator
* Generating the set of valid unicode characters is expensive in terms
of memory storage. Instead, we define the grammer by the negation of
allowed unicode characters. Much faster.
2017-04-03 15:32:21 -04:00
Chris Meyers a8213661fd basic fact search grammar
* Establish a base grammar for handling json path specification and
value matching. With boolean logic support and parenthesis grouping
i.e. (a.b.c="value") and ((a.b="foo") or (a="bar"))
* generate Q() results for passing to Host.objects.filter()
* Hooked up via /api/v1/hosts?host_filter=...
* DynamicFilterField added to store host filter as string with grammar
parser attached as static methods for later use by DynamicInventory &
continued use by host_filter=...
2017-04-03 15:32:21 -04:00
Chris Meyers 33dca18119 more tests 2017-03-13 15:05:33 -04:00
Chris Meyers a051b41773 add test 2017-03-13 14:45:20 -04:00
Chris Meyers 6a0916371b add job cancel dependency information
* Inventory updates that are canceled and are dependencies of jobs
result in the dependent job being canceled. This code adds a better
description to job_explanation so that a job marked as canceled can be
traced back to the inventory update that triggered this case.
2017-03-13 12:52:33 -04:00
Chris Meyers c255c07ea5 pass ansible the "raw" git repo url
* I explored the |urlencode() filter instead. Ansible and git didn't
like this.
* Quoting doesn't seemed to be required. Ansible and the git module are
smart enough to do the right thing. I tested with a space in the repo
url path and it works.
2017-03-13 09:34:52 -04:00
Chris Meyers 4005cf927e copy existing env before making a safe env
* We should not modify the original env because it's what is going to be
passed to the Ansible process. This will contain all of the passwords,
unobscured. The safe env is what will get saved into the model.
2017-03-07 16:48:48 -05:00
Chris Meyers 1fc40d38c7 jobs/<id>/job_events?search= searches stdout field 2017-03-07 16:48:48 -05:00
Chris Meyers 54bcdccdab give a default other than None
1. If the setting isn't in the database, then the specified default is
returned.
2. If the setting IS in the database, then the 'value' field, from the
database, is returned; Unless, the value is null in the database, then
the defined default is returned.
* Take case 1. If the default=None then an AttributeError is raised
* Thus, by setting default='', in case 1. We don't get an AttributeError
because '' will be returned.
* Also note that we don't allow_null=True because then the database
entry could be None. Accessing the setting would raise an AttributeError
in this case. Further, since we set default='' it doesn't matter if null
is in the database.

TL;DR set default=<something_other_than_None>
2017-03-02 13:36:48 -05:00
Chris Meyers c4fb88c0d9 remove uneeded post commit wrapper
* Since we changed the lower level method to always use post commit
message emit
2017-02-28 13:10:00 -05:00
Chris Meyers e09497108e all job status change websockets events should happen after the job hits
the database
2017-02-28 12:56:55 -05:00
Chris Meyers b85361732b Revert "emit job status over socket after database commit"
This reverts commit edefeeacdaf11cf484a4b4893ee9acde5ef85390.
2017-02-28 12:53:59 -05:00
Chris Meyers 7da52c8bef emit job status over socket after database commit
* Wait until the newly created job record hits the database before
telling the websocket clients that the job's status is "pending"
2017-02-28 12:39:55 -05:00
Chris Meyers c1bace87ab only cancel deps if we can cancel the inv update 2017-02-27 11:37:29 -05:00
Chris Meyers f3e514246e cancel jobs dependent on inv update 2017-02-27 11:28:29 -05:00
Chris Meyers 9f8df08e1d update tests 2017-02-27 10:56:34 -05:00
Chris Meyers a1c76d3adc like inventory updates, check if project update deps already processed 2017-02-27 10:34:44 -05:00
Chris Meyers dd513621f0 Revert "Merge pull request #5553 from chrismeyersfsu/fix-waiting_blocked"
This reverts commit 9ba2122f4f85eecaeb6fa53ac92ea2811b05e83f, reversing
changes made to c3a5f2c96fd85dd1405a8f5c875ffc988dee16a4.
2017-02-27 09:38:45 -05:00
Chris Meyers 903d0472f0 just like we fail running tasks fail waiting tasks
* Associate the celery_id with the job at the earliest point possible.
This ensures that a waiting job has a celery id. Thus, we are free to
fail waiting jobs that don't have a celery id.
2017-02-24 12:07:04 -05:00
Chris Meyers 2f604f30d9 host may be None, account for that 2017-02-24 09:59:52 -05:00
Chris Meyers fe3d79b5ec Revert "Merge pull request #5527 from chrismeyersfsu/fix-log_settings"
This reverts commit 3db0242ef9a8b1ce67e159b8a19e0c1e70330b7c, reversing
changes made to e6893bb7f3cf696c202c39103b432c20afa6ec08.
2017-02-24 09:59:34 -05:00
Chris Meyers 50a8083984 flake8 2017-02-23 15:41:41 -05:00
Chris Meyers 08825a1f49 fix check running status 2017-02-23 15:09:50 -05:00
Chris Meyers 2953479dc8 correct behavior of tower_uuid logging setting
* Register a default=function() with LOG_AGGREGATOR_TOWER_UUID. We know
this function will ONLY be called when there is no database backed
settings. Therefore, we set a one-time uuid at this time.
* The user is free to change LOG_AGGREGATOR_TOWER_UUID.
* The user may not set this field to null
* The user may not set this field to ''
2017-02-23 14:31:47 -05:00
Chris Meyers 0b04001b15 host may be None, account for that 2017-02-23 14:31:24 -05:00
Chris Meyers 427b484075 be forgiving in log api log message fields list 2017-02-21 19:24:27 -05:00
Chris Meyers e78377dcfc remove formatters dependency on settings 2017-02-21 14:06:20 -05:00
Chris Meyers 60aa22b01b flake8 2017-02-21 11:05:30 -05:00
Chris Meyers 98c8ff3475 rename uuid field to trigger restart on update
* Since we trigger a restart on update, we can also cache the tower uuid
value in the formatter init. So do that.
2017-02-21 10:15:02 -05:00
Chris Meyers 31a79c331d move logger logic to formatter 2017-02-20 14:30:17 -05:00
Chris Meyers 0dada82b4b more general name for performance logger 2017-02-18 09:28:38 -05:00
Chris Meyers af9975c6af add a new logger, awx.analytics.performance.api
* Used to log API timing information
2017-02-17 15:35:03 -05:00
Chris Meyers 6e9488a59b ensure job deps are created only once 2017-02-15 15:54:30 -05:00
Chris Meyers 2432a3d3c3 Revert "remove partial dependency job id logic"
This reverts commit 4bb3a4909e616209fc291b2b3cee46469bc58f9e.
2017-02-13 16:16:43 -05:00
Chris Meyers b693b06706 remove partial dependency job id logic
* Late in the release we added job dependency tracking to the DB. We
decided not to use this information in the scheduler. However, I
half-ass added code to the scheduler to use it. Note that we still
determine inv and job update dependency by using a hack of the related
creation time, job.created-2 and job.created-1 respectively.

This removes any use of job dependent id expect for purposes of chain
failing.
2017-02-13 12:48:00 -05:00
Chris Meyers dfb7b08380 check job status before marking as failed
* When rectifying celery <-> db job status, re-check the job status to
ensure it did not finish between the time that we pulled the list of
celery tasks from celery and the time in which we rectify.
2017-02-09 15:27:08 -05:00
Chris Meyers d375560f18 take into account inv org when getting custom inv src list 2017-02-06 14:08:18 -05:00
Chris Meyers 0056699691 no tooltip for user roles, only team roles 2017-02-06 11:40:52 -05:00
Chris Meyers 730cbb0afd name org permissions tab; users / teams 2017-02-06 10:30:04 -05:00
Chris Meyers 335a78d1e1 fixes job elapsed timer
* now with tests
2017-02-03 11:40:25 -05:00
Chris Meyers 51fe00ffac update tests to NOT use json 2017-02-03 11:11:30 -05:00
Chris Meyers a2903199ae logger username/pass not required 2017-02-03 10:19:54 -05:00
Chris Meyers 195a36aef9 embed json into js module 2017-02-02 18:00:41 -05:00
Chris Meyers 76e5cc1fb1 update ui packaging 2017-02-02 14:06:08 -05:00
Chris Meyers 8b40cb14ec add job finished test 2017-02-01 16:42:17 -05:00
Chris Meyers f62b6ca014 workflow job elapsed timer
* Now with tests for elapsed timer feature.
2017-02-01 16:19:44 -05:00
Chris Meyers c6ed34884b workflows consume no capacity 2017-02-01 11:00:18 -05:00
Chris Meyers 50970f2c31 disable playbook when permission denied to list 2017-01-27 16:31:30 -05:00
Chris Meyers 08832428cc don't be looping if there ain't nothing to loop on 2017-01-27 13:53:57 -05:00
Chris Meyers ef3a3b3b2f super-user requests to HostDetail go through rbac 2017-01-27 10:51:26 -05:00
Chris Meyers 6aaf6a3150 allow can_add to be called for permission info
* can_add() is called through our generic permission/access framework
for api creation (POST). However, can_add() may also be called for
purposes of determining if a user has perms to do something. Thus, the
data field may not contain 'name' in this case. Allow for that.
2017-01-27 09:19:20 -05:00
Chris Meyers 608975ff2f bump vmware inventory script 2017-01-26 16:01:57 -05:00
Chris Meyers fbebc58267 add tests for license add host duplicate or not logic 2017-01-26 15:16:33 -05:00
Chris Meyers e09a0fb886 ensure manually modifying hosts adhears to license
* Super user or not, don't allow adding NOR editing (changing the name
of) a host to exceed the host license count.
2017-01-26 12:13:06 -05:00
Chris Meyers ef7f69ba80 update vmware inventory ini link 2017-01-25 13:28:06 -05:00
Chris Meyers 8198abe3fa join array of emails using '\n' when displaying
* Don't ASSume user email addresses don't contain ,
* Allows email addresses to contain ,
2017-01-24 15:58:59 -05:00
Chris Meyers cf52b82fa6 hide smart search also 2017-01-24 15:33:18 -05:00
Chris Meyers e06f2661f8 conditional stdout resize tooltip text
related to #4785
2017-01-24 10:12:29 -05:00
Chris Meyers 1f0733b31a tooltip location
related to #4789
2017-01-23 11:35:33 -05:00
Chris Meyers ecb3082490 hide pagination based on superness of user 2017-01-23 11:22:10 -05:00
Chris Meyers 8f9aecf716 hide add permissions when editing super user 2017-01-20 17:11:16 -05:00
Chris Meyers a59da9115e allow overriding chkbox ngDisable inheritance
Allow checkbox associated with form textbox to override the enherited
ngDisabled condition set on the associated "parent" form textbox.

This allows "Ask at Runtime?" checkboxes to be unchecked.

Note: I did not expand this feature to anything outside the scope of
fixing this problem. i.e. only password textbox fields.

related to #4857
2017-01-20 14:33:42 -05:00
Chris Meyers be3ff85500 center the red and green balls
related to #3967
2017-01-20 11:15:04 -05:00
Chris Meyers e2a13495c8 formatting and i18n fixes 2017-01-20 09:53:17 -05:00
Chris Meyers 627203a5ee spelling things 2017-01-19 12:13:48 -05:00
Chris Meyers e40d637e56 fix 2017-01-19 12:05:46 -05:00
Chris Meyers fcdb0ed2f2 added ansible version note for set_stats 2017-01-19 12:05:10 -05:00
Chris Meyers 00f94098f5 revisions 2017-01-19 11:58:21 -05:00
Chris Meyers 378a620733 add acceptance docs for set_stats 2017-01-19 11:10:16 -05:00
Chris Meyers 38d4d97e11 add extra UI components for fact cache cleaning
related to #4777
2017-01-18 15:24:14 -05:00
Chris Meyers 49a29168e6 "reload" page when project deleted
related to #4611
2017-01-18 11:00:07 -05:00
Chris Meyers 7bc720b435 rectifiy dashboard proj sync count with UI link
* The dashboard project sync failure count only includes project syncs
that have failed, not that have been canceled. Thus, the link from the
dashboard that displays the list of failed project updates should only
include the failed ones, not the canceled ones.

related to #2827
2017-01-18 10:52:07 -05:00
Chris Meyers 67f282f64d begin re-implementation of auto-populate feature 2017-01-17 17:04:52 -08:00
Chris Meyers e0ffb7814d replace all instances of , with \n
related to #4698
2017-01-17 18:25:26 -05:00
Chris Meyers 01c1c513f9 remove token from stdout download
related to #4759
2017-01-17 17:27:13 -05:00
Chris Meyers 49c2838036 tooltip a bit better
* update tests for i18n
2017-01-17 16:39:56 -05:00
Chris Meyers 6729717f13 add translations 2017-01-17 15:41:08 -05:00
Chris Meyers e904deb3e7 subvert potential monkey punch 2017-01-17 15:00:20 -05:00
Chris Meyers 768ddaed31 add org to permission team role
related to #3326

* Reduce confusion when 2 teams with the same name, belonging to diff
orgs, are given permission to the same resource. The confusion is
eliminated by showing the org that a team role belongs to in the
tooltip.
2017-01-17 13:31:21 -05:00
Chris Meyers 322c774823 download standard out tooltip
related to #4342
2017-01-17 09:51:48 -05:00
Chris Meyers 2088b1fcfe omit search-tags dynamically 2017-01-16 11:07:38 -05:00
Chris Meyers a58433ed9b activity stream, display name of resource as title
related to #4185

* When activity stream is gone to from a resource edit view, it should:
  * only show activity for the particular object
  * display the name of the resource as a title

This commit patch half-ass does those two things. So what's missing?
That questions is best answered by looking at how the feature behaves in
tower 3.0.3. You'll notice that you are "locked" on the resource you are
viewing the activity stream for. With this commit:
* You aren't locked
* The removal of the resource-id filter (smart-search) is borked.

So what do we need to do?:
* Lock the view to the resource being viewed

How do we need to do it?:
* router params.activity_search.values is a "static" thing. It is used
to tell smart-search to not generate search tags. This is what we want
to do. However, this is a contructor-only parameter. Further, the value
"value" gets passed around to all sorts of other UI contructors that are
hard to get access to when they are needed to try and dynamically set
smart-search ignore search-tags.
2017-01-16 08:57:37 -05:00
Chris Meyers a9926a6451 fix overflow on error modal for all things
related to #4508

* Removed one-off fix for callback url long host config key
2017-01-12 16:27:23 -05:00
Chris Meyers 2215f8561b better spacing 2017-01-12 15:05:01 -05:00
Chris Meyers c67989bc90 correctly cancel/delete on job details
related to #4620

* Changed cancel prompt buttons from "Cancel" "Cancel" to "Cancel"
"Proceed", talk about some confusing shit.
* Removed copy and pasted code that would call a delete upon canceling a
job
* Don't expect job_status to be an object in the view, just
`job_status`, not `job_status.status`
2017-01-12 11:32:56 -05:00
Chris Meyers ee0295a378 css mods 2017-01-12 10:55:54 -05:00
Chris Meyers 1cf3a259ee add view more/less logic to credential owners
related to #3313
2017-01-11 18:04:47 -05:00
Chris Meyers a9f78af3d2 wire up teams into the rbac list directive
related to #4675
2017-01-11 16:52:31 -05:00
Chris Meyers eaf883f349 dem controllers just needed to know who headers is
related to #4663
2017-01-11 14:02:41 -05:00
Chris Meyers e1ce3c3199 add title parameter to rbac modal directives
related to #4048
2017-01-11 10:58:40 -05:00
Chris Meyers 9826012499 do not display tab tooltip in edit mode by default
related to #4387
2017-01-11 09:25:00 -05:00
Chris Meyers e5a2671d21 rename wfjt to Workflow Template in OPTIONS 2017-01-10 18:23:52 -05:00
Chris Meyers b903ad069e Revert "display workflow template instead of wfjt"
This reverts commit 459b03e2e90b2aeaaf071a7438323890f238bf3f.
2017-01-10 18:23:26 -05:00
Chris Meyers 3a118f911d change projects list field ordering
related to #4372
2017-01-10 18:02:44 -05:00
Chris Meyers 5a5fcb1614 remove activity stream link on scheduled jobs list
related to #3833
2017-01-10 17:44:37 -05:00
Chris Meyers 36acc5c6bc better empty list error message
related to #4047
2017-01-10 17:19:24 -05:00
Chris Meyers a41fd5bdf8 display workflow template instead of wfjt
related to #3404
2017-01-10 17:11:45 -05:00