Commit Graph

1130 Commits (2710fac45f5b28461eb8dedd4161d5cede623122)

Author SHA1 Message Date
Lyon Hill ad515cbdc5
Update the required fields for task swagger (#12400)
* Update the required fields for task swagger
2019-03-07 15:34:12 -07:00
Chris Goller c1e74f30ad feat(http): convert user sessions to auth for query service
Co-Authored-By: Kelvin Wang <sherkrainwang@gmail.com>
Co-Authored-By: Michael Desa <mjdesa@gmail.com>
Co-Authored-By: Christopher M. Wolff <chris.wolff@influxdata.com>
2019-03-07 16:01:31 -06:00
Jacob Marble 603a1f26e0 use tracing.StartSpanFromContext 2019-03-07 12:12:31 -07:00
Jacob Marble ed4e3e130b return n with error 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
Christopher M. Wolff e28ecdc0e9
refactor(query): make queryd present ProxyQueryService (#12360)
Fixes influxdata/idpe#2014.
2019-03-07 07:32:13 -08:00
Jorge Landivar 2d0ba57f4b
Merge pull request #12387 from zhulongcheng/task-paging
feat(http): add task paging links
2019-03-07 01:49:29 -06:00
zhulongcheng fac5986396 remove argument index from fmt string in scraper tests 2019-03-07 11:10:09 +08:00
zhulongcheng 111ed7767d docs(http): add members/owners links 2019-03-07 10:56:36 +08:00
zhulongcheng 593ab12e3c docs(http): remove Owners schema 2019-03-07 10:50:00 +08: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
Palak Bhojani ef440615e6 Update response to include event object for LogEvent type
Co-authored-by: Alex Paxton <thealexpaxton@gmail.com>
Co-authored-by: Chris Goller
2019-03-06 16:01:47 -08:00
Palak Bhojani cdce8b1388 Update Logs type in swagger to match the api response 2019-03-06 14:52:12 -08:00
Michael Desa 2687b7fd61
feat(influxdb): add support for templates
feat(influxdb): add generic store for documents

feat(influxdb): support authorizations in document store

feat(influxdb): support orgs in user resource mapping

feat(influxdb): add read-only included field on documents

feat(influxdb): add labels support to documents service

fix(influxdb): rename data field to content on documents

feat(influxdb): add with org id options for document store

feat(http): add templates swagger

feat(influxdb): add documentation to document options

doc(kv): add documentation for kv document store

test(kv): pull document tests in to the testing package

fix(http): fix swagger specification of templates endpoints
2019-03-06 13:18:31 -08:00
zhulongcheng b8a9c9595d feat(http): add task paging links 2019-03-06 15:06:35 +08:00
Nathaniel Cook a190ddb44c fix(http): fix tests for encoding changes 2019-03-05 16:56:35 -07:00
Alirie Gray dcb8c6e9b9
Merge pull request #12373 from influxdata/fix/remove-org-from-tasks
fix(tasks): replace organization on tasks with org name string
2019-03-05 15:07:20 -08:00
Lyon Hill 17026c2053
change task logs from a string to a struct (#12363)
* change task logs from a string to a struct
2019-03-05 15:58:33 -07:00
Alirie Gray e4b3023748 fix(tasks): replace organization on tasks with org name string 2019-03-05 14:43:50 -08:00
Chris Goller 864eb91f7a feat(http): query client fallback uses context auth
Co-authored-by: Mark Rushakoff <mark@influxdata.com>

Tasks instantiates the query service but does not know the token
it will use ahead of time.  This allows the token to be optionally
set on contex.
2019-03-04 17:19:01 -06:00
Jacob Marble b9c7ec439e
feat(influxd): Tracing refactor (#12318)
* feat(launcher): Tracing to log disabled by default

* remove traceLogger and use opentracing directly

* add Jaeger tracing

* go vet && go fmt
2019-03-04 11:48:11 -08:00
Mark Rushakoff e99c505287 refactor(http): only generate bindata asset for swagger.yml
The previous "." argument with "-ignore go" accidentally matched
README.md and Makefile too, neither of which we care to actually include
as assets.

Now we just explicitly include swagger.yml. It's simple enough to add
another file to the go:generate line if and when we need it.
2019-03-04 09:40:00 -08:00
Mark Rushakoff 3307276be1 fix(task): don't error when URM task disappears
In the platform adapter, we ask the URM for a list of tasks the user
owns, and then we look up each task individually.

The task service tests uncovered a legitimate bug where FindTasks would
return a "task not found" error, originating from looking up a task that
was present when we interrogated the URM but was deleted before we could
find it in the task store.

This change also removes duplicated URM logic from the HTTP handler
which has since been pushed down into the platform adapter.
2019-03-04 08:35:04 -08:00
Ben Johnson 12d35f1a50
Revert "Merge point parse & explode."
This reverts commit 1004abc3e1.
2019-03-02 06:23:04 -07:00
Ben Johnson 1004abc3e1
Merge point parse & explode. 2019-03-01 15:55:37 -07:00
Mark Rushakoff 290d06f98f fix(swagger): synchronize enum with defined error constants 2019-03-01 11:58:11 -08:00
Nathaniel Cook 17c3851c83
Merge pull request #12292 from influxdata/flux-staging
update to Flux v0.21.1
2019-03-01 11:02:16 -07:00
Brandon Farmer df70693e22 Fix indention on swagger.yml CreateDashboardRequest 2019-03-01 09:34:31 -08:00
Delmer Reed 268b40da00 update(http/swagger): update Dashboard to extend CreateDashboardRequest
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
2019-03-01 09:34:31 -08:00
Delmer Reed dd168e943d fix(http/swagger/dashboard): update the swagger post request requirements 2019-03-01 09:34:31 -08:00
jlapacik d08f5fe835
dep(http): switch Now property to time value on ASTCompiler (#12272)
Closes #12268.
2019-03-01 08:53:24 -08:00
Jorge Landivar 9e6a2247c0
Merge pull request #12134 from zhulongcheng/validate-task-status
fix(http): validate status for creating and updating a task
2019-02-27 13:08:06 -06:00
Lyon Hill b3f450eca9
Allow the CLI to find tasks by org name (#12202)
* Allow the CLI to find tasks by org name
2019-02-27 08:56:32 -07:00
Jonathan A. Sternberg dd50e10d6d
Merge pull request #12165 from influxdata/flux-staging
update to Flux v0.21.0
2019-02-26 13:12:37 -06:00
docmerlin (j. Emrys Landivar) 669c464335 feat(tasks): look up tasks by orgname 2019-02-25 15:57:01 -06:00
Jonathan A. Sternberg 70507670c3
feat(storage/reads): add scanned values and bytes metadata to the query (#12156)
This updates influxdb to use the new arbitrary metadata that can be
attached by a source and adds metadata entries for the cursor
statistics.
2019-02-25 14:44:18 -06:00
Nathaniel Cook 26e7f641b7 Merge branch 'master' into flux-staging 2019-02-25 13:00:28 -07:00
Chris Goller 8a104eba28
Merge pull request #12102 from zhulongcheng/empty-op-log
fix(http): return an empty list of operation logs if not found
2019-02-25 11:49:01 -06:00
Michael Desa 0d3d0d4d78
chore(influxdb): add context to storage.PointsWriter 2019-02-25 11:11:20 -05:00
zhulongcheng efadd43886 fix(http): validate status for creating and updating a task 2019-02-24 15:34:32 +08:00
Mark Rushakoff f79d9cba4f fix(task): pass task's authorization to query system, if using sessions
The query system specifically expects an Authorization. When a request
comes in using a Session, use the target task's Authorization, if we are
allowed to read it, when executing a query against the system bucket.
2019-02-22 12:50:55 -08:00
Nathaniel Cook a75adf6c4b fix(http): separate InfluxQL and Flux services
Previously the APIBackend understood only a ProxyQueryService,
but it needs to understand that there are two implementations of the
ProxyQueryService one for handling InfluxQL queries and one for handling
Flux queries. The names of the fields have been updated to make this
clear. As well as the FluxBackend is now initialized using the
FluxService explicitly.
2019-02-22 10:31:20 -07:00
Mark Rushakoff 12a604172f fix(task): create authorizations for tasks, which can read their task
Also set the generated token's description while we're here.

This enables us to use task's Authorization when we need to query the
system bucket to get run logs, etc. but we only have a Session.
2019-02-22 09:15:25 -08:00
Mark Rushakoff 6fdcaf83b4 fix(swagger): quote keys named "y"
The YAML parser used by the go-openapi libraries treats an unquoted y as
a boolean key, which will lead to a difficult-to-understand parser
error:

types don't match expect map key string or int got: bool

See also https://yaml.org/type/bool.html.
2019-02-22 08:20:07 -08:00
zhulongcheng ad1bab1a3c fix(http): return an empty list of operation logs if not found 2019-02-22 14:18:13 +08:00
Mark Rushakoff ecb37d7cc4 fix(task): restore functionality for creating task with org name
This is a partial rollback of changes #12004. Issue to track adding a
test: #12089.
2019-02-21 16:30:52 -08:00
Iris Scholten ffc88da46a
Merge pull request #12073 from influxdata/swagger-telegraf-labels-post
Update the swagger definition for a telegraf labels post response
2019-02-21 14:44:09 -08:00
Adam 68c25ec381 Merge remote-tracking branch 'origin/master' into flux-staging 2019-02-21 17:20:12 -05:00
Christopher Henn a499a8b0d9 Enable adding a description to a telegraf config 2019-02-21 14:06:04 -08:00
Iris Scholten 561902e5c4 Update the swagger definition for a telegraf labels post response 2019-02-21 14:02:35 -08:00
jlapacik af258e62e7
feat(http): define external preprocessing options via http api (#11939)
Closes #11702.
2019-02-21 13:11:50 -08:00
Chris Goller 1ec7b69d85 fix(kv): error org search if neither name nor id is set 2019-02-21 11:18:08 -08:00
Christopher Henn 953f703ae5 Add description to spec for telegraf config 2019-02-21 08:25:56 -08:00
zhulongcheng 29d49adcfb doc(http): update request body for updating a task 2019-02-21 08:25:45 -08:00
Lyon Hill 3665feef38
Populate organization name on task create action (#12004)
* Populate organization name on task create action

* Move the responsiblity of organization lookup to the platform adaptor
2019-02-20 13:36:35 -07:00
Mark Rushakoff ec1019b930 chore: add .editorconfig and enable in CI 2019-02-19 16:58:07 -08:00
Chris Goller 2e694241be
Merge pull request #11768 from bednar/scraper-backend
NewScraperBackend doesn't have associate UserService, UserResourceMappingService and LabelService
2019-02-19 18:57:09 -06:00
Chris Goller 81c55e8da8
Merge pull request #11962 from zhulongcheng/docs-label
docs(http): fix typos
2019-02-19 18:46:13 -06:00
Chris Goller 813d684aeb
docs(http): add operation log endpoints (#11487)
Closes #11359
2019-02-19 18:36:41 -06: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
Palakp41 eb32636dda
Merge pull request #11986 from influxdata/fix/swagger-latest-completed
Update swagger to camel case the latest completed date
2019-02-19 13:24:23 -08:00
Alirie Gray 526c4cde07 Add get variable by ID route to swagger.yml 2019-02-19 13:04:05 -08:00
Palak Bhojani 0c24737b89 Update swagger to camel case the latest completed date 2019-02-19 12:34:01 -08:00
Mark Rushakoff abd6fee757 fix(task): use HTTP 404 for no results when listing runs, logs 2019-02-19 11:00:43 -08:00
Lyon Hill c7f60271fd
remove task owner from task struct (#11968)
* remove task owner from the payload

* clean user references in store and tests
2019-02-19 11:19:06 -07:00
zhulongcheng fdee94a9ed docs(http): add operation log endpoints 2019-02-19 10:28:37 +08:00
zhulongcheng 9a5aa2e7f8 docs(http): fix typos 2019-02-18 23:29:28 +08:00
Mark Rushakoff cbef811c63 refactor(task): remove explicit org from run/log lookup
Task ID is now a required value on run and log filters. It was
effectively required by all implementations before anyway, so now those
types reflect that requirement.

Organization ID was removed from those same fields. The TaskService
looks up the organization ID via the task in cases where we need it at a
lower layer.
2019-02-16 14:34:49 -08:00
Lyon Hill 48cc643992
Clean out user from the task store's (#11882)
* Clean out user from the task store's
2019-02-15 15:50:09 -07:00
Mark Rushakoff 0977a651df fix(task): create authorization when using token to create task 2019-02-15 12:11:55 -08:00
Michael Desa c5b9376c0b
feat(http): add method to create authz for task when using session 2019-02-15 13:04:47 -05:00
Alirie Gray 6073289ba8 Update return type for get/task route 2019-02-14 14:29:10 -08:00
Alirie Gray 5f524eb92d Rename all occurences of Macro to Variable 2019-02-14 13:21:57 -08:00
Mark Rushakoff caf08b5078 feat(task): store authorization ID with task
Accept token when creating or updating a task, but only report back the
authorization ID.

This means the executor and the platform adapter are now both aware of
an Authorization Service.
2019-02-14 08:53:40 -08:00
Alirie Gray cb5f9bac40 Add name, orgID, and arguments as required properties to Macro type 2019-02-13 16:54:12 -08:00
Alirie Gray f27a3713f5 Add orgID property to Macro (variable) type 2019-02-13 16:07:16 -08:00
Alirie Gray 34f251d62b
Merge pull request #11875 from influxdata/fix(swagger)/update-macro-type
Add values and language properties to QueryMacroProperties
2019-02-13 14:24:53 -08:00
Alirie Gray 58f833510c Add values and language properties to QueryMacroProperties 2019-02-13 13:36:01 -08:00
Mark Rushakoff 007f5059c7 refactor(task): extract TaskCreate struct
With the ongoing authorization work, creation arguments will differ from
what's returned on reads. More specifically, creation will accept a
token, but reads will report back a token ID.

This refactor facilitates that authorization work, and also brings the
code closer to the swagger definition, for the TaskCreateRequest type in
particular.
2019-02-12 15:10:03 -08:00
Alirie Gray 525f3ae3a2
Merge pull request #11838 from influxdata/fix(swagger)/macros-get-return-type
Change return type of get/macros to an array
2019-02-12 14:53:00 -08:00
Alirie Gray 9affdf9657 Change return type of get/macros to an array 2019-02-12 14:45:58 -08:00
Lyon Hill 6db627b76c
Update task http handler to use user resource mapping. (#11827)
* Update task http handler to use user resource mapping.
2019-02-12 15:37:46 -07:00
Lyon Hill 512af6e4b3
Add createdAt and updatedAt to tasks api (#11794)
fixes #11061
2019-02-12 11:06:23 -07:00
Iris Scholten 6029744a62 Add name to scraper target response in swagger 2019-02-11 16:05:49 -08:00
Nathaniel Cook 2877611a9d Merge branch 'master' into flux-staging 2019-02-11 13:44:37 -07:00
Christopher Wolff 698de51e67 refactor(query): update to reflect changes to windows 2019-02-08 08:39:52 -08:00
Jakub Bednar dd15213bd6 Associate UserService, UserResourceMappingService and LabelService to ScraperBackend. #11767 2019-02-08 08:38:31 +01:00
Michael Desa f271d0a580 test(http): add tests to ensure labels can be added to resources
Co-authored-by: Iris Scholten <ischolten.is@gmail.com>
2019-02-07 19:08:59 -05: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
Jonathan A. Sternberg e0e3a17ed9
Merge branch 'master' into flux-staging 2019-02-07 10:26:21 -06:00
Brandon Farmer 0f2b8487ee Remove validation of cur_swagger 2019-02-06 16:28:49 -08:00
Brandon Farmer 8150ccac61 Remove cur_swagger.yml 2019-02-06 16:24:42 -08:00
Brandon Farmer 7e22ffea5a Add complete list of links to sources swagger 2019-02-06 15:51:39 -08:00
Brandon Farmer bb8a724c6e Fix tasks response in swagger 2019-02-06 15:00:36 -08:00
Brandon Farmer 960f6882b7 Swagger fixes 2019-02-06 14:03:54 -08:00
Michael Desa 81734dcb00
Merge pull request #11722 from influxdata/revert/pr#10947
fix(influxdb): revert functionality added in pr#10947
2019-02-06 16:53:01 -05:00
Brandon Farmer 5e64b5ba71 Consolidate swagger documentation 2019-02-06 13:04:15 -08:00
Michael Desa 386c70ea0d fix(influxdb): revert functionality added in pr#10947 2019-02-06 15:54:09 -05:00
Michael Desa dbc241b728 fix(http): use urm without authz where appropriate 2019-02-06 14:24:21 -05:00
Leonardo Di Donato b60ac48f6c fix(http): task service should use new task backend also when testing user resource mappings
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-02-06 19:18:23 +01:00
Leonardo Di Donato e6bb9e6b97 feat(http): view backend for view http handler
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-02-06 19:18:23 +01:00
Leonardo Di Donato 24441cd2ad fix(http): scrapers members and owners 2019-02-06 19:18:23 +01: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 57dc6664f5 feat(http): construct flux handler by FluxBackend 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 df93adce9a feat(http): construct telegraf handler by TelegrafBackend 2019-02-06 19:18:23 +01:00
zhulongcheng 18f4825e4f feat(http): construct task handler by TaskBackend 2019-02-06 19:18:23 +01:00
zhulongcheng c95e8b14da feat(http): construct setup handler by SetupBackend 2019-02-06 19:18:23 +01:00
zhulongcheng 2c89ee715b feat(http): construct source handler by SourceBackend 2019-02-06 19:18:23 +01:00
zhulongcheng 5d8b1507f5 feat(http): construct scraper handler by ScraperBackend 2019-02-06 19:18:23 +01:00
zhulongcheng 385cca43b7 feat(http): construct authorization handler by AuthorizationBackend 2019-02-06 19:18:23 +01:00
zhulongcheng 639753ab45 feat(http): construct macro handler by MacroBackend 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 ef308ab9bd feat(http): construct org handler by OrgBackend 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 4dbfae4628 construct user handler by UserBackend 2019-02-06 19:18:23 +01:00
Brandon Farmer 3992fa9d54 Remove typescript client generation
- All api calls are now through the client or raw XMLHTTPRequest
2019-02-05 17:13:57 -08:00
Lorenzo Affetti ce00375298 refactor(query/stlib): move from implementation from Flux 2019-02-05 17:46:46 +01:00
Lyon Hill ab2a7265a4
Add user resource management to the task API (#11664)
* Add user resource management to the task API
step 1 and 2 of #11427
2019-02-05 08:26:26 -08:00
Chris Goller b8584b72ef
Merge pull request #11651 from zhulongcheng/http-simplify-code
chore(http): simplify code
2019-02-04 08:31:03 -06:00
zhulongcheng e024b13a2e fix(http): rename desc to descending 2019-02-02 15:11:06 +08:00
zhulongcheng 75d62b5fba chore(http): simplify code 2019-02-01 14:02:13 +08:00
Mark Rushakoff 3f0e40812e fix(http): return 404 when task or run is not found
For an operation that looks up a task or a run, when that operation
fails, only set the status to 404 if that operation explicitly returns
ErrTaskNotFound or ErrRunNotFound.

It's possible that the operation could fail for a reason other than the
ID being invalid: for example, if there was an IO error preventing the
lookup from succeeding.

Harden that behavior with tests for the task handler.

Closes #11589.
2019-01-25 15:44:09 -08:00
Kelvin Wang 4e7785d92c update(http): changes based on review 2019-01-25 10:31:25 -08:00
Kelvin Wang f99f4759fa fix(http): fix task errors 2019-01-25 10:31:24 -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 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
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
Kelvin Wang cc3eaf5e75 feat(http): add scraper target swagger 2019-01-11 11:03:42 -05:00
jlapacik 5266cba346
deps: updates for packages and imports (#10962) 2019-01-10 14:33:25 -08:00
Jade McGough 6b99b09e0b fix(http): add labels to view links responses 2019-01-10 11:41:17 -08:00
Deniz Kusefoglu bc46eb5698 trailing slashes and code review 2019-01-10 10:05:58 -08:00
Deniz Kusefoglu deb87aef05 Update curswagger and generate client with views nested under cells 2019-01-10 10:05:58 -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
Alex P d12e94bb01 feat(ui/labels): Add the ability to edit labels on a dashboard
Co-authored-by: Alex Paxton <thealexpaxton@gmail.com>
2019-01-09 17:41:19 -08:00
Palakp41 7875051ace
Merge pull request #2391 from influxdata/feat/remove-bucket-org
Add delete column and functionality to buckets list and row
2019-01-09 17:11:37 -08:00
Palak Bhojani beac010471 Add delete column and functionality to buckets list and row
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
2019-01-09 16:49:03 -08:00
Christopher Henn ddac3c796f Add support for windowPeriod macro variable
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
2019-01-09 15:31:21 -08:00
Michael Desa bcddb83a3c
Merge pull request #2112 from zhulongcheng/doc-rm-org
docs(http): remove unused org param from swagger
2019-01-09 17:06:53 -05:00
Michael Desa 81dcfee03e
Merge pull request #2163 from zhulongcheng/session-backend
initialize session handler by SessionBackend
2019-01-09 17:05:59 -05:00
Leonardo Di Donato 3d0a42cbbc fix(http): filtering telegraf configs only by organization ID
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-09 22:17:19 +01:00
Leonardo Di Donato 77574c559d feat(http): decode telegraf config filters and tests 2019-01-09 22:17:19 +01:00
Michael Desa 10429675b9 fix(http): remove fmt.Println from scraper service tests 2019-01-09 15:17:11 -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 7ea1db0079
Merge pull request #2250 from influxdata/fix/issue#2195
Nest views beneath dashboard cells
2019-01-09 09:30:39 -05:00
Iris Scholten 4f96333b52 feat(ui/labels): display labels in task row 2019-01-08 16:07:10 -08: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
alexpaxton 21c996383c
Display Labels in Dashboards Index (#2330)
* Update cur_swagger

Co-Authored-By: Iris Scholten <ischolten.is@gmail.com>

* Display labels in dashboards list

Co-Authored-By: Iris Scholten <ischolten.is@gmail.com>

* Add # to example label

Co-Authored-By: Iris Scholten <ischolten.is@gmail.com>

* Write test for dashboard TableRow component

Co-Authored-By: Iris Scholten <ischolten.is@gmail.com>

* Update snapshot and mock data

Co-Authored-By: Iris Scholten <ischolten.is@gmail.com>

* Increase page gutter and max width of centered pages

* Show description in dashboards list

* Update snapshot

* Fix linting error

* Remove snapshot check from unit test
2019-01-08 14:56:48 -08:00
Leonardo Di Donato 43c454e5ea chore(http): cleanup scraper tests
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-08 15:57:29 +01:00
Leonardo Di Donato e79be29224 chore(http): test update of scraper targets
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-08 15:57:29 +01:00
Leonardo Di Donato 4932f2aadd chore(http): test insertion and deletion of scraper targets
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-08 15:57:29 +01:00
Leonardo Di Donato 53cadf9260 chore(http): test scraper targets listing
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-08 15:57:29 +01:00
Leonardo Di Donato a79780e074 chore(http): test getting scraper target by id
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-08 15:57:29 +01:00
Nathaniel Cook e482c71e03 Merge branch 'master' into flux-staging 2019-01-07 14:25:22 -07:00
kelwang 5de0e2e8d2
Merge pull request #2236 from influxdata/fix_auth_status_update_error
fix(bolt): fix auth status update error
2019-01-07 13:37:02 -05:00
Adam fa35dea009 feat(query/functions/tests): end to end testing is configured to run against a live storage engine.
all tests use a unique bucket based on the test file name.  copied all tests over from flux repo

the tests are currently disabled due to engine consistency issues:  https://github.com/influxdata/flux/issues/613
2019-01-07 13:05:29 -05:00
Jade McGough 4ca3b83813
Merge pull request #2228 from influxdata/more-label-responses
add label responses to telegraf and buckets
2019-01-04 13:32:25 -08:00
Nathaniel Cook 4918b15f35 refactor(http/query): update http query logic for new parser API 2019-01-04 11:28:55 -07:00
Kelvin Wang f392f1bab0 fix(bolt): fix auth status update error 2019-01-04 12:21:34 -05:00
Jade McGough 6a2554d6db test json formatting 2019-01-03 16:46:47 -08:00
Andrew Watkins 6eca18fc4e
fix(ui/org-view): org view polish
* fix(ui/org-view): list actual tasks from api

* fix(ui/org-view): fix dashboard list not rendering

* fix(ui/org-view): fix bucket modal

* feat(dashboards): add updated at column
2019-01-03 16:18:14 -08:00
Jade McGough a80a86c6c2 chore(http): add labels to bucket tests 2019-01-03 16:10:16 -08:00
Palakp41 ac7e9df407
Merge pull request #2219 from influxdata/feat/org-members-role-column
Update MembersList to include role column
2019-01-03 16:09:49 -08:00
Jade McGough 815795261d feat(http): add labels to bucket responses 2019-01-03 16:02:02 -08:00
Jade McGough 910d310c20 feat(http): add labels to telegraf GET responses 2019-01-03 16:02:02 -08:00
Palak Bhojani 21eb3a26d8 Update MembersList to include role column 2019-01-03 14:39:49 -08:00
Jade McGough 7562c9a6d2
chore(http): make test diffs more readable (#2203)
* chore(http): make test diffs more readable

* fixes

* add back telegraf output spacing

* whitespace hell

* jsonEqual2 -> jsonEqual
2019-01-03 14:29:22 -08:00
Brandon Farmer 547a147d6b Make client generation optional via ENV variable 2019-01-03 11:33:23 -08:00
Kelvin Wang 739d12bc00 fix(http): convert source errors 2019-01-03 11:38:01 -05:00
Michael Desa c4c374a0b4
Merge pull request #2180 from influxdata/fix/issue#1918
Add support for get /api/v2/query
2019-01-03 10:43:55 -05:00
Michael Desa cf2ba751db feat(http): add support for get /api/v2/query 2019-01-02 14:36:16 -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
Jade McGough e666bef692 chore(http): remove debug statement 2019-01-01 23:38:42 -08:00
zhulongcheng 83529543ac initialize session handler by SessionBackend 2018-12-29 11:41:06 +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 4c60eacb58 chore(platform): cleanup, document, and use secret service
fix(http): add members/secrets/labels links on org response

fix(http:cmd/influxd): use secret service in api backend

fix(bolt): return empty list if there are no secrets for an org

chore(vault): add description of vault usage
2018-12-28 11:11:21 -05:00
Delmer efdb373868
Feat/manage labels (#2082)
feat(ui): add labels to org page
2018-12-27 13:19:07 -05:00
Chris Goller 96fb4a6072 fix(http): rename piging_test to paging_test 2018-12-27 09:48:20 -06:00
zhulongcheng f3bf670706 rename msg to message for platform.Error json 2018-12-27 10:34:00 +08:00
kelwang 364b56f4fa
Merge pull request #2130 from influxdata/convert_write_errors
fix(http): convert write endpoint error
2018-12-26 16:43:01 -05:00
Chris Goller eb48eb6317
Merge pull request #2142 from zhulongcheng/custom-404
fix(http): replace default-404 handler with custom-404 handler
2018-12-26 15:17:55 -06:00
Chris Goller 4f38c8cad9 feat(http): add accept parsing for telegraf 2018-12-26 12:23:59 -06:00
zhulongcheng 7ce8237d29 replace default-404 handler with custom-404 handler 2018-12-25 10:35:36 +08:00
zhulongcheng e73d4fc637 add MethodNotAllowed handler 2018-12-23 15:55:45 +08:00
Kelvin Wang ddaa602014 fix(http): convert write endpoint error 2018-12-21 20:19:30 -05:00
kelwang 94b7c3cea0
Merge pull request #2128 from influxdata/move_time_telegraf_service
fix(platform): remove creator and time
2018-12-21 20:13:35 -05:00
AJ Bond 941e7526c0 fix(http): Fix developer mode default
Developer mode is now passed to assets
closes #2050
2018-12-21 16:33:04 -05:00
Mark Rushakoff 0e41f240f2 feat(task): support forcing a run with arbitrary timestamp
Also rename RetryAlreadyQueuedError by running:

gorename -from '"github.com/influxdata/platform/task/backend".RetryAlreadyQueuedError' -to RequestStillQueuedError

and some further manual cleanup for comments.
2018-12-21 14:37:53 -05:00
Leonardo Di Donato e2169abb1f feat(http): swagger update for authorizations post method
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-12-21 19:23:12 +01:00
Leonardo Di Donato 09dca2ff29 fix(http): check for user before creating authorization 2018-12-21 19:23:12 +01:00
Leonardo Di Donato b8153e83d1 feat(http): test an authorization for non-existing user cannot be created 2018-12-21 19:23:12 +01:00
Kelvin Wang 003561148d fix(platform): remove creator and time 2018-12-21 11:05:55 -05:00
Chris Goller d4467949aa
Merge pull request #2109 from influxdata/feat/si-time-units
feat(models): only use common SI time units for timestamp precision
2018-12-21 09:22:14 -06:00
Chris Goller 38a3e94bed
Merge pull request #2108 from influxdata/feat/flux-http-query-parameters
fix(http): change /query to use org/orgID
2018-12-21 09:20:42 -06:00
Chris Goller edfb323472 fix(http): update task test to use :id
Fixes merge issue from #1562
2018-12-21 09:11:57 -06:00
Chris Goller a33f3ff672 fix(http): update test to use platform.Error 2018-12-21 08:58:16 -06:00
Chris Goller 31518b7022
Merge pull request #1562 from bednar/task_service
Fixed the task id path, Added RunController instance to pAdapter
2018-12-21 08:48:01 -06:00
Chris Goller 9c01be5377
Merge pull request #2110 from zhulongcheng/panic-handler
feat(http): add panic handler
2018-12-21 08:43:20 -06:00
Chris Goller 5297d1fee9 fix(http): remove typo in test name 2018-12-21 08:40:37 -06:00
Chris Goller 088cf6e98e
Merge pull request #2111 from zhulongcheng/fix-json-decode-500
fix(http): return http 400 if request data is invalid
2018-12-21 08:38:58 -06: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
Leonardo Di Donato 45febb597c feat(http): single source health endpoint
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-12-21 15:34:24 +01:00
Leonardo Di Donato af16a87f35 fix(http): swagger for sources/<id>/health
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-12-21 15:34:24 +01:00
zhulongcheng 518ea18410 remove unused org param from swagger 2018-12-21 20:11:31 +08:00
zhulongcheng a5ba07ae2c fix(http): return http 400 if request data is invalid 2018-12-21 18:44:18 +08:00
zhulongcheng 73a52bad6c add panic handler 2018-12-21 18:20:14 +08:00
Leonardo Di Donato e66db43f95 chore(http): simplify bucket test
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-12-21 09:56:23 +01:00
Leonardo Di Donato cc075a19d3 feat(http): session service with platform errors 2018-12-21 09:56:23 +01:00
Chris Goller 65bf4bb383 feat(models): only use common SI time units for timestamp precision
Closes #1959
2018-12-20 22:39:24 -06:00
Chris Goller e3a86bbd64 fix(http): change /query to use org/orgID
Fixes: #2106
2018-12-20 22:18:09 -06:00
Chris Goller 3e1294fd8a fix(http): health endpoint now returns pass 2018-12-20 21:53:54 -06:00
Chris Goller 532a3b7294
Merge pull request #2015 from zhulongcheng/trace-span
docs(http): add OpenTracing span
2018-12-20 20:46:10 -06:00
Brandon Farmer ff0d2110ba
Merge pull request #2091 from influxdata/chore/generation-add-typescript-task
Add back typescript client generation task
2018-12-20 15:09:35 -08:00
Brandon Farmer 03598b8397 No longer need to convert yaml to json to generate client 2018-12-20 14:59:24 -08:00
Jade McGough 3ee90eefc2
Merge pull request #2085 from influxdata/label-properties
Label properties
2018-12-20 14:16:51 -08:00
Michael Desa ce88906188 fix(platform): make onboarding token "<user name>'s token" 2018-12-20 16:46:21 -05:00
Jade McGough 0532d0327e update swagger 2018-12-20 13:42:12 -08:00
Michael Desa dc4c2cae35 fix(http): update swagger doc for /api/v2/ response
Alphabetize the links so that additions and verifications are easier.
2018-12-20 16:25:53 -05:00
Jade McGough 39e84260a0 add property update clarification in swagger 2018-12-20 12:56:18 -08:00
Jade McGough 1a10ae701a remove colors from labels 2018-12-20 12:18:03 -08:00
Michael Desa b0f13f2857
Merge pull request #2073 from influxdata/fix/issue#1904
remove multiple calls to w.WriteHeader in http handlers
2018-12-20 14:53:04 -05:00
Nathaniel Cook b99ede0b76 chore(Makefile): fix issue with go run not having modules enabled 2018-12-20 12:47:00 -07:00
Michael Desa 885b65e55c feat(http): add error logger for http server errors 2018-12-20 13:21:28 -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
Michael Desa a941e881c6 fix(http): use platform.Error instead of old style error 2018-12-20 11:11:09 -05:00
zhulongcheng 03c4ef1898 add TraceSpan param to swagger 2018-12-20 23:43:51 +08:00
Kelvin Wang f1c562f848 fix(http): view errors endpoint conversion 2018-12-19 16:54:48 -05:00
Nathaniel Cook d6c0a393b0 Merge branch 'master' into flux-staging 2018-12-19 11:30:55 -07:00
Jade McGough 53f27c5566 fix swagger indentation 2018-12-18 16:15:35 -08:00
Jade McGough 121588bf8a chore(http): add missing labels documentation 2018-12-18 14:49:22 -08:00
Christopher M. Wolff 86b10a75c9
fix(http): make query service look for platform.Error in response (#2027) 2018-12-18 13:37:25 -08:00
Nathaniel Cook 61e36cbee6 chore(Makefile): add target to check generated files are accurate
A standard Makefile is used now in all subdirs that run go generate.
Make will only generate the file if its source files changed.
The checkgenerate target runs clean to ensure all targets a generated
fresh.
2018-12-18 12:54:17 -07:00
Nathaniel Cook b40a67efc7 chore(http): remove plan specs from swagger 2018-12-18 12:45:30 -07:00
Nathaniel Cook f4dfda705a fix(http): remove /api/v2/query/plan
BREAKING CHANGE: The API endpoint exposed internal details about the implementation of
the logical and physical plans. Those data structures need to be free to
change without breaking the API. For now since the endpoint is unused it
is being removed. A similar API may be added back in that correctly
abstracts away the internal details of plans.
2018-12-18 12:17:34 -07:00
Nathaniel Cook 98a6a0351d Merge branch 'master' into flux-staging 2018-12-18 11:20:17 -07:00
Alirie Gray d9e9b1fd85
Merge pull request #2007 from influxdata/fix/authorizations-response
Match shape of get/authorizations to backend response
2018-12-18 10:06:28 -08:00
Jade McGough 77ce7d6a4b
Merge pull request #2012 from influxdata/update-labels
add labels update endpoint and label colors
2018-12-18 09:48:16 -08:00
Jade McGough 7eb69049c5 use new errors library in label http handlers 2018-12-18 09:14:59 -08:00
Michael Desa 9501a547f1 feat(http): add /query/analyze endpoint to analyze queries
review(http): add suggestions from pr review

doc(http): update swage description of analyze endpoint

fix(http): remove authorization header from query analyze endpoint
2018-12-18 11:23:59 -05: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 9e4367176f update swagger 2018-12-18 03:27:27 -08:00
Jade McGough 786af8154e add patch label endpoints 2018-12-18 01:45:49 -08:00
Jade McGough 3bf4db0d5d add http handler for label PATCH 2018-12-18 01:38: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