Commit Graph

1202 Commits (d43bfaab7ddae86dbb72cf874bc1d589e73f4dd9)

Author SHA1 Message Date
Christopher Henn 00b61c948b Implement macros API 2018-09-14 13:45:42 -07:00
Nathaniel Cook d65a864ec5 fix: Update REPL to use HTTP API 2018-09-14 14:03:35 -06:00
Chris Goller 29a1eb4714 test(http): add client tests for auth and bucket 2018-09-14 13:18:02 -05:00
Jade McGough 0b70dc99c4
don't store references to internal buckets (#789)
* add types to bucket service tests

* add type to bucket cmd interface

* bucket type needs to be defined in json for POST creations

* rip out bucket type stuff

* remove type from bucket tests

* add InternalBucketID helper fn

* remove more code

* remove org from internal bucket ID
2018-09-14 09:26:59 -07:00
Chris Goller 9673a425ec feat(http): add flux AST and Spec endpoints to fluxd 2018-09-13 23:01:07 -05:00
Chris Goller 65fa08abca test(http): add flux query service test 2018-09-13 15:26:36 -05:00
Chris Goller 052c896fa4 feat(http): add flux query service client 2018-09-13 13:21:19 -05:00
Chris Goller 310a64fc97 feat(http): use proxy request in flux service 2018-09-13 13:00:27 -05:00
Chris Goller 02ac64fc35 test(http): add test for querying flux service 2018-09-13 11:56:49 -05:00
Chris Goller 61d60a3c61 feat(http): update /v2/query client to send query.Request with auth 2018-09-13 10:39:08 -05:00
Nathaniel Cook 1786402d48 Merged pull request #822 from influxdata/nc-remove-platform
chore: Updates to be able to remove platform as a dependency of Flux
2018-09-12 10:31:25 -06:00
Nathaniel Cook 672e2d5fe7 chore: Updates to be able to remove platform as a dependency of Flux 2018-09-12 10:18:54 -06:00
Michael Desa 6d083fb8e3 feat(http): add links to auth service response structures 2018-09-12 11:44:44 -04:00
Gianluca Arbezzano d117803e8c
Merge pull request #812 from influxdata/feature/790
Add org as a query param to bucket
2018-09-11 16:59:20 +02:00
Gianluca Arbezzano 12c24080b4
Add org as a query param to bucket
Fixed #790

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2018-09-11 15:24:23 +02:00
Gianluca Arbezzano 0c862f71a1
Add links to orgs http handler
Fixed #795

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2018-09-11 14:55:29 +02:00
Michael Desa 50dad74429
Merge pull request #788 from influxdata/doc/api
Fill out swagger documentation to be the expected state of the API
2018-09-10 16:08:42 -04:00
Michael Desa d6098882f9 feat(http): add links to bucket service response structures 2018-09-10 15:26:08 -04:00
Michael Desa f437888ee2 doc(http): add macro (template variable) swagger documentation
Co-authored-by: Chris Goller <goller@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-09-06 18:13:36 -04:00
Michael Desa 2c82b18800 doc(http): add links to resources
Co-authored-by: Chris Goller <goller@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-09-06 16:13:53 -04:00
Michael Desa e2d5ac1637 doc(http): nest users under org and misc. cleanup
Co-authored-by: Chris Goller <goller@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-09-06 16:13:53 -04:00
Michael Desa 23b468d948 doc(http): add org query param to required resource routes
Co-authored-by: Chris Goller <goller@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-09-06 16:13:53 -04:00
Michael Desa ec1b4219cb doc(http): remove ping endpoint from swagger
Co-authored-by: Chris Goller <goller@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-09-06 16:13:53 -04:00
Stuart Carnie ac75af2f58 refactor: Migrate query package to influxdata/flux repository 2018-09-06 11:13:48 -07:00
Chris Goller b48fad0c4e
Merge pull request #771 from influxdata/feature/query
feat(http): add flux endpoint /v2/query influx
2018-09-06 11:27:54 -05:00
Jade McGough cd30e5a820
add internal system buckets for orgs (#652)
feat(bolt): add internal system buckets for orgs
2018-09-06 09:19:58 -07:00
Michael Desa 330f76c331 feat(http/influxdb): add csv dialect support to json response 2018-09-06 09:56:16 -04:00
Jade McGough 43e0d143e7
chore(http): return early if a critical error occurs in write path org/bucket lookup (#767) 2018-09-05 15:53:57 -07:00
Chris Goller 6307531df0 feat(http): add checks for nil compiler 2018-09-05 09:33:10 -05:00
Chris Goller cb1de24097 feat(http) add top-level links and health 2018-09-04 17:28:59 -05:00
Chris Goller 37bd273acd feat(http): add flux endpoint /v2/query influx 2018-09-04 16:08:00 -05:00
Mark Rushakoff d4753e2ed6 chore(platform): remove Last Run field from Task
Closes #626.
2018-08-30 11:02:17 -07:00
Chris Goller acddea49a8 fix(http): remove swagger typos 2018-08-30 11:24:55 -05:00
Mark Rushakoff eb24f2d780 fix(http): fix compile error from outdated merge 2018-08-30 09:16:07 -07:00
Jade McGough b39ba889e4
feat(http): add write path (#682)
feat(http): Add write path with embedded NATS streaming server
2018-08-29 16:15:39 -07:00
Chris Goller 4c42d40ca9 docs(http): authorization status is now active or inactive 2018-08-29 13:07:39 -05:00
Chris Goller 40e56333e1 refactor(http): update authorization to use active/inactive status 2018-08-29 13:07:39 -05:00
Chris Goller 8fa72fa35b feat(auth): allow authorizations to be enabled/disabled 2018-08-29 13:07:38 -05:00
Michael Desa 45233d939a feat(platform): add uniform query endpoint for sources
Using query request struct to query resources

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Use query.ProxyRequest instead query.Request

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Proxy request from idpd

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Comments about the desired results

Signed-off-by: Lorenzo Fontana <lo@linux.com>

V1 endpoints working with flux

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Influxql working for v1

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

V2 influxql query endpoint working

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>
Signed-off-by: Lorenzo Fontana <lo@linux.com>

V2 Flux compiler support

Co-authored-by: Michael De Sa <mjdesa@gmail.com>
Signed-off-by: Lorenzo Fontana <lo@linux.com>

Improve comments in bolt sources and give error on self

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

Review tests failing

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

Avoid type casts for compiler types

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

Using nil instead of dbrp mapping service for influxql v1

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Check if compiler types are valid for influxql

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Organization as query param in the flux external handler

Signed-off-by: Lorenzo Fontana <lo@linux.com>

feat(http): update swagger documentation for flux query endpoint

feat(http): document query endpoint design

The code documented does not currently work. It is indended that this
will be implemented in follow up PRs.

feat(platform): move source to platform package

The source Query endpoint implements what's in the query swagger docs

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

feat(platform): allow for encoding and decoding of csv dialects

feat(platform): specify dialect in flux page

Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-28 15:53:20 -04:00
Chris Goller bb7d80e7bd
Merge pull request #692 from influxdata/feature/write-swagger
docs(http): add write endpoint documentation
2018-08-27 16:25:09 -07:00
Chris Goller 878ca0f95b docs(http): add further description for 401 on /write 2018-08-27 18:21:31 -05:00
Chris Goller eb443cad53 docs(http): remove outside of retention duration 2018-08-27 18:01:22 -05:00
Chris Goller 6b6aad3478 docs(http): add org parameter to writes 2018-08-27 11:58:14 -05:00
Chris Goller 42f6b278e4 docs(http): add 422 response for writes where points outside of RP 2018-08-26 12:54:12 -05:00
Chris Goller 957e3f72ae docs(http): remove minutes and hours from precision on write 2018-08-26 10:23:34 -05:00
Chris Goller 48107600f2 docs(http): fix swagger formatting for /write route 2018-08-26 10:20:58 -05:00
Chris Goller 4fd19c0054 docs(http): add content-type, content-length, and accept to /write 2018-08-26 10:18:05 -05:00
Chris Goller c85517fcdf docs(http): fix header in write to be content-encoding 2018-08-26 10:01:30 -05:00
Chris Goller 52e71f9592 docs(http): add identity support in Accept-Encoding for write 2018-08-26 09:54:09 -05:00
Chris Goller 0da3fa9122 docs(http): document write over quota response 2018-08-26 09:49:54 -05:00
Chris Goller d4c95ccc5f docs(http): update database to bucket 2018-08-26 09:42:21 -05:00
Chris Goller 54999f3207 docs(http): add disabled boolean for authorization tokens 2018-08-24 14:20:19 -07:00
Chris Goller 2f23bc4045
Merge branch 'master' into feature/write-swagger 2018-08-24 10:33:13 -07:00
Chris Goller 83cf2ace19 docs(http): add write endpoint documentation 2018-08-24 10:26:40 -07:00
Michael Desa 8bc2d33b78 feat(platform): move chronogaf v2 dashboards to platform
test(testing): add tests for dashboards and cells

test(bolt): all conformance tests for dashbaords and cells

fix(bolt): rename dashboardV2Bucket to dashboardBucket

feat(chronograf): introduce v2 dashboards

Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

chore(chronograf): add tests for v2 dashboard reducer

Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

chore(chronograf): create dashboard from dashboard index

Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

chore(chronograf): move tests to same level of heirarchy as file tested

chronograf(chore): implement import dashboard with v2 api

chore(chronograf): delete dashboards from v2 api

chore(chronograf): add source health handler

chore(chronograf): move sources reducer to sources dir

chore(chronograf): remove stutter in notify

WIP stop namespacing by sourceID

chore(chronograf): no longer namespace routes under sources/:sourceID

WIP move dashtimeV1 to ranges

WIP remove CEO

chrore(chronograf): WIP Remove CEO and QueryMaker

chore(chronograf): introduce updateDashboard v2

chore(chronograf): Change cell to view

A dashboard's cell object now only contains positional information
for the cell in it's grid and a reference to the cell's view data.
A cell's view contains all necessary information for the cell's
visualization.

Add react-grid-layout types

chore(chronograf): introduce add cell

chore(chronograf): fix type errors

Not on DashboardPage

feat(platform): add cell methods to dashboard service interface

feat(mock): update dashboard service with cell methods

feat(testing): add cell methods to testing package

feat(bolt): add dashboard cell methods to bolt dashbaord service

feat(http): add cell routes to dashbaord handler

feat(platform): add dependent create/destroy of views from cells

chore(chronograf): introduce update dashboard cells endpoint

WIP update cells FE

fix(http): rename Cells to cells on dashboard cells response

chore(chronograf): re-introduce dashboard cell dragging

feat(platform): add copy dashboard cell to dashboard service

chore(platform): rename cell to view across codebase

feat(bolt): add replace dashboard tests

Move Layouts to Cells

Introduce delete cell

Fix broken test

fix(platform): update route for copying a a dashboard cell

UI for delete cell

Introduce copy cell

feat(platform): add copy view options to AddDashboardCell

feat(bolt): delete views when dashboard is removed.

Cleanup

Fix type errors

Fix links not updating

Remove annotations from RefreshingGraph

Sources and types work

fix(platform): add TODO.go files back

fix(view): rename visualizationType to type in view JSON

Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

fix(dashboardTime): change dashboardID to string

Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>

feat(http): add dashboard api to swagger documentation

review(http): fix comments and function naming

feat(http): update sources swagger documentation

review(http): update the swagger to reflect the implementation

feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-24 13:22:58 -04:00
Jade McGough a1734f3d35 refactor(http): update task log structure in swagger 2018-08-23 15:58:46 -07:00
Lyon Hill f718b9cdca
feat(task): create validation layer for TaskService (#591)
* feat(task): create validation layer for TaskService
2018-08-20 15:15:04 -06:00
Nathaniel Cook 0654b3cc81 Merged pull request #649 from influxdata/nc-log-traces
feat: Add zap opentracing.Tracer
2018-08-16 14:37:16 -06:00
Nathaniel Cook f6923881f7 feat: Add zap opentracing.Tracer
Propogate opentracing spans through HTTP requests.
Use zap logger to log each span as it is finished.
2018-08-16 14:32:04 -06:00
docmerlin (j. Emrys Landivar) c113e70605 task swagger name -> readOnly 2018-08-15 18:13:38 -05:00
Jade McGough 70ccb78c5d chore(task): update run schema 2018-08-14 13:33:05 -07:00
Michael Desa 7b10d5e844
Merge pull request #536 from influxdata/feature/query-v1-sources
Support flux page in platform
2018-08-10 10:24:25 -04:00
Iris Scholten f1137b9b24 feat(http): support posting queries as a json body
Co-authored-by: Chris Goller <goller@gmail.com>
2018-08-09 17:08:25 -07:00
Michael Desa 5aad8ceb9e review(platform): update PR as suggested in review 2018-08-09 15:37:23 -04:00
Nathaniel Cook 5bde0b5be6 fix: Update query services to use Request type
Moves idpe.QueryService into platform/query.ProxyQueryService
Splits the Request into ProxyRequest and Request.

Changes query.QueryService and query.AsyncQueryService to use a Request
type. This means that the Compiler interface is consumed by the service
to abstract out transpilation vs Flux compilation vs raw spec.

The transpiler handler is removed.

There are separate http handlers and service implementations for each of
the three query services.

Query logging types are moved into platform.

The ResultIterator now expects Cancel to always be called.

The fluxd binary exposes the query endpoint specified in the swagger
file.
2018-08-08 15:31:35 -06:00
Andrew Watkins 5568298297 chore(chronograf): fix rebase onto master 2018-08-08 10:48:44 -07:00
Michael Desa 30fc5282f6 feat(http): add status feed to platform links 2018-08-08 09:38:27 -07:00
Michael Desa 3b400952d9 fix(http): get time series data properly 2018-08-08 09:37:37 -07:00
Michael Desa fc382defb8 add retention policy name to bucket 2018-08-08 09:37:37 -07:00
Michael Desa ffe645d6e2 feat(platform): support flux queries for 1x sources 2018-08-08 09:37:37 -07:00
Michael Desa abc20e5e05 feat(platform): add chronograf language server to platform binary
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-08 09:37:37 -07:00
Michael Desa e954a8063d feat(platform): add ability to query sources
Currently all  that is supported is v1 sources. This code will likely
need revisiting.

Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-08 09:32:44 -07:00
Lyon Hill 212210eaec make necessary changes 2018-08-07 16:51:33 -06:00
Lyon Hill 02d1b6507b feat(task): connect the api to tasks
We need a coordination layer to facilitate the communication in the api to the task service.
The api was also not connected in main to the http service.
2018-08-07 15:53:17 -06:00
Michael Desa 707283b478 fix(http/influxdb): use dot as delimiter in dbrp 2018-08-07 10:45:14 -04:00
Michael Desa 0a4196b504 feat(http/influxdb): add http bucket service for oss influxdb
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-07 10:45:14 -04:00
Michael Desa 840044f58c feat(http/influxdb): add influxdb client for oss sources
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-07 10:45:14 -04:00
Michael Desa 1b0ad7128b feat(http/influxdb): add stubbed out v1 influxdb bucket service
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-07 10:45:14 -04:00
Michael Desa af62beb75b feat(http): add get sources buckets route
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-07 10:45:13 -04:00
Michael Desa 472154504c feat(http): allow for v2 paths in serve http
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-07 10:45:13 -04:00
Michael Desa add2eafc86 feat(http): add source http handler for source crud
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-07 10:45:13 -04:00
Mark Rushakoff faf5408a7b fix(http): increase errorHeaderMaxLength
The limit was introduced in 510325ea5c but
it didn't specify why 64 was chosen.

According to https://stackoverflow.com/a/6160643, we should be able to
assume at least 8kb of space for HTTP headers, so I'm assuming 256 bytes
should be sufficient to avoid truncating most error messages, without
being likely to hit the total HTTP header limit.

Fixes #530.
2018-08-01 16:04:36 -07:00
Michael Desa 8c87c9d132 revert #442 2018-08-01 14:54:32 -04:00
Leonardo Di Donato 3191de776d Refactoring code using platform.IDs
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-08-01 18:20:59 +02:00
Leonardo Di Donato 711d4a3f33 Refactoring main package 2018-08-01 18:20:59 +02:00
Leonardo Di Donato c59e4e8a50 Refactoring http package 2018-08-01 18:20:59 +02:00
Jonathan A. Sternberg 97a636ae8e fix(http): only log an error and reference code if it exists
We should not log fields that don't exist since it clutters up the logs.
2018-08-01 09:47:58 -05:00
Nathaniel Cook ef9c26391c feat: add errors to http logging 2018-07-31 14:34:55 -06:00
Nathaniel Cook 1ef9de6aed feat: Add optional http logging to handler 2018-07-30 16:16:37 -06:00
Iris Scholten ec920cbc44
Merge pull request #471 from influxdata/feature/ping
feat(http): Add /ping endpoint to fluxd
2018-07-25 15:06:51 -07:00
Iris Scholten f70a4553bf feat(http): Add /ping endpoint to fluxd
Co-authored-by: Chris Goller <goller@gmail.com>
Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
2018-07-25 12:21:59 -07:00
Andrew Watkins 93ca5c9f76 chore(chronograf): Get Chronograf to "work" as in 1.6.x (w/o Kapacitor)
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-07-24 15:13:08 -07:00
Michael Desa cfe907e8f5 feat(chronograf): all chronograf api handler to platform 2018-07-24 15:55:49 -04:00
Michael Desa 390a12bf21 fix(http): fix chronograf build asset paths 2018-07-24 14:25:06 -04:00
Michael Desa 7340b60840 feat(http): create asset handler for serving chronograf assets
Co-authored-by: Michael Desa <mjdesa@gmail.com>
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
2018-07-24 14:13:47 -04:00
Nathaniel Cook d568d7fd01 feat: Use DBRPMappings in 1.x read path 2018-07-18 09:46:57 -06:00
Nathaniel Cook 2fe60c3ce2 fix: Defer writing HTTP headers in query service
This makes it so we can encode errors in HTTP headers so long as the
encoder did not write anything.

This also changes the behavior to encode the stats trailer even in the
event of an error.
2018-07-17 13:43:20 -06:00
Nathaniel Cook 85b7d36147 feat: Add query statistics
Introduces the Statisticser interface which ResultIterators may
implement.

The HTTP implementation uses HTTP trailers to preserve the statistics.
This way we do not need to have all encoders and decoders support
statistics.
2018-07-17 09:16:27 -06:00
Mark Rushakoff a1bf6856fc chore(http): integrate with prom.Registry 2018-07-11 16:54:23 -07:00
Nathaniel Cook b63394da0a fix(errors): Update Fluxd errors
This PR also completes some TODOs about kit/errors and http/errors.
2018-06-28 16:56:35 -06:00
Nathaniel Cook 83282276ae Merged pull request #183 from influxdata/nc-http-status
fix(http): Fix status class when WriteHeader was not called
2018-06-28 16:22:12 -06:00
Nathaniel Cook 541a7561de fix(http): Fix status class when WriteHeader was not called 2018-06-28 13:13:32 -06:00
Jonathan A. Sternberg d62b9d3b28
Merge pull request #119 from influxdata/js-transpiler-options
feat(query/influxql): expose default database and retention policy for transpiler
2018-06-27 12:29:55 -05:00
Nathaniel Cook f128074458 feat(query): Change Encode interface to return bytes written 2018-06-27 10:31:04 -06:00
Jonathan A. Sternberg 2388d95949 feat(query/influxql): expose default database and retention policy for transpiler
The influxql transpiler can now be configured with a default database
and retention policy.
2018-06-27 10:23:37 -05:00
Jade McGough a88765bf95 feat(platform/task): add organization to tasks 2018-06-26 14:52:01 -07:00
Chris Goller 99e069f5be
Merge pull request #156 from influxdata/feature/flux-swagger
Feature/flux swagger
2018-06-25 10:12:24 -05:00
Jade McGough c5f829591b fix(http): prevent creation of nameless organizations 2018-06-22 11:18:17 -07:00
Chris Goller 448a6cb8a3 feat(http): specify empty array as default annotations 2018-06-21 16:06:24 -05:00
Chris Goller b2916c1f3f feat(http): add lengths and default values to dialect 2018-06-21 16:05:56 -05:00
Chris Goller 8434ee7a38 feat(http): add default response to flux query 2018-06-21 16:05:05 -05:00
Chris Goller ee523a5e6d feat(http): add swagger documentation for flux queries 2018-06-20 13:45:37 -05:00
Chris Goller ae1b03eeb9 feat(http): fix typos in query definition 2018-06-19 20:33:17 -05:00
Chris Goller 34c67c11f7 feat(http): add swagger definitions for influxql query 2018-06-19 20:33:17 -05:00
Jade McGough fe17091251 feat(http): add authorizations to swagger 2018-06-19 14:59:08 -07:00
Jonathan A. Sternberg 6aa578c7f7
Merge pull request #31 from influxdata/js-transpiler-ping
feat(http): add a /ping endpoint to the transpiler
2018-06-19 15:47:04 -05:00
Jade McGough a0dca5de04 feat(http): add owners to swagger 2018-06-18 09:38:37 -07:00
Jade McGough c0018b31f0 feat(http): move run id to path for logs 2018-06-14 17:06:44 -07:00
Jade McGough 44df62891c fix(http): use task id from path, not params
Squashed commit - includes fixes for comments on PR.
2018-06-14 17:05:41 -07:00
Jade McGough d756083890 feat(http): add endpoints for runs and logs 2018-06-14 17:05:32 -07:00
Jade McGough e68b635402 feat(http): add single task http handlers 2018-06-14 16:56:27 -07:00
Jade McGough 057161bdc0 feat(http): add http service for tasks 2018-06-14 16:56:27 -07:00
Jonathan A. Sternberg 2af6c3dadf feat(http): add a /ping endpoint to the transpiler
This will match the /ping endpoint from the influxdb 1.x httpd service.
This endpoint is used by many of the clients that use the query service
and it will also be helpful for testing that the transpiler service is
up and working.

In the future, we will add the appropriate health endpoint that is
standard for 2.0. But, for the best compatibility, we have to return
something viable for 1.x clients.
2018-06-12 16:01:51 -05:00
Nathaniel Cook 54a81a0c51 Merged pull request #113 from influxdata/nc-ifql-flux
chore(ifql): Rename IFQL to Flux
2018-06-11 15:19:42 -06:00
Jonathan A. Sternberg e63498e217 fix(http): use a duration literal for the server's shutdown timeout
This follows the logging style guide more correctly.
2018-06-11 12:39:06 -05:00
Nathaniel Cook d1ca38c71f chore(ifql): Rename IFQL to Flux 2018-06-11 09:26:10 -06:00
Kelvin Wang 22a63de92a fix(http): fix auth header 2018-06-04 15:26:50 -07:00
Michael Desa d0a2f84c07 feat(platform): add dashboards service
feat(platform): add dashboard service interface and associated types

feat(bolt): add bolt implementation ofplatform dashboard service

feat(http): add dashboard http handler and http implementation dashboard service

feat(cmd/idpd): use bolt dashboard service in idpd

test(testing): add conformance test for dashboard service

test(bolt): ensure conforms dashboard service conforms to tests

fix(platform): rename DashboardContents to DashboardCellContents in test

fix(bolt): correct mispelled comments
2018-06-04 08:26:19 -07:00
Nathaniel Cook 555ec3e5ae fix(http/transpiler): OrgID was being dropped 2018-05-30 13:57:56 -06:00
Jade McGough 6e7a1296a2
feat(http): add swagger docs for tasks 2018-05-29 16:25:27 -07:00
Jonathan A. Sternberg bde1a71bab fix(http): remove the orgID parameter from the transpiler handler
The /query endpoint didn't have an orgID parameter so we can't have one
in the transpiler endpoint. This removes the parameter and replaces it
with a command line parameter that sets which organization we are using
for querying ifql.
2018-05-29 11:01:46 -05:00
Jonathan A. Sternberg 911f053dd6 fix(http): keep the http response body open until the result has been read
This modifies the `MultiResultDecoder` interface to accept an
`io.ReadCloser` so the `ResultIterator` can close the `io.Reader`
instead of doing it through a defer call. It then makes it so the
`Cancel()` method will close the reader or the reader will be
automatically closed when `More()` returns false.
2018-05-25 15:03:52 -05:00
Nathaniel Cook 99f4e4a8b4 fix(query/csv): Encode result iterator errors
This change also adds Name() to the Result interface to allow for
correct MultiResultEncoding.
2018-05-24 16:38:50 -06:00
Jonathan A. Sternberg e18879370b feat(http): perform error handling in the transpiler and the query service
The query service now handles some errors (not all) from the ifqld
service. This way, the transpiler, which uses the query service, can
report when it encounters an error from ifqld.

The transpiler will now correctly return errors in the JSON response.
2018-05-24 17:14:16 -05:00
Jonathan A. Sternberg a7d5a89844
Merge pull request #36 from influxdata/js-http-error-handling
feat(http): add a utility function for reading http errors
2018-05-23 13:42:07 -05:00
Jonathan A. Sternberg 48ece5136f feat(http): add a utility function for reading http errors
This also modifies the http error encoder to not include the reference
code in the `X-Influx-Error` message so it only includes the text.
2018-05-23 13:29:48 -05:00
Jonathan A. Sternberg eb83898c73 feat(cmd/transpilerd): follow the logging style guide for transpilerd
Introduce logging into the http server implementation for when the
server is shutting down and reporting when we receive a signal for a
hard shutdown.
2018-05-23 12:06:09 -05:00
Jonathan A. Sternberg 0cc2440c1f
Merge pull request #30 from influxdata/js-transpiler-shutdown
feat(cmd/transpilerd): update transpilerd to use http server package
2018-05-23 12:05:54 -05:00
Michael Desa 09b2bf2b71
Merge pull request #18 from influxdata/md-misc-fixes
[WIP] Use correct query param and update authorization tests
2018-05-23 10:47:02 -04:00
Jonathan A. Sternberg d8e4f4f2e0 feat(cmd/transpilerd): update transpilerd to use http server package
The http package now contains a server that handles signals and proper
shutdown procedure. It has now been updated to use it.

The http package has also added a `ListenAndServe` convenience function
that is similar to the `net/http` one, but also takes in a logger and
will automatically use the most common signals when running an http
server.
2018-05-23 09:27:17 -05:00
Jonathan A. Sternberg 68ee1acd89 feat(http): add common code for running an http server
It handles graceful termination by listening to signals which will be
particularly useful for commands where the sole purpose is to run an
http server.
2018-05-23 08:51:13 -05:00
j. Emrys Landivar (docmerlin) 85c13d5f12 enable vet 2018-05-22 17:05:17 -05:00
Michael Desa d907373d03 fix(http): use name query parameter instead of org in org routes 2018-05-22 13:50:34 -04:00
Jonathan A. Sternberg 71986589fa migrate(cmd/transpilerd): migrate the transpiler and its http handler to platform 2018-05-22 11:13:30 -05:00
Nathaniel Cook affc7e3976 move types around to avoid cyclic imports 2018-05-21 17:02:42 -06:00
Nathaniel Cook 20345b8701 rewrite imports 2018-05-21 15:20:06 -06:00
Michael Desa f654b59662 feat(platform): add boltdb implementation of services
feat(platform): add id to authorization

feat(platform): add user arg to CreateAuthorization method on auth svc

migrate(platform): move idp command to platform directory

This comit did not move the ifql command as it depends on the query
service which has yet to be migrated.

feat(platform): add optional user name to authorization struct

feat(platform): add organization name to bucket struct

Additionally allow filtering buckets by organization name.

feat(prom): ensure that prom auth svc implement base interface

feat(prometheus): add user to create authorization method

feat(prom): drop user string from create authorization

feat(zap): ensure that zap auth svc implements base service interface

feat(zap): add user to create authorization method

feat(zap): drop user string from create authorization

feat(http): add ids to authorization service

feat(http): ensure that http authoriztaion service implements auth svc interface

feat(http): use authorization ids in authorization handler

squash(http): add check for http status accepted in authorization service

feat(http): clean up authorization service and handlers

feat(http): drop user string from create authorization

fix(http): normalize the http authorization service

feat(http): normalize bucket service and handler methods

Additonally, we added support for DELETE bucket

feat(http): add delete user handler

Additionally, there was a bit of general cleanup

feat(http): add delete route for organization handler and service

Did a bit of additional cleanup of the http code.

test(testing): add service conformance tests

test(testing): add organization service conformance tests

test(testing): add conformance test for orgs service

Additionally, there was a bit of cleanup in the users service tests

test(testing): add conformance test for authorizations service

test(testing): update auth tests to validate that user exists

test(testing): update authorization conformance tests with user name

test(testing): update bucket conformance tests to include organizations

feat(bolt): add bolt implementation services

feat(bolt): add bolt implementation of organization service

feat(bolt): add bolt implementation of users service

feat(bolt): add bolt implementation of authorization service

feat(bolt): add user to create authorization method

feat(bolt): drop user string from create authorization

fix(bolt): set user name on authorization after put

feat(bolt): update bucket servie to include organizations

feat(bolt): add dependent destroy of resources

feat(cmd/idpd): use bolt services in platform server

feat(cmd/idpd): use bolt organization service in platform server

feat(cmd/idpd): use bolt users service in plaform server

feat(cmd/idpd): use bolt client as authorization service

feat(cmd/idp): show user name in output of auth sub command

feat(cmd/idp): clean up bucket subcommand of idp command

fix(cmd/idp): normalize idp command output for users

fix(cmd/idp): normalize auth subcommand output

feat(cmd/idp): add support for delete organiztion command

migrate(idp): move ifql subcommand of idp to platform
2018-05-21 10:08:22 -04:00
Nathaniel Cook c0b01f16f8 update transpiler and influxql encoders 2018-05-19 15:28:37 -06:00
Adam 64e3c840ea Relocated several source files from private repo to here. 2018-05-17 11:35:53 -04:00
Michael Desa 3c7ca65c61 fix(http): rename status_response_writer.go to status.go 2018-05-16 11:45:13 -04:00
Michael Desa 8801c288cd feat(http): add platform http handler 2018-05-15 17:22:42 -04:00
Michael Desa eabba6986d migrate(platform): move public dependencies into platform
migrate(context): move context package to platform

migrate(kit/errors): move errors package to platform

migrate(mock): move mock package to platform

migrate(prometheus): move prometheus package to platform

migrate(rand): move rand package to platform

migrate(snowflake): move snowflake package to platform

migrate(testing): move testing package to platform

migrate(zap): move zap package to platform

migrate(http): move http package to platform

migrate(platform): rename base package idpe to platform

git(base): add gitignore

dep: add dependencies

migrate(platform): remove consumer.go

migrate(platform): make secret things private again
2018-05-14 17:12:53 -04:00