* Transformations: Fix Timeseries to table transformation trend reduction when result is 0
When reduceField function returns 0, the reduced value is set to null. I
think we can remove this "|| null" statement, as:
- There is a check a few lines above to make sure the field type is a number. This might be a reasonable guarantee that the calculation we are doing will make sense and there will be no need to set to null.
- Sparkline cell type already has an option to hide value if we believe the calculation
does not make sense.
Fixes#78025
* make sure we check for undefined
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* [WIP] Lift RBAC from xorm store
* Cleanup RBAC, fix tests
* Use the scope type map as a map
* Remove dependency on dashboard service
* Make dashboards a map for constant time lookups (useful later)
---
* Lift RBAC tests into a new file to test at service level
* Add necessary access resource structs to xorm store tests
* Move authorization into separate service
* Pass features to searchstore.Builder
* Sort imports
* Code cleanup
* Remove useless scope type check
* Lift permission check into `Authorize()`
* Use clearer language when checking scope types
* Include dashboard permissions in test to ensure they're ignored
* Switch to errutil
* Cleanup sql.Cfg refs
* Add `isManaged` property to frontend model
* Remove enabled and token buttons for managed SA
* Replace trash icon for lock icon for managed SA
* Block the role picker for managed SA
* Filter SA list usiong the managed filter
* Rename external for managed
* Add only managed filter
* Toggle the enable buttons for managed sa
* Disable add token and delete token buttons
* Remove the edit name button
* Disable the Role picker for managed sa
* Hide the permissions section
* Add managed by row
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Plugin: Deriving fields by name from parsed logs
Loki only derives fields by a regex matcher, this limits its usage when functions such as `line_formatter` is used on
top of the logs.
Some users already have logs parsed in json or logfmt structure which are detected as fields in loki.
This pull request allows the mapping between detected fields values and derived values by matching the fields' names.
Currently the feature is behind `lokiEnableNameMatcherOption` feature toggle.
* improve settings page to have a `fieldType`
* improve derived fields getter to use `matcherRegex`
* fix failing test
* rename feature toggle to `lokiDerivedFieldsFromLabels`
* added suggestions from review
* add empty config object
* remove feature flag
* fix width of select
* default to `regex` derived field
* fix failing test
---------
Co-authored-by: Sven Grossmann <svennergr@gmail.com>
* Alerting: Add an empty Forked Alertmanager
* Alerting: Add methods for silences to the forked Alertmanager
* check for errors in tests
* make linter happy
* Alerting: Add methods for alerts to the forked Alertmanager
* Alerting: Add methods for receivers to the forked Alertmanager
* Alerting: Add TestTemplate method to the forked Alertmanager
* make linter happy
* separate into both forked AMs
* fix tests
* Alerting: Add lifecycle methods to the forked Alertmanager
* Add AlertStates data topic
* DashboardScene: Alert states data layer
* TMP package json
* Remove duplicated function
* Use latest scenes canry
* Use latest scenes and add transformation test
* feat: share the plugin context with app plugins
* feat: share the plugin context ui-extension modals
* feat: pre-fetch the app plugin settings
* feat: expose more utility hooks for plugins
* fix: use `location.pathname` directly
Previously it was referenced by `pluginRoot.props.path`, which stops
working in case the `pluginRoot` element is wrapped with anything.