Commit Graph

1714 Commits

Author SHA1 Message Date
Torkel Ödegaard
9201c47e59
DashboardScene: Map timezone and fiscal year to scene model and back (#75715)
* DashboardScene: Map timezone and fiscal year to scene model and back

* weekstart

* update scenes
2023-10-03 11:03:53 +02:00
Esteban Beltran
9747cdd7d1
Sandbox: Update to latest near membrane version ^0.13.0 (#75605)
* Sandbox: Update to latest near membrane version ^0.13.0

* Use exact version

* Replace throw with reject

* Add nera membrane to renovate skip list
2023-10-03 10:22:17 +02:00
Josh Hunt
8006dacf15
I18n: Run psuedo when extracting phrases (#75811) 2023-10-02 11:58:43 +00:00
ismail simsek
dcaad5b3fd
Chore: Update react-awesome-query-builder package (#75766)
* Upgrade react-awesome-query-builder to v6.4.1

* Update package

* Update package and fix types

* Remove unnecessary package
2023-10-02 13:29:39 +02:00
renovate[bot]
da23aef83d
Update babel monorepo (#75353)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-25 14:27:35 +01:00
Leon Sorokin
aadd5bacfa
Chore: uPlot v1.6.26 (#75199) 2023-09-22 11:33:39 -05:00
renovate[bot]
f0b75360db
Update dependency @grafana/faro-web-sdk to v1.2.1 (#75291)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 15:11:32 +01:00
renovate[bot]
7501dab95e
Update dependency @grafana/faro-core to v1.2.1 (#74957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 14:30:53 +01:00
Matias Chomicki
91ed2a6afe
Loki Query Editor: Add support for new logfmt features (#74619)
* Loki autocomplete: add IN_LOGFMT situation for log queries

* Loki autocomplete: add IN_LOGFMT situation for metric queries

* Loki autocomplete: improve handling of trailing pipes and spaces

* Loki autocomplete: add logfmt arguments completion

* Loki autocomplete: add flags support to IN_LOGFMT

* Loki autocomplete: extend IN_LOGFMT situation with labels and flag

* Loki autocomplete: return logQuery in IN_LOGFMT situation

* Loki autocomplete: offer label completions when IN_LOGFMT

* Query utils: update parser detection method

* Validation: update test

* Loki autocomplete: improve IN_LOGFMT detection when in metric query

* Loki autocomplete: improve logfmt suggestions

* Loki autocomplete: improve logfmt suggestions in different scenarios

* Loki autocomplete situation: refactor resolvers to support multiple paths

* Situation: add test case

* Loki autocomplete: allow user to use 2 flags

* Situation: change flag to flags

* Remove console log

* Validation: import test parser

* Completions: better handling of trailing comma scenario

* Upgrade lezer-logql

* Revert temporary imports

* Loki Query Builder: Add support for new logfmt features (#74858)

* Query builder: add params to logfmt definition

* Logfmt operation: add default params

* Query builder: update deprecated JsonExpression

* Operation utils: update logfmt renderer

* Query builder: parse LogfmtParser

* Query builder: parse LogfmtExpressionParser

* Remove console log

* Remove unused variable

* Remove extra character from render

* Update unit tests

* Fix unit tests

* Operations: remove restParams from logfmt booleans

* Parsing: group cases

* Formatting

* Formatting

* Update modifyQuery

* LogContextProvider: update with parser changes

* LogContextProvider: remove unnecessary type castings

It takes more energy to write `as unknow as LokiQuery` than to write a refId.

* Formatting

* Situation: use charAt instead of substring with endsWith

* Situation: explain logfmt suggestions

* Logfmt: improve flag suggestions

* Remove console log

* Completions: update test
2023-09-22 12:34:17 +03:00
Dominik Prokop
df1c80c7d8
DashboardScene: Prepare annotations support for public dashboards (#75146)
* WIP Dashboard to Scenes: Annotations

* Bump scenes

* Enable annotations and controls

* Betterer

* Update snapshots

* Test fix

* DashboardScene: Prepare annotations support for public dashboards

* Use latest scenes
2023-09-20 03:47:09 -07:00
Dominik Prokop
157859aede
DashboardScene: Integrate annotations (#74610)
* WIP Dashboard to Scenes: Annotations

* Bump scenes

* Enable annotations and controls

* Betterer

* Update snapshots

* Test fix
2023-09-20 02:50:35 -07:00
Virginia Cepeda
0d3c47da99
[Alerting] - Display scenes using SceneAppPage for caching (#74767)
* Display scenes using SceneAppPage for caching

Also, reorganizing them in different tabs per Torkel's suggestion

* Fix lint

* Alerting home app poc

* Fix imports

* fix routing

* remove width

* Apply feature flags back

* Add comment regarding enabling the rule group query variable

* Upgrade scenes lib

* Add query variables back

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-09-19 09:17:56 -03:00
Fabrizio
9113c6d959
Tempo: Improve autocompletion for TraceQL editor (#74790) 2023-09-19 09:23:35 +02:00
Ashley Harrison
3fdf96d241
Chore: consolidate e2e scripts in package.json (#74906)
consolidate e2e scripts in package.json + almost fix benchmarking tests
2023-09-14 15:00:29 +01:00
Ashley Harrison
fcdae0ca0b
Chore: move to cypress 13.1 (#74718)
* move to cypress 13.1

* update cloud-data-sources docker image
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-09-13 11:08:43 +01:00
Andrej Ocenas
e4f26a5e4b
Flamegraph: Move to package (#73113) 2023-09-12 12:28:48 +02:00
Torkel Ödegaard
97d568e60a
DashbboardScene: RowRepeaterBehavior (#74505)
* Repeating rows start

* working

* Progress

* Progress

* Update

* up scenes lib

* Update

* Progress

* restore url sync

* Progress

* Fixes and tests

* Update

* Adds tests and code to remove repeats from save model

* Update

* Fix test
2023-09-11 12:02:04 +02:00
Ashley Harrison
0f2f25c5d9
Chore: Move to Cypress 12 and decouple cypress from @grafana/e2e (#74084)
* update drone to use cypress 12 image

* upgrade cypress to 12 in core

* cypress config actually valid

* update @grafana/e2e imports and add lint rule

* ignore grafana-e2e from betterer now it's deprecated

* fix remaining type errors

* fix failing tests

* remove unnecessary tsconfig

* remove unnecessary comment

* update enterprise suite commands to work

* add cypress config to CODEOWNERS

* export setTimeRange in utils

* remove @grafana/e2e from core deps

* try running the command through yarn

* move CMD to scripts

* Update cloud-data-sources e2e image

* Update paths

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-09-08 16:51:59 +01:00
Fabrizio
96facbdfa2
Tempo: Improve autocompletion and syntax highlighting for TraceQL tab (#73707) 2023-09-07 12:36:23 +02:00
Sarah Zinger
433c76f7f6
Cloudwatch: Bump grafana-aws-sdk (#74422) 2023-09-06 08:34:40 -04:00
Torkel Ödegaard
d82a3c9fc6
DashboardScene: Repeat panel by variable (#74294)
* Progress

* think this a bad approach

* Scene panel repeats looking good

* Update

* update

* Update

* Use key instead for inspect/view

* refactorings to improve tests

* Update

* More tests

* Update

* added support for key / value variables

* Update

* Fixes

* remove log

* Update

* Removed old gdev templating dashboard and added new and improved one

* Update

* Added repeating panels coded demo

* Update to latest scenes lib

* review feedback fixes

* update

* Sync schema
2023-09-05 13:51:46 +02:00
Yulia Shanyrova
77bf8215d4
Plugins: Remove deprecated grafana-toolkit (#73489)
* remove grafana-toolkit

* replaces old tsconfig with grafana tsconfig

* fix betterer
2023-09-05 09:56:04 +02:00
Torkel Ödegaard
f4c127a1d8
DashboardScene: Support panel relative time overrides and timeshift (#62844)
* Things are working

* update

* Added unit tests

* More tests

* minor fix

* Update

* Support hideTimeOverride
2023-09-01 10:21:41 +02:00
Jack Westbrook
62821c69b3
Plugins: Bump SystemJS to 6.14.2 (#70068)
* chore(plugins): bump systemjs to latest version

* refactor(plugins): switch runtime over to use latest systemjs, add typings

* refactor(plugins): use latest systemjs APIs for runtime dependency resolution

* refactor(plugins): return valid urls from backend for latest systemjs import to work

* revert(plugins): remove cfg from assetpath in favour of relative paths

* fix(plugins): useDefault for systemjs deps to solve undefined errors

* feat(plugins): add basic support for loading plugins via CDN

* fix(plugins): load nested plugins with latest systemjs

* feat(plugins): add back ability to transform plugin src for cdns

* feat(plugins): get caching for module.js working, clean up

* refactor(plugin_loader): create buildImportMap fn and more clean up

* refactor(angularapp): use buildImportMap for dependencies and clean up

* test(plugin_loader): fix failing test due to systemjs update

* test(jest): mock systemjs amd extra in tests to prevent it breaking tests

* chore(plugins): remove systemjs module-types extra, already included with system

* fix(plugins): update key for invalidating cached plugins

* fix: move systemjs amd define to another global so monaco can load

* refactor(plugins): clean up cache buster and tests

* chore(plugins): remove debug

* refactor(plugins): move systemjs define to keep global cleaner

* fix(plugins): set useDefault so system modules lodash references dont fail

* feat(plugins): hook systemjs onload so stylesheets are applied to the dom

* refactor(plugins): wrap amd formatted plugins in iife to prevent define collision

* feat(plugins): support system module format for legacy plugins

* test(plugincachebuster): update tests to match latest implementation

* test(plugins-loader): fix up tests post module property change

* fix test

* Update pkg/plugins/manager/loader/assetpath/assetpath.go

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

* chore(plugin_loader): remove stray import from merge conflict

* Revert "Update pkg/plugins/manager/loader/assetpath/assetpath.go"

This reverts commit 0df57d1cf20f49c22c93369001c70aae46a97c42.

* fix(plugin_loader): set use default for shared plugin dependencies

* refactor(plugins): use leading slash for Module and BaseUrl

* fix(plugins): fix resolve appending extension to cache query param

* refactor(plugins): align baseurl and module paths

* refactor(plugins): update builtInPlugins keys to match naming convention

* refactor(plugins): minor loader clean up, fix up types

* test(plugins): fix failing tests

* refactor(plugins): rename cache buster systemjs plugin to cache

* refactor(plugins): separate plugin_loader into smaller files

* chore(plugins): clean up plugin_loader types

* chore(plugin_sandbox): fix typescript error

* chore(npm): remove unplug debug and pin systemjs to 6.14.1

* refactor(plugins-cdn): update loaders to use absolute module url from backend

* fix(plugins): escape period in systemjs  module regex

* chore(plugins): delete redundant systemjs plugins

* refactor(plugin_loader): move hooks into own file, add types

* test(plugins): add tests for systemjs loader hooks

* chore(plugins): rename systemjshooks file

* chore(plugins): remove redundant systemjs cdn backend code

* fix(plugins): handle loading with config.appSubUrl

* chore(plugins): delete redundant plugin-cdn angular code

* test(plugins): fix failing systemjs test missing pluginsCDNBaseUrl

* refactor(plugins): backend provides base and module properties with AppSubUrl

* fix(plugins): consider AppSubUrl for plugin logos

* fix(plugins): use isHostedOnCDN util when checking for cdn hosted plugins

* add new appSubURL field to config

* refactor relative URL func

* fix path for core app

* refactor asset path input

* fix(plugins): catch errors in loadPluginCss

* feat(plugins-cdn): selectively transform sourceMapURL

* re-add deleted test case

* chore(plugins): bump to latest systemjs@6.14.2

* feat(plugins): add systemjs-cjs-extra for loading commonjs plugins

---------

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2023-08-31 15:45:44 +02:00
renovate[bot]
66f60bc410
Update dependency @grafana/experimental to v1.7.0 (#74051)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-30 09:41:12 +01:00
Torkel Ödegaard
412e545503
DashboardScene: Support for discard, start at transform back to save model and save drawer (#73873)
* SceneDashboard: Discard changes now works

* To save model works and start at save drawer

* Update

* Added missing file

* Refactorings to keep responsibility more logical

* Refactorings

* Removed file

* Fixed state issue

* Update

* Update
2023-08-29 14:17:55 +02:00
Sven Grossmann
07eb4b1b90
Loki: Remove distinct operation (#73938)
* remove distinct

* trigger ci

* update yarn.lock

* fix import
2023-08-28 19:26:59 +02:00
Torkel Ödegaard
5bd58cac57
Eslint: Update grafana/eslint-config that allows public accessability modifier (#73906) 2023-08-28 14:57:49 +02:00
Jo
1a281ac49d
Experiment: tag UI devices for anon stats (#73748)
* experiment: attempt to tag only UI devices

* lint frontend

* use await

* use shorthand check

* do not assume build info exists

* do not assume build info exists

* Apply suggestions from code review

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-08-28 10:49:23 +02:00
Torkel Ödegaard
9b891480d6
DashboardScene: Edit mode should enable dragging (#73628)
* DashboardScene: Edit mode should enable dragging

* Update

* Update

* Update scenes lib
2023-08-24 07:26:23 +02:00
Kevin Minehart
ebeb7dcb83
Update "What's new" URL (#73722)
Update package.json
2023-08-23 18:55:51 -03:00
Sarah Zinger
8b7566c299
Cloudwatch: Upgrade grafana-aws-sdk (#73580)
Upgrade grafana-aws-sdk
2023-08-23 09:52:30 -04:00
Ivana Huckova
fc9b8f6be1
Loki: Implement keep and drop operations (#73636)
* Update lezer

* Add functionalities for code and builder

* Add comment
2023-08-23 14:52:19 +02:00
renovate[bot]
c5be239990
Update dependency @types/jest to v29.5.4 (#63635)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-23 11:15:39 +01:00
Dominik Prokop
f00f56bbff
DashboardLoaders: Add support for loading library panels (#73406)
* DashboardLoaders: Add support for loading library panels

* Bump scenes

* Scene object for loading library panels

* Remove unused function

* Remove console.log

* Bump scenes

* Review
2023-08-21 08:43:48 -07:00
Dominik Prokop
30393459df
DashboardsLoader: Enable cursor sync in scenes based dashboard (#73383)
* Bump scenes

* Enable cursor sync in scene dashboard
2023-08-17 07:03:26 -07:00
Josh Hunt
654d99fbca
Chore: Replace Husky/Lint-staged with Lefthook (#66608)
* Switch from husky+precommit to lefthook

Migrate from husky/precommit to lefthook

h

old husky precommit

lefthook so far

remove husky folder

switch to new lefthook package

Add postinstall script to clean up after husky

preinstall to remove husky config

package.json

package.json

package.json

script

v

Reduce lefthook output

Cleanup

testing

reduce output

testing betterer

testing betterer

testing betterer

testing betterer

testing betterer

testing betterer

testing betterer

skip skipping execution info

small cleanup

remove comment from testing

clean up old husky hooks in .git/hooks path

run scripts in parallel

update codeowners

don't auto-install lefthook

install lefthook with make command

fix yarn checksum

* update codeowners

* don't use source because it isn't available in ubuntu/debian's /bin/sh

* Ensure lefthook commits files fixed by precommit hooks

* add comment to lefthook.rc explaining what it does

* add i18n:pseudo precommit

* Don't create .husky/safe-to-delete file anymore

* cleanup old lint-staged config

* contribute docs

* update lefthook to 1.4.8

* Move frontend encouragement docs

* rewrite husky cleanup script in bash so we can run it with make

* Make old husky precommit script reject commits until husky is removed

* log precommit warning for everyone

* fix package.json

* run lefthook hooks from old husky hook

* run lefthook hooks from old husky hook

* comments

* codeowners

* codeowners
2023-08-17 09:56:52 +00:00
Sarah Zinger
09d5483c6c
Cloudwatch: Upgrade aws-sdk and display external ids for temporary credentials (#72821)
(under a feature toggle, not yet ready for public testing)
2023-08-14 13:42:30 -04:00
Andrej Ocenas
58314e6414
Flamegraph: Remove feature flag and code to switch to pyroscope version (#72689) 2023-08-02 17:01:12 +02:00
Andre Pereira
5c14a07ec3
Tempo: Integrate TraceQL grammar (#72516)
* Replacing the regex based approach and integrating the lezer-traceql grammar in the editor

* Added some tests

* Added path to capture error in filter root

* Tests are great and help fix issues 👍

* Fix autocomplete tests
2023-08-01 14:15:05 +01:00
Jack Westbrook
00f0ff038e
Chore: Introduce yarn start:noLint (#64430)
chore(webpack): introduce start:noLint to bypass typecheck and lint plugins during dev
2023-08-01 11:58:39 +02:00
Ashley Harrison
70cbda951f
Chore: revert swc upgrade since it breaks CI metrics emit (#72598)
revert swc upgrade since it breaks CI metrics emit
2023-07-31 15:35:48 +03:00
renovate[bot]
58a2b5d64d
Update Monthly patch updates (#71651)
* Update Monthly patch updates

* dedupe packages

* lezer update rolled back

* rolled back react-virtualized-auto-sizer

* rolled back update to dangerously-set-html-content

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2023-07-31 13:52:26 +02:00
Ashley Harrison
ae4810f854
Chore: Emit theme token usage metrics (#72500)
* create rule to find instances of theme variables

* emit theme token usage metrics

* move awking into script

* make sure theme usage is covering ts and tsx files, remove commented lines
2023-07-28 17:08:02 +03:00
Matias Chomicki
0d121bab29
Elasticsearch: Implement modify query using a Lucene parser (#71954)
* Lucene: add dependency

* ModifyQuery: use Lucene parser to detect key:values in queries

* ModifyQuery: use Lucene parser to remove filters

* Remove test code

* Modify query: switch to recursive implementation

* Modify query: implement remove filter

* Update query normalizing function

* FlagElasticToggleableFilters: remove feature flag

* Remove unused feature flag from test

* Elasticsearch: escape quotes in filter values
2023-07-28 14:49:02 +02:00
grafana-delivery-bot[bot]
eaca6c3f49
Release: Bump version to 10.2.0-pre (#72418)
"Release: Updated versions in package to 10.2.0-pre"

Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
2023-07-27 09:21:29 +03:00
renovate[bot]
c280f884f0
Update dependency @grafana/experimental to v1.6.1 (#68681)
* Update dependency @grafana/experimental to v1.6.1

* chore(mssql-datasource): update completion provider to work with experimental type changes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-07-24 15:47:55 +02:00
Gareth Dawson
4e42f9b619
Loki: Add the ability to prettify logql queries (#64337)
* pushed to get help of a genius

* fix: error response is not json

* feat: make request on click

* refactor: remove print statement

* refactor: remove unnecessary code

* feat: convert grafana variables to value for API request

* use the parser to interpolate and recover the original query (#64591)

* Prettify query: use the parser to interpolate and recover the original query

* Fix typo

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

* Fix typo

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

* fix: reverse transformation not working

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Gareth Dawson <gwdawson.work@gmail.com>

* fix: bugs created from merge

* refactor: move prettify code out of monaco editor

* fix: variables with the same value get converted back to the incorect variable

* refactor

* use consistent styling with bigquery

* fix: only allow text/plain and application/json

* fix: only make the request if the query is valid

* endpoint now returns application/json

* prettify from js

* WIP: not all cases are handles, code still needs cleaning up

* WIP

* large refactor, finished support for all pipeline expressions

* add tests for all format functions

* idk why these files changed

* add support for range aggregation expr & refactor

* add support for vector aggregation expressions

* add support for bin op expression

* add support for literal and vector expressions

* add tests and fix some bugs

* add support for distinct and decolorize

* feat: update variable replace and return

* fix: lezer throws an errow when using a range variable

* remove api implementation

* remove api implementation

* remove type assertions

* add feature flag

* update naming

* fix: bug incorrectly formatting unwrap with labelfilter

* support label replace expr

* remove duplicate code (after migration)

* add more tests

* validate query before formatting

* move tests to lezer repo

* add feature tracking

* populate feature tracking with some data

* upgrade lezer version to 0.1.7

* bump lezer to 0.1.8

* add tests

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-07-21 13:03:56 +01:00
Jack Westbrook
6ac664ecf7
Chore: Update Semver to latest versions (#72086)
chore(npm): bump all versions of semver to their latest respective version
2023-07-21 12:40:45 +02:00
renovate[bot]
d2ff73d455
Update dependency stylelint-config-sass-guidelines to v10 (#71632)
* Update dependency stylelint-config-sass-guidelines to v10

* fixes

* fix typo

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-07-19 16:05:06 +01:00