When a task was created we used to use a token, we then decided to switch to using
A user id. To facilitate this change we pull the users auth associated with the task
and use the auth's `GetUserID` method. This only works if they have not deleted the auth.
We need a fail safe way to populate the ownerID in the circumstance that the auth associated
with the task has been deleted. To facilitate this we can pull the UserResourceMapping's for the org
resource of the type `Owner` and use a organization owner as the task owner. This makes sense because
any organization owner also own's any part of the organization including tasks.
* Make endpoint description field normal sized
* Add password type to secret inputs
* de-snarkify and remove defaults from new-endpoint-draft
* Make new tag rules unique
* Remove hardcoded fields in initRuleDraft
* Add tag rule make statusRule is equal to level
* Status rule can be "is equal to"
* Remove cron option from rule
* Add the text lastupdated to cards
* Fix offset and every copy
* Improve Tags in checks
* Move threshold deadman selector to conditions card
* Filter empty tag rules on notification rules
* Make dismiss button gray
* Fix review comments
* remove irrelevant tests
* Fix missing url field from http rule
fix(notification/check): include tags in check object in generated flux
Closes https://github.com/influxdata/influxdb/issues/14769
fix(notification/check): use selected field in threshold functions
Closes https://github.com/influxdata/influxdb/issues/14776
fix(testing): add selected field for check tests
fix(check): use real flux for threshold check
feat(notification/check): generate flux for deadman checks
chore(endpoint): rename webhook endpoint to http endpoint
fix(notification/rule): fetch url for flux script off of endpoint
fix(notification/rule): clean up slack and http rules
fix(notification/rule): change MessageTemp to MessageTemplate
fix(rules): pass endpoint in to rule during create
fix(ui): rename webhook to http
feat(notification/check): namespace deadman under alerts
fix(notification/check): nest tags under tags key in data object in flux
wip
feat(kv): log error if urm cannot be deleted for notification rule
fix(notification/rule): remove name from notify call in slack rule
chore(ui/cypress/e2e): skip rule create test
The secret service is tested by creating a secret and then attempting to
use it in a flux query. There is one test where accessing the secret
should work and one where it should return that the action is forbidden.
To have checks and notifications happen transactionally we need to be
able to alert the task system when a new task was created using the checks and notifications systems.
These two new middlewares allow us to inform the task system of a update
to a task that was created through the check or notification systems.
* feat(alerts): rule overlay endpoint dropdown
* test: skip tests until ownerID gets sorted out
* chore: change back to using electron
* test(cypress): use chrome again
* test(cypress): downgrade cypress
* Remove CSV export button from alerting timeMachine
* Single select fields in alerting query builder
* Single select aggregate functions in alerting builder
* EditCheckEO should open in alerting tab
* Remove view type and vis options from CheckEO
* added missing Permission types: notificationRules, notificationEndpoints, checks
* Authorization links use Link as a type
* Run's logs are readonly
* TaskCreateRequest and TaskUpdateRequest has description property to update Task description
If a task is created and the auth associated is removed
lookup of tasks currently fail. This is bad behavior.
We should expect to be able to at least see and delete task's that
have old auth.
This change makes it so that if an org or orgID are missing on calls to the `to` function
that the orgID is retrieved from the request context.
This is consistent with how `from` works.