Commit Graph

28916 Commits

Author SHA1 Message Date
Dafydd
0dcd0281ab
Chore: avoid hard-coding IDs in integration tests (#33152)
* use dynamic user Ids in test

* use dynamic IDs in alert tests

* use dynamic IDs in dashboard test queries

* use dynamic IDs in org test queries
2021-04-21 11:22:46 +03:00
dependabot[bot]
2cd6c0565b
Chore(deps): Bump react-dev-utils from 10.2.1 to 11.0.4 (#31932)
Bumps [react-dev-utils](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-dev-utils) from 10.2.1 to 11.0.4.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/HEAD/packages/react-dev-utils)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-21 10:07:42 +02:00
Torkel Ödegaard
dc6d134276
Storybook: Fixes theming of the padded story (that makes stories use primary background by default) (#33166) 2021-04-21 09:45:12 +02:00
kay delaney
bad048b7ba
Performance: Standardize lodash imports to use destructured members (#33040)
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.

* Remove unnecessary _ import from Graph component

* Enforce lodash import style

* Fix remaining lodash imports
2021-04-21 09:38:00 +02:00
Torkel Ödegaard
2bb7eb18d1
PanelEdit: Fixes showIf for panel level options, fixes configRev when switching panels (#33173) 2021-04-20 21:22:58 +02:00
Ryan McKinley
af46bbf654
LegendIcon: only render color picker when the props change (#33141) 2021-04-20 20:28:47 +02:00
Ryan McKinley
18bbbaf53e
TestData: support boolean and strings in CSV metric response (#33099) 2021-04-20 11:17:06 -07:00
Nicholas Auger
fa620c1c38
cla.md formatting update to match cla-assistant (#33188)
@RichiH
2021-04-20 19:56:12 +02:00
Robby Milo
9ef7770631
update cla (#33180)
Co-authored-by: kyle <kyle@grafana.com>
2021-04-20 19:16:34 +02:00
Owen Diehl
e065e19583
Fix/ngalert generation (#33172)
* fixes pkg names & alerting openapi generation

* cleans up api generation, uses docker & removes python
2021-04-20 13:12:32 -04:00
Torkel Ödegaard
8db3eb90ae
Re-license Grafana to AGPLv3 (#33184)
For a rationale as to why this was done, please see

* https://grafana.com/blog/2021/04/20/grafana-loki-tempo-relicensing-to-agplv3/
* https://grafana.com/blog/2021/04/20/qa-with-our-ceo-on-relicensing/

Signed-off-by: Richard Hartmann <richih@richih.org>
Signed-off-by: Torkel Ödegaard <torkel@grafana.com>
Signed-off-by: Carl Bergquist <carl.bergquist@gmail.com>
Signed-off-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-04-20 19:03:30 +02:00
Diana Payton
c986aaa0a8
Docs: InfluxDB doc improvements (#32815)
* Create getting-started-influxdb.md

* Update getting-started-prometheus.md

* Update getting-started-sql.md

* data source edits

* single source intro

* Create first-step.md

* Update influxdb.md

* Update getting-started-influxdb.md

* Update influxdb.md

* break up long file

* Update influxdb-templates.md

* more updates

* Update _index.md

* Update _index.md

* Update getting-started-sql.md

* Update _index.md

* edits

* Update docs/sources/datasources/influxdb/_index.md

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

* Delete influxdb.md

* Update getting-started-influxdb.md

* Update influx-flux.md

* Update _index.md

* Update getting-started-influxdb.md

* Update getting-started-influxdb.md

* content

* content changes

* Update _index.md

* link fixes

* Update getting-started-influxdb.md

* Update getting-started-influxdb.md

* Merge branch 'master' into docs-influxdb

* updated port

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-04-20 09:33:44 -07:00
Torkel Ödegaard
6bbcd43b4c
Switch: Another design update (#33170) 2021-04-20 17:10:05 +02:00
Dimitris Sotirakis
d3e510e92f
Chore: Remove Revive standalone linter - use it via golangci-lint (#33150)
* Remove Revive standalone linter - use it via golangci-lint

* Add revive settings to ignore lint errors for now

* Small fix

* Update to grabpl v0.5.53

* Remove errorCode and warningCode from config
2021-04-20 16:51:08 +02:00
Marcus Efraimsson
caa420f92f
Chore: Improve request distributed tracing middleware (#33033)
Before these changes the request tracing was added for each route 
registered using the routing.RouteRegister, see code. This had the 
consequence that middleware executed earlier/later in the request 
pipeline was not part of the request tracing middleware life-cycle 
which measures the duration of requests among other things.
In the logger middleware we do extract the current distributed trace 
identifier, if available, and set that on request info/error log messages.
With these changes we can extract the current distributed trace identifier, 
if available, and set that on the contextual HTTP request logger 
(models.ReqContext.Logger) which would improve the possibility to correlate 
all HTTP request log messages with traces.
In addition, the request tracing middleware is now executed first and last in 
the request pipeline and should therefore result in more accurate timing 
measurements (request duration).

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-04-20 15:22:22 +02:00
Hugo Häggmark
527b7bd756
Theme: Theme toggle is only persisted for signed in users (#33163) 2021-04-20 15:15:56 +02:00
Hugo Häggmark
888667abbc
Table: Fixes so border is visible for cells with links (#33160) 2021-04-20 15:06:29 +02:00
Gábor Farkas
72db1bb2e9
fix: regenerate auto-generated css file (#33161) 2021-04-20 14:57:09 +02:00
Zoltán Bedi
a220e5dac2
OpenTSDB: Fix showing error on query (#32421) 2021-04-20 14:10:05 +02:00
Oscar Kilhed
bc2d90f140
Fix lint issue in cortex ruler test (#33158) 2021-04-20 14:03:58 +02:00
Piotr Jamróz
e017de4f06
Fix inefficient regular expression (#33155) 2021-04-20 13:21:57 +02:00
Ryan McKinley
dff78561bc
PanelData: include structure revision info and only apply overrides once (#33098)
* calculate schemaRevision in panel query runner

* schema > structureRev

* calculate revision after apply field overrides

* this.state

* don't apply field overrides if the shape is already the same

* check schema revision

* update snapshots
2021-04-20 11:05:50 +02:00
Dimitris Sotirakis
b3ce655b67
Remove field limitation from slack notification (#33113) 2021-04-20 12:01:05 +03:00
Nicolai Hemdrup
04781bfcc6
Theme: Update to dark blues (#33148)
darkBluePrimary = less purple and bit more aligned with the theme
darkBlueSecondary (text) = bit less saturated, meaning a bit brighter.
2021-04-20 10:48:55 +02:00
Torkel Ödegaard
c67737905e
RadioButton: fixes height of radio button after recent design changes (#33147) 2021-04-20 10:47:56 +02:00
Uchechukwu Obasi
bebc48c1f6
ToolTip: refactors story from knobs to control (#33130) 2021-04-20 10:23:59 +02:00
Hugo Häggmark
025b671146
Dashboard: Unsaved changes warning shown for anyone that can save (#33145)
* Dashboard: Unsaved changes warning shown for anyone that can save

* Refactor: changes the order in function
2021-04-20 09:55:46 +02:00
Jack Westbrook
c2953f3a06
PieChart: Unify tooltip to look the way it looks in TimeSeries (#33032)
* feat(piechart): align styles between piechart and graph

* feat(piechart): introduce tooltip options to panel and visualisation

* feat(piechart): get tooltip options working

* feat(piechart): add SeriesTable to visx TooltipInPortal

* refactor(piechart): move getTooltipData out of PieSlice

* docs(piechart): fix storybook story errors

* feat(viztooltip): initial commit of common tooltip types and components

* refactor(viztooltip): rename type as enum and update usage

* refactor(viztooltip): move chart.tooltip into viztooltip and fix imports and typings

* refactor(viztooltip): update import paths and names where used

* docs(infotooltip): fix story import paths

* docs(piechart): fix typings in story

* docs(viztooltip): add public annotations to exported components and types
2021-04-20 09:45:41 +02:00
Ryan McKinley
5f54f2dc00
GraphNG: flip logic so we can explicitly say the field types to keep (#33140) 2021-04-19 17:45:10 -07:00
Kevin Minehart
534614063a
add cache config tab to datasource settings (#33036) 2021-04-19 16:18:47 -05:00
dependabot[bot]
0a3e7dea62
Bump github.com/centrifugal/centrifuge from 0.16.0 to 0.17.0 (#33117) 2021-04-19 12:09:10 -07:00
Owen Diehl
e37a780e14
Inhouse alerting api (#33129)
* init

* autogens AM route

* POST dashboards/db spec

* POST alert-notifications spec

* fix description

* re inits vendor, updates grafana to master

* go mod updates

* alerting routes

* renames to receivers

* prometheus endpoints

* align config endpoint with cortex, include templates

* Change grafana receiver type

* Update receivers.go

* rename struct to stop swagger thrashing

* add rules API

* index html

* standalone swagger ui html page

* Update README.md

* Expose GrafanaManagedAlert properties

* Some fixes

- /api/v1/rules/{Namespace} should return a map
- update ExtendedUpsertAlertDefinitionCommand properties

* am alerts routes

* rename prom swagger section for clarity, remove example endpoints

* Add missing json and yaml tags

* folder perms

* make folders POST again

* fix grafana receiver type

* rename fodler->namespace for perms

* make ruler json again

* PR fixes

* silences

* fix Ok -> Ack

* Add id to POST /api/v1/silences (#9)

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Add POST /api/v1/alerts (#10)

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* fix silences

* Add testing endpoints

* removes grpc replace directives

* [wip] starts validation

* pkg cleanup

* go mod tidy

* ignores vendor dir

* Change response type for Cortex/Loki alerts

* receiver unmarshaling tests

* ability to split routes between AM & Grafana

* api marshaling & validation

* begins work on routing lib

* [hack] ignores embedded field in generation

* path specific datasource for alerting

* align endpoint names with cloud

* single route per Alerting config

* removes unused routing pkg

* regens spec

* adds datasource param to ruler/prom route paths

* Modifications for supporting migration

* Apply suggestions from code review

* hack for cleaning circular refs in swagger definition

* generates files

* minor fixes for prom endpoints

* decorate prom apis with required: true where applicable

* Revert "generates files"

This reverts commit ef7e975584.

* removes server autogen

* Update imported structs from ngalert

* Fix listing rules response

* Update github.com/prometheus/common dependency

* Update get silence response

* Update get silences response

* adds ruler validation & backend switching

* Fix GET /alertmanager/{DatasourceId}/config/api/v1/alerts response

* Distinct gettable and postable grafana receivers

* Remove permissions routes

* Latest JSON specs

* Fix testing routes

* inline yaml annotation on apirulenode

* yaml test & yamlv3 + comments

* Fix yaml annotations for embedded type

* Rename DatasourceId path parameter

* Implement Backend.String()

* backend zero value is a real backend

* exports DiscoveryBase

* Fix GO initialisms

* Silences: Use PostableSilence as the base struct for creating silences

* Use type alias instead of struct embedding

* More fixes to alertmanager silencing routes

* post and spec JSONs

* Split rule config to postable/gettable

* Fix empty POST /silences payload

Recreating the generated JSON specs fixes the issue
without further modifications

* better yaml unmarshaling for nested yaml docs in cortex-am configs

* regens spec

* re-adds config.receivers

* omitempty to align with prometheus API behavior

* Prefix routes with /api

* Update Alertmanager models

* Make adjustments to follow the Alertmanager API

* ruler: add for and annotations to grafana alert (#45)

* Modify testing API routes

* Fix grafana rule for field type

* Move PostableUserConfig validation to this library

* Fix PostableUserConfig YAML encoding/decoding

* Use common fields for grafana and lotex rules

* Add namespace id in GettableGrafanaRule

* Apply suggestions from code review

* fixup

* more changes

* Apply suggestions from code review

* aligns structure pre merge

* fix new imports & tests

* updates tooling readme

* goimports

* lint

* more linting!!

* revive lint

Co-authored-by: Sofia Papagiannaki <papagian@gmail.com>
Co-authored-by: Domas <domasx2@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-04-19 14:26:04 -04:00
Diana Payton
6238a7c4c4
Docs: Update pie-chart-panel.md (#33132) 2021-04-19 11:16:08 -07:00
Marcus Efraimsson
747f3cd300
Auth: Don't clear auth token cookie when lookup token fails (#32999)
If LookupToken fails we don't clear the auth token cookie.

Ref #15316
2021-04-19 19:46:25 +02:00
Alexander Emelin
3e3a0a1ea1
bump jaeger-client-go to v2.27.0 (#33134) 2021-04-19 20:38:14 +03:00
Ryan McKinley
f93b05f506
PanelEdit: only update when config changes (#33133) 2021-04-19 19:24:39 +02:00
Alexander Emelin
d807fbc9e9
Live: Telegraf input modifiers (#32982) 2021-04-19 18:48:43 +03:00
Uchechukwu Obasi
f92b6518c5
ValuePicker: refactors story from knobs to control (#33122)
* ValuePicker: refactors story from knobs to control

* fixes wrong type issue
2021-04-19 15:45:28 +01:00
Andrej Ocenas
13cb34bbca
Plugins: Support es5 plugins extending LanguageProvider (#33127) 2021-04-19 16:37:27 +02:00
Giordano Ricci
875fa37d10
Elasticsearch: Add documentation for supported Elasticsearch query transformations (#33072)
* Elasticsearch:  Add documentation for supported Elasticsearch query transformation

* Update docs/sources/datasources/elasticsearch.md

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

* Remove beta notives for ES logs

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-04-19 15:18:50 +01:00
Hugo Häggmark
9bb1484dc5
ConfirmModal: Migrates to React with new theme (#33107)
* ConfirmModal: Migrates to React

* Refactor: migrates to v2 styles

* Chore: updates after PR comments
2021-04-19 14:30:18 +02:00
dependabot[bot]
33621e6f9b
Bump github.com/uber/jaeger-client-go from 2.25.0+incompatible to 2.26.0+incompatible (#33106)
* Bump github.com/uber/jaeger-client-go

Bumps [github.com/uber/jaeger-client-go](https://github.com/uber/jaeger-client-go) from 2.25.0+incompatible to 2.26.0+incompatible.
- [Release notes](https://github.com/uber/jaeger-client-go/releases)
- [Changelog](https://github.com/jaegertracing/jaeger-client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber/jaeger-client-go/compare/v2.25.0...v2.26.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix go.sum

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-04-19 12:33:31 +02:00
Domas
60b469f836
Alerting: receivers page + template list (#33112) 2021-04-19 13:02:58 +03:00
Domas
382cab6406
Alerting: misc fixes (#33070) 2021-04-19 12:53:02 +03:00
Alexander Zobnin
41f6af96c4
Access control: Build navigation links with access control (#33024)
* Build nav links with access control

* Break up getNavTree (reduce cyclomatic complexity)

* Fix tests

* Use only ActionUsersRead permissions

* Remove unused permissions definitions

* Chore: remove unused fallbacks

* Fix linter error
2021-04-19 12:23:29 +03:00
Arve Knudsen
381e4a51cd
SQL data sources: Fix configuration UI (#33110)
* fix frontend mssql/postgres

* fix frontend

Co-authored-by: Ying WANG <ying.wang@grafana.com>
2021-04-19 10:30:29 +02:00
Ryan McKinley
0c64d88d64
Live: support legacy stream paths (#33101) 2021-04-19 00:47:14 -07:00
Torkel Ödegaard
76034ad1cb
Annotations: Fixing recursive angular watch loop (#33090) 2021-04-19 09:35:43 +02:00
dependabot[bot]
58380368af
Bump github.com/mattn/go-sqlite3 from 1.14.6 to 1.14.7 (#33104)
Bumps [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) from 1.14.6 to 1.14.7.
- [Release notes](https://github.com/mattn/go-sqlite3/releases)
- [Commits](https://github.com/mattn/go-sqlite3/compare/v1.14.6...v1.14.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 09:26:51 +02:00
Ryan McKinley
98789e7ed9
MatcherUI: show field name even when not found in results (#33102) 2021-04-19 09:02:58 +02:00