* Move some thema code inside grafana
* Use new codegen instead of thema for core kinds
* Replace TS generator
* Use new generator for go types
* Remove thema from oapi generator
* Remove thema from generators
* Don't use kindsys/thema for core kinds
* Remove kindsys/thema from plugins
* Remove last thema related
* Remove most of cuectx and move utils_ts into codegen. It also deletes wire dependency
* Merge plugins generators
* Delete thema dependency 🎉
* Fix CODEOWNERS
* Fix package name
* Fix TS output names
* More path fixes
* Fix mod codeowners
* Use original plugin's name
* Remove kindsys dependency 🎉
* Modify oapi schema and create an apply function to fix elasticsearch errors
* cue.mod was deleted by mistake
* Fix TS panels
* sort imports
* Fixing elasticsearch output
* Downgrade oapi-codegen library
* Update output ts files
* More fixes
* Restore old elasticsearch generated file and skip its generation. Remove core imports into plugins
* More lint fixes
* Add codeowners
* restore embed.go file
* Fix embed.go
* mssql: Add Kerberos/Windows AD auth
* need username for cache file
* account for no port in cc file
* add tests around constring
* remove un-needed port
* add docs
* remove comments
* move defer to same locale as where it begins
* fix linting and spelling
* fix gosec linter
* note lack of grafana cloud support
* Adds color and stroke-dasharray support for node graph edges
Adds support for providing color, highlighted color, and visual display of node graph edges as dashed lines via stroke-dasharray.
* Updates node graph documentation
* Updates documentation
Adds default for `highlightedColor`
* Update docs/sources/panels-visualizations/visualizations/node-graph/index.md
Co-authored-by: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com>
* Update packages/grafana-data/src/utils/nodeGraph.ts
Co-authored-by: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com>
* Update docs/sources/panels-visualizations/visualizations/node-graph/index.md
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Removes highlightedColor; deprecates highlighted
Per [request](https://github.com/grafana/grafana/pull/83855#issuecomment-1999810826), deprecates `highlighted` in code and documentation, and removes `highlightedColor` as an additional property. `highlighted` will continue to be supported in its original state (makes the edge red), but is superseded if `color` is provided.
* Update types.ts
Missed a file in my last commit. Removes `highlightedColor` and deprecates `highlighted`.
* Add test scenario in test data source
---------
Co-authored-by: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
* WIP - proof of concept
* Update pkg/tsdb/elasticsearch/client/client.go
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* update and add test
* lint
* Fix lint
* Bring back logging when creating client
---------
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Move files to prometheus-library
* refactor core prometheus to use prometheus-library
* modify client transport options
* mock
* have a type
* import aliases
* rename
* call the right method
* remove unrelated test from the library
* update codeowners
* go work sync
* update go.work.sum
* make swagger-clean && make openapi3-gen
* add promlib to makefile
* remove clilogger
* Export the function
* update unit test
* add prometheus_test.go
* fix mock type
* use mapUtil from grafana-plugin-sdk-go
* streamline initialization of test databases, support on-disk sqlite test db
* clean up test databases
* introduce testsuite helper
* use testsuite everywhere we use a test db
* update documentation
* improve error handling
* disable entity integration test until we can figure out locking error
* clean up intervalv2 functions
* use roundInterval from grafana-plugin-sdk-go
* use from grafana-plugin-sdk-go
* have intervalv2 in publicdashboards and remove tsdb/intervalv2
* legacydata cleanup
* remove unused variables
* Update pkg/tsdb/legacydata/interval/interval.go
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
---------
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
* create the feature flag
* bring the concurrency in to the play
* Update feature flag
* Use concurrency number from settings
* update influxdb dependency
* use ConcurrentQueryCount from plugin-sdk-go
* use helper method for concurrent query count
* log the error
* add value guard
* add unit tests
* handle concurrency error
* use regex as templateSrv replace format
* use regex as templateSrv replace format for raw queries
* import path fix
* don't use regex formatter
* tag value escape
* tag value escape with wrappers
* polished interpolation logic
* update unit tests
* comments and more place to update
* unit test update
* fix escaping
* handle the string and array of string type separately
* update variable type
- Feature Toggle is `promQLScope`.
- Query property is:
"scope": {
"matchers": "{job=~\".*\"}"
}
Misc:
- Also updates drone GO version to address ARM bug https://github.com/golang/go/issues/58425
- Also updates Swagger defs that were causing builds to fail
---------
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
* Check the value type before casting it to the string
* set visualization as table by default
* append all values for show diagnostics
* golangci-lint
* append metadata only to first frame
* add clearer comment for function def
* update test to reflect change in range for 1w step
* clarify docs
* add more clarity
* add explanation to query options min interval and link to min step
* Update docs/sources/panels-visualizations/query-transform-data/_index.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Sets that status code on backend data responses in prometheus to match the status code returned by prometheus. If the failure is below HTTP/Application Layer, Bad Gateway is returned (502).
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* Send sanitized selectors to the Pyroscope backend for LabelNames and LabelValues
* Clean LabelNames response to remove already used labels
* Improve performance after major changes
* Fix import order
* Further improve rendering performance
* Fix frontend tests
* Fix fake pyroscope client signature
* Bump pyroscope/api dependency to include start/end in LabelNames/LabelValues
* Fix issue with old queries running when using the run button
* Add generated file
* Make code more readable, add a few comments
* Format with prettier
* Fix error when assigning data
* Revert "Add generated file"
This reverts commit c4f33727b8.
* Remove leftover code
* Simplify query editor internal state objects
* Move label selector validation up, improve label filtering
* Simplify query editor state, switch to debounce to reduce rerenders
* Revert cosmetic change
* Have the first iteration
* Prepare bench testing
* rename the test files
* Remove unnecessary test file
* Introduce influxqlStreamingParser feature flag
* Apply streaming parser feature flag
* Add new tests
* More tests
* return executedQueryString only in first frame
* add frame meta and config
* Update golden json files
* Support tags/labels
* more tests
* more tests
* Don't change original response_parser.go
* provide context
* create util package
* don't pass the row
* update converter with formatted frameName
* add executedQueryString info only to first frame
* update golden files
* rename
* update test file
* use pointer values
* update testdata
* update parsing
* update converter for null values
* prepare converter for table response
* clean up
* return timeField in fields
* handle no time column responses
* better nil field handling
* refactor the code
* add table tests
* fix config for table
* table response format
* fix value
* if there is no time column set name
* linting
* refactoring
* handle the status code
* add tracing
* Update pkg/tsdb/influxdb/influxql/converter/converter_test.go
Co-authored-by: İnanç Gümüş <m@inanc.io>
* fix import
* update test data
* sanity
* sanity
* linting
* simplicity
* return empty rsp
* rename to prevent confusion
* nullableJson field type for null values
* better handling null values
* remove duplicate test file
* fix healthcheck
* use util for pointer
* move bench test to root
* provide fake feature manager
* add more tests
* partial fix for null values in table response format
* handle partial null fields
* comments for easy testing
* move frameName allocation in readSeries
* one less append operation
* performance improvement by making string conversion once
pkg: github.com/grafana/grafana/pkg/tsdb/influxdb/influxql
│ stream2.txt │ stream3.txt │
│ sec/op │ sec/op vs base │
ParseJson-10 314.4m ± 1% 303.9m ± 1% -3.34% (p=0.000 n=10)
│ stream2.txt │ stream3.txt │
│ B/op │ B/op vs base │
ParseJson-10 425.2Mi ± 0% 382.7Mi ± 0% -10.00% (p=0.000 n=10)
│ stream2.txt │ stream3.txt │
│ allocs/op │ allocs/op vs base │
ParseJson-10 7.224M ± 0% 6.689M ± 0% -7.41% (p=0.000 n=10)
* add comment lines
---------
Co-authored-by: İnanç Gümüş <m@inanc.io>
* Prepare the test files
* use json files everywhere
* update golden json files
* disable update
* update test file
* fix naming
* lint
* InfluxDB: Add metadata information to first frame only (#78664)
* executedString in first frame only
* lint
* fix tests
* update tests
* don't update
* linting
* update
* update again
* handle nil values
* append in the right array
* add comments
* remove redundant if condition
* Prepare the test files
* use json files everywhere
* update golden json files
* disable update
* update test file
* fix naming
* lint
* InfluxDB: Add metadata information to first frame only (#78664)
* executedString in first frame only
* lint
* fix tests
* update tests
* don't update
* linting
* update
* update again
* Use TimeSeriesWide format for table response
* fix group by query result parsing
* handle labels
* provide a test where result has no tags
* parsing results without time column
* clean the code
* remove the comment line
* more cleaning
* lint
* CloudWatch: call query method from DataSourceWithBackend to support public dashboards
* add test
* remove unneeded properties from test case
* update betterer
* add parens to group related logic
* remove unnecessary aliasing of variable
* use t.Cleanup
* remove redundant check
* add comment
* prepare backend for structured metadata
* add `lokiStructuredMetadata` feature toggle
* use `lokiStructuredMetadata` feature flag
* add field type check to `labelTypesField`
* remove fixme
* fix feature toggle
* add field in dataplane mode
* use `data.Labels` where possible
* adjust framing tests
* improve verbiage
* improve naming
* update tests to "attributes"
* InfluxDB: Add new truthiness operators (`Is` and `Is Not`) to InfluxQL Editor for use with boolean fields
* InfluxDB: Make the front-end aware of the new operators so that translation between raw and builder works
* Chore: Add tests
* feat: identify type of field value to allow other types to work with Is/Is Not
Tags: always quote
Integer: Don't quote
Float: Don't quote
Boolean: Don't quote
String: Quote
* Chore: Add test-cases for type inference
* Update front-end to infer type for operators Is and Is Not
* chore: Add front-end tests
* chore: add additional front-end tests
* chore: fix failing lint test
* chore: fix tests (run prettier)
This reverts commit 046791e2be.
Is causing malformed frames, and resulting in errors about mismatched field lengths in the logs, No data in the UI, and will cause SSE to panic.
I think this is because of the global slice vars since it seems to take concurrency to replicate it.
* Use GetDefaultCloud from SDK
* Use GetAzureCloud from SDK
* Credentials parser moved to azmoncredentials
* Refactor legacy credentials
* Tests
* Fix test description
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* InfluxDB: Add support for `>=` and `<=` comparison operators to InfluxQL Query Builder
* Add front-end support for the new operators
This ensures that the query translates correctly between raw and builder mode
* Chore: add test for new operators
* chore: add front-end tests
* fix: don't skip quoting on `<>`
This preserves the pre-existing behaviour, fixing a failing test
* chore: fix tests