Commit Graph

16 Commits (master)

Author SHA1 Message Date
Daniel Moran 00afd95cb7
refactor: automated move of errors and id from root to kit (#21101)
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-03-30 14:10:02 -04:00
Mark Rushakoff d4b5ff29cf fix: encode IDs as JSON map keys properly
The encoding/json docs explain that you need to provide a MarshalText
method to encode integer types as map keys, otherwise they will be
formatted as a string version of the decimal number.

Providing MarshalText and UnmarshalText also uses those methods as a
fallback for MarshalJSON and UnmarshalJSON, so we no longer need
explicit versions of those latter methods.

Apparently Sources were using IDs as map keys and were providing the
,string attribute on the JSON tag on the struct. This was not correct so
that attribute has been removed. Existing sources will no longer be
readable as a result of this change.

Fixes #13277.
2019-04-26 20:41:20 -07:00
Leonardo Di Donato a11b725a33 feat(influxdb): default source find options 2019-01-18 14:05:36 +01: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
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
Kelvin Wang 739d12bc00 fix(http): convert source errors 2019-01-03 11:38:01 -05:00
Christopher Henn 0b5f7a01ca Update Flux query URL for v1 sources
Previously, a v1 source was configured with a `URL` and `fluxURL`. The
`URL` was used for querying InfluxQL data, while the `fluxURL` pointed
to a `fluxd` instance and was used for querying Flux data.  Since then,
`fluxd` has been subsumed by the InfluxDB 1.7 release, which supports
both InfluxQL and Flux.

This commit updates the source proxy query service to query Flux data
from a V1 source directly.
2018-11-09 09:48:04 -08:00
Chris Goller b4e1cd4199 tests(http): add tests for creation without IDs 2018-10-12 10:03:06 +02:00
Kelvin Wang 4cd8a48c39 feat(errors): add errors lib 2018-09-07 21:45:47 -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
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
Michael Desa 64e9cff2be feat(platform): ensure that Source implements query interface 2018-08-08 13:51:15 -04:00
Michael Desa ffe645d6e2 feat(platform): support flux queries for 1x sources 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
Michael Desa ea25a1a72b feat(platform): add bucket service to source struct
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 1d43597f8c platform: add source type and source service interface
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