Commit Graph

30834 Commits (f683f0dc46f7455e7a402cef9c8697ea1b21d0d9)

Author SHA1 Message Date
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
Christopher Henn 07f34e4e60 feat(ui): add notifications tab to alerting history page 2019-08-14 07:56:34 -07:00
Edd Robinson 99831c34c4
Merge pull request #14638 from influxdata/er-rhh-alloc-perf
perf(storage): reduce allocations when accessing series file or TSI
2019-08-14 12:47:11 +01:00
Christopher Henn 90a8138c95 chore(ui): disable eslint via fork-ts-checker-webpack-plugin
Disables running ESLint through the fork-ts-checker-webpack-plugin in
development, due to its tendency to overuse CPU.

I think this OK since linter errors, unlike typechecking errors, are
usually confined to the file you are working within. So they're a good
fit to run via an editor, rather than the build tool.
2019-08-13 14:11:33 -07:00
Lyon Hill e671c71e69
fix(task): Remove the tag and field status duplication (#14643) 2019-08-13 14:58:50 -06:00
Nathaniel Cook 25d6de0ba8 build(flux): update Flux to v0.39.0 2019-08-13 13:54:34 -06:00
Stuart Carnie 7118d4a953
Merge pull request #14636 from influxdata/sgc/issue/14574
fix(flux): Fix hanging test by ensuring results are read
2019-08-13 09:00:11 -07:00
Edd Robinson 94dbbdca7b perf(storage): memoize hashmap prom labels
Prior to this, each hashmap operation that was instrumented involved
initialising a map. Now these maps are pre-initialised.

```
⇒  benchstat old.txt new.txt
name                                                     old time/op    new time/op    delta
Index_CreateSeriesListIfNotExist/create_series-8            5.00s ± 3%     5.13s ± 2%   +2.50%  (p=0.033 n=10+7)
Index_CreateSeriesListIfNotExist/already_exist_series-8     557ms ± 3%     530ms ± 6%   -4.85%  (p=0.001 n=10+8)

name                                                     old alloc/op   new alloc/op   delta
Index_CreateSeriesListIfNotExist/create_series-8           2.57GB ± 0%    1.84GB ± 1%  -28.52%  (p=0.000 n=8+10)
Index_CreateSeriesListIfNotExist/already_exist_series-8     678MB ± 0%     308MB ± 0%  -54.55%  (p=0.000 n=10+8)

name                                                     old allocs/op  new allocs/op  delta
Index_CreateSeriesListIfNotExist/create_series-8            28.9M ± 0%     24.5M ± 0%  -15.22%  (p=0.000 n=9+10)
Index_CreateSeriesListIfNotExist/already_exist_series-8     2.23M ± 0%     0.03M ± 0%  -98.51%  (p=0.000 n=10+10)
```
2019-08-13 11:28:51 +01:00
alexpaxton 05c607aa41
refactor(ui): replace AutoInput with Clockface (#14628)
* refactor(ui): replace instaces of AutoInput with Clockface

* refactor(ui): delete local AutoInput component

* refactor(ui): ensure null gets passed back when bin count is set to auto

* refactor(ui): convert BinCountInput into a stateless component

* refactor(ui): convert BinCountInput to function component
2019-08-12 17:04:24 -07:00
Stuart Carnie 9d94b7500d
fix(flux): Fix hanging test by ensuring results are read
Closes #14574
2019-08-12 16:47:03 -07:00
Christopher Henn 648e80a9a6 feat(ui): stub out check visualization options 2019-08-12 16:30:19 -07:00
Christopher Henn fc18ec56a5 fix(ui): allow visualization options for a check view to be opened 2019-08-12 16:02:33 -07:00
Christopher Henn 1bf7ed9bae refactor(ui): move type to types directory 2019-08-12 16:02:33 -07:00
Christopher Henn 926bf1214e feat(ui): show dialog when adding check to cell
Closes #14585
2019-08-12 16:02:33 -07:00
Deniz Kusefoglu d11dbf04cc
Fix checks bugs (#14622)
* Fix editVEO check saving

* Get checks at dashboard load

* Fix check queries type

* save View before saving check in VEOs

* Get checks from checks list for checkPlot

* Add check view properties to backend

* Match Alerting Button to CheckAlertingButton

* Remove thresholds from default check

* Remove explicity declaration of check view type in query views

* Pass check down to CheckPlot

* Fix clashing action calls

* Fix calling check type change action from dispatch

* Only check for checkView if view is defined

* Remove type when spreading new check on to default check

* Fix check edit route in check cards

* Get checks for dashboard earlier

* Clean up getCheckForView selector
2019-08-12 14:48:24 -07:00
Alirie Gray 02765c6d01
Merge pull request #14604 from influxdata/tasks/sort-runs-by-time-scheduled
feat(tasks): sort runs by most recently scheduled
2019-08-12 12:44:45 -07:00
Alirie Gray 16c400c0d0 feat(tasks): sort runs by most recently scheduled 2019-08-12 12:32:17 -07:00
alexpaxton ee8dc2d5c3
refactor(ui): factor out local Form components (#14624)
* refactor(ui): replace instace of local Form with clockface

* refactor(ui): replace Form in token overlay

* refactor(ui): replace Form in label overlay

* refactor(ui): replace Form in danger overlay

* refactor(ui): delete local form layout components
2019-08-12 11:34:48 -07:00
Christopher Henn 02092e6960 fix(ui): feature flag alerting button 2019-08-12 10:47:32 -07:00
Alirie Gray aafb9e5b5e
Merge pull request #14569 from influxdata/tasks/fix-run-limit-api
fix(tasks): add run limit check to analytical store
2019-08-12 09:06:32 -07:00
Alirie Gray ca6625c261 fix(tasks): add run limit check to analytical store 2019-08-12 08:51:05 -07:00
Edd Robinson 9f3cbdc80e test(storage): add benchmark for series creation
This benchmark exercises creating (or checking if series need creating)
in the TSI index and the Series File.
2019-08-12 13:50:02 +01:00
Edd Robinson 396c6b0364 refactor(storage): ensure tests clean up 2019-08-12 13:49:52 +01:00