Commit Graph

30970 Commits

Author SHA1 Message Date
Gábor Farkas
aa7a6633b8
old-alert: set interval and max-data-points (#38434)
* alerting: old-alerting: handle interval + maxdatapoints better

* fixed failing test

* refactor: use interval instead of tsdb

* fix typo

* added unit-test

* added comment

* refactor
2021-08-31 14:49:30 +02:00
Jack Westbrook
fec50115b0
Chore: Bump dangerously-set-html-content to 1.0.9 (#38622) 2021-08-31 14:10:56 +02:00
Tania B
bfde29d107
Chore: Remove global encryption calls from authinfoservice (#38591)
* Add encryption service

* Add tests for encryption service

* Inject encryption service into http server

* Replace encryption global function usage in login tests

* Migrate to Wire

* Refactor authinfoservice to use encryption service

Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-08-31 14:00:13 +02:00
Gábor Farkas
a5d11a3bef
Prometheus: monaco-based query-editor-field, first step (#37251)
* prometheus: add monaco-based query-field

for now it is behind a feature-flag

* added new trigger character

* better separate grafana-specifc and prom-specific code

* better styling

* more styling

* more styling

* simpler monaco-import

* better imports

* simplified code

* simplified type imports

* refactor: group completion-provider files together

* renamed type

* simplify type-import

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* handle no-metric-name autocompletes

* updated comment

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-08-31 13:46:13 +02:00
Jack Westbrook
8d3b31ff23
Build: Upgrade Webpack 5 (#36444)
* build(webpack): bump to v5 and successful yarn start compilation

* build(webpack): update postcss dependencies

* build(webpack): silence warnings about hash renamed to fullhash

* build(webpack): enable persistent cache to store generated webpack modules / chunks

* build(webpack): prefer eslintWebpackPlugin over tschecker so eslint doesn't block typechecking

* chore(yarn): run yarn-deduplicate to clean up dependencies

* chore(yarn): refresh lock file after clean install

* build(webpack): prefer output.clean over CleanWebpackPlugin

* build(webpack): prefer esbuild over babel-loader for dev config

* build(babel): turn off cache compression to improve build performance

* build(webpack): get production builds working

* build(webpack): remove phantomJS (removed from grafana in v7) specific loader

* build(webpack): put back babel for dev builds no performance gain in using esbuild in webpack

* build(webpack): prefer terser and optimise css plugins for prod. slower but smaller bundles

* build(webpack): clean up redundant code. inform postcss about node_modules

* build(webpack): remove deprecation warnings flag

* build(webpack): bump packages, dev performance optimisations, attempt to get hot working

* chore(storybook): use webpack 5 for dev and production builds

* build(storybook): speed up dev build

* chore(yarn): refresh lock file

* chore(webpack): bump webpack and related deps to latest

* refactor(webpack): put back inline-source-map, move start scripts out of grafana toolkit

* feat(webpack): prefer react-refresh over react-hot-loader

* build(webpack): update webpack.hot to use react-refresh

* chore: remove react-hot-loader from codebase

* refactor(queryeditorrow): fix circular dependency causing react-fast-refresh errors

* revert(webpack): remove stats.errorDetails from common config

* build(webpack): bump to v5 and successful yarn start compilation

* build(webpack): update postcss dependencies

* build(webpack): silence warnings about hash renamed to fullhash

* build(webpack): enable persistent cache to store generated webpack modules / chunks

* build(webpack): prefer eslintWebpackPlugin over tschecker so eslint doesn't block typechecking

* chore(yarn): run yarn-deduplicate to clean up dependencies

* chore(yarn): refresh lock file after clean install

* build(webpack): prefer output.clean over CleanWebpackPlugin

* build(webpack): prefer esbuild over babel-loader for dev config

* build(babel): turn off cache compression to improve build performance

* build(webpack): get production builds working

* build(webpack): remove phantomJS (removed from grafana in v7) specific loader

* build(webpack): put back babel for dev builds no performance gain in using esbuild in webpack

* build(webpack): prefer terser and optimise css plugins for prod. slower but smaller bundles

* build(webpack): clean up redundant code. inform postcss about node_modules

* build(webpack): remove deprecation warnings flag

* build(webpack): bump packages, dev performance optimisations, attempt to get hot working

* chore(storybook): use webpack 5 for dev and production builds

* build(storybook): speed up dev build

* chore(yarn): refresh lock file

* chore(webpack): bump webpack and related deps to latest

* refactor(webpack): put back inline-source-map, move start scripts out of grafana toolkit

* feat(webpack): prefer react-refresh over react-hot-loader

* build(webpack): update webpack.hot to use react-refresh

* chore: remove react-hot-loader from codebase

* refactor(queryeditorrow): fix circular dependency causing react-fast-refresh errors

* revert(webpack): remove stats.errorDetails from common config

* revert(webpack): remove include from babel-loader so symlinks (enterprise) work as before

* refactor(webpack): fix deprecation warnings in prod builds

* fix(storybook): fix failing builds due to replacing css-optimise webpack plugin

* fix(storybook): use raw-loader for svg icons

* build(webpack): fix dev script colors error

* chore(webpack): bump css-loader and react-refresh-webpack-plugin to latest versions

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-08-31 12:55:05 +02:00
Ashley Harrison
b40d48258d
Sidemenu: Fix logout button (#38747) 2021-08-31 11:33:38 +01:00
Dimitris Sotirakis
3fb5afb9e3
Update Dockerfile (#38744) 2021-08-31 12:53:17 +03:00
Ashley Harrison
7a242afcd6
Sidemenu: Refactor BottomNavLinks to use SideMenuDropDown (#38598)
* Sidemenu: Attempt to refactor BottomNavLinks to use SideMenuDropDown

* BottomNavLinks: Rewrite existing enzyme tests in RTL

* BottomNavLinks: Use object spreading instead of slicing
2021-08-31 10:37:51 +01:00
Selene
e47a60f511
Add filter to search users by active (#38637)
* Add filter to search users by active

* Fix query
2021-08-31 11:35:16 +02:00
shuotli
f1529b83a2
[Azure monitor] Support variables for Azure Resource Group subscription picker (#38620) 2021-08-31 09:15:35 +02:00
Ryan McKinley
f567bef0bf
Geomap: hide legend for markers with single threshold (#38734) 2021-08-30 23:22:19 -07:00
Dimitris Sotirakis
8e2ee0a1c8
Chore: Update to Golang 1.17 (#38608)
* Update to golang 1.17

* Further updates

* Run go mod tidy on go 1.17

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Use build-container:1.4.2

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-08-31 09:19:26 +03:00
Leon Sorokin
05e5b67a99
Colors: rename getThresholdRange() -> getGradientRange() (#38688)
* Colors: use visible y scale range for non-threshold gradients schemes

* rename instead
2021-08-30 15:04:02 -05:00
Tania B
a0108a1e5b
Encryption: Extract encryption into service (#38442)
* Add encryption service

* Add tests for encryption service

* Inject encryption service into http server

* Replace encryption global function usage in login tests

* Apply suggestions from code review

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

* Migrate to Wire

* Undo non-desired changes

* Move Encryption bindings to OSS Wire set

Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-08-30 19:39:55 +02:00
Kyle Brandt
79e79fe244
Alerting/Docs: Clarify NoData option (#38451)
* Alerting/Docs: Clarify NoData option
for #37665

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-grafana-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-08-30 09:13:04 -04:00
Zoltán Bedi
dbc7464e78
Toolkit: fix matchmedia missing (#38694) 2021-08-30 14:36:15 +02:00
Levente Balogh
82c038bd06
Plugins Catalog: add signature information to details (#38558)
* refaactor: extract the tab labels into a const

* feat: list - show signature badge for enterprise plugins as well

* feat(plugins): add a component for showing plugin signature details

* feat: add a component for showing signature info under details

* feat: add a component for displaying signature info in details header

* feat: extract the plugin details header into a separate component

* feat: show signature information on the plugins details page

* refactor(Plugins): use an enum instead of an object

* refactor(Plugins): use more strict typing for tabs

* refactor(Plugins): use function declaration instead of fat-arrow for components

* fix(Plugins): fix typo

* fix: make installed plugin config an optional param again

* refactor: cache plugin meta requests

* refactor: move PLUGIN_TAB_LABELS to the types module
2021-08-30 14:00:11 +02:00
Serge Zaitsev
d15cbe4b4e
Macaron cleanup (#37795)
* simplify some dependency injection in macaron
* remove unused internal server error handler from macaron
* remove internal server error handler from the router
* remove unused combo router api
* remove unused parts of the macaron router
2021-08-30 11:48:34 +02:00
Peter Holmberg
74afe809af
Alerting: Add DateTimePicker on view rule page (#38592)
* export datetimepicker

* minor fixes to the datetime picker

* correct datetime to picker

* move datetime calc to function

* set maxDate

* set maxDate

* wrap in useCallback
2021-08-30 11:42:37 +02:00
Zoltán Bedi
38b398feb4
Fix: panel crash after esc (#38646) 2021-08-30 09:57:07 +02:00
Alex Khomenko
d90c822e69
Fix key prop when rendering options (#38595) 2021-08-30 06:59:51 +02:00
Oscar Kilhed
b248c119ef
TimeSeries: Use graph min/max for percentage threshold (#38528)
* TimeSeries: Use graph min/max as baseis for percentage threshold calculation.

* respect hard and soft axis limits for % threshold steps

* revert state-timeline changes

* enable by-threshold coloring in histogram and barchart

* revert yMin

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-29 15:46:17 -05:00
sam boyer
96557ecadc
Change cuetsy annotation "targetType" to "kind" (#38564)
Mirrors change made upstream in cuetsy
2021-08-29 14:29:06 -04:00
knuzhdin
3df001db93
ImageRendering: fix leakage of the rendering inflight counter (#34607) 2021-08-28 09:05:03 +02:00
Christoph Deil
06c9f7e13b
Fix typo in whats-new-in-v8-1.md (#38660)
* Fix typo in whats-new-in-v8-1.md

* Update docs/sources/whatsnew/whats-new-in-v8-1.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-08-28 00:28:56 +02:00
nikki-kiga
a54a139176
Transformations: Convert field types to time string number or boolean (#38517)
* outline string to time

add stringToTime transformer

start to add format

add type and dateformat

rename stringToTime to fieldConversion

add more type support and use FieldNamePicker

add field conversion transformation

* adjust for performance feedback

rename and adjust labels and widths

shorten labels and null values

rename to convertFieldType

update test

* make updates
2021-08-27 13:49:31 -07:00
Leon Sorokin
3c72f1678f
Colors: fix by-value/hex3 & Single color schemes in Gradient mode (#38656) 2021-08-27 15:06:28 -05:00
Leon Sorokin
4e2516d12a
GraphNG: fix crash when trying to diff missing timeRange prop (#38654) 2021-08-27 12:40:33 -05:00
Dominik Prokop
1be53b4f3b
TimeSeries: Add per-axis grid visibility toggle (#38502)
* Allow grid lines visibility control to XYChart and TimeSeries

* Move grid lines config to field config (axis)

* Fix merge

* Auto grid mode

* Fix ts

* Align naming

* Update packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.test.ts

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* Update packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.test.ts

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* remove 'grid' from props diff array since field.config.custom.* is handled by structureRev diffing

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-27 12:30:42 -05:00
Giordano Ricci
b5e4a0a39a
Elasticsearch: Only show numbers in histogram field autocomplete (#38631) 2021-08-27 17:19:44 +01:00
Jack Westbrook
5898824a48
Chore: Fix version format (#38649) 2021-08-27 18:12:37 +02:00
Petros Kolyvas
4a73e0f9a8
Docs: Remove an unnecessary legacy alerts notification webhook listing and reduce promotional content (#38644)
* Removed an unecessary webhook listing and modified some text to reduce promotion for specific tooling.

* Updated doc content with Eve and Ursula's review.

* Removed "the".

Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
2021-08-27 11:17:58 -04:00
Olof Bourghardt
8da634f780
Loki: add tests for addAdHocFilters (#38594)
* Loki: add tests for addAdHocFilters

* Change description of test

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

* Replace ADD_FILTER with "=" operator in test description

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

* Loki: refafctor test for addAdHocFilter

* Loki: refactor tests for better readability

* Remove comments

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-08-27 17:06:22 +02:00
Jack Westbrook
beeb8330c4
Chore: Update packages version to 8.2.0-pre (#38635)
* chore(packages): run packages:prepare script

* chore: update package.json version

* chore: put back semver compliant version
2021-08-27 17:01:19 +02:00
Giordano Ricci
eaca54a9f2
Elasticsearch: change terms default min_doc_count to 1 (#38632) 2021-08-27 14:22:12 +01:00
Armand Grillet
72d296843d
Docs: clarify state of Unified Alerting (#38603)
* Docs: clarify state of Unified Alerting

* Update docs/sources/alerting/unified-alerting/_index.md

Co-authored-by: Kyle Brandt <kyle@grafana.com>

* Adjusted note to move below the introduction.

* Fixed a typo and added beta notes.

* Minor typo fix.

* Docs: remove innacurate beta label for Grafana 8.0

Grafana 8.0 is not in beta, only unified alerting.

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
2021-08-27 15:09:28 +02:00
Ikko Ashimine
202f295e51
Chore: Fix typo in nodes.go (#38636)
commmon -> common
2021-08-27 14:57:41 +02:00
Marcus Efraimsson
e872032a2b
Docs: Add v8.1 upgrade note regarding unencrypted data source passwords (#38449)
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-27 13:23:56 +02:00
Alexander Emelin
a95a40d87d
Live: allow connections with request host matching origin host (#38538) 2021-08-27 13:26:28 +03:00
Andres Martinez Gotor
b25eb0aa74
AzureMonitor: Fix wrong merge (#38623) 2021-08-27 11:31:17 +02:00
Torkel Ödegaard
bbaf6a23bb
Docs: Add info and links about our hosted services to our grafana install docs (#38544)
* Add info and links about our hosted services to our grafana install docs

* review updates

* Update docs/sources/installation/debian.md

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

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-08-27 10:46:45 +02:00
Marcus Efraimsson
0ef5831332
v8.2.0-pre.0 2021-08-27 10:39:53 +02:00
Olof Bourghardt
458bced826
Jaeger: fix bug where query is executed twice (#38550)
* Jaeger: add empty callback to QueryField onBlur to stop query from being run twice

* Jaeger: add wait call on 500ms to accomodate for debouncing by the QueryField component
2021-08-27 10:36:18 +02:00
Alex Khomenko
a15e33e693
Admin: remove Redux from ServerStats (#38581)
* Admin: remove Redux from ServerStats

* Admin: Fix import
2021-08-27 11:09:17 +03:00
Alex Khomenko
c08d5eeda0
Update the location of the server stats tab (#38548) 2021-08-27 10:04:57 +03:00
Gábor Farkas
8e88600c04
style-guide: frontend: describe directory naming style (#38607)
* style-guide: frontend: describe directory naming style

* apply recommended changes

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

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-08-27 08:27:56 +02:00
Dimitris Sotirakis
d7daaa19df
Add CODEOWNERS for CI related code (#38606) 2021-08-27 09:06:15 +03:00
Jack Westbrook
2cb141d4ec
Plugins: Refactor installation buttons component (#37642)
* refactor(catalog): split out installcontrols into multiple components

* test(catalog): update tests for plugindetails page

* refactor(catalog): rename installcontrols -> index

* refactor(catalog): remove redundant curlies

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* tests(plugindetails): fix assertions and naming of tests

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* refactor(installcontrols): prefer enum over duplicate union type, rename disabled prop

* refactor(installcontrols): use PluginStatus enum for installcontrols pluginStatus

* refactor(installcontrols): remove redundant curlies

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-08-26 17:15:43 +02:00
idafurjes
568549e810
Bug: Return empty plugins.DataTimeSeriesSlice when the frame field vector is epmty (#38587)
* Add check if the vector is empty

* Use Rows() instead of Len() on field

* Remove redundant condition
2021-08-26 16:39:50 +02:00
Jack Westbrook
5339275793
Grafana UI: Fix TS error property css is missing in type (#38078) 2021-08-26 16:00:52 +02:00