* WIP
* Fix UI linter errors from swagger changes to Level Rule
* Prevent same level selection on changes from
* Remove unused get
* Fix prettier error
* chore(notification/rule): change level rule to check level for rules
* 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
* 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
Create view with checkID in NewVEO
fix ruleToDraftRule bug
Fix no thresholds error
Get correct view status for rendering cell
Fix editVEO flow
Add notification endpoint ID to initRule
Remove task type from check and notification rule
mock generate AST
use check query in EditCheckEO
wip
Create default http notification endpoint
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Dont save view if no dashboardID in saveCheck
Execute queries in editCheckEO
Fix check remove bug
Disable Advanced view and multiple queries in check builder
Disable alerting button if draftQuery is not alertable
chore(kv/check): remove createCheckTask from KV as the result of #14728
* feat(task): Remove token's from task structures
We had previously removed token's from the task api but left the token in place in several locations in the stack.
Now we can cleanly remove the extra tokens.
* feat(task): impersonate user on task execution
Passing tokens to tasks is cumbersome and we needed a way to more easily create tasks. With this change we no longer need a token on task create. We take the user that created the task and pass that in as the "owner". As far as the task is concerned the owner is the source of permissions.
This is done by adding an additional field on task create that is OwnerID. We will no longer respect the token passed in and it will be deprecated soon.
Things to do still:
Task updates need to allow for owners to be set.
First pass at flux AST generation from check
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): format call expression
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): cleanup CheckDefinition
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): clean up threshold functions
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): clean up message function
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): misc fixes
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): remove dead code
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): move threshold flux generation to check pkg
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): move base ast generation to its own package
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
fix(notification/check): add comment for GenerateFluxAST
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
docs(notification/flux): add comments to each exported function
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
feat(notification/check): add tests for GenerateFlux
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
feat(notification/check): add task options to generated flux
fix(notification/check): use flux compatible duration type
test(notification/check): add task option to task definition
test(http): use check Duration in checks http handlers
feat(check): add TaskID to checks base
fix(notification/check): hack around issue with formatting ast package
wtih multiple files
test(check): create task when check is created
A lot of little changes had to happen as a result of this. This change
was rather painful.
feat(checks): add update and delete of task for check
fix(notifications/check): hack around the alerts package not being
available
test(kv): temporarily skip check tests while we merge the pr above
* adding new templates; removing calls to create templates
* fixing quickstart dashboard creation
* Type dashboard template
* bump templates repo version
* add templateID to template meta in swagger
* Add templateID to document meta type in UI
* add templateID to telegrafPlugin and telegrafplugin info types
* Instantiate templates from static templates
* Get tests to pass
* Fix type conflicts
* Bump templates version
* update changelog
* Use CheckPlot to visualize check view
* Revert to add threshold types
* Disable view type dropdown in checkView
* Add proper equality
* Add errors in default cases
This will only attempt to parse an error as JSON if it has the content
type `application/json` so that it stops trying to parse the result as
JSON when it isn't JSON.
While the real error message is included, the addition of the "could not
parse json" makes it very confusing to read and distracts from the real
issue.
* chore: add new types for NotiicationRules
* build(client): remove client and build each build
* chore: update gitignore to exclude generated client
* fix: allow client dir to be empty
* docs: add README to client dir
* fix(build): add autogen client to eslintignore
* build: gen client for ci js tests
* Add check saving flows and change activeTab type
* Add first pass at alertBuilder
* Change TimeMachineEnum type
* Add xy view properties to checks, and convert to and from check View type
* Add Column Header to checks column
* Add change current check type action
* Access view type through properties
* Load xy view options for check view
* Add orgID to check in createCheck
* Clear current check on close CheckEO
* Create Check Alerting Button
* Create check view on edit and new check EO
* Fix edit check eo action bug
* Update threshold types
* When switch schedule from every to cron change the inputs that are visible
* save Current Check from VEO if view type is check
* Add description component to checks
* TimeMachineIDs to TimeMachineID
* Remove bracketed object decleration
* Remove as Threshold type
* Use ViewType instead of typeof
* Create CheckType type
* Remove time machine reducer tests
* Remove check view properties that come from xyView
* Fix EditCheck hooks
* Move status calculations to body of function
* Update redux store when performing check CRUD
* Create add and remove check actions in timeMachine
* Remove trailing space
* Define new check, edit check and check view routes with VEO
Co-authored-by: Michael Desa <mjdesa@gmail.com>
* Add task status to other task types
* Put editAlerting route behind feature flag
* add action and reducer for update current check
* Add init edit and new check editor overlay
* Split VEO in to two for new and edit view
* get edit and new CheckEO's ready
* Create getViewForTimeMachine action
* current check should be a partial check
* Fix view typing
* Fix linter errors
* Fix equality
* Catch save VEO errors