Commit Graph

41 Commits (0ae8bebd755cf4aa579b9c38e6ea4792dfdbe53a)

Author SHA1 Message Date
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Johnny Steenbergen bf86cce1f1 feat(httpc): extend httpc Client with JSON shorthand methods
making most common API calls super easy to get up and running
2019-12-12 07:44:31 -08:00
Johnny Steenbergen 8729cd0959 chore(http): refactor api handler take advantage of route tree instead of switch statement
is very much WIP at this point
2019-12-11 09:53:29 -08:00
Johnny Steenbergen 417d25537f chore(http): refactor org service to use httpc client 2019-12-10 10:49:22 -08:00
Johnny Steenbergen 5cc02de988 feat(httpc): add httpc pkg to resuse code for http client type 2019-12-09 12:17:22 -08:00
Johnny Steenbergen ad841608ca chore(http): refactor bucket|dashboard|label|umr|var http clients to use reusable HTTP client
this is a step towards providing a shared http client that manages  pooling connections,
timeouts, and reducing GC for by not creating/GCing a client each req. Bring on the red!
2019-12-09 09:44:41 -08:00
Jacob Marble 5f19c6cace
chore: Remove several instances of WithLogger (#15996)
* chore: Remove several instances of WithLogger

* chore: unexport Logger fields

* chore: unexport some more Logger fields

* chore: go fmt

chore: fix test

chore: s/logger/log

chore: fix test

chore: revert http.Handler.Handler constructor initialization

* refactor: integrate review feedback, fix all test nop loggers

* refactor: capitalize all log messages

* refactor: rename two logger to log
2019-12-04 15:10:23 -08:00
George 3dbb9c0fd2
feat(tracing): dont trace spans with full request paths as operation name in ExtractFromHTTPRequest (#15971)
* feat(tracing): dont trace spans with full URL path names in ExtractFromHTTPRequest

* chore(multiple): replace all occurrences of julienschmidt/httprouter with influxdata/httprouter
2019-11-25 15:22:19 +01:00
Johnny Steenbergen fb5f00e05b chore(http): add missing client methods for label/buckets GET reqs 2019-11-01 11:59:09 -07:00
Deary Hudson 220309e498 feat(pkger): adds label support 2019-11-01 11:59:09 -07:00
Johnny Steenbergen 4da248ec30
Merge pull request #15275 from influxdata/task/15258_remove_senstive_data_logging
chore(http): remove logging of senstive data
2019-09-25 10:13:10 -07:00
Johnny Steenbergen fc955c5abe chore(http): remove logging of senstive data
after discussion with team, dropping the request logging was decided on.
2019-09-25 09:49:09 -07:00
Kelvin Wang 4aa6df1c34 fix(cmd/influx): org add/remove members 2019-09-24 13:26:18 -04:00
Kelvin Wang f55cf4c8b3 feat(http): add auth debug log 2019-07-15 12:09:59 -04:00
Kelvin Wang 9ecada4dce feat(http): convert errorEncode to use interface 2019-06-26 21:41:01 -04:00
Christopher M. Wolff c35c15f54d
refactor(http): move queryd http interface to idpe (#13862) 2019-05-09 10:41:14 -07:00
Jade McGough 7914a04f0b organizationID -> orgID 2019-04-12 01:29:42 -07:00
Jade McGough 81e6a7116b feat(http): filter label response by organization 2019-04-12 01:29:32 -07:00
Kelvin Wang ec6895531d feat(http): add document labe handler 2019-04-10 15:08:03 -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
Jade McGough f488428a32 fix(authorizer): labels can be created if the user has read access to the specified org 2019-03-19 01:56:55 -07: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
Iris Scholten aad4193c3f fix root labels endpoint
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
Co-authored-by: Delmer Reed <del@influxdata.com>
Co-authored-by: Jade McGough <jade@influxdb.com>
2019-02-07 14:21:49 -08:00
zhulongcheng 2d48b85f0a feat(http): construct label handler by LabelBackend 2019-02-06 19:18:23 +01: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
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
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
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 0ddf6b3588
Label responses (#2165)
* add labels to task links

* add labels to task responses

* add failing test

* fix label POST

* make fmt

* fix dashboard tests

* update swagger

* fix task service test labels

* add labels test for dashboards http service

* pull params out of newTaskResponse

* pull params out of newDashboardResponse

* make fmt

* add labels to dashboard response in swagger

* make context first argument

* fix test formatting
2019-01-02 11:17:28 -08: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 121588bf8a chore(http): add missing labels documentation 2018-12-18 14:49:22 -08:00
Jade McGough 7eb69049c5 use new errors library in label http handlers 2018-12-18 09:14:59 -08:00
Jade McGough 08abdf59b1 oops 2018-12-18 03:55:28 -08:00
Jade McGough ec40c17fd9 fix label responses 2018-12-18 03:51:10 -08:00
Jade McGough 3bf4db0d5d add http handler for label PATCH 2018-12-18 01:38:49 -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