Commit Graph

73 Commits (bbc37b4c6814d428d2e423fbac777a9139640be5)

Author SHA1 Message Date
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
zhulongcheng 3c1e9ee5f3 fix(influxdb): use influxdb.Error in ID.Decode 2019-05-15 22:53:31 +08:00
kelwang 8687cb8039
Merge pull request #13448 from influxdata/create_view_issue
fix(http): create view
2019-05-13 13:33:34 -04:00
Adam ae25f0c448 Merge remote-tracking branch 'origin/master' into flux-staging 2019-05-09 15:29:00 -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 291ac06372
fix(http): return correct response code when dashboard creation fails (#13803) 2019-05-06 16:19:42 -07:00
Kelvin Wang bff7b90829 fix(http): create view 2019-04-16 18:06:39 -04:00
Jade McGough 5a1ae7c704 Revert "fix(http): remove view ID"
This reverts commit 1c6bdb6c3e.
2019-04-15 15:00:40 -07:00
zhulongcheng 1c6bdb6c3e fix(http): remove view ID 2019-04-14 12:31:35 +08:00
Kelvin Wang a5f53e48c4 fix(http): fix go vet issue 2019-04-12 12:46:26 -04:00
kelwang a64c4fd138
Merge pull request #12246 from zhulongcheng/rm-view
fix(http): remove view service
2019-03-27 20:13:10 -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 83c43e7173 fix(http): log endpoint should be logs 2019-03-11 12:45:25 -05:00
zhulongcheng a136a302f1 remove ViewService interface 2019-03-07 10:22:19 +08:00
zhulongcheng 1a46cc8f80 fix(http): remove view handler 2019-03-07 10:18:55 +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
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 ac43477d68 feat(http): construct dashboard handler by DashboardBackend 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
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
Leonardo Di Donato 8b9a21dc03 chore(http): remove getDashboardsLinks 2019-01-17 12:35:00 +01:00
Leonardo Di Donato 3e6add97cb feat(http): dashboards pagination 2019-01-17 12:35:00 +01:00
Michael Desa c60031a6b7 fix(influxdb): change resource to resource type 2019-01-15 12:57:57 -05:00
Jade McGough 9d844ae274 fix(http): add owners/members links to dashboards responses 2019-01-14 08:58:04 -08: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
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 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
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
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
Jade McGough c9b45b4c6d make fmt 2018-12-18 01:09:51 -08:00
Jade McGough e9fba06b3f WIP add colors to labels 2018-12-17 23:00:56 -08:00
kelwang 48fe377af3
Merge pull request #1926 from influxdata/convert_dashboard_error
fix(http): convert dashboard errors
2018-12-17 13:01:25 -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
Kelvin Wang 6ca7c68e2e fix(http): convert dashboard errors 2018-12-13 14:36:46 -05: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
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