Commit Graph

30956 Commits (e9c6ce11650fac3fe61fe4e35a8a2e445b2110ad)

Author SHA1 Message Date
Stuart Carnie f60c2ec3ba
fix(reads): Remove issue reference from test per feedbakc 2019-08-16 13:00:06 -07:00
Michael Desa 8e56c36737
feat(notification_rule): create notification rule task
feat(notification_rule): generate base flux for notification rule

wip: saving state

fix(notification/endpoint): add comment about weird requirements

feat(notification_rule): create notification rule task
2019-08-16 15:43:15 -04:00
Alirie Gray 28089fdb59 feat(tasks): add ability to find tasks by name 2019-08-16 12:07:11 -07:00
alexpaxton 1f499d599a
refactor(ui): scrub alerting ui copy (#14682)
* refactor(ui): rename Alerting related page titles

* refactor(ui): update copy in alerting index empty state

* refactor(ui): shrink dashed buttons slightly

* refactor(ui): update copy in VEO and alerting overlays

* refactor(ui): ensure AND in rule builder is a different color

* refactor(ui): fix linter error for reals
2019-08-16 11:34:26 -07:00
Stuart Carnie 3ca751cfd6
fix(reads): ResponseWriter truncates values for last series
The ResponseWriter would truncate the last series if the byte size of
the points frames exceeded the writeSize constant, causing a Flush to
occur and the cumulative ResponseWriter.sz to reset to zero. Because
ResponseWriter.sz was not incremented for each frame, it remained at
zero, which resulted in the final Flush short circuiting.

This commit implements the Size method for the cursors.Array types
to be used to estimate the size of frame. This is in place of calling
the Protocol Buffer `Size` function, which can be very expensive.
2019-08-16 10:36:40 -07:00
Stuart Carnie 0b20c227b4
feat(reads): A series of helpers to produce a SeriesCursor
This allows the data/gen package to be used to produce a SeriesCursor
for generated data that can be used in testing by the reads package.
2019-08-16 10:36:30 -07:00
Stuart Carnie 9964312bad
feat(cursors): Implement Size method so it doesn't panic
Returns the size (in bytes) of the associated array. Used by
the reads.ResponseWriter to estimate the size of buffered data.
2019-08-16 10:34:43 -07:00
Stuart Carnie 0054562014
feat(gen): Add Copy(tsdb.<type>Array) method to Values
This allows data generators to produce tsdb arrays, which are
useful for testing
2019-08-16 10:33:41 -07:00
Michael Desa 2710fac45f
Merge pull request #14686 from influxdata/feat/create-task-from-check
feat(check): pass ownerID to task on create
2019-08-16 12:28:41 -04:00
Deniz Kusefoglu 6bfce8483f
feat: check threshold conditions (#14680)
* Fix alert-ids in AlertBuilder

* Render deadman or threshold depending on check

* Add threshold condition cards

* swap ComponentSpacer with FlexBox

* Remove unnecessary component props

* Remove extra nesting

* Better gets

* Fix linter erros in value input

* Disconnect CheckConditionsCard from redux

* Add tags inputs
2019-08-16 09:14:31 -07:00
Michael Desa a2a9eb5e49
feat(check): pass ownerID to task on create 2019-08-16 07:12:28 -04:00
kelwang 88047a7fae
Merge pull request #14667 from Zyqsempai/14644-change-notification-order
fix(notification/status): notification order
2019-08-16 06:20:03 -04:00
kelwang 3673fa0a92
Merge pull request #14684 from influxdata/check_owner_id
fix(notification/check): remove authorizationID
2019-08-16 06:18:59 -04:00
bpopovschi cc73c221b2 fix(notification/status): notification order 2019-08-16 11:34:55 +03:00
Kelvin Wang bbb4fbc50d fix(notification/check): remove authorizationID 2019-08-16 00:00:55 -04:00
kelwang 4e3025efe0
Merge pull request #14639 from influxdata/notification_endpoint
feat(influxdb): Add notification endpoint
2019-08-15 22:57:07 -04:00
Kelvin Wang 8a503b5a08 chore(authorizer): user org perm for endpoints 2019-08-15 22:41:29 -04:00
Kelvin Wang 64e42271be feat(cmd/launcher): add notification endpoint 2019-08-15 21:56:24 -04:00
Kelvin Wang c394391b8c feat(authorizer): add notification endpoint 2019-08-15 21:56:23 -04:00
Kelvin Wang c5100f3eae feat(http): add notification endpoint 2019-08-15 21:56:21 -04:00
Kelvin Wang 43fa754087 fix(kv): fix extra \x00 secret decoding 2019-08-15 21:56:20 -04:00
Kelvin Wang 61628671ed feat(kv): add notification endpoint
Co-authored-by: Jade McGough <jade@thezets.com>
2019-08-15 21:56:18 -04:00
Kelvin Wang f683f0dc46 feat(notification/endpoint): add endpoint struct
Co-authored-by: Jade McGough <jade@thezets.com>
2019-08-15 21:56:17 -04:00
Lyon Hill a8d7870689
feat(task): impersonate user on task execution (#14675)
* 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.
2019-08-15 18:31:52 -06:00
alexpaxton 53f6806df1
chore(ui): upgrade Clockface dependency to 0.0.25 (#14677)
* chore(ui): upgrade clockface dependency to latest

* refactor(ui): replace references to "ComponentSpacer" with "FlexBox"

* refactor(ui): update snapshot tests

* refactor(ui): appease the linter

* refactor(ui): appease the linter, again

* refactor(ui): WIP improve flaky e2e test

Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com>

* test(e2e): refactor scraper tests
2019-08-15 17:04:06 -07:00
kelwang d01b91667d
Merge pull request #14679 from influxdata/notification_auth_id
fix(notification/rule): remove authID requirement
2019-08-15 19:54:18 -04:00
Kelvin Wang f3dcdee504 fix(notification/rule): remove authID requirement 2019-08-15 19:31:45 -04:00
Christopher Henn 33a5d8ff5d feat(ui): integrate notification rule overlays with API 2019-08-15 16:24:52 -07:00
Lyon Hill f4fb6a1753
fix(task): Unify task scheduling across create and query (#14668)
Current behavior is that the first execution of a task happens based on the create time
of the task when using a 'every' schedule. If you create a task at 12:02 and want
the task to run every 15m. The first execution would happen at 12:17, and the 2nd would happen
at 12:30.

To fix this behavior I refactored the kv task to give a single source of knowledge.
We now have one function for finding exactly what the last scheduled task was.
We also now have a single method that calculates when the next schedule is due.
By unifying the logic it should always work the same way weather your asking when to run
or when creating a task.
2019-08-15 15:28:35 -06:00
kelwang 098dee6c9f
Merge pull request #14673 from influxdata/threshold_type
fix(notification/check): convert threshold type
2019-08-15 17:16:52 -04:00
Kelvin Wang f688697ca6 fix(notification/check): convert threshold type 2019-08-15 16:53:46 -04:00
Russ Savage 235e0b4d60
fix spelling in logBins example (#14672) 2019-08-15 13:41:30 -07:00
Michael Desa e5902d8de9
Merge pull request #14648 from influxdata/feat/generate-flux-ast-for-checks
feat(notification/check): generate task from check
2019-08-15 15:22:14 -04:00
Deniz Kusefoglu e1508ac2e1
feat(checks): add first pass at creating tasks from checks
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
2019-08-15 15:07:09 -04:00
Michael Desa 8e12b1cbb0
Merge pull request #14670 from influxdata/revert-14660-threshold_type
Revert "feat(notification/check): convert threshold type"
2019-08-15 14:08:22 -04:00
Michael Desa c355e62a27
Revert "feat(notification/check): convert threshold type" 2019-08-15 13:53:44 -04:00
kelwang 5d96ade951
Merge pull request #14660 from influxdata/threshold_type
feat(notification/check): convert threshold type
2019-08-15 13:18:05 -04:00
Kelvin Wang d8a88e1865 feat(notification/check): convert threshold type 2019-08-15 12:11:22 -04:00
Jonathan A. Sternberg 3d747b4fb1
fix(storage/reads): remove duplicate tables from the stream (#14601)
If the reader produces more than one table with the same group key, we
discard the later ones because the stream should never give us more than
one table with the same group key.

This is an error and it indicates the server sent us a bad set of data.
This change makes it so that the client is tolerant of that data and
will discard it if it exists.
2019-08-15 10:20:35 -05:00
Lyon Hill 9c0ee9e789
fix(task): Make runs sorting and limits work (#14663)
Because we were grouping by taskID and status we are returning limit(n) results for
"success" and limit(n) results for "failed" runs.
2019-08-15 07:27:42 -06:00
Deniz Kusefoglu e637e1e140
Feat/current check to time machine (#14662)
* Move current check to TimeMachine alerting

* Unify RemoveButton actions in to  ConvertFromCheckView

* Unify AddCheckDialog actions

* Switch saveCurrentCheck to saveCheckFromTimeMachine

* Remove current check from checks reducer

* Change getCurrentCheck to getCheckForTimeMachine

* Get Check along with view in EditcheckEO

* Tidy imports

* Import Actions With on...

* fix module name

* Remove check fixtures
2019-08-14 17:37:33 -07:00
Christopher Henn 54c9537bfc refactor(ui): differentiate server/client side IDs 2019-08-14 15:48:39 -07:00
Christopher Henn 26f98262bb refactor(ui): differentiate dynamic/constant/fixture data 2019-08-14 15:48:39 -07:00
Christopher Henn 672f6eca93 refactor(ui): simplify notification rule state management 2019-08-14 15:48:39 -07:00
Christopher Henn fcfa827e8e fix(ui): polish notification rule message panel 2019-08-14 15:48:39 -07:00
Lyon Hill 28043bcab5
fix(task): Fix inconsistancies in run query (#14661)
We currently have some data that has both a status tag and a status field
because of that we need to exclude the status field from the query results
2019-08-14 14:35:30 -06:00
Russ Savage 4172dfd09e
fix(circleci): add protoc to release build (#14658) 2019-08-14 12:24:27 -07:00
kelseiv 12e192f474
Flux function updates (#14657)
* update exponentialMovingAverage

* add doubleEMA

* add tripleEMA

* add relativeStrengthIndex

* add holtWinters

* add date.microsecond

* add date.millisecond

* add date.nanosecond

* add date.quarter

* add date.truncate

* add date.week

* add runtime.version

* update map example

* for difference, add keepFirst, upd column and desc

* add date.year

* add chandeMomentumOscillator

* add hourSelection

* add tail

* remove tail

* add tail

* format prettier

* add edits from Scott and Russ

* fix format
2019-08-14 11:47:09 -07:00
Russ Savage 8a5d0e6230
feat(templates): adding new templates, removing calls to create templates (#14631)
* 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
2019-08-14 11:01:19 -07:00
Christopher Henn d006d80ee6 refactor(ui): simplify event viewer field configuration 2019-08-14 07:56:34 -07:00