Commit Graph

1283 Commits

Author SHA1 Message Date
Gabriel MABILLE
10c080dad1
LDAP: Add skip_org_role_sync configuration option (#56679)
* LDAP: Add skip_org_role_sync option

* Document the new config option

* Nit on docs

* Update docs/sources/setup-grafana/configure-security/configure-authentication/ldap.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Docs suggestions

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Add test, Fix disabled user when no role

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-10-12 13:33:33 +02:00
Gareth Dawson
10a34a041c
Add feature tracking for LogRow.tsx (#56656)
* Add feature tracking for LogRow.tsx

* Add type and logRowUid to reportInteraction

* Rename logs variable
2022-10-11 10:04:43 +01:00
Polina Boneva
129a5a29e7
PanelChrome: New Panel Header design Feature Flag (#56450)
* add feature toggle newPanelHeader

* add feature toggle newPanelHeader

* more explicit naming and description of PanelChrome feature flag
2022-10-10 18:03:16 +03:00
Artur Wierzbicki
bf264d2f76
Query library: requiresDevMode dummy backend (#56466)
* query library - dummy backend

* fix tests

* dont explicitly marshall backend dataresponse

* skip integration tests

* null check for tests

* added query library to codeowners

* null check for tests

* lint
2022-10-07 11:31:45 -07:00
Joey Tawadrous
74c809f544
Plugins: Introduce new Flame graph panel (#56376)
* Flamegraph

* Updated flame graph width/height values

* Fix top table rendering issue

* Add feature toggle for flamegraph in explore

* Update tests

* Hide flamegraph from dash panel viz list if feature toggle not enabled

* Show table if no flameGraphFrames

* Add flame graph to testdata ds

* Minor improvement
2022-10-07 11:39:14 +01:00
Ryan McKinley
609abf00d1
ObjectStore: Write json as json when possible (#56433) 2022-10-06 15:48:53 -04:00
Matias Chomicki
729ce8bb72
Loki: query editor using Monaco (#55391)
* loki: switch to a monaco-based query field, step 1 (#46291)

* loki: use monaco-logql (#46318)

* loki: use monaco-logql

* updated monaco-logql

* fix all the tests (#46327)

* loki: recommend parser (#46362)

* loki: recommend parser

* additional improvements

* more improvements

* type and lint fixes

* more improvements

* trigger autocomplete on focus

* rename

* loki: more smart features (#46414)

* loki: more smart features

* loki: updated syntax-highlight version

* better explanation (#46443)

* better explanation

* improved help-text

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Fix label

* feat(loki-monaco-editor): add monaco-logql as a dependency

* feat(loki-monaco-editor): add back range function removed during merge

* feat(loki-monaco-editor): sync imports with recent changes

* feat(loki-monaco-editor): add missing lang provider functions

* feat(loki-monaco-editor): fix imports

* feat(loki-monaco-editor): display monaco editor by default

Temporarily

* Chore: remove commented code

* Chore: minor refactor to NeverCaseError

* Chore: minor code cleanups

* feat(loki-monaco-editor): add history implementation

Will see how it behaves and base the history slicing on tangible feedback

* feat(loki-monaco-editor): turn completion data provider into a class

* Chore: fix missing imports

* feat(loki-monaco-editor): refactor data provider methods

Move complexity scattered everywhere to the provider

* Chore: clean up redundant code

* Chore: minor comments cleanup

* Chore: simplify override services

* Chore: rename callback

* feat(loki-monaco-editor): use query hints implementation to parse expression

* feat(loki-monaco-editor): improve function name

* Chore: remove superfluous variable in favor of destructuring

* Chore: remove unused imports

* Chore: make method async

* feat(loki-monaco-editor): fix deprecations and errors in situation

* feat(loki-monaco-editor): comment failing test case

* Chore: remove comment from test

* Chore: remove duplicated completion item

* Chore: fix linting issues

* Chore: update language provider test

* Chore: update datasource test

* feat(loki-monaco-editor): create feature flag

* feat(loki-monaco-editor): place the editor under a feature flag

* Chore: add completion unit test

* Chore: add completion data provider test

* Chore: remove unwanted export

* Chore: remove unused export

* Chore(loki-query-field): destructure all props

* chore(loki-completions): remove odd string

* fix(loki-completions): remove rate_interval

Not supported

* fix(loki-completions): remove line filters for after pipe case

We shouldn't offer line filters if we are after first pipe.

* refactor(loki-datasource): update default parameter

* fix(loki-syntax): remove outdated documentation

* Update capitalization in pkg/services/featuremgmt/registry.go

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* refactor(situation): use node types instead of names

* Chore: comment line filters pending implementation

It's breaking the build due to a linting error.

* Chore: update feature flag test after capitalization change

* Revert "fix(loki-completions): remove line filters for after pipe case"

This reverts commit 3d003ca4bc.

* Revert "Chore: comment line filters pending implementation"

This reverts commit 84bfe76a6a.

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
2022-10-06 10:35:30 -04: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
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
Tania
222c33c307
Remove branding feature toggle (#56379) 2022-10-05 14:07:35 +02:00
George Rodrigues
8950d86141
fix: some typos (#56171) 2022-10-04 18:43:49 -05:00
Gábor Farkas
3c1de8750c
GrafanaData: Deprecate the LogsParser type (#56242)
* added copy of code to main-grafana

* grafana-data: add depreceted-notice
2022-10-04 11:25:22 +02:00
renovate[bot]
bcd1c48a4d
Update dependency rollup-plugin-esbuild to v4.10.1 (#56191)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-03 16:27:37 +01:00
renovate[bot]
8f578d18ce
Update dependency rollup to v2.79.1 (#56187)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-03 16:42:55 +02:00
Gábor Farkas
a069a01853
grafana-data: logs: add deprecated-info (#56077) 2022-09-30 14:22:04 +02:00
Jack Westbrook
b81f90cd0c
Toolkit: Fix script failures due to missing import paths (#55857)
* fix(toolkit): package without dist folder so config file paths are correct

* chore(packages): make sure to bundle readme, changelog and apache2 license

* refactor(packages): recursively copy src when prepacking toolkit

* chore(toolkit): lock down babel dependencies. use grafana-eslint-config@5 for TS4.8 support
2022-09-28 17:04:55 +02:00
Joao Silva
cf1862ecc4
Storybook: Explicitly set init on a registry to stop Storybook from being broken (#55909) 2022-09-28 13:29:41 +01:00
Torkel Ödegaard
e31cb93ec0
NavTree: Make it possible to configure where in nav tree plugins live (#55484)
* NewIA: Plugin nav config

* progress

* Progress

* Things are working

* Add monitoring node

* Add alerts and incidents

* added experiment with standalone page

* Refactoring by adding a type for navtree root

* First test working

* More tests

* more tests

* Progress on richer config and sorting

* Sort weight working

* Path config

* Improving logic for not including admin or cfg nodes, making it the last step so that enterprise can add admin nodes without having to worry about the section not existing

* fixed index routes

* removed file

* Fixes

* Fixing tests

* Fixing more tests and adding support for weight config

* Updates

* Remove unused fake

* More fixes

* Minor tweak

* Minor fix

* Can now control position using sortweight even when existing items have no sortweight

* Added tests for frontend standalone page logic

* more tests

* Remove unused fake and fixed lint issue

* Moving reading settings to navtree impl package

* remove nav_id setting prefix

* Remove old test file

* Fix trailing newline

* Fixed bug with adding nil node

* fixing lint issue

* remove some code we have to rethink

* move read settings to PrivideService and switch to util.SplitString
2022-09-28 08:29:35 +02:00
Tania
4a4201ec92
Chore: Update versions (#55813) 2022-09-27 14:07:16 +02:00
Alexander Emelin
55aae79744
GRPC Server: Add gRPC server service (#47849)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-09-26 16:25:34 -04:00
Torkel Ödegaard
018733dd24
PluginDetails: Make plugin details page look good in topnav (#55571)
* PluginDetails: Make plugin details page look good in topnav

* Minor style tweak aligning things

* minor refactoring where I moved the logic to decide the default tab into its own hook.

* refactor(plugindetails): first pass at using navmodel for usePluginDetailsTabs hook

* refactor(plugindetails): move "reset page when uninstalling plugin" to installcontrols

this prevents a user from seeing a blank page if they uninstall an app plugin whilst viewing a
config page

* refactor(plugindetails): remove usage of toIconName and reduce nested if

* Trying to fix tests

* minor fix

* test(plugindetails): update selectors causing failing tests

* chore(plugindetails): remove commented out test code

* test(plugindetails): clean up - remove unnecesary usage of waitFor

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-09-26 15:04:07 +02:00
Will Browne
b25ea75bac
Plugins: Add secure JSON fields to plugin setting DTO (#55313)
* add secure JSON fields to plugin setting DTO

* add nil pointer fix

* adding secureJsonFields to the plugin meta.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-09-21 12:20:11 +02:00
Jo
006944a360
Auth: Add development manual override (#55496)
* Auth: Add development manual override

* rename to disable_sync_lock
2022-09-20 11:48:40 -04:00
Alexander Emelin
0e6a8cc6ac
Live: Migrate to centrifuge-js v3 (new API and client protocol) (#51977) 2022-09-20 11:39:46 -04:00
Josh Hunt
d014a3a09b
Echo: Add support for Google Analytics 4 (#55446)
* user essentials mob! 🔱

lastFile:public/app/core/services/echo/backends/analytics/GA4Backend.ts

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/core/services/echo/backends/analytics/GA4Backend.ts

* user essentials mob! 🔱

lastFile:public/app/core/services/echo/backends/analytics/GA4Backend.ts

* user essentials mob! 🔱

lastFile:public/app/app.ts

* user essentials mob! 🔱

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Leodegario Pasakdal <leodegario.pasakdal@grafana.com>
2022-09-20 03:13:14 -07:00
kay delaney
64bbb7a7ce
Chore: Update and enforce usage of typed react-redux hooks (#55349)
* Chore: Update and enforce usage of typed react-redux hooks
2022-09-19 10:49:35 +01:00
Leo
1a0cbdeabe
Navigation: Add help menu to top search bar (#55062)
* add help menu to top search bar

* fixes

* handle preventDefault in node graph specifically

* use icon prop of MenuItem

* undo changes to ContextMenuPlugin/DataLinksContextMenu

* remove unused component

* revert storybook changes

* Tweaks

* remove unused style

* stop propagation on the header so version can be highlighted

* make sure useContextMenu has the exact same logic as before

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-09-17 18:17:00 +02:00
Gareth Dawson
98a8908910
Loki: Remove any type from logs.test.ts (#55303)
* Remove any type from logs.test.ts

* Replace unknown types and move type casting to variables
2022-09-16 16:57:42 +01:00
Piotr Jamróz
9b4cdfe652
Correlations: Hide Correlations Page behind a feature toggle (#55224)
* Hide Correlations Page behind a toggle

* Remove redundant defaults

* Ensure top nav is rendered when correlations are disabled

This is for the case when:

[feature_toggles]
topnav = true
2022-09-16 15:14:27 +02:00
Jo
3e2e9f93b9
Auth: Allow admins to manually change oauth user role if oauth_skip_org_role_update_sync is enabled (#55182)
* Auth: Allow admins to change oauth user info it it's not synced.

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

* Update public/app/features/admin/UserAdminPage.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Add missing import

* Simplify init

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* SAML: Add option to skip org role sync (#55230)

* SAML: Add option to skip org role sync

* Modify frontend accordingly

* Remove update from config option name

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Remove update from config option name

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Fix typo

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: gamab <gabi.mabs@gmail.com>
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-09-15 12:06:09 -04:00
Seyaji
7ec1d137b4
Logs: Relocate "show context" button, add copy line log button (#50977)
* add context button to right side of log row

* add context button to right side of log row

* add context button to right side of log row

* add context button to right side of log row

* add show-context icon

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
2022-09-15 17:13:58 +02:00
Adam Simpson
92857ef331
CloudMonitor: Remove cloudMonitoringExperimentalUI feature flag (#55054)
* CloudMonitor: remove cloudMonitoringExperimentalUI

* fix: address typecheck errors

* fix: fix SLO import and width cleanup

* fix wrong metricType when switching datasources

* fix: remove legacy SLO and fix queryType check
2022-09-15 14:12:26 +00:00
Marcus Andersson
c95b530502
DataSource: Adding possibility to hide queries from the inspector (#54892)
* adding the possibility to hide queries when they are executed via the DataSourceWithBackend.query
2022-09-13 13:27:16 +02:00
Ivana Huckova
e70395f07a
Query editor: Allow query editors to create new query (#55028)
* Query editor: Allow query editors to create new query

* Update

* Revert "Update"

This reverts commit d5b79d60dd.
2022-09-13 13:09:31 +02:00
Torkel Ödegaard
d59bb1e4c2
IconName: Move to grafana/data and use type on NavModelItem (#55013)
* IconName: Allow strings

* Moving to grafana/data and adding type to NavModelItem

* Removed any type

* ts fix
2022-09-12 20:09:33 +02:00
Torkel Ödegaard
49bc70c812
TopNav: Panel edit changes (#54746)
* Progress

* Progress

* Things are working

* More tweaks

* Fixing unit test

* Tweaks and fixing e2e tests

* Remove ... in Save as

* Fixing unit test

* Fixing e2e test

* Fixes

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-09-12 15:45:14 +02:00
Carl Bergquist
72ae4a5aa3
toggles: add feature toggle to increase in mem caching (#55014)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2022-09-12 03:50:54 -04:00
Leon Sorokin
dbb33eaba9
DataFrameJSON: add string enums inflation of field values (#54938)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-09-09 13:59:29 -06:00
kay delaney
4c7732ad17
Chore: Upgrade Typescript to 4.8.2 (#54901)
* Chore: Upgrade typescript to 4.8.2
2022-09-09 16:17:58 +01:00
renovate[bot]
b382c7ac1d
Update dependency marked to v4.1.0 (#54972)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-09 09:09:32 -04:00
renovate[bot]
ad19f018a9
Update dependency esbuild to v0.15.7 (#54928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-09 10:56:49 +01:00
Leon Sorokin
085db83cd9
DisplayProcessor: Handle reverse-ordered data when auto-showing millis (#54923) 2022-09-08 12:49:03 -05:00
Kevin Yu
34fe7a1119
Plugins: Add feature toggles for long running queries (#54349)
* Add feature toggles for long running queries

* update feature flag name

* make feature toggle frontend only
2022-09-05 08:39:45 -07:00
Torkel Ödegaard
11de1dfe40
TopNav: Plugin page layouts / information architecture (#53174)
* Change nav structure when topnav is enable to do initial tests with new information architecture

* Support for nested sections

* Updated

* sentance case

* Progress on plugin challange

* Rewrite to functional component

* Progress

* Updates

* Progress

* Progress on things

* missing file

* Fixing issue with runtime, need to use setter way to set component exposed via runtime

* Move PageLayoutType to grafana/data

* Fixing breadcrumb issue, adding more tests

* reverted backend change

* fix recursive issue with cleanup
2022-09-05 14:56:08 +02:00
Leon Sorokin
8273839539
Histogram: ensure y axis is unit-less (#54667) 2022-09-02 13:50:01 -05:00
Ashley Harrison
0ab548a8b5
Chore: fixing some anys/type assertions (#54661)
* fixing some anys/type assertions

* make types consistent
2022-09-02 16:39:09 +00:00
Timur Olzhabayev
b5b41988cf
Docs: Deprecating packages_api and removing it from our pipelines (#54473) 2022-09-01 18:15:44 +02:00
Josh Hunt
f15ce633c9
Navigation: Don't round app plugin icon images (#54543)
* Navigation: Don't round app plugin icon images

* round icon
2022-09-01 10:28:50 +01:00
renovate[bot]
7efefbaece
Update dependency moment-timezone to v0.5.35 [SECURITY] (#54523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-01 10:27:39 +01:00
Kristina
38c1f3d054
Explore: Add Mixed Datasource (#53429)
* Toggle on the mixed mode option

* Ensure switching to mixed gives existing query prev datasource

* WIP - Populate datasource when switching between mixed and not

* WIP - handle change from mixed

* Remove preimport filter, refine filter to work for queries

* WIP debugging datasource transition

* Ensure creating a new query gets target data source if switching with no matches between

* Add mixed datasource to rich history display

* Cleanup console logs, add relevant comments

* Add feature toggle for mixed datasource

* Fix Wrapper tests

* Fix tests!

* Fix test types and add feature tracking

* Remove unnecessary default, remove explore/mixed workarounds for D2E

* Move display text logic to mixed datasource file

* Add in the default query parameters to a generated empty query

* Condense some code

* Apply suggestions from code review

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Add more logic around mixed datasource being off for explore

* Build out logic to handle different datasource scenarios

* Add tests

* Finalize last test

* Fix mixed URL with mixed ds off, and relevant test

* Fix datasource to explore workflow

* Add datasource change function, call import queries if needed

* add logic for changing single query ds

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-08-31 09:24:20 -05:00