This commit changes how labels are printed in templates for custom
annotations and labels from map[foo:bar bar:baz] to foo=bar, bar=baz.
Labels are comma separated, and sorted in increasing order.
This commit moves templating from the state package to a sub-package
called template. This sub-package will be the logical package for
future ease-of-use improvements to templating custom annotations
and labels.
* fix any's in tests
* fix more any's in tests
* more test type fixes
* fixing any's in tests part 3
* more test type fixes
* fixing test any's p5
* some tidy up
* fix template_srv
* docs: add what needs to happen to change
* refactor docs
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Use existing row struct instead of [2]string, add deserialization helper
* Replace Stream struct with stream struct which is exactly the same
* Drop unused status field
* Don't export queryRes and queryData
* Tests for custom marshalling
* Rename row fields to T and V for consistency with prometheus samples
* Rename row to sample
* structure dtos and private methods
* add basic LDAP service
* use LDAP service in ldap debug API
* lower non fatal error
* remove unused globals
* wip
* remove final globals
* fix tests to use cfg enabled
* restructure errors
* remove logger from globals
* use ldap service in authn
* use ldap service in context handler
* fix failed tests
* fix ldap middleware provides
* fix provides in auth_test.go
* add new scenario to config
* make workflow run on opened issues
* revert-dont run on opened
* action for newly opened issues
* move new action config
* remove opened from commands
* change name
* Update .github/workflows/issue-opened.yml
ty!
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
* make comment clearer
---------
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
* improved text
* prevent all labels removed
* use `structuredClone` instead of lodash
* update test
* get `structuredClone` in test?
* fix using structuredClone
* add prom query var editor with tests and migrations
* fix migration, now query not expr
* fix label_values migration
* remove comments
* fix label_values() variables order
* update UI and use more clear language
* fix tests
* use null coalescing operators
* allow users to query label values with label and metric if they have not set there flavor and version
* use enums instead of numbers for readability
* fix label&metrics switch
* update type in qv editor
* reuse datasource function to get all label names, getLabelNames(), prev named getTagKeys()
* use getLabelNames in the query var editor
* make label_values() variables label and metric more readable in the migration
* fix tooltip for label_values to remove API reference
* clean up tooltips and allow newlines in query_result function
* change function wording and exprType to query type/qryType for readability
* update prometheus query variable docs
* Update public/app/plugins/datasource/prometheus/components/VariableQueryEditor.tsx
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
---------
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>