Commit Graph

77 Commits (415f6984915bc67093d55e164022ddd7888c8401)

Author SHA1 Message Date
Kelvin Wang 76cc27751b feat(influxdb): add bucket desc 2019-04-24 11:20:05 -04:00
Kelvin Wang 7a72c363f2 remove org from bucket 2019-04-22 18:39:05 -04:00
Kelvin Wang 9d44ac3635 rename bucket organization to org 2019-04-22 18:39:01 -04:00
Kelvin Wang 054ce89dc5 fix(kv): fix bucket not found by name 2019-04-02 15:10:56 -04:00
Jade McGough 7bcff2e973 fix(http): remove newPatchLabelHandler, it should not exist
This was removed in the labels 2.0 rewrite, and looks like it was added back as a regression
2019-03-27 14:31:04 -07:00
Chris Goller 831d5110f4 fix(http): update bucket write links to include org/bucket 2019-03-11 13:46:16 -05:00
Chris Goller 83c43e7173 fix(http): log endpoint should be logs 2019-03-11 12:45:25 -05:00
Chris Goller 2011ef7252
Merge pull request #12177 from zhulongcheng/rm-owner-schema
docs(http): add members/owners links
2019-03-10 22:39:53 -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
zhulongcheng 111ed7767d docs(http): add members/owners links 2019-03-07 10:56:36 +08:00
Michael Desa 23f6c4b3fe fix(http): pass resource type through to label handlers
Co-authored-by: Iris Scholten <ischolten.is@gmail.com>
2019-02-07 19:08:56 -05:00
Michael Desa 5a6a6a94ef fix(http): rename platform to influxdb in package
Co-authored-by: Iris Scholten <ischolten.is@gmail.com>
2019-02-07 19:08:41 -05:00
zhulongcheng 2d48b85f0a feat(http): construct label handler by LabelBackend 2019-02-06 19:18:23 +01:00
zhulongcheng be37e07bea feat(http): construct member handler by MemberBackend 2019-02-06 19:18:23 +01:00
zhulongcheng c283b068ed feat(http): construct write handler by WriteBackend 2019-02-06 19:18:23 +01:00
zhulongcheng e29f925679 feat(http): construct bucket handler by BucketBackend 2019-02-06 19:18:23 +01:00
zhulongcheng e024b13a2e fix(http): rename desc to descending 2019-02-02 15:11:06 +08:00
Kelvin Wang 875162abd3 update(http): remove check error true 2019-01-25 10:29:27 -08:00
Kelvin Wang 79ce30691e update(http): remove kerrors, change the default to be influxdb error 2019-01-25 10:29:26 -08:00
Michael Desa d9473182d2 fix(cmd/influx): make setup, write, query a solid experience
fix(cmd/influx): format error for bare influx command

feat(cmd/influx): add org flag to query command

fix(cmd/influx): check correct error in wrapCheckSetup

fix(influx/cmd): use correct shorthand flag for org flag

feat(cmd/influx): wrapCheckSetup with wrapErrorFmt

feat(cmd/influx): cleanup language and errors during setup command

fix(http): use id query param in get buckets request

feat(cmd/influx): add helpful error messages for write command

feat(cmd/influx): add context to query command
2019-01-22 13:25:17 -08:00
Mark Rushakoff 3e1551334f fix(http): ensure response body always closed
This avoids leaking resources.

Found by manually inspecting results of `git grep -A5 -F '= hc.Do'`.
2019-01-18 14:55:48 -08: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 460b758f8e test(http): ensure bucket service tests have appropriate services set 2019-01-16 20:09:03 -05:00
Michael Desa f66774a766 fix(http): use wrapped org/bucket services only when required
return reasonable error message for http errors on write
2019-01-16 19:03:08 -05:00
zhulongcheng ca332b59de filter buckets by FindOptions 2019-01-16 13:08:56 +01:00
Michael Desa c60031a6b7 fix(influxdb): change resource to resource type 2019-01-15 12:57:57 -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
Jade McGough 815795261d feat(http): add labels to bucket responses 2019-01-03 16:02:02 -08:00
Andrew Watkins 3429e8d0c6
feat(auth): rewrite authorization service (#2157)
* feat(view-token-overlay): add view token overlay

* test(tokens): update tests

* chore(auths): rename mock data file

* feat(token-view): clicking on description opens token view modal

* feat(token-view): add ability to close overlay

* feat(token-view): display token permissions with updated permissions shape

* feat(token-view): wip update authorization and permission shapes

* feat(auth): wip refactor auth permissions

* fix(auth): generate permissions via functions

* fix(auth): make Id ID

* chore(types): update generated client

* feat(auth): wip add user and org names to auth

* fix(user): didnt save rebase

* feat(auth): WIP refactor auth

* feat(auth): check for user existence during auth creation

* feat(auth): org must exist during auth creation

* fix(auth): pluralize telegrafs resource type

* docs(http): update swagger definition for the Authorization

* test(auth): fix broken tests

* docs(swagger): update cur_swagger Authrorizations

* fix(api): remove trace from cur_swag

* test(ui/token): update components with new generated type definitions

* feat(http): add lookup service adding names for permissions

* fix(http): remove debugging panics

* chore: go tidy

* fix: unsaved rebase

* test(idpe): add ids to Authorizations for log tests
2018-12-28 15:02:19 -08:00
Michael Desa 158be4b599
Merge pull request #1993 from zhulongcheng/fix-user-service
fix(http): pass user service to handler New function
2018-12-21 09:37:42 -05:00
Michael Desa 32bd37de9a fix(http): remove second potention call to w.WriteHeader
Multiple calls to w.WriteHeader were possible if there was an error that
was encountered while encoding the response. To resolve this, we simply
log any error that is encountered instead.
2018-12-20 11:11:09 -05:00
Jade McGough 786af8154e add patch label endpoints 2018-12-18 01:45:49 -08:00
Michael Desa c33d94f5ec
Merge pull request #1799 from zhulongcheng/paging
feat(http/paging): add paging implementation
2018-12-17 12:43:05 -05:00
zhulongcheng dcac51377e pass user service to handler New function 2018-12-17 23:59:30 +08:00
zhulongcheng 5f40883342 add custom-404 handler 2018-12-16 22:55:39 +08:00
zhulongcheng 7cd1994cd4 add ResourceType param to filter resource members 2018-12-15 00:18:50 +08:00
zhulongcheng 3b43d83da0 add UserService to members/owners endpoint handlers 2018-12-15 00:18:50 +08:00
Jade McGough 909fb6e98c
fix(http): remove id param for /buckets and update swagger (#1942) 2018-12-13 16:27:34 -08:00
Jade McGough 78d0fc2b17
fix(testing): compare expected error messages against actual (#1857)
* fix(testing): compare expected error messages against actual

* remove nonsense

* remove nonsense

* add expected error message for bucket not found

* oops
2018-12-12 10:24:33 -08:00
zhulongcheng cb8f7a1744 add /buckets endpoint paging links 2018-12-09 23:27:18 +08:00
Jade McGough 8c961e12bb
Labels (#1668)
* feat(platform): add label struct

* feat(platform): add label service interface

* WIP label service

* chore(http): simplify URMapping validation

* WIP label service skeleton

* add new GET labels handler

* feat(http): add POST handler for label service

* feat(http): add label delete handler

* fix json tag

* add happy path testing

* feat(http): add label endpoints to dashboard service

* make fmt

* add label delete handler

* make fmt again :(

* feat(bolt): add label implementation

* wire boltdb implementation of labels

* feat(mock): add mock for label service

* fix tests, add delete test

* add remaining tests, flesh out GET params

* unused code

* remove comments

* add labels endpoints

* clean up labels after deleting a dashboard

* fix issues from code review

* WIP remove type from labels

* feat(http): add label cli functions

* fixes

* make fmt

* feat(http): add labels to tasks and buckets

* feat(bolt): remove labels if their resources are deleted

* remove bolt cleanup for now

* make fmt

* type conversion magic

* feat(inmem): implement label service

* prevent race conditions

* remove labels from inmem if their resources are deleted

* fix race condition

* fix formatting
2018-12-03 08:07:08 -08:00
Jade McGough 873aae3fad
Revert "feat(http): add label service" (#1667)
This reverts commit 70a430c599.
2018-12-03 04:27:27 -08:00
Jade McGough 70a430c599
feat(http): add label service (#1346) 2018-11-30 21:08:35 -08:00
kelwang 6db9acc951
Revert "Revert "convert /buckets endpoint error to platform error "" 2018-11-30 13:27:40 -05:00
kelwang 2a57dc1970
Revert "convert /buckets endpoint error to platform error " 2018-11-29 12:02:32 -05:00
Kelvin Wang 232d9d71e3 fix(http): fix bucket errors 2018-11-29 09:58:56 -05:00
Michael Desa 7227bf8fa2 feat(platform): add operation log for resources
feat(platform): add dashboard operation log interface

feat(bolt): add dashboard operation log to bolt client

feat(platform): add links to dashboard load response

fix(http): update links in json response of dashboards

feat(bolt): add operation logs for each resource

feat(http): add routes for operation logs

feat(cmd/influxd): set operation logs on http api backend
2018-11-02 14:21:14 -04:00
Andrew Watkins f82eeb8338
feat(orgs): update org bucket name and retention rule (#1181)
* Add error handling to spinner

* Fix broken test

* Update retentionPeriod to retentionRules

* fix(http): bucket retention period now empty

Co-authored-by: Chris Goller <goller@gmail.com>

* fix(bucket): remove bucket key from createBucket API

* feat(bucket): update organization buckets

* fix: coerce Bucket type

* chore: create separate components for bucket create / update
2018-10-25 15:23:05 -07:00