Commit Graph

166 Commits (d7877164b62a694bb2fafa3b6aefa58d6686cb01)

Author SHA1 Message Date
Jade McGough b2775ef9da feat(labels): allow label names to be updated 2019-03-15 16:24:23 -07:00
kelwang e78b34b799
Merge pull request #12456 from influxdata/bucket_update_issue
fix(kv): fix bucket update issue
2019-03-08 13:44:04 -05:00
Russ Savage 83614f94d7
Minor text updates for password error and default scraper name (#12448)
* updating password length message
* updating default scraper name
* updating password error in a few more places; fixed tests
2019-03-08 09:12:59 -08:00
Kelvin Wang fb6e3b3a5f fix(kv): fix bucket update issue 2019-03-08 11:36:05 -05:00
Jacob Marble 603a1f26e0 use tracing.StartSpanFromContext 2019-03-07 12:12:31 -07:00
Jacob Marble 9541e861a3 goimports -w -local github.com/influxdata/influxdb 2019-03-07 12:12:31 -07:00
Jacob Marble 92fa813c45 add spans to multiple services 2019-03-07 12:12:31 -07:00
Kelvin Wang 2fa517c19c fix(testing): update bucket update uniqueness 2019-03-06 10:17:56 -05:00
Chris Goller 1ec7b69d85 fix(kv): error org search if neither name nor id is set 2019-02-21 11:18:08 -08:00
Michael Desa 6a8a1fce32 feat(kv): implemented key/value store with end-to-end integration tests
* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* refactor(passwords): rename from BasicAuth to Passwords

* refactor(kv): copy bolt user test into kv

Co-authored-by: Michael Desa <mjdesa@gmail.com>

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* fix(http): s/platform/influxdb/ for user service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement labels generically on kv

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* refactor(kv): copy bolt user test into kv

Co-authored-by: Michael Desa <mjdesa@gmail.com>

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* fix(http): s/platform/influxdb/ for user service

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* feat(kv): implement labels generically on kv

* refactor(passwords): rename from BasicAuth to Passwords

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(http): initial support for flushing all key/values from kv store

* feat(kv): rename macro to variable

* feat(cmd/influxd/launcher): user kv services where appropriate

* refactor(passwords): rename from BasicAuth to Passwords

* feat(kv): implement macro service

* test(ui): introduce cypress

* test(ui): introduce first typescript test

* test(ui/e2e): add ci job

* chore: update gitignore to ignore test outputs

* feat(inmem): in memory influxdb

* test(e2e): adding pinger that checks if influxdb is alive

* hackathon

* hack

* hack

* hack

* hack

* Revert "feat(inmem): in memory influxdb"

This reverts commit 30ddf032003e704643b07ce80df61c3299ea7295.

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* hack

* chore: lint ignore node_modules

* hack

* hack

* hack

* add user and flush

* hack

* remove unused vars

* hack

* hack

* ci(circle): prefix e2e artifacts

* change test to testid

* update cypress

* moar testid

* fix npm warnings

* remove absolte path

* chore(ci): remove /home/circleci proto mkdir hack

* wip: crud resources e2e

* fix(inmem): use inmem kv store services

* test(dashboard): add first dashboard crud tests

* hack

* undo hack

* fix: use response from setup for orgID

* chore: wip

* add convenience getByTitle function

* test(e2e): ui can create orgs

* test(e2e): add test for org deletion and update

* test(e2e): introduce task creation test

* test(e2e): create and update of buckets on org view

* chore: move types to declaration file

* chore: use route fixture in dashboard tests

* chore(ci): hack back

* test(ui): update snapshots

* chore: package-lock

* chore: remove macros

* fix: launcher rebase issues

* fix: compile errors

* fix: compile errors

* feat(cmd/influxdb): add explicit testing, asset-path, and store flags

Co-authored-by: Andrew Watkins <watts@influxdb.com>

* fix(cmd/influxd): set default HTTP handler and flags

Co-authored-by: Andrew Watkins <watts@influxdb.com>

* build(Makefile): add run-e2e and PHONY

* feat(kv:inmem:bolt): implement user service in a kv

* refactor(kv): use consistent func receiver name

* feat(kv): add initial basic auth service

* refactor(passwords): move auth interface into own file

* refactor(passwords): rename basic auth files to passwords

* refactor(passwords): rename from BasicAuth to Passwords

* refactor(kv): copy bolt user test into kv

Co-authored-by: Michael Desa <mjdesa@gmail.com>

* feat(kv): add inmem testing to kv store

* fix(kv): remove extra user index initialization

* feat(kv): attempt at making errors nice

* fix(http): return not found error if filter is invalid

* fix(http): s/platform/influxdb/ for user service

* fix(http): s/platform/influxdb/ for user service

* feat(kv): initial port of telegraf configs to kv

* feat(kv): initial port of scrapers in bolt to kv

* feat(kv): first pass at migrating bolt org service to kv

* feat(kv): first pass at bucket service

* feat(kv): first pass at migrating kvlog to kv package

* feat(kv): add resource op logs

* feat(kv): first pass at user resource mapping migration

* feat(kv): add urm usage to bucket and org services

* feat(kv): first pass at kv authz service

* feat(kv): add cascading auth delete for users

* feat(kv): first pass d authorizer.OrganizationService in kv

* feat(cmd/influxd/launcher): user kv services where appropriate

* fix(kv): initialize authorizations

* fix(influxdb): use same buckets while slowly migrating stuff

* fix(kv): make staticcheck pass

* feat(kv): add dashboards to kv

review: make suggestions from pr review

fix: use common bucket names for bolt/kv stores

* test(kv): add complete password test coverage

* chore(kv): fixes for staticcheck

* feat(kv): implement labels generically on kv

* feat(kv): implement macro service

* feat(kv): add source service

* feat(kv): add session service

* feat(kv): add kv secret service

* refactor(kv): update telegraf and urm with error messages

* feat(kv): add lookup service

* feat(kv): add kv onboarding service

* refactor(kv): update telegraf to avoid repetition

* feat(cmd/influxd): use kv lookup service

* feat(kv): add telegraf to lookup service

* feat(cmd/influxd): use kv telegraf service

* feat(kv): update scraper error messaging

* feat(cmd/influxd): add kv scraper

* feat(kv): add inmem backend tests

* refactor(kv): copy paste errors

* refactor(kv): add code to password errors

* fix(testing): update error messages for incorrect passwords

* feat(kv): rename macro to variable

* refactor(kv): auth/bucket/org/user unique checks return errors now

* feat(inmem): add way to get all bucket names from store

* feat(inmem): Buckets to return slice of bytes rather than strings

* feat(inmem): add locks around Buckets to avoid races

* feat(cmd/influx): check for unauthorized error in wrapCheckSetup

* chore(e2e): add video and screenshot artifcats to gitignore

* docs(ci): add build instructions for e2e tests

* feat(kv): add id lookup for authorized resources
2019-02-19 17:47:19 -06:00
Alirie Gray 5f524eb92d Rename all occurences of Macro to Variable 2019-02-14 13:21:57 -08:00
Leonardo Di Donato 1849f29f14 chore: refactor according to label mappings improvements
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-25 11:17:36 +01:00
Leonardo Di Donato df1fa88cb3 chore: use specific error for labels not found 2019-01-25 11:17:36 +01:00
Kelvin Wang 6e3e4503c2 feat(influxdb): add urm for scraper 2019-01-23 08:46:32 -08:00
Jade McGough ca35c2d3e1 fix(bolt): provide better error message when unable to find org by name 2019-01-22 17:20:37 -08:00
Jacob Marble 62ebb2c9ad feat: Onboarding without interaction 2019-01-22 14:36:34 -08:00
Chris Goller 31ab881c96
Merge pull request #11347 from influxdata/feat/telemetry
Add optional telemetry that reports every 8 hours
2019-01-22 15:48:24 -06:00
Leonardo Di Donato 285979c82c chore(bolt): refactor secrets to influxdb ns 2019-01-22 19:23:23 +01:00
Chris Goller af8f698490 feat(telemetry): add initial telemetry metrics 2019-01-21 13:05:58 -06:00
Michael Desa c76e202309
Merge pull request #11337 from zhulongcheng/fix-bolt-onboarding
fix(bolt): create user mapping after bucket is created
2019-01-21 09:15:26 -08:00
Michael Desa e2bc8afc04
Merge pull request #11301 from influxdata/feat/authorize-urm
authorize user resource mapping operations
2019-01-21 08:33:25 -08:00
Chris Goller 1811ed43b4
Merge pull request #11038 from zhulongcheng/log-db-rm-event
log dashboard removed event
2019-01-20 10:09:03 -06:00
zhulongcheng ffdf2cd1e6 fix(bolt): create user mapping after bucket is created 2019-01-20 15:44:22 +08:00
Chris Goller 2b7a0099e8 feat(bolt): add scraper and telegraf metric counters 2019-01-18 18:00:10 -06:00
Chris Goller 8082c64556 feat(bolt): add metrics for influxdb buckets stored in boltdb 2019-01-18 17:45:45 -06:00
Chris Goller 49782c3be4 feat(bolt): add metrics for resources stored in boltdb 2019-01-18 17:45:45 -06:00
Michael Desa cdc9146b78 feat(influxdb): add authorized user resource mappings
feat(bolt): add function to find a resources organization id

rename platform to influxdb

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

fix(bolt): rename FindResoureOrganization to FindResoureOrganizationID

feat(authorizer): add authorized user resource mapping service

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

feat(influxdb): wire up authorized user resource mapping

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

fix(authorizer): remove unused field from tests

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2019-01-18 14:22:08 -05:00
Jade McGough 8a1d7ba1ba
Labels v2 (#11198)
* WIP first-class endpoint for labels

* WIP

* WIP

* add all the boilerplate

* fix boltdb

* fix http label test

* fix test

* WIP

* fix test failures

* reenable all tests

* add failing test for label mappings

* add label mapping bolt bucket

* implement resource -> label mapping fn

* add inmem label mapping

* delete label mappings

* remove unused stuff

* add missing functions

* add POST endpoint for labels

* add GET route for label

* delete label endpoint

* add label patch endpoint

* remove commented code

* add label service to api handler

* update comment

* add FindLabelByID test

* use platform.Error

* change path name

* formatting

* remove label patch from swagger

* avoid potential orphaned mapping bug

* guard against creating label mappings from nonexistent labels

* update swagger

* update swagger

* update swagger

* fix swagger indentation

* update swagger
2019-01-18 11:03:36 -08:00
Michael Desa 01983553c4 feat(influxdb): add authorization for user actions 2019-01-17 16:05:24 -05:00
Leonardo Di Donato 70921b6014 feat(bolt): dashboards pagination 2019-01-17 12:35:00 +01:00
Leonardo Di Donato 91f4ffba30 chore: bucket pagination improvements 2019-01-17 12:35:00 +01:00
Kelvin Wang 0b90767a31 feat(http): add renew session 2019-01-16 11:07:35 -05:00
zhulongcheng ca332b59de filter buckets by FindOptions 2019-01-16 13:08:56 +01:00
Leonardo Di Donato 7e8cea7641 chore(bolt): use platform.Error within ReplaceMacro and DeleteMacro methods
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-15 20:39:41 +01:00
Leonardo Di Donato d6e010c884 feat(bolt): org index for filtering macros 2019-01-15 20:39:41 +01:00
Leonardo Di Donato 184021174e feat(bolt): macro filtering by org id
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-15 20:39:41 +01:00
Leonardo Di Donato edc2f703c3 chore(bolt): bolt macro impl. is a macro service again 2019-01-15 20:39:41 +01:00
Michael Desa c60031a6b7 fix(influxdb): change resource to resource type 2019-01-15 12:57:57 -05:00
Michael Desa 92eaa53936 feat(platform): add organization id to dashboard
feat(http): add organization id to dashboard handler

feat(testing): add organization id to dashboards for testing

feat(bolt): add organization dashboard index

feat(inmem): filter dashboards by organization id

feat(http): add organizationID to dashboard response

feat(bolt): use index key to retrieve dashboard id

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

feat(influxdb): support organization as filter for dashboards

fix(http): add query params to self links in dashboards/protos api
2019-01-14 11:28:28 -05:00
Leonardo Di Donato e4a19bbf36 fix(bolt): empty set rather than error when there aren't telegraf configs for an org
Fixes #11018
2019-01-14 17:08:44 +01:00
zhulongcheng e50e4f9226 log dashboard removed event 2019-01-14 11:53:31 +08:00
Kelvin Wang ce6004243c add(gather): add writer interface 2019-01-11 13:09:18 -05:00
Michael Desa 944de4157a fix(influxdb): add org id to permissions
filter out resources that have mission IDs

fix(influxdb): simplify auth check in PermissionAllowed

review(platform): update as noted in review

fix(influxdb): ensure permission has valid org id
2019-01-11 12:23:28 -05:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Michael Desa 394673c54b
Merge pull request #2367 from influxdata/fix/issue#2252
Add org admin and member specific permissions
2019-01-09 17:54:20 -05:00
Leonardo Di Donato 740723ae16 chore(bolt): revisit telegraf configs to support org 2019-01-09 22:17:19 +01:00
Michael Desa 0ec22953df fix(testing:bolt:inmem): add org admin permissions during onboarding generate 2019-01-09 11:43:58 -05:00
Michael Desa ead4a0a170 fix(bolt): grand first user org admin privileges during onboarding 2019-01-09 10:35:50 -05:00
Michael Desa 857b60150e feat(platform): add proto service for creating templated resources
feat(http): add http handler for proto service

feat(mock): add mock proto service

test(http): add proto handler tests

fix(platform): add view as option when adding a cell

feat(platform): add dashboard to proto struct

feat(fs): add filesystem implementation of proto

feat(http): add protos endpoints to api handler

feat(cmd/influxd/launcher): add protos path to server

doc(http): add protos to swagger

test(cmd/influxd/launcher): add --protos-path to launcher tests

fix(fs): remove unused args from test

fix(http): use platform.Error where appropriate
2019-01-09 09:55:15 -05:00
Michael Desa 338e0587d0 fix(platform): nest view beneath dashboard cell
feat(platform): add functional options for platform errors

fix(testing): set dashboard ids properly in dashboard tests

feat(bolt): add dashboard specific views

fix(bolt): delete view when cell is removed or dashboard is deleted
2019-01-08 18:11:13 -05:00