* 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.
* 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=...
* 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.
* 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.
* 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.
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>
* 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.
* 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 ''
* 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.
* 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.
* 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.
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
* 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
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.
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.
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`