Commit Graph

31 Commits (4acc7330198279f464de0935f6a69ce7bfe7ead0)

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
Alirie Gray 4e690062cb
fix(labels): prevent adding duplicate labels to resources in kv (#17340) 2020-04-16 09:02:50 -07:00
Johnny Steenbergen fb5f00e05b chore(http): add missing client methods for label/buckets GET reqs 2019-11-01 11:59:09 -07:00
Deary Hudson III 741b64d4ee
feat(kv): makes label names unique across kv impls
* feat: (http) label names to be unique

* feat(http): should work for updates as well

* chore: commented out former work. added a failing test

* feat: ensure label uniqueness & test cases

* feat: updating labels ensures uniqueness

* fix: fixes a failing unrelated test

* chore: update changelog
2019-10-31 11:30:36 -05:00
Jade McGough 81e6a7116b feat(http): filter label response by organization 2019-04-12 01:29:32 -07:00
Kelvin Wang 92e82884a6 feat(http): accept label id for template post 2019-04-11 13:16:39 -04:00
Kelvin Wang ec6895531d feat(http): add document labe handler 2019-04-10 15:08:03 -04:00
Jade McGough f488428a32 fix(authorizer): labels can be created if the user has read access to the specified org 2019-03-19 01:56:55 -07:00
Jade McGough 950e496748 fix(label): add organizationID to labels 2019-03-18 23:58:42 -07:00
Jade McGough b2775ef9da feat(labels): allow label names to be updated 2019-03-15 16:24:23 -07:00
Jade McGough 334b9ec0ae remove unnecessary ID filtering logic 2019-03-15 16:24:23 -07:00
Leonardo Di Donato 4d5f39334e fix: json tags for label mappings
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-01-25 11:17:36 +01:00
Leonardo Di Donato bcabc0a085 fix: we need resource type to filter labels by resources 2019-01-25 11:17:36 +01:00
Leonardo Di Donato 72679393b9 fix(influxdb): label mappings reference label ID, resource ID, and resource type now 2019-01-25 11:17:36 +01: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 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
Jade McGough 59797ddee2 fix go vet 2018-12-20 13:52:35 -08:00
Jade McGough 7cf03bc1de address PR comments 2018-12-20 13:41:20 -08:00
Jade McGough 8740a69867 add failing tests 2018-12-20 12:27:27 -08:00
Jade McGough 1a10ae701a remove colors from labels 2018-12-20 12:18:03 -08:00
Jade McGough 7eb69049c5 use new errors library in label http handlers 2018-12-18 09:14:59 -08:00
Jade McGough 0846083f19 add label update validation 2018-12-18 08:56:14 -08:00
Jade McGough b171004169 use error library in label.go 2018-12-18 08:36:18 -08:00
Jade McGough d5bf127648 remove name updates 2018-12-18 01:41:47 -08:00
Jade McGough 5036777750 use new error library 2018-12-17 23:59:04 -08:00
Jade McGough 01a5aff7e3 feat(http): add ability to update labels 2018-12-17 23:00:57 -08:00
Jade McGough e9fba06b3f WIP add colors to labels 2018-12-17 23:00:56 -08:00
Jade McGough 6451d7cca2
chore(platform): use a constant for label not found error (#1782) 2018-12-07 10:25:11 -08:00
Jade McGough 8c961e12bb
Labels (#1668)
* feat(platform): add label struct

* feat(platform): add label service interface

* WIP label service

* chore(http): simplify URMapping validation

* WIP label service skeleton

* add new GET labels handler

* feat(http): add POST handler for label service

* feat(http): add label delete handler

* fix json tag

* add happy path testing

* feat(http): add label endpoints to dashboard service

* make fmt

* add label delete handler

* make fmt again :(

* feat(bolt): add label implementation

* wire boltdb implementation of labels

* feat(mock): add mock for label service

* fix tests, add delete test

* add remaining tests, flesh out GET params

* unused code

* remove comments

* add labels endpoints

* clean up labels after deleting a dashboard

* fix issues from code review

* WIP remove type from labels

* feat(http): add label cli functions

* fixes

* make fmt

* feat(http): add labels to tasks and buckets

* feat(bolt): remove labels if their resources are deleted

* remove bolt cleanup for now

* make fmt

* type conversion magic

* feat(inmem): implement label service

* prevent race conditions

* remove labels from inmem if their resources are deleted

* fix race condition

* fix formatting
2018-12-03 08:07:08 -08:00
Jade McGough 873aae3fad
Revert "feat(http): add label service" (#1667)
This reverts commit 70a430c599.
2018-12-03 04:27:27 -08:00
Jade McGough 70a430c599
feat(http): add label service (#1346) 2018-11-30 21:08:35 -08:00