Commit Graph

31132 Commits

Author SHA1 Message Date
Atif Shoukat Ali
64ff15c157
Live: default to constant label value for pipeline (#39211) 2021-09-15 13:10:52 -07:00
Maarten De Wispelaere
3d0fa70b3b
Docs: Added "manageAlerts" provisioning option. (#38836)
* add "manageAlerts" option to prov. docs

* Update docs/sources/administration/provisioning.md

Takes into account suggestion from @domasx2

Co-authored-by: Domas <domasx2@gmail.com>

* Revert "Update docs/sources/administration/provisioning.md
"

This reverts commit d7085355a6.

* Adding content back.

Co-authored-by: Domas <domasx2@gmail.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
2021-09-15 14:32:30 -04:00
Leon Sorokin
fb091de2c7
BarChart: Fix legend and tooltip colors off by 1 after data refresh (#39234) 2021-09-15 13:10:26 -05:00
sam boyer
2a4b08eab9
Apply cuetsy attrs to PanelSchema (#39112) 2021-09-15 12:27:47 -04:00
Vardan Torosyan
8537b36be2
Access control: Document new permissions restricting access for reloading provisioning configuration (#38906)
* Access control: Document new permissions restricting access for reloading provisioning configuration

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-09-15 17:58:20 +02:00
Dan Cech
f8ae71af5b
Usage Stats Updates (#39235)
* add randomly-generated anonymous id to usage reports
* include uptime in stats
* add last_sent tracking, remove metricsLogger
2021-09-15 11:47:44 -04:00
Peter Holmberg
74beb9a64c
Alerting: Edit thresholds by handle in timeseries panel (#38881)
* POC/Thresholds: Allow thresholds modification directly from the time series panel

* Snapshot updates

* Optimize styles memoization

* change threshold from graph

* renames and logging

* using useeffect to update graph

* Fix react worning about setting state on unmounted component

* revert panelrenderer

* using onFieldConfig change

* use a useeffect

* simplied fieldConfig state

* Do not use plot context in ThresholdControlsPlugin

* Do not throw setState warnings when drag handle is dropped

* Update thresholds position on the graph when updating threshold drag handle

* fix issues with rerenders

* prevent thresholds on conditions with range

* only edit the first threshold

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-09-15 17:35:12 +02:00
Josh Hunt
b3196621f1
AzureMonitor: Fix template variables being cleared out (#39173)
* AzureMonitor: Fix template variables being cleared out

* fix metric namespace from resetting

* tests :)
2021-09-15 16:31:37 +01:00
Giordano Ricci
f79173c99d
Explore: Reuse Dashboard's QueryRows component (#38942)
* WIP

* Functional without custom wrapper component, needs highlight

* Remove latency from explore

* Sync eventbus

* Some cleanup & removal of unused code

* Avoid clearing queries when running all empty queries

* Run remaining queries when removing one

* Update snapshots

* fix failing tests

* type cleanup

* Refactor QueryRows

* update snapshot

* Remove highlighter expressions

* minor fixes in queryrows

* remove unwanted change

* fix failing e2e test

* Persist refId in explore url state

* make traces test slightly more robust

* add test for query duplication
2021-09-15 16:26:23 +01:00
Domas
e251863085
Alerting: validate recording rule name (#39136) 2021-09-15 18:24:26 +03:00
Marcus Andersson
aba8af1d59
Docs: plugin migration guide 7.0.0 to 8.0.0 (#38911)
* restructuring to new storybook inspired structure.

* added instructions on how to handle breaking changes in the legend.

* start adding migration steps for 7 -> 8

* added information about the data frame format changes.

* added plugin.json changes.

* added emotion 11 imports.

* added information about theme v1 being deprecated.

* added steps for backend plugin migration.

* added reference to the migrate hooks v6 -> v7.

* docs(pluginmigration): introduce getColorForTheme changes

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* docs(migration-guide): introduce useStyles to v8 deprecation notes

* Apply suggestions from code review

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* suggestion from review.

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* docs(Migration Guide): update the example for `grafanaDependency`

* docs(Migration Guide): remove the time-series migration part for now

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* docs(Migration Guide): update wording about plugin signing

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-09-15 17:23:10 +02:00
Andrew Burian
e4c80d1269
Update silences.md (#38834)
* Update silences.md

minor correction in not equals regex

* Update docs/sources/alerting/unified-alerting/silences.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-15 10:59:18 -04:00
Andrej Ocenas
515d6afec3
CloudWatch Logs: Disable query path using websockets (Live) feature (#39231)
* Use only non live branch for querying logs.

* Update tests

* fix lint
2021-09-15 16:28:34 +02:00
Domas
264946f37f
Graph: make old graph panel thresholds work even if ngalert is enabled (#38918) 2021-09-15 16:15:50 +03:00
Alexander Kubyshkin
32946ec9b1
Table panel: Fix table column resize handle incorrect z-index (#36934) (#39157) 2021-09-15 13:26:11 +02:00
Erik Sundell
9d3f4f5983
Analytics: Instrument Azure Application Insights (#38553)
* add backend

* read config and pass to backend

* update config docs

* change var name

* use connection string instead of instrumentation key

* add config for endpoint url. update docs

* update default ini

* add spaces

* remove space

* Update docs/sources/administration/configuration.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-15 13:00:38 +02:00
Serge Zaitsev
6005e6572d
Chore: fix param names in ctx.ParamsInt64 (#39223) 2021-09-15 12:14:15 +02:00
Dimitris Sotirakis
fdc681788b
InfluxDB: Fix regex to identify / as separator (#39185)
* Fix regex to identify / as separator

* Update regex
2021-09-15 09:37:33 +01:00
Erik Sundell
c621131fff
remove code that was duplicated by accident (#39212) 2021-09-15 10:32:01 +02:00
Jim McDonald
1aaa00a1e4
Value mappings: add regex value mapping. (#38931) 2021-09-14 17:15:14 -07:00
Alexander Emelin
15e278e9e1
Live: search for pipeline files in data folder (#39198)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-14 22:27:51 +02:00
Alexander Emelin
548b4daa49
Live: up centrifuge to v0.18.4 (#39139) 2021-09-14 11:31:04 -07:00
Leon Sorokin
df6b6e7a98
BarChart: fix stale bar values and x axis labels (#39188) 2021-09-14 12:16:43 -05:00
Serge Zaitsev
063160aae2
Chore: pass url parameters through context.Context (#38826)
* pass url parameters through context.Context

* fix url param names without colon prefix

* change context params to vars

* replace url vars in tests using new api

* rename vars to params

* add some comments

* rename seturlvars to seturlparams
2021-09-14 18:34:56 +02:00
Andrej Ocenas
fb1c31e1b6
CloudWatch Logs: Add link to Xray data source for trace IDs in logs (#39135)
* Refactor log query handling

* Add link to config page

* Change message about missing xray to alert

* Add xrayTraceLinks

* Fix typo in field name

* Fix tests and lint

* Move test

* Add test for trace id link

* lint
2021-09-14 17:02:41 +02:00
Levente Balogh
3c433dc36d
Plugins Catalog: refactor the mocking for our tests (#39165)
* refactor(Plugins/Admin): add a type for version coming back from the API

* refactor(Plugins/Admin): only add necessary version information to the state

* test(Plugins/Admin): add a mock for a CatalogPlugin

* test(Plugins/ADmin): add a mock for a LocalPlugin

* test(Plugins/Admin): add a test for a RemotePlugin

* test(Plugins/Admin): add helpers for mocking plugin states

* refactor(Plugins/Admin): mock the Redux state instead of the API responses

This makes it simpler to add new test cases and also makes
the tests easier to reason about.

* refactor(Plugins/Admin): mock the Redux state instead of the API responses
2021-09-14 16:44:13 +02:00
Gábor Farkas
bff3d91b0d
prometheus: monaco: better popup-font-size (#39181) 2021-09-14 16:40:44 +02:00
Dimitris Sotirakis
ed810da1f6
Update to grabpl 2.4.6 (#39177) 2021-09-14 16:21:04 +02:00
Marcus Efraimsson
fa9857499b
Chore: GetDashboardQuery should be dispatched using DispatchCtx (#36877)
* Chore: GetDashboardQuery should be dispatched using DispatchCtx

* Fix after merge

* Changes after review

* Various fixes

* Use GetDashboardCtx function instead of GetDashboard
2021-09-14 16:08:04 +02:00
gotjosh
2b1d3d27e4
Alerting: Fix bug not creating filepath for silences/nflog if it does not exist (#39174)
We created this filepath just as we're about persist the templates - with the latest change, we now need to create it sooner.
2021-09-14 14:40:59 +01:00
Todd Treece
9b20a24989
Handle enterprise data source tab refreshes (#37567) 2021-09-14 09:24:18 -04:00
Dimitris Sotirakis
f5ecf5c2d9
Cast fields to int64 (#39179) 2021-09-14 14:57:12 +02:00
gotjosh
a2f4344bf2
Alerting: Refactor & fix unified alerting metrics structure (#39151)
* Alerting: Refactor & fix unified alerting metrics structure

Fixes and refactors the metrics structure we have for the ngalert service. Now, each component has its own metric struct that includes the JUST the metrics it uses. Additionally, I have fixed the configuration metrics and added new metrics to determine if we have discovered and started all the necessary configurations of an instance.

This allows us to alert on `grafana_alerting_discovered_configurations - grafana_alerting_active_configurations != 0` to know whether an alertmanager instance did not start successfully.
2021-09-14 12:55:01 +01:00
Maria Alexandra
1edd415ddf
Accessibility checks: Phase 2 - Adding Pa11y CI PR stage (#38556)
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-14 13:23:17 +02:00
Gábor Farkas
27e3fda7ce
influxdb: influxql query editor: fix escaping problematic characters (#39170) 2021-09-14 12:55:43 +02:00
Emil Tullstedt
ad971cc9be
LDAP: Search all DNs for users (#38891) 2021-09-14 10:49:37 +02:00
Ryan McKinley
98cca6317d
Options: expose a dashboard picker element (#38955) 2021-09-13 23:30:46 -07:00
An
45e67630e8
Live: admin config UI (#39103)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Atif Ali <atifshoukatali@yahoo.com>
2021-09-13 21:09:55 -07:00
achatterjee-grafana
d3a7e0228c
Doc: Created a separate topic for AWS authentication (#39012)
* Created new topic for AWS authentication and fixed broken relrefs.

* Applied suggestion from review.

* Update docs/sources/datasources/aws-cloudwatch/aws-authentication.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Applied some suggestions from doc review.

* Applied all doc review.

* Last of the edits, went through and addressed all comments.

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2021-09-14 01:30:43 +02:00
Piotr Jamróz
26bb08e1e6
Graphite: Fix drag and drop queries (#39130)
* Do not use "select metric" segment when rendering target

* Use better names for tests
2021-09-13 20:10:35 +02:00
Marcus Efraimsson
2cc0788187
Chore: Disable backend test for now since it adds 10 minutes extra in CI (#39150)
Ref #38586
2021-09-13 19:37:26 +02:00
Peter Leitzen
4f70113ea0
OAuth: Support role mapping for GitLab OAuth (#30025)
* Support `role_attribute_path` for GitLab OAuth

Allow role mapping for GitLab accounts.

Example:

  [auth.gitlab]
  role_attribute_path = is_admin && 'Admin' || 'Viewer'

* Support `role_attribute_path` for GitLab OAuth

Allow role mapping for GitLab accounts.

Example:

  [auth.gitlab]
  role_attribute_path = is_admin && 'Admin' || 'Viewer'

* docs: add docs for role_attribute_path

* Apply suggestions from code review

Co-authored-by: Peter Leitzen <splattael@users.noreply.github.com>

* docs: update example

example should suggest a full configuration

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Apply suggestions from code review

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* docs: add suggestions from tech writers

Co-authored-by: Henry Sachs <Henry.Sachs@deutschebahn.com>
Co-authored-by: Henry Sachs <henrysachs@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2021-09-13 12:44:37 -04:00
David Lamb
89878dae1b
OAuth: clarify role & group paths prefer id_token over userinfo api (#39066)
* OAuth: clarify role & group paths prefer id_token over userinfo api (#39066)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-09-13 18:15:15 +02:00
Jorge Luis Betancourt
ae4900e76f
Docs: Fix broken link to signed GCS URLs docs (#39144)
The current version of the docs contains a broken link to the GCS docs about signed URLs. The link (since it contains an additional `]`) generates a 404 and also slightly breaks the rendering of the link.
2021-09-13 18:06:42 +02:00
Piotr Jamróz
0026162845
Add handlers to handle time range changes to Explore graphs (#39142) 2021-09-13 18:04:46 +02:00
Ashley Harrison
ca53f5c8da
Navigation: Implement active state for items in the Sidemenu (#39030)
* Navigation: Implement active state for items in the Sidemenu

* Navigation: Improve logic for when link is active and extract isSearchActive into a util function

* Navigation: Implement custom rule for dashboards under /d/ and fix minor bugs

* Navigation: only show first matching active state + strip query params from link urls
2021-09-13 16:49:27 +01:00
Will Browne
1a71f0fe13
Chore: Add WARN log if grafana server process is running with elevated privileges (#35205)
* warn on linux

* add warning for grpc plugins

* add windows support

* update go.mod

* reorganize imports

* update naming

* remove Windows logic

* simplify and add check for when UID and EUID don't match

* fix build

* tidy go.mod

* feedback

* cleanup + migrate
2021-09-13 17:46:47 +02:00
Will Browne
40267f5ea0
Plugins: Fix "too many open files" error when verifying signature of plugin with many files (#39100)
* close file at loop end

* less tired approach
2021-09-13 17:46:26 +02:00
Maria Alexandra
04e7736cba
Variables: Fix not updating inside a Panel when the preceding Row uses "Repeat For" (#38935)
Added a condition to the `repeatRow` function to only update GridPos if we actually rendered more than 1 repeated row.
2021-09-13 16:47:01 +02:00
Dan Cech
9dfd469afc
add daily active counts to stats (#38842)
* add daily active counts to stats

* standardize on int64, update tests
2021-09-13 10:29:35 -04:00