Commit Graph

38116 Commits

Author SHA1 Message Date
Galen Kistler
8fd4fcb987
Prometheus: Annotation query filtering values less then 1 (#53969)
* prevent annotation query from filtering values less then 1
* unit tests were asserting that gaps in data (0 value) are removed from annotation, update filter to exclude 0
2022-10-06 09:26:08 -05:00
Sonia Aguilar
01526d9053
Add error details in notification error feedback tooltip (#56472) 2022-10-06 16:20:07 +02:00
Dimitris Sotirakis
66e8f39ce8
Packaging: Change from 0750 to 0755 folder permissions when packaging (#56436)
* Change from 0750 to 0755

* Change to 0o755

* Skip lint when creating dir
2022-10-06 17:11:11 +03:00
Sonia Aguilar
d8d8ef1aff
Alerting: Add Notification error feedback on contact points view (#56225)
* Alerting: Receivers integrations error feedback: WIP - Add notifications error at the top right on contact points view (#52390)

* Add interfaces for contact point errors

* [WIP] Create fake response for the new service to get contact point errors

* [WIP] Create action an reducer for the new service to get contact point errors

* Fetch fetchContactPointStates in Contact Points tab every 20s and when AM changes

* [WIP] Use store to get error count

* Show number of integrations errors at the contact points main view

* Add warning icon and refactor styles using getStyles

* Change lastNotify type to string instead of DateTime

* Use Stack component from experimental library when it is possible

* Alerting: Add receivers error feedback in contact point list (#52524)

* Refactor types for contact points state

* Add health column in ReceiversTable in case error state is available for this AM

* Create method for converting contact points state DTO to the FE type used in Redux store

* Update types

* Fix indexOf criteria getting integration type

* Change type name to integrationType name

* Change new components to be named functions to follow the FE style-guide

* Fix typos

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>

* Decouple ReceiversTable from Redux state

* Create private useContactPointsState hook to simplify code in ReceiversTable component

* Add tests for getIntegrationType and refactor the method to validate the name

* Add tests for contactPointsStateDtoToModel method

* Remove unnecessary check

* Use Badge compoment for health status in contact point list

* Create new method parseIntegrationName to simplify getting types and index from integration name

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>

* Alerting: Show integrations error feedback when expanding contact point in list (#52920)

* Use DynamicTable for rendering list of contact points and make them expandable if error status is available

* Render expanded content for contact points integrations

* Style and format last notify column

* Add send resolve column to the integration details

* Fix receiver id for DynamicTable row

* Update clock icon in integration state

* Fix tests

* Add PR review sugestions

* Alerting/integrations error feedback handle null dates in response 3 (#55659)

* Update fake response with lastNotify ISO8601 formatted, to be aligned with latest BE changes

* Update LastNotify in ReceiversTable component to handle null date

* Alerting/integrations error feedback handle 404 state not available (#55803)

* Create fetchContactPointsState using the future contact point url and handle 404 error

* Add contact points state tests

* Alerting/update receivers dto naming 2 (#56201)

* Update NotifierStatus naming and fix sendResolved not being updated in UI

* Return always empty ContactPointsState array when catching an error in the request response

* Fix test

* Show notification status only in notifications main view

* Calculate total error count from the final contactPointsState object, to avoid errors when duplicated entries are returned wronly in the response

* Add PR review suggestions

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-10-06 15:23:38 +02:00
Torkel Ödegaard
9300ae7ce6
NavTree: Don't add license and stats page unless your a Grafana Admin (#56410) 2022-10-06 14:30:51 +02:00
Gábor Farkas
3a76c7aac3
grafana-ui: removed obsolete test that cause jest warnings (#56444) 2022-10-06 11:35:21 +00:00
Ashley Harrison
c5171b84a0
actually convert Cloudwatch ConfigEditor test to RTL (#56461) 2022-10-06 12:14:41 +01:00
Torkel Ödegaard
a8b883b1fa
TopNav: Adding sign in to topnav and hiding it mega menu (#56403)
* TopNav: Adding sign in to topnav and hiding it mega menu

* Added target _self

* remove scss change

* Fix sign in link

* Fix other link
2022-10-06 13:00:32 +02:00
Torkel Ödegaard
0958d9ba55
Theme: Change body line-height to fix alignment issue (#56442)
* Theme: Change body line-height to fix alignment issue

* Updates
2022-10-06 12:59:43 +02:00
Levente Balogh
55187ebc48
Navtree: Make it possible to configure standalone plugin pages (#56393)
* feat: make it possible to register standalone app plugin pages under different sections

* refactor(sample.ini): use "admin" instead of "starred" section in the INI

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* feat(defaults.ini): add app navigation settings to the defaults.ini as well

* fix: use the correct key in the tests

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-06 12:57:03 +02:00
Joe Blubaugh
b1df15c4b9
Alerting: Add basic test wrappers to notification channel API test. (#56432)
Adds t.Run calls that supply the name of a receiver and its integrations
when the API response is being verified. This test has a rare flake and
it's difficult to track down without more context for the test failure.
2022-10-06 17:38:54 +08:00
Leo
b0ba94f316
Navigation: Use page nav in silence and policy notification pages (#55753)
* use pagenav in mutetiming form

* use pagenav in alert policy page

* use pageNav for Silence page

* added missing breadcrumbs
2022-10-06 11:18:43 +02:00
Dimitris Sotirakis
3aacda5579
Move files under pkg/build/packaging (#56435) 2022-10-06 03:33:40 -04:00
Dimitris Sotirakis
ec7d9e196e
Change from grabpl to build for grafana-com (#56434) 2022-10-06 08:14:38 +01:00
Torkel Ödegaard
fe1395a1ec
Revert "TopNav: Section styling fix (#56372)" (#56399)
This reverts commit b396f16fe1.
2022-10-06 08:23:29 +02:00
Joe Blubaugh
b476ae62fb
Alerting: Write and Delete multiple alert instances. (#55350)
Prior to this change, all alert instance writes and deletes happened
individually, in their own database transaction. This change batches up
writes or deletes for a given rule's evaluation loop into a single
transaction before applying it.

These new transactions are off by default, guarded by the feature toggle "alertingBigTransactions"

Before:

```
goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/services/ngalert/store
BenchmarkAlertInstanceOperations-8           398           2991381 ns/op         1133537 B/op      27703 allocs/op
--- BENCH: BenchmarkAlertInstanceOperations-8
    util.go:127: alert definition: {orgID: 1, UID: FovKXiRVzm} with title: "an alert definition FTvFXmRVkz" interval: 60 created
    util.go:127: alert definition: {orgID: 1, UID: foDFXmRVkm} with title: "an alert definition fovFXmRVkz" interval: 60 created
    util.go:127: alert definition: {orgID: 1, UID: VQvFuigVkm} with title: "an alert definition VwDKXmR4kz" interval: 60 created
PASS
ok      github.com/grafana/grafana/pkg/services/ngalert/store   1.619s
```

After:

```
goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/services/ngalert/store
BenchmarkAlertInstanceOperations-8          1440            816484 ns/op          352297 B/op       6529 allocs/op
--- BENCH: BenchmarkAlertInstanceOperations-8
    util.go:127: alert definition: {orgID: 1, UID: 302r_igVzm} with title: "an alert definition q0h9lmR4zz" interval: 60 created
    util.go:127: alert definition: {orgID: 1, UID: 71hrlmR4km} with title: "an alert definition nJ29_mR4zz" interval: 60 created
    util.go:127: alert definition: {orgID: 1, UID: Cahr_mR4zm} with title: "an alert definition ja2rlmg4zz" interval: 60 created
PASS
ok      github.com/grafana/grafana/pkg/services/ngalert/store   1.383s
```

So we cut time by about 75% and memory allocations by about 60% when
storing and deleting 100 instances.
2022-10-06 14:22:58 +08:00
Ryan McKinley
b4e23e5d32
ObjectStore: update dev protobuf definitions (#56428) 2022-10-05 18:46:17 -07:00
Leon Sorokin
8300702524
Search: fuzzy match dashboard names in frontend from full list (#55721) 2022-10-05 18:32:35 -04:00
juanicabanas
69c49f6ba2
PublicDashboards: Make mixed datasource calls concurrently (#56421)
PublicDashboards: Make mixed datasource calls concurrently
2022-10-05 18:45:17 -03:00
ying-jeanne
d9cc292066
Star: Add uid in the endpoint (#54340)
* add new uid endpoing for star

* add store pool into service

* fix the endpoint caller

* udpate swagger file

* Update pkg/api/stars.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* remove useless code for star dashboard

* add new uid endpoing for star

* add store pool into service

* fix the endpoint caller

* Update pkg/api/stars.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/api/stars.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* solve linter

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-10-05 22:32:49 +02:00
Alexander Weaver
8df830557a
Alerting: Move annotation functionality behind a history persistence interface (#56133)
* Move annotation functionality behind a history persistence interface

* Rename to RecordState

* Fix lint error in import aliasing

* One more import linter error
2022-10-05 15:32:20 -05:00
Kevin Yu
b3087cfcd1
QueryEditorRow: Only pass error to query editor if panel is not loading (#56350) 2022-10-05 12:19:49 -07:00
Ryan McKinley
97d19830cf
ObjectStore: rename modified to updated (#56420) 2022-10-05 14:58:46 -04:00
Artur Wierzbicki
a94acb7f61
Object store: get user from context (#56346)
* GRPC Server: Add signedInUser to context after auth

* add permissions to signedInUser

* add access control permissions test

* add additional signedInUser checks

* get user from context

* move `UserFromContext` to object/auth.go

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2022-10-05 17:00:34 +00:00
Beto Muniz
4a14d75086
Add prop to improve memory usage listing metrics (#56398) 2022-10-05 12:19:12 -03:00
Andres Martinez Gotor
2cdbd05634
Azure Monitor: Fix subscription selector when changing data sources (#56284) 2022-10-05 16:59:06 +02:00
Sven Grossmann
0d8ea2bb34
LogContext: Fix scroll position in upper context group (#56370)
* fix log row being falsely added to context

* do not add to many lines

* fix scroll position in context

* more flexible id comparison

* add original refid to context query

* added missing row comparison

* updated comment

Co-authored-by: Matias Chomicki <matyax@gmail.com>

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-10-05 16:26:22 +02:00
Sven Grossmann
2410b88ad1
Logs: Show LogRowMenu also for long logs and wrap-lines turned off (#56030)
* show logrowmenu as new table-cell

* fix dashboard position

* added reasonable position

* fix log row message not beeing 100%
2022-10-05 16:11:08 +02:00
idafurjes
bc7a383252
Remove org methods from sqlstore interface (#56358)
* Remove org methods from sqlstore interface

* Remove some mocks

* Fix some tests
2022-10-05 15:47:56 +02:00
Yuriy Tseretyan
ad2a1dd680
Alerting: Start ticker only when scheduler starts (#56339) 2022-10-05 09:35:02 -04:00
Andres Martinez Gotor
8594e648e8
Azure Monitor: Adapt empty Logs response (#56378) 2022-10-05 15:29:34 +02:00
Ivan Ortega Alba
7fd613ec0d
E2E: Remove time zone scenario flackyness (#55458)
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2022-10-05 16:00:33 +03:00
GitStart
48ebaa48cc
Toolkit: Remove changelog command (already replaced by a github workflow) (#56073)
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
2022-10-05 14:44:53 +02:00
Gilles De Mey
87cba8836f
Alerting: Expressions pipeline redesign (#54601) 2022-10-05 14:35:15 +02:00
Tania
222c33c307
Remove branding feature toggle (#56379) 2022-10-05 14:07:35 +02:00
Ashley Harrison
78a57f2064
Navigation: use ToolbarButton in TopSearchBar for consistency (#56371)
* use ToolbarButton in TopSearchBar for consistency

* Removed unnessary styles

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-05 12:22:47 +01:00
Dimitris Sotirakis
636ae8d091
Update grabpl version to v3.0.11 (#56377) 2022-10-05 14:18:28 +03:00
Torkel Ödegaard
b396f16fe1
TopNav: Section styling fix (#56372) 2022-10-05 13:06:51 +02:00
Jack Westbrook
dcc02a8ebe
Storybook: Fix asset paths for hosted storybooks (#56319)
* feat(sass): introduce font-file-path var to define where to load fonts from

* feat(storybook): introduce storybook sass theme styles to set font file paths

* chore(sass): change imports so treated as sass rather than css

* feat(storybook): filter assets so builds dont contain thousands of files
2022-10-05 12:10:29 +02:00
Torkel Ödegaard
aa274500cf
TopNav: Fixes to page and plugin page handling (#56278)
* Added labels

* App page fixes

* Switch to switch

* Fixing sort position for Apps
2022-10-05 11:46:27 +02:00
Ivana Huckova
4469572b27
Loki: Add support for range aggregations with by grouping (#56184)
* Loki: Fix unwrapped range operations with grouping

* Update, fix tests

* Fix modeller
2022-10-05 11:32:33 +02:00
Gilles De Mey
015651f860
@grafana/ui: adds a virtualized options for the Select component (#55629) 2022-10-05 10:33:47 +02:00
Ashley Harrison
7ac7f844f4
improve some grafana-ui types (#56318) 2022-10-05 09:04:10 +01:00
Levente Balogh
ae5e8bc53b
refactor: rename Data Connections to Connections (#56353) 2022-10-05 09:56:58 +02:00
brendamuir
b1b3f9e24c
Fixes alertmanagers whats new entry (#56356) 2022-10-05 08:39:50 +01:00
idafurjes
5167c55760
Chore: Move methods from sqlstore to user store (#56305)
* Copy sqlstore methods to suer store

* Adjust ProvideService signatures in test

* Add xorm tags and tests for search

* Remove methods from sqlstore

* fix lint in tests
2022-10-05 09:34:36 +02:00
Torkel Ödegaard
580ca144fd
StyleGuide: Minor fix for themes.md (#56012)
* Update themes.md

* Update themes.md

* Updates
2022-10-05 08:50:39 +02:00
Gábor Farkas
3f4bf76324
cloudwatch-logs: use not-deprecated version of type (#56239) 2022-10-05 08:47:57 +02:00
Dimitris Sotirakis
5cdc932f8c
CI: Stop publishing OSS images for security mode (#56088)
* No-op: Refactor publish images pipeline struct

* Stop publishing images for OSS
2022-10-05 09:39:38 +03:00
George Rodrigues
8950d86141
fix: some typos (#56171) 2022-10-04 18:43:49 -05:00