Commit Graph

32156 Commits

Author SHA1 Message Date
Alexander Emelin
e0b59fe8ce
live: move back to ojg (#41642) 2021-11-13 15:14:13 +03:00
Jesse Weaver
8338f01467
Add detailed info on audit log contents (#40905)
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-11-13 00:27:36 +01:00
Peter Holmberg
b2d7162168
Alerting: Add external Alertmanagers (#39183)
* building ui

* saving alertmanager urls

* add actions and api call to get external ams

* add list to add modal

* add validation and edit/delete

* work on merging results

* merging results

* get color for status heart

* adding tests

* tests added

* rename

* add pollin and status

* fix list sync

* fix polling

* add info icon with actual tooltip

* fix test

* Accessibility things

* fix strict error

* delete public/dist files

* Add API tests for invalid URL

* start redo admin test

* Fix for empty configuration and test

* remove admin test

* text updates after review

* suppress appevent error

* fix tests

* update description

Co-authored-by: gotjosh <josue@grafana.com>

* fix text plus go lint

* updates after pr review

* Adding docs

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: gotjosh <josue@grafana.com>

* prettier

* updates after docs feedback

Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gotjosh <josue@grafana.com>
2021-11-12 22:19:16 +01:00
Ryan McKinley
862054918d
Geomap: styleConfig cleanup and symbol caching (#41622)
Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com>
2021-11-12 11:24:35 -08:00
gotjosh
dfa14e9500
Alerting: Document Grafana 8 High Availability setup (#41503)
* Alerting: Document Grafana 8 High Availability setup

* Apply suggestions from code review

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>

* Wordsmithing

* Apply suggestions from code review

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

* Address review feedback

* Apply suggestions from code review

Co-authored-by: George Robinson <george.robinson@grafana.com>

* Update docs/sources/alerting/unified-alerting/high-availability.md

Co-authored-by: George Robinson <george.robinson@grafana.com>

* address review feedback

* Prettier

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
2021-11-12 18:47:39 +00:00
renovate[bot]
bcc46990aa
Update dependency symbol-observable to v4 (#41626)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-12 16:13:55 +00:00
Dimitris Sotirakis
2b2c0b8b5e
Remove check for local drone version (#41535) 2021-11-12 14:08:43 +00:00
Oscar Kilhed
6fe29dda33
Barchart docs and styling fix (#41362)
* Barchart docs and styling fix

* Fix name of max length

* rename valueRotation -> xTickLabelRotation

also limits slider padding on sliders without marks
2021-11-12 15:03:19 +01:00
idafurjes
d72e389d3d
Add context for GetAlertNotificationUidQuery (#41633) 2021-11-12 14:35:38 +01:00
Ivana Huckova
47aab9adfa
Tracing: Fix upload JSON functionality (#41455)
* Tracing: Fix upload JSON

* Tracing: Add processes for each span

* Revert "Tracing: Add processes for each span"

This reverts commit 7c0558be83.

* Tracing: Add processes for each span

* Revert "Tracing: Add processes for each span"

This reverts commit 7c0558be83.
2021-11-12 14:33:30 +01:00
Ieva
ba7d65edf5
Revert "allow using targetOrgId parameter to set organisation ID for a request (#41561)" (#41643)
This reverts commit 08276225c1.
2021-11-12 14:23:16 +01:00
Uchechukwu Obasi
d91e2ff632
TimePickerSettings: make label appropriately link to input when clicked (#41638) 2021-11-12 14:00:51 +01:00
Ivana Huckova
9b9e41e036
Prometheus: Disable exemplar queries for alerting (#41607)
* Prometheus: Dont include empty exempalr frame in results

* Prometheus: Never run exemplar queries for alerting

* Remove exemplar field from alerting and set exemplar to false

* Add tests for frontend

* Add test for backend
2021-11-12 12:49:06 +01:00
Joan López de la Franca Beltran
44837fc592
Replace encryption.Service usages by secrets.Service (#41625)
* Replace encryption.Service by secrets.Service on expr.Service

* Replace encryption.Service by secrets.Service on live pkg

* Rename encryption.Service to encryption.Internal to clarify it must be not used
2021-11-12 12:16:39 +01:00
Ieva
dcae138379
Access Control: adding group field to roles (#41465)
* add group field to roles in AC models

* change to using group_name as the column name

* add a migration for group column
2021-11-12 10:42:47 +00:00
renovate[bot]
d5fc48028f
Update dependency sinon to v12 (#41605)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-12 10:28:34 +00:00
Giordano Ricci
13db125558
Explore: Use PageToolbar component & some cleanup (#41318)
* Explore: Use PageToolbar component & some cleanup

* remove unneeded getStyles

* remove unneeded fragment

* restore cancelQueries action handler in reducer

* avoid nested ternary operator

* Clean up explore e2e
2021-11-12 10:09:25 +00:00
Jack Westbrook
3c3cf2eee9
Plugins Catalog: Install and show the latest compatible version of a plugin (#41003)
* fix(catalog): prefer rendering installed version over latest version

* feat(catalog): signify installed version in version history

* feat(catalog): introduce installedVersion and latestVersion

* refactor(catalog): use latestVersion for installation, simplify plugindetails header logic

* refactor(catalog): clean up installedVersion and latestVersion

* feat(catalog): use table-layout so versions list table has consistent column widths

* test(catalog): update failing tests

* removed the need of having a latest version in the plugin catalog type root level.

* fixed flaky test depending on what locale it was being running with.

* added missing test to verify version for a remote plugin.

* fixed version in header.

* preventing the UI from break if no versions are available.

* fixed failing test due to missing mock data.

* added todo as a reminder.

* refactor(catalog): prefer grafana plugin icons over gcom notfound images

* refactor(Plugins/Admin): change constant name

* refactor(Plugins/Admin): add comment to make condition easier to understand

* chore: update go modules

* feat(Backend/Plugins): add "dependencies" field to `PluginListItem`

* feat(Plugins/Admin): show the grafana dependency for the installed version

* refactor(Plugins/Admin): use the local version of links

* refactor(Plugins/Admin): prefer the local version for `.type`

* refactor(Plugins/ADmin): prefer the local `.description` field

* fix(Plugins/Admin): fix tests

* test(plugins/api): update the expected response for the `api/plugins` tests

* chore(Plugins/Admin): add todo comments to check preferation of remote/local values

* feat(backend/api): always send the grafana version as a header when proxying to GCOM

* feat(plugins/admin): use the `isCompatible` flag to get the latest compatible version

* feat(plugins/admin): show the latest compatible version in the versions list

* fix(plugins/admin): show the grafana dependency for the latest compatible version

* fix(plugins/admin): update the version list when installing/uninstalling a plugin

* test(plugins/admin): add some test-cases for the latest-compatible-version

* fix(plugins/admin): show the grafana dependency for the installed version (if installed)

* feat(plugins/backend): add the `dependencies.grafanaDependency` property to the plugin object

* test(plugins/backend): fix tests by adjusting expected response json

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-11-12 11:07:12 +01:00
Ivana Huckova
bf2ece7281
Tracing: Add processes for each span (#41473) 2021-11-12 10:43:03 +01:00
Torkel Ödegaard
e4a499b957
AppPlugins: Remove unused angular plugin page files (#41569)
* AppPlugins: Remove unused angular plugin page files

* Remove more unused bits
2021-11-12 10:35:39 +01:00
Selene
25ad916473
OAuth: Fix group mapping when use generic OAuth (#41418)
* Fix group mapping when use generic OAuth

* Fix lint

* Fix lint
2021-11-12 10:22:04 +01:00
renovate[bot]
fdd1364ddd
Update dependency stylelint to v14 (#41609)
* Update dependency stylelint to v14

* stylelint: fixed package dependencies

* fixed version-number

* fixed dependency version

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-12 08:40:51 +01:00
Ryan McKinley
7ffdff9e1f
MarketTrend: aggressive default field matching (#41574) 2021-11-11 22:04:37 -08:00
Leon Sorokin
7a92faf398
TimeSeries: guard against pointSize being set < lineWidth (#41577) 2021-11-11 23:47:28 -06:00
nikki-kiga
4281c5afc1
Geomap: Add opacity and prepare svg (#41170) 2021-11-11 21:27:57 +01:00
Torkel Ödegaard
3d735c4809
DataSources: Patch legacy instances so they have the required properties and functions (#41594)
* DataSources: Patch legacy instances so they have the required properties and functions

* Missed setting components
2021-11-11 19:45:07 +01:00
Ieva
08276225c1
allow using targetOrgId parameter to set organisation ID for a request (#41561) 2021-11-11 16:39:08 +00:00
Erik Sundell
eb40723bcb
Cloudwatch: Enable dimension filtering when loading dimension values (#41566)
* fix dimension filter

* refactor tests

* add comments

* fix typo
2021-11-11 16:48:35 +01:00
Gabriel MABILLE
0f36152127
UserCacheService: Use value instead of pointer (#41549) 2021-11-11 16:25:57 +01:00
Eric Leijonmarck
4fd3dd41bc
ServiceAccounts: Delete ServiceAccount (#40470)
* Add extra fields to OSS types to support enterprise

* WIP service accounts

* Update public/app/features/api-keys/ApiKeysForm.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Create a service account at the same time as the API key

* Use service account credentials when accessing API with APIkey

* Throw better error

* Use Boolean for "create service account button"

* Add GetRole to service, merge RoleDTO and Role structs

This patch merges the identical OSS and Enterprise data structures, which improves the code for two reasons:

1.  Makes switching between OSS and Enterprise easier
2.  Reduces the chance of incompatibilities developing between the same functions in OSS and Enterprise

* Start work cloning permissions onto service account

* If API key is not linked to a service account, continue login as usual

* Fallback to old auth if no service account linked to key

* Commented

* Add CloneUserToServiceAccount

* Update mock.go

* Put graphical bits behind a feature toggle

* Start adding LinkAPIKeyToServiceAccount

* Update pkg/models/user.go

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Update pkg/api/apikey.go

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Update pkg/api/apikey.go

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Finish LinkAPIKeyToServiceAccount

* Update comment

* Handle api key link error

* Update pkg/services/sqlstore/apikey.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Feature toggle

* Update pkg/services/accesscontrol/accesscontrol.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* Not needed (yet)

* Better error messages for OSS accesscontrol

* Set an invalid user id as default

* ServiceAccountId should be string

* Re-arrange field names

* ServiceAccountId is integer

* Update ossaccesscontrol.go

* Linter

* Remove fronend edits

* Remove console log

* Update ApiKeysForm.tsx

* feat: add serviceaccount deletion

* feat: make sure we do not accidently delete serviceaccount

* feat: ServiceAccount Type

* refactor: userDeletions function

* refactor: serviceaccount deletions\

* refactor: error name and removed attribute for userDeletecommand

* refactor:: remove serviceaccount type for now

* WIP

* add mocked function

* Remove unnecessary db query, move to right place

* Update pkg/services/accesscontrol/mock/mock.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update pkg/services/accesscontrol/mock/mock.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update pkg/services/accesscontrol/mock/mock.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Better error messages

* Better and correcter error messages

* add mocked function

* refactor: move function call, add error msg

* add IsServiceAccount and fix table

* add service accounts package

* WIP

* WIP

* working serviceaccountsapi registration

* WIP tests

* test

* test working

* test running for service

* moved the error out of the models package

* fixed own review

* linting errors

* Update pkg/services/serviceaccounts/database/database.go

Co-authored-by: Jeremy Price <Jeremy.price@grafana.com>

* tests running for api

* WIP

* WIP

* removed unused secrets background svc

* removed background svc for serviceaccount infavor or wire.go

* serviceaccounts manager tests

* registering as backend service

Co-authored-by: Jeremy Price <jeremy.price@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-11-11 15:10:24 +00:00
Gábor Farkas
cd01384d3a
renovate: ignore packages/grafana-toolkit (#41602) 2021-11-11 14:52:33 +01:00
Gábor Farkas
4f4620188c
influxdb: alias: fix corner case (#41562) 2021-11-11 14:38:54 +01:00
Jack Westbrook
5fad5511e9
Build: Enable persistent cache for faster Webpack builds (#41430)
* build(webpack): enable caching for development and production builds

* build(webpack): introduce unminified production build script

* build(typescript): introduce incremental flag to cache typechecking

* chore(git): ignore typescript cache file

* chore(webpack): bump dependencies to latest
2021-11-11 14:32:34 +01:00
Andrej Ocenas
5cc9ff8b28
Tempo: Add filtering for service graph query (#41162)
* Add filter based on AdHocFilter element

* Add tests

* Cancel layout in case we have have new data or we unmount node graph

* Fix typing

* Fix test
2021-11-11 14:27:59 +01:00
Gábor Farkas
f6ad3e420a
devenv: influxdb: better config (#41456) 2021-11-11 14:20:57 +01:00
Torkel Ödegaard
6da6ef98be
VisualizationSuggestions: More suggestions and refinements (#41480)
* VisualizationSuggestions: More suggestions

* more refinements

* Minor fixes
2021-11-11 14:10:23 +01:00
Jack Westbrook
c712c31721
Build: Use SWC to speed up Sass template builds (#41425)
* build(themes): use SWC to speed up template builds

* chore: remove superfluous dev deps
2021-11-11 14:03:53 +01:00
Karl Persson
3c659f1ea0
Access Control: Move part of access control database (#40483)
* Add accesscontrol migrations

* Add ResourceStore interface and related structs

* Add team/user/builtin-role

* Add accesscontrol database with functions to handle managed roles and
permissions

* Add ResourceManager

* Add GetUserPermissions

* Update pkg/services/accesscontrol/accesscontrol.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-11-11 14:02:53 +01:00
Jack Westbrook
8c98f24777
Chore: Fix failing frontend-metrics script (#41599) 2021-11-11 13:41:15 +01:00
Erik Sundell
fa3261eaf2
ignore empty tags (#41529) 2021-11-11 13:38:04 +01:00
gotjosh
05c672b755
Alerting: Update docs on using the Prometheus Datasource with the Ruler (#41528)
* Alerting: Update docs on using the Prometheus Datasource with the Ruler

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

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-11-11 12:10:07 +00:00
Hugo Häggmark
0e12293971
Chore: Removes pa11y-ci as dependency and use dlx instead (#41591) 2021-11-11 12:54:08 +01:00
Torkel Ödegaard
175c39a976
DataSourceRef: Fix migration for panels inside collapsed rows (#41590) 2021-11-11 12:06:17 +01:00
Jeremy Price
69c5370e94
Accesscontrol: Add additional API keys to service account, move cloneserviceaccount to sqlstore (#41189)
* Add additional api key, move cloneserviceaccount

* Remove TODOs, for now

* Error messages

* Linter

* Security check

* Add comments

* Take service account id from correct variable

* Update user.go
2021-11-11 10:42:21 +00:00
Hugo Häggmark
4e1059649a
Admin: Fix so Timezone is saved when saving preferences (#41583)
* Configuration: Fix so Timezone is saved when saving preferences

* Updating package.json and yarn.lock

* Chore: force drone reload

* Chore: trying with the git protocol

* Chore: revert back to main

* Chore: deleted cached pa11y file

* Chore: revert

* Chore: trying with YARN_CHECKSUM_BEHAVIOR=reset

* Chore: YARN_CHECKSUM_BEHAVIOR=reset worked but reverting back waiting for other fix
2021-11-11 11:13:01 +01:00
Erik Sundell
d5b1500c0b
Chore: Add new CloudWatch ui components (#41484)
* add new ui components

* pr feedback

* remove leftover comment
2021-11-11 10:02:40 +01:00
renovate[bot]
881dd9992c
Update pa11y-ci commit hash to 6b2d4f5 (#41536)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-11 09:51:47 +01:00
Dimitris Sotirakis
13df0901a8
Remove build-deploy.sh (#41586) 2021-11-11 09:23:12 +01:00
Gábor Farkas
eb47a58029
InfluxDB: fix numeric aliases in queries (#41531)
* influxdb: alerting: handle out-of-range numeric aliases

* influxdb: updated documentation
2021-11-11 09:18:06 +01:00
Gilles De Mey
dbe78e47b1
fix: check lotex endpoint URL (#41429)
* fix: check lotex endpoint URL

* Add validation for data sources URLs

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2021-11-11 07:45:56 +01:00