Commit Graph

749 Commits (bdb108d67e8be93fce0c7d616e7fcb85bd4bf26e)

Author SHA1 Message Date
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
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