Commit Graph

12 Commits

Author SHA1 Message Date
sam boyer
6aba592741
Schema: get all devenv dashboards passing validation (#37857)
* Strip nulls (again)

* Add stripnulls script

* Add transformations field

* Close FieldConfig struct; proper plugin validating

* s/graph/viz/ field in histogram dashboard

* Use ui.GraphFieldConfig in histogram model

* Add models for stat, gauge, barguage panel plugins

Also toss necessary shared types into cue/ui/gen.cue, with TODOs to move
them appropriately later.

* Add required license headers

* Heap of updates to cue UI components

* Fix barchart types and one old devenv input

* Use the GraphFieldConfig directly for timeseries

* Add models.cue for a few panel plugins

Barchart, state-timeline, and status-history

* Enable the test validating all devenv dashboards!!

* Fix effects of not checking after making comments

* Update packages/grafana-ui/src/options/models.gen.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Realign and unalign cue with ts types

* Update devenv test to sniff for null errors

Best option we have right now for helping people to know they need to
strip nulls from devenv dashboards.

* Add speculative default for barchart stacking

* Fixup some dated devenv dashboards

timeline-modes needed to be regenerated with the appropriate tooltip
values included, per typing requirements, and timeline-demo needed to
have the `mode` field removed, as it is not intended to be persisted.

* Add necessary missing options for various panels

* Regenerate devenv dashboards

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-17 07:11:57 -04:00
Dimitris Sotirakis
2e0dc835cf
Scuemata: Add test to validate devenv resources (#35810)
* Add test for devenv resources

* Refactor validation tests for grokkability

* Devenv dashboards error-tracking script

* Refactor to use cueerrors.Details()

* Further test refinement

* Close major elements of dashboard schema

* Centralize dashboard validation tests

General dashboard validation testing belongs in the load package.

* Better names for error context on glue CUE code

* Fixup validate-resource

Do only one of base or dist, and fix copied docs.

* Skip the devenv test

* Remove test for validateResources

* Fix shellcheck

* Backend linter

Co-authored-by: sam boyer <sdboyer@grafana.com>
2021-07-15 20:08:03 -04:00
ying-jeanne
edf2029b52
[Scuemeta] Fix cue schema load on windows (#35185)
* fix the load basic schema

* fix windows unittest

* fix error return for get current path

* fix windows notation
2021-06-07 18:58:47 +08:00
Dimitris Sotirakis
4c8ce8a450
Scuemata: Checking json validity by enabling skipped tests (#34385)
* Make sure we don't skip any tests - refactoring

* Remove commented lines

* Move test folder
2021-06-04 08:18:03 +02:00
Dimitris Sotirakis
2b1e6c136f
Scuemata: Add error wrapper for CUE sanity errors (#33934)
* Add error wrapper for CUE sanity errors

* Fix error

* Fix linting

* Update test

* Update TestCueErrorWrapper assertions
2021-05-14 09:02:41 +02:00
ying-jeanne
a7ea0ca849
refactory to move trim/apply default into schema.go (#33754)
* refactory to move trim/apply default into schema.go

* fix comments

* move schema test outside of load folder
2021-05-12 15:38:00 +08:00
sam boyer
8fe7da5183
Models: Properly indicate Apache licensing of CUE files (#33960) 2021-05-11 21:44:57 -07:00
Dimitris Sotirakis
47af158ddb
Scuemata: Add grafana-cli command to validate basic scuemata (#33523)
* Add grafana-cli command to validate basic scuemata

* Fix c/p outdated message

* Fix linting - naming

* Add basic testing

* Add cue schema validation

* Add tests

* Fix linting errors

* Remove code - refactored tests

* Remove unnecessary files - leftovers

* Fix linting

* Try adding public folder in testdata
2021-05-06 18:21:08 +02:00
ying-jeanne
22b2d3c38a
frontend for trim/apply defaults and some bug fixing (#33561)
* remove empty object and workaround on list

* frontend

* add toggle on frontend
2021-05-04 15:03:42 +08:00
sam boyer
806761fe70
Schema: Change Subsume check so optionality is respected (#33650) 2021-05-03 10:24:28 -07:00
ying-jeanne
748778fff0
new endpoint to post/get trimmed dashboard json (#33465)
* new endpoint to post/get trimed dashboard json

* add isdisabled check in dashboard.go
2021-04-28 19:38:33 +08:00
sam boyer
bba4d9bd7f
Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527) 2021-04-08 01:11:11 -07:00