Commit Graph

749 Commits (bdb108d67e8be93fce0c7d616e7fcb85bd4bf26e)

Author SHA1 Message Date
Kelvin Wang 79ce30691e update(http): remove kerrors, change the default to be influxdb error 2019-01-25 10:29:26 -08:00
Mark Rushakoff 4df856c229 chore(task): add messages to all HTTP errors from tasks
Closes #11544.
2019-01-25 09:22:34 -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
Mark Rushakoff a0ff60c075 fix(task): respect limit when finding runs 2019-01-24 15:32:16 -08:00
Lyon Hill bdf65f5dfe
Remove owner from task json responses (#11504)
* Remove owner from task json responses

* allow for crud to run in parallel with other tests

To be parallel we just cant assume we only have 1 task.
2019-01-24 16:05:24 -07:00
kelwang 27b4d45e9e
Merge pull request #11309 from influxdata/add_urm_scraper
Add urm scraper
2019-01-24 14:21:09 -08:00
Mark Rushakoff 04a86c92af fix(http): consistently use influxdb errors in task handlers
And ensure that the task HTTP client consistently expects influxdb
errors, so that they're properly extracted and returned to the caller.

Closes #11426.
2019-01-24 11:25:02 -08:00
Kelvin Wang 74b5dccfb4 updates based on review 2019-01-23 09:29:50 -08:00
Kelvin Wang 0e4c55a82c feat(http): add urm endpoints 2019-01-23 08:46:33 -08:00
Kelvin Wang 6e3e4503c2 feat(influxdb): add urm for scraper 2019-01-23 08:46:32 -08:00
Iris Scholten 1aa238fcba Refactor search logic to include scrapers with no bucket
Co-authored-by: Chris Goller <goller@gmail.com>
2019-01-22 18:29:08 -08:00
Chris Goller e5f8ee0d76 fix(http): add default org/bucket id of zero when it doesn't exist 2019-01-22 19:35:23 -06:00
Chris Goller 799375d4a8 fix(http): if bucket or org do not exist, do not report 2019-01-22 19:21:23 -06:00
Delmer f074315881
fix(ui): wiring for labels (#11404)
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
2019-01-22 14:22:11 -08:00
Chris Goller 204b2b4d7d
Merge pull request #11366 from influxdata/feature/hosted-docs
feat(http): host swagger docs at /docs and /api/v2/swagger.json
2019-01-22 15:49:44 -06: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 6bda17c673 fix(task): use formal errors during task creation
The client expects influxdb.Error, so use them on the server.

Also clarify the message when the task option is missing.
2019-01-22 09:40:51 -08:00
Chris Goller a11773838f feat(http): host swagger docs at /docs and /api/v2/swagger.json 2019-01-22 11:16:27 -06:00
zhulongcheng acbb47781e pr review changes 2019-01-22 21:24:05 +08:00
zhulongcheng edf8dfad52 fix(http): convert write error 2019-01-22 11:28:15 +08:00
Chris Goller 5c73b12887
Merge pull request #11336 from influxdata/feat/prom-api-request-hist
feat(http): use default prom histogram buckets
2019-01-21 11:16:26 -06: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 e2bbf2495e
Merge pull request #11083 from zhulongcheng/panic-stack
fix(http): log api panic with a stack trace
2019-01-21 10:06:05 -06:00
zhulongcheng bb7df1fb4d add test for logging http panics 2019-01-21 23:29:28 +08:00
Chris Goller a28494ad76 feat(http): use default prom histogram buckets 2019-01-19 19:19:18 -06:00
Brandon Farmer b42cf30062 Pass task options on update 2019-01-18 16:39:12 -08:00
Chris Goller 49782c3be4 feat(bolt): add metrics for resources stored in boltdb 2019-01-18 17:45:45 -06: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
Delmer e2ffc17b21
fix(ui): add session timeout notification (#11281)
Co-authored-by: Chris Goller <goller@gmail.com>
2019-01-18 17:43:00 -05:00
Iris Scholten 02c02f9b40 fix(ui/dataLoaders): Update scraper targets to scraper 2019-01-18 14:08:23 -08: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
Mark Rushakoff 27d854d771 fix(http): display platform error from task client 2019-01-18 10:25:06 -08:00
kelwang ecf63c7935
Merge pull request #11285 from influxdata/update_scraper_endpoint
fix(http): update scrapers endpoint
2019-01-18 11:59:09 -05:00
Lyon Hill 523e52d662
Show organization names in task api actions (#11223)
* Show organization names on task actions.

closes #10876
2019-01-18 09:10:14 -07:00
Kelvin Wang 63ae68b9eb fix(http): update scrapers endpoint 2019-01-18 10:38:28 -05:00
Kelvin Wang f0838e4c71 feat(authorizer): add scraper authorizer 2019-01-18 10:01:51 -05:00
Leonardo Di Donato 4706339a9a feat(http): hook handler's source svc to authorizer 2019-01-18 14:05:36 +01:00
Michael Desa 24e10a4594
Merge pull request #11261 from influxdata/feat/authorize-auths
add authorized authorization service
2019-01-18 07:55:28 -05:00
Michael Desa c9f2a597a4
Merge pull request #11207 from influxdata/feat/authorize-dashboards
add dashboard authorization
2019-01-18 07:55:15 -05:00
Michael Desa 58a555a619
Merge pull request #11221 from influxdata/feat/authorize-users
feat(influxdb): add authorization for user actions
2019-01-18 07:55:03 -05:00
Michael Desa 3f6b5a27e8 feat(http): wire up authorized authorization service 2019-01-17 19:03:36 -05:00
Iris Scholten 40e75ced16
Merge pull request #11183 from influxdata/feat/plugin-links
Add additional info links to plugin forms
2019-01-17 14:35:00 -08:00
Mark Rushakoff 3f2a5578a5 fix(http): fix typo in owner/member links
There was an extra s in owner links, for example:

{"links":{"self":"/api/v2/taskss/034356818538f000/owners"},"users":[]}

All of the ResourceType values in authz.go already are plural, so I am
fairly certain that the extra s was just a typo all along.
2019-01-17 14:09:03 -08:00
Iris Scholten 022b19358c Add additional info links to plugin forms 2019-01-17 14:07:53 -08:00
Michael Desa 01983553c4 feat(influxdb): add authorization for user actions 2019-01-17 16:05:24 -05:00
Michael Desa 78249fdb89 feat(http): wire up dashboard authorizer 2019-01-17 16:04:16 -05:00
Nathaniel Cook b031e22003 feat(http): add vnd.flux content-type support
Fixes #10745
2019-01-17 14:01:56 -07:00
Deniz Kusefoglu 15547eda0d
Merge pull request #11197 from influxdata/feat/add-protoboard-creation-to-onboarding
Add protos state in redux and create protos API infrastructure
2019-01-17 11:51:55 -08:00
Kelvin Wang 2f97711703 feat(authorizer): add telegraf authorizer 2019-01-17 11:37:01 -05:00
Leonardo Di Donato ad6f2e42f5 feat(http): hook macros authorizer to handler
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-17 14:50:18 +01:00
Michael Desa f889675ef7
Merge pull request #11176 from influxdata/fix/misc-auth-issues
fix(http): use wrapped org/bucket services only when required
2019-01-17 07:55:15 -05: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
Leonardo Di Donato e8ecc6a712 feat(http): dashboards protos pagination 2019-01-17 12:35:00 +01:00
Leonardo Di Donato 964151504f docs(http): update swagger for dashboards filtering 2019-01-17 12:35:00 +01:00
Deniz Kusefoglu 95e808871e Add protos state in redux and create API infra 2019-01-16 20:24:13 -08:00
Iris Scholten 4918d7ae67 Move dataloading into admin ui
Co-authored-by: Daniel Campbell <metalwhirlwind@gmail.com>
2019-01-16 17:21:07 -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
Michael Desa 59fde4a9de feat(authorizer): add authorized bucket service
feat(http): use authorizer bucket service for API handler.

test(authorizer): add tests for bucket service auth
2019-01-16 15:37:19 -05:00
Michael Desa bfb865cd72 feat(influxdb): authorize org service operations
feat(influxdb): add unauthorized error code

feat(testing): export ErrorsEqual method

feat(authorizer): add Authorize method that authorizers permissions

feat(authorizer): add org service that authorizes actions to a wrapped org service

feat(http): use authorized org service in org handler

feat(authorizer): rename Authorize to IsAllowed
2019-01-16 14:41:57 -05: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
Alirie Gray d9a3b6d76c
Feat/edit labels on tasks (#11122)
* Replace EditDashboardLabelsOverlay with generic EditLabelsOverlay
* Add ability to add/remove labels from a task
2019-01-15 17:02:32 -08:00
Palak Bhojani a7816fb1c0 Add the ability to delete collector from admin ui 2019-01-15 16:09:56 -08:00
Michael Desa 4d0bec5b49
Merge pull request #11098 from influxdata/fix/permission-ui
fix(ui): update permissions type in cur swagger and associated ui
2019-01-15 15:53:37 -05:00
Iris Scholten c97d0c7d28
Merge pull request #11076 from influxdata/feat/save-scraper-targets
feat(ui/dataLoaders): Update Scraper ui and connect to api
2019-01-15 11:51:41 -08:00
Leonardo Di Donato f7d33a63a5 fix(http): canonicize dashboard organization field
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-15 20:39:41 +01:00
Leonardo Di Donato 26ff149f61 docs(http): swagger update for macros 2019-01-15 20:39:41 +01:00
Leonardo Di Donato 4c8db98ca9 chore(testing): test macro by org
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-15 20:39:41 +01:00
Leonardo Di Donato 6527987b80 chore(platform/testing): macro platform testing accounts for org ID now 2019-01-15 20:39:41 +01:00
Leonardo Di Donato 0f3a076f3e feat(http): get macros via http accounts for query parameters
Refs #1908
2019-01-15 20:39:41 +01:00
Jade McGough d174d56f35
Merge pull request #11097 from influxdata/task-labels-swagger
fix(http): use correct response for task labels GET request
2019-01-15 11:25:55 -08:00
Michael Desa 4c1afc3a21 fix(ui): update permissions type in cur swagger and associated ui
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2019-01-15 14:24:20 -05:00
Iris Scholten ab549039d1 feat(ui/dataLoaders): Update Scraper ui and connect to api 2019-01-15 11:20:32 -08:00
Jade McGough fe6e1bcd23 fix(http): use correct response for task labels GET request 2019-01-15 11:18:57 -08:00
Deniz Kusefoglu b249f82e6d Add organizationID to telegrafsRequest schema 2019-01-15 10:40:39 -08:00
Michael Desa c60031a6b7 fix(influxdb): change resource to resource type 2019-01-15 12:57:57 -05:00
Deniz Kusefoglu 515d23117c
Merge pull request #11049 from influxdata/fix/dashboard-swagger
Rename json organizationID to orgID across API
2019-01-15 09:51:36 -08:00
zhulongcheng 17a3a02ee3 log api panic with a stack trace 2019-01-15 11:58:42 +08:00
Deniz Kusefoglu d8eb0d0a5d Replace organizationID with orgID everywhere 2019-01-14 18:34:12 -08:00
Deniz Kusefoglu 28d906fce6 Add orgID to dashboards 2019-01-14 18:13:27 -08:00
Michael Desa 7c1372cdfc fix(influxdb): rename organizationID to orgID in json struct tags
Note. This may require that users blow away thier existing boltdb
databases to avoid errors.
2019-01-14 18:12:46 -08:00
Michael Desa 263b3e228d fix(http): add organizationID to dashboard swagger 2019-01-14 18:12:46 -08:00
Nathaniel Cook 622106caaa Merge branch 'master' into flux-staging 2019-01-14 17:03:57 -07:00
Iris Scholten 358e1820c7 fix(ui/dataLoaders): Add check for existing configs for update 2019-01-14 11:02:14 -08:00
kelwang c447f9bad9
Merge pull request #11045 from influxdata/find_telegrafs_bug
fix(http): fix the user resouce mapping filter
2019-01-14 12:27:07 -05:00
Kelvin Wang 390f553416 fix(http): fix the user resouce mapping filter 2019-01-14 12:07:51 -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
Michael Desa a3541b22d4 feat(http): allow user id to be specified explicitly on authorization
test(http): get user off of session in create authz test

fix(http): allow user id to be specified explicitly on authorization

create authorization now allows specifying user id explicitly. If no
user id is specified then we use the user id from the authorizer.

fix(http): use influxdb import

fix(http): use platform error in http auth tests

feat(cmd/influx): allow create auth command to specify user explicitly

feat(http): add org id to permissions
2019-01-14 10:20:20 -05:00
Jorge Landivar f8f1c1e7b6
Merge pull request #10954 from influxdata/feature/update_task_options
feat(tasks): update task options from api
2019-01-11 14:58:10 -06:00
Nathaniel Cook 3a2231be98 Merge branch 'master' into flux-staging 2019-01-11 13:47:49 -07:00
kelwang 0ac9d02d64
Merge pull request #10957 from influxdata/scraper_with_write_interface
add(gather): add writer interface
2019-01-11 13:51:26 -05:00
kelwang f0381bd308
Merge pull request #10977 from influxdata/scraper_target_swagger_doc
feat(http): add scraper target swagger
2019-01-11 13:51:07 -05:00
Kelvin Wang 82f79932c1 feat(http): add bucket and org name in response 2019-01-11 13:09:19 -05:00
Kelvin Wang ce6004243c add(gather): add writer interface 2019-01-11 13:09:18 -05:00
j. Emrys Landivar (docmerlin) a2674fa03d feat(tasks): update task options from api 2019-01-11 11:55:46 -06:00