Compare commits

...

112 Commits

Author SHA1 Message Date
Sofia Papagiannaki
9f4a172a76 Auth: Fix POST request failures with anonymous access (#26049)
Macaron context.QueryBool() seems to modify the request context
that causes the POST and PUT requests to fail with:
"http: proxy error: net/http: HTTP/1.x transport connection broken: http: ContentLength=333 with Body length 0"

(cherry picked from commit 44dff6fdd0)
2020-07-09 10:59:27 +02:00
Sofia Papagiannaki
eab4ff50a5 Auth: Add support for forcing authentication in anonymous mode and modify SignIn to use it instead of redirect (#25567)
* Forbid additional redirect urls

* Optionally force login in anonymous mode

* Update LoginCtrl page to ignore redirect parameter

* Modify SignIn to set forceLogin query instead of redirect

* Pass appUrl to frontend and use URL API for updating url query

* Apply suggestions from code review

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix SignIn test

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit fefbbc65a8)
2020-07-09 10:59:27 +02:00
Torkel Ödegaard
26b4c628f7 Templating: Fix recursive loop of template variable queries when changing ad-hoc-variable (#26191)
* Templating: Fix url sync issue with adhoc variables

* Update packages/grafana-ui/src/components/Segment/SegmentAsync.tsx

* Update packages/grafana-ui/src/components/Segment/SegmentAsync.tsx

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit 0428f27194)
2020-07-09 10:59:27 +02:00
Torkel Ödegaard
0487ac7d05 Bumped version 2020-07-09 10:59:27 +02:00
Torkel Ödegaard
81ec60c608 Templating: Fixed recursive queries triggered when switching dashboard settings view (#26137)
* Templating: Fixed recursive queries triggered when going into dashboard settings

* Fixed unused import

* use locationUtil

(cherry picked from commit cace879c96)
2020-07-09 10:59:27 +02:00
Torkel Ödegaard
efbcbb838b Cherry picks for v7.0.5 (#25938)
* Graphite: Fix graphite tag value dropdowns not rendering (#25889)


(cherry picked from commit 75d8853aac)

* Bump version to 7.0.5

* Datasource: Make sure data proxy timeout applies to HTTP client (#25865)

For backend data sources executing in the backend (not through data proxy) make
sure that the timeout applies to cached HTTP client.

Fixes #25863

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
(cherry picked from commit 460b01f1fe)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-06-30 14:58:56 +02:00
Torkel Ödegaard
c4d8d0c2ae Slider: Update rc-slider component (#25617) 2020-06-25 08:45:15 +02:00
Hugo Häggmark
ba06f38b16 Chore: Upgrades jQuery and @types/jQuery (#25651)
* Chore: upgrades jQuery and @types/jQuery

* Chore: reduce strict null errors

* Fixed issue in graphite func editor

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-06-25 08:45:15 +02:00
Hugo Häggmark
69e989ea9d Azure Monitor: fixes undefined is not iterable (#25586)
* Azure Monitor: fixes undefined is not iterable

* Update public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_log_analytics/response_parser.test.ts

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_log_analytics/response_parser.test.ts

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit c0139b7d42)
2020-06-25 08:45:15 +02:00
Marcus Efraimsson
b58f7741b5 InfluxDB: Fix invalid memory address or nil pointer dereference when schema is missing in URL (#25565)
Add guard if parsing url fails in influxdb backend data source.

Fixes #25242

(cherry picked from commit bd8a04a6a5)
2020-06-25 08:45:15 +02:00
Torkel Ödegaard
d7af398341 Dashboard: Redirects for old edit & view panel urls (#25653)
(cherry picked from commit d6ed8c522c)
2020-06-25 08:45:15 +02:00
Torkel Ödegaard
8a752954c5 Bump version to v7.0.4 2020-06-25 08:45:15 +02:00
Torkel Ödegaard
037682d63b Backport fixes from #24779 2020-06-25 08:45:15 +02:00
Torkel Ödegaard
497a194abc Variables: Adding dashboard to test updating variables from data link (#25192)
(cherry picked from commit aa5fb20cfd)
2020-06-25 08:45:15 +02:00
Torkel Ödegaard
aef8a08d3a Fixed merge issue 2020-06-25 08:45:15 +02:00
Torkel Ödegaard
3d65daa587 Templating: Fix searchFilter issue in templating system (#25770)
(cherry picked from commit b7d26b12dd)
2020-06-25 08:45:15 +02:00
Arve Knudsen
38bb3e55f3 CircleCI: Upgrade build pipeline tool (#25741)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit ba6aefb6ec)
2020-06-25 08:45:15 +02:00
Marcus Efraimsson
13579a7449 Datasources: Handle URL parsing error (#25742)
Adds handling of error returned from URL parsing.

Fixes #25714

(cherry picked from commit 58cefe73ee)
2020-06-25 08:45:15 +02:00
Arve Knudsen
45e6acabb3 API: Recognize MSSQL data source URLs (#25629)
* API: Recognize MSSQL URLs

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Move MSSQL URL validation into mssql package

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit d352c213b3)
2020-06-25 08:45:15 +02:00
Sofia Papagiannaki
4f58ca11da Stackdriver: Fix creating Label Values datasource query variable (#25633)
(cherry picked from commit e6a5e88054)
2020-06-25 08:45:15 +02:00
Alex Ashley
3fb267fe72 Stackdriver: Use default project name if project name isn't set on the query (#25413)
* Get default project if not defined on query

* Log when using default project name

* Set query result error

(cherry picked from commit 4aff2d7469)
2020-06-25 08:45:15 +02:00
kay delaney
cdf2fa9ff0 Explore/Logs: Fix tooltip display for log graph (#25544)
(cherry picked from commit bd76c66e50)
2020-06-25 08:45:15 +02:00
Arve Knudsen
79126eb73b Chore: Upgrade Jest to latest (#25591)
* Chore: Upgrade Jest to latest

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: reduces strict null errors

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
(cherry picked from commit 91c24e1f56)
2020-06-25 08:45:15 +02:00
Arve Knudsen
670c86246e package.json: Depend on es-check since we need it for CI (#25593)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit cf2343fac8)
2020-06-25 08:45:15 +02:00
Robbert Gurdeep Singh
d7aa9959a4 Security: Use Header.Set and Header.Del for X-Grafana-User header (#25495)
This ensures that the X-Grafana-User header can be trusted.
If the configuration enabled the setting of this header, the
server can now trust that X-Grafana-User is set/unset by Grafana.
Before this, an anonymous user could simply set the X-Grafana-User
header themselves (using the developer tool for example)

(cherry picked from commit 034abaa73a)
2020-06-25 08:45:15 +02:00
kay delaney
1ccf307efe UI/Switch: Makes Switch ID generation more stable (#25542)
(cherry picked from commit 12d2f2c026)
2020-06-25 08:45:15 +02:00
Overcooked Panda
963e3ba13e Units: Added bitcoin units milli-bitcoin (mBTC) and micro-bitcoin (μBTC) (#24182)
* Update Bitcoin Currency to use proper symbol, add mBTC and μBTC

* Apply suggestions from code review

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Revert Bitcoin to use '฿'

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>
(cherry picked from commit d3c57ac251)
2020-06-25 08:45:15 +02:00
Theo Schlossnagle
4b58a532b8 Fix dense y-axis labels in heatmap using tsbuckets (#24351)
* Fix dense y-axis labels in heatmap using tsbuckets

This change emulates the non-tsbuckets Y-axis tick count by making
the y-axis label formatter treat a dense set as a sparse set.

fixes #11342

* have d3 do the work

* Update public/app/plugins/panel/heatmap/rendering.ts

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

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
(cherry picked from commit b15a401efa)
2020-06-25 08:45:15 +02:00
Torkel Ödegaard
a535334c76 Table: Support custom date formats via custom unit (#25195)
* Table: Custom date formating via custom unit

* FieldConfig: Changed so that shouldApply is not called for overrides and added unit test

* Updated

(cherry picked from commit 6fe9982ff0)
2020-06-25 08:45:15 +02:00
Speak Your Code
c9798d75cd TablePanel: Sort numbers correctly (#25421)
* Table sortType to basic to be able to sort negative numbers

* Table sortType based on field type

(cherry picked from commit 5f767e2c9a)
2020-06-25 08:45:15 +02:00
Alex Khomenko
1d962eefc7 Search: Only move dashboards into expanded folders UI-wise (#25363)
* Search: Ony move dashboards into expanded folders UI-wise

* Search: Add tests

(cherry picked from commit 1790ece4d5)
2020-06-25 08:45:15 +02:00
Dominik Prokop
c980a43bf7 Provide correct field scoped vars for data links interpolation (#25318)
(cherry picked from commit 0f5b894256)
2020-06-25 08:45:15 +02:00
Marcus Andersson
00ee734baf Release 7.0.3 2020-06-03 17:19:31 +02:00
Alexander Zobnin
f0ab81d0f6 Fix active LDAP sync (#25321)
* LDAP: sync only users with 'ldap' module as a most recent auth module

* LDAP: tests for searching ldap users

(cherry picked from commit c4eca530ce)
2020-06-03 17:19:31 +02:00
Harrison Shoff
b6865b3427 Variables: change VariableEditorList row action Icon to IconButton (#25217)
Fixes #21807

(cherry picked from commit 5d6af607d7)
2020-06-03 17:19:31 +02:00
Sofia Papagiannaki
4a331327b2 Cloudwatch: Fix dimensions of of DDoSProtection (#25317)
(cherry picked from commit 467348bded)
2020-06-03 17:19:31 +02:00
Sofia Papagiannaki
8f91e148ae Alerting: Add confirmation modals for deleting notifier (#25303)
* Add confirm modals for deleting notifier
* Update public/app/features/alerting/NotificationsListPage.tsx

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
(cherry picked from commit d040daa1cd)
2020-06-03 17:19:31 +02:00
Sofia Papagiannaki
e2308871e0 Alerting: Ignore obsolete notification channels referenced by alerts (#25302)
* Ignore obsolete notification channel

* Fix tests

* Update pkg/services/alerting/rule.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

(cherry picked from commit 1e543d5ac1)
2020-06-03 17:19:31 +02:00
Dominik Prokop
1dbdf9b839 Do not show alerts tab when alerting is disabled (#25285)
* Do not show alerts tab when alerting is disabled

* Add tests

(cherry picked from commit b12df9d64c)
2020-06-03 17:19:31 +02:00
Arve Knudsen
486ae92279 release_publisher: Fix Debian/RPM naming (#25276)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 1d9f47b6a6)
2020-06-03 17:19:31 +02:00
Alex Khomenko
170aba2cfb Search: uncheck dashboards after moved (#25256)
(cherry picked from commit 10158c90e3)
2020-06-03 17:19:31 +02:00
Arve Knudsen
81a4f4addf CircleCI: Fix builds of forked PRs (#25272)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit b2745c3e23)
2020-06-03 17:19:31 +02:00
Marcus Andersson
3e09d991fb Variables: fix so the variable picker will remember selected options between filtering (#25119)
* added tests to verify flow.

* refactoring picker reducer.

* made all the tests green.

* removed console.log's

* fixed toggle all and making sure the correct values are set on picker open.

* added more tets.

* refactored and added table tests.

* fixed so we select values from selectedValues instead of options.

* fixed so you can navigate and select even after you have filtered a variable.

* adding tests to verify flows when toggling by highlight.

* fixed so enter always selects value before closing.

* improved the code for tags.

(cherry picked from commit 13787294c6)
2020-06-03 17:19:31 +02:00
Arve Knudsen
cafb3a14ef CircleCI: Upgrade to Go 1.14.3 and Node 12.17.0 (#25215)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 01ecbae2ee)
2020-06-03 17:19:31 +02:00
Ryan McKinley
3224f7587a Stats: include all fields (#24829)
(cherry picked from commit d526647005)
2020-06-03 17:19:31 +02:00
Ryan McKinley
9dbce49c7d FieldConfig: implement color picker (#24833)
(cherry picked from commit 57a9e422b0)
2020-06-03 17:19:31 +02:00
Arve Knudsen
7fb3d3fa62 CircleCI: Upgrade grafana/build-container in order to fix arm32v7-musl (#25213)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit b703f21622)
2020-06-03 17:19:31 +02:00
Arve Knudsen
f5233f32af CircleCI: Upgrade build image (#25189)
* CircleCI: Upgrade build image
* CircleCI: Upgrade grabpl

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit f0eb124278)
2020-06-03 17:19:31 +02:00
Marcus Efraimsson
ec2e951cd3 Configuration: Fix env var override of sections containing hyphen (#25178)
Fixes so that ini-sections containing hyphen is replaced with
underscore. Fixes an issue with backend plugin settings.

Ref grafana/grafana-image-renderer#147

(cherry picked from commit 34d5ffa562)
2020-06-03 17:19:31 +02:00
Arve Knudsen
9bc12846a2 CircleCI: Fix GitHub API rate limiting (#25188)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 3de3115dec)
2020-06-03 17:19:31 +02:00
Torkel Ödegaard
2a34acfa7b Transformations: Fixed transformation crash issue (#25152)
* Transformations: Fixed transformation crash issue

* Updated

(cherry picked from commit 3833aa416d)
2020-06-03 17:19:31 +02:00
Lukas Siatka
6c8e42655e Explore: adds table result dataframes sorting to get response columns order based on queries order (#25131)
* Chore: updates Explore result processor to sort dataframes based on their refId so results are displayed in a correct order

* Chore: adds types to Explore ResultProcessor getTableResult DataFrames

(cherry picked from commit 9d04dfe41a)
2020-06-03 17:19:31 +02:00
Lukas Siatka
731c3e918d Chore: fixes jaeger duration value in cascader option label - using milliseconds now instead of microseconds (#25129)
(cherry picked from commit 03a5e5348d)
2020-06-03 17:19:31 +02:00
Marcus Andersson
d072718d1a Fix: make sure that we the gauge panel can handle scenario with no data. (#24938)
* make sure that we can handle the empty data scenario in the gauge.

* reverted Guague.tsx and set default values on no data.

(cherry picked from commit f795a1577c)
2020-06-03 17:19:31 +02:00
Peter Holmberg
fa0855ad4b Dashboard: Get panels in collapsed rows (#25079)
(cherry picked from commit 7e5f525473)
2020-06-03 17:19:31 +02:00
Marcus Efraimsson
d3c725e4ff Release v7.0.2 2020-05-26 19:36:28 +02:00
Marcus Efraimsson
7a9c0e31ec Only allow 32 hexadecimal digits for the avatar hash 2020-05-26 19:36:28 +02:00
kay delaney
ef5b586d7d Chore: Add IAM to list of ignored terms for codespell (#25013)
(cherry picked from commit 4f1bbdfc0a)
2020-05-26 10:05:56 +02:00
Hugo Häggmark
03306f1220 Release: 7.0.1 2020-05-26 10:05:56 +02:00
Patrick Hemmer
b6cb31a4de Postgres: Fix add button (#25087)
Previously the add button on the postgres UI would break after the first usage. This was due to the button not being fully reset after use.

(cherry picked from commit 231a32c4a3)
2020-05-26 10:05:56 +02:00
Lukas Siatka
0b627672ba Chore: fixes throwing errors on 200 response with influxdb datasource (#24848)
* Chore: fixes throwing errors on 200 response with influxdb datasource

* Chore: changes influxdb error prefix from error to influxdb error

(cherry picked from commit 7bf5b395b6)
2020-05-26 10:05:56 +02:00
Sofia Papagiannaki
205b7685a8 Fix AWS WAF and AWS DDoSProtection metrics (#25071)
(cherry picked from commit 1e4e2642bf)
2020-05-26 10:05:56 +02:00
kay delaney
c0a2aceac5 Explore/Table: Keep existing field types if possible (#24944)
* Explore/Table: Keep existing field types if possible

(cherry picked from commit f5a9b23d83)
2020-05-26 10:05:56 +02:00
Hugo Häggmark
63c6284b94 DashboardLinks: variables are resolved and limits to 100 (#25076)
(cherry picked from commit 83d933d010)
2020-05-26 10:05:56 +02:00
Peter Holmberg
bb2201c35e Table: Make last cell value visible when right aligned (#24921)
* add some padding to accommodate for vertical scrollbar

* use theme spacing

* Move padding to inner div and make it use actual scrollbar width

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 0da72131b9)
2020-05-26 10:05:56 +02:00
Peter Holmberg
820d382e8f Transform: Display correct field name when using reduce transformation (#25068)
* fix field names

* add dataframes argument and fix tests

(cherry picked from commit 880a11773b)
2020-05-26 10:05:56 +02:00
Torkel Ödegaard
5310fe837b PanelEditor: Overrides name matcher still show all original field names even after Field default display name is specified (#24933)
* FieldConfigOverrides: Should not apply defaults in override UI options

* Missed change

(cherry picked from commit 923faf78f1)
2020-05-26 10:05:56 +02:00
Torkel Ödegaard
23a42e801f MoveDashboard: Fix for moving dashboard caused all variables to be lost (#25005)
* MoveDashboard: Fix moving caused all variables to be lost

* fix typescript issue

(cherry picked from commit 3a469f6ca2)
2020-05-26 10:05:56 +02:00
Lukas Siatka
2c42ac5df9 Loki/Prometheus: updates addLabelToQuery method to prevent it from adding labels outside of selector when using Loki datasource (#25059)
* Chore: updates add label to query method in prometheus datasource to fix loki label insert

* Chore: adds addLabelToQuery test covering differences between adding label to loki vs non-loki queries

* Chore: adds an additional comment to addLabelToQuery

* Chore: renames isLokiDatasource to hasNoMetrics in addLabelToQuery

(cherry picked from commit 60e7b63c33)
2020-05-26 10:05:56 +02:00
Dominik Prokop
10c9543038 Organize transformer: Use display name in field order comparer (#24984)
* Use display name in field order comparer

* Post review

(cherry picked from commit 9a59f387d9)
2020-05-26 10:05:56 +02:00
Zoltán Bedi
40d7234d02 Explore: fix word break in type head info (#25014)
fixes #24154

(cherry picked from commit dca03a3b4a)
2020-05-26 10:05:56 +02:00
Sofia Papagiannaki
fa0670e734 Stackdriver: Fix creating Service Level Objectives (SLO) datasource query variable (#25023)
* Fetch SLOs on SLO service change

* Prevent querying for SLOs if SLO service is empty

Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
(cherry picked from commit a1ee62877e)
2020-05-26 10:05:56 +02:00
Ryan McKinley
43b65f7d67 Download CSV: format the dates (#24992)
* export formatted dates

* remove if(true)

* display processor

(cherry picked from commit 81d1f6653f)
2020-05-26 10:05:56 +02:00
Dominik Prokop
037b6a45ca DataLinks: Bring back variables interpolation in title (#24970)
(cherry picked from commit ad870c07cf)
2020-05-26 10:05:56 +02:00
Lukas Siatka
7b9650ba81 Explore: refactors LogRowContextProvider to get rid of unnecessary dimensions (#24899)
* Chore: refactors LogRowContextProvider to get rid of unnecessary array dimensions

* Chore: removes unnecessary array dimensions from LogRowContextProvider test

* Chore: changes LogRowContextProvider test to use jest mock

* Chore: updates LogRowContextProvider test

* Chore: removes unnecessary wrapper variable in LogRowContextProvider test

(cherry picked from commit 8c1307e704)
2020-05-26 10:05:56 +02:00
Tobias Skarhed
28253bb62e PanelMenu: Make menu disappear on button press (#25015)
* Fix button press outside

* Add a prop to toggle button press

* Add comments

* Remove public

(cherry picked from commit 5f4526ca64)
2020-05-26 10:05:56 +02:00
Tobias Skarhed
2fc13ac853 LoginPage: Fix hover color for service buttons (#25009)
* Set explicit hover color

* Use cx

(cherry picked from commit 84031649e3)
2020-05-26 10:05:56 +02:00
Carl Bergquist
e929eab87c updates broken link to time range docs (#25008)
(cherry picked from commit b5bf54f5ac)
2020-05-26 10:05:56 +02:00
Ivana Huckova
c1ab56fd8e Prometheus: Fix recording rules expansion (#24977)
* First pass solution

* Refactor solution

* Add test coverage, update tests

* Fix behaviour for multiple labels, add test for this

* Add recordin rules to devenv prometheus

* Update devenv/prometheus2 instead of devenv/prometheus

* Add newlines

* Fix label matching if labels include comma, add test coverage

* Refactor

* Refactor, simplify

(cherry picked from commit 4d18bda2e1)
2020-05-26 10:05:56 +02:00
kay delaney
4541dee9e1 Datasource/CloudWatch: Better handling of stats grouping (#24789)
* Datasource/CloudWatch: Better handling of stats grouping

(cherry picked from commit e1f4287f70)
2020-05-26 10:05:56 +02:00
Zoltán Bedi
4ac745ac55 Dashboard: Render PanelChrome on refresh (#24940)
Fixes #23306

(cherry picked from commit 77633db00e)
2020-05-26 10:05:56 +02:00
Torkel Ödegaard
4ba0377511 Graph: Legend decimals now work as expected (#24931)
* Graph: Legend decimals now work as expected

* removed new test that I could not get green

(cherry picked from commit 8aedf81133)
2020-05-26 10:05:56 +02:00
Hugo Häggmark
298f8b0028 PanelInspector: hides unsupported data display options for Panel type (#24918)
(cherry picked from commit 0b5d818771)
2020-05-26 10:05:56 +02:00
Hugo Häggmark
fe890a0708 Panel: shows correct panel menu items in view mode (#24912)
(cherry picked from commit 460847f3ed)
2020-05-26 10:05:56 +02:00
Dominik Prokop
a930cba373 PanelEditor Fix missing labels and description if there is only single option in category (#24905)
(cherry picked from commit bb099cb141)
2020-05-26 10:05:56 +02:00
kay delaney
045b8629a4 Datasource/CloudWatch: Field suggestions no longer limited to prefix-only (#24855)
(cherry picked from commit 0f174de760)
2020-05-26 10:05:56 +02:00
Ivana Huckova
3b3fbb551d Explore: Fix wrap lines toggle for results of queries with filter expression (#24915)
* Add pre-wrap to highlighter only for wrapped lines option

* Remove duplicated styling

(cherry picked from commit 966b0a97b1)
2020-05-26 10:05:56 +02:00
Marcus Andersson
9e4d9bed2a Fix: adding missing icons in the elastic query editor and the single stat editor. (#24914)
* fixed issue that the icon was missing in es group by.

* fixed missing icon in the single stat value mappings.

(cherry picked from commit 731deb9628)
2020-05-26 10:05:56 +02:00
Ivana Huckova
1ee5fc893c LogsPanel: Fix scrollbar (#24850)
* Fix scrolling, besides context (wip)

* Remove autoHide

* Revert "Remove autoHide"

This reverts commit 3572718cab.

* Revert "Fix scrolling, besides context (wip)"

This reverts commit 8e11d89612.

* Fix scrolling in Logs Panel

* Rename passed prop to disableCustomHorizontalScroll

(cherry picked from commit 4f6fb2d46e)
2020-05-26 10:05:56 +02:00
Hugo Häggmark
f2df0cedd4 PanelInspect: makes sure Data display options are shown (#24902)
(cherry picked from commit 5a6026a8c0)
2020-05-26 10:05:56 +02:00
Kamal Galrani
3256fb87c5 Dashboard/Links: Fixes dashboard links by tags not working (#24773)
* Fixes dashboard links by tags not working

* removes code duplication

(cherry picked from commit e2368e623e)
2020-05-26 10:05:56 +02:00
Ryan McKinley
f098b4049d Transformations: Allow numbers (#24752)
(cherry picked from commit 793299af14)
2020-05-26 10:05:56 +02:00
Zoltán Bedi
21f7a9ed1e Explore: fix undo in query editor (#24797)
* Explore: fix undo in query editor

* Add e2e test for regression

(cherry picked from commit 29afc2feb8)
2020-05-26 10:05:56 +02:00
kay delaney
f235cd697d Datasource/CloudWatch: Makes CloudWatch Logs query history more readable (#24795)
Now just displays query expression rather than stringified JSON

(cherry picked from commit 2f01f1320f)
2020-05-26 10:05:56 +02:00
Torkel Ödegaard
0b27b1fb17 TablePanel: Adding sort order persistance (#24705)
* TablePanel: Adding sort order persistance

* adds panel test dashboard for table panel

(cherry picked from commit b709f6ad71)
2020-05-26 10:05:56 +02:00
Alex Khomenko
2d6faa6d99 Search: make anchor full-height (#24783)
(cherry picked from commit 7b6deef46d)
2020-05-26 10:05:56 +02:00
Kamal Galrani
72c7731c42 Dashboard/Links: Fixes open in new window for dashboard link (#24772)
* fixes target in dashboard link

* Update DashboardLinks.tsx

* Revert "Update DashboardLinks.tsx"

This reverts commit 2b23db8dc4.

(cherry picked from commit 7b18b101b4)
2020-05-26 10:05:56 +02:00
Arve Knudsen
cd507df860 CircleCI: Upgrade v7.0.x branch to use new version of build pipeline tool (#24926)
* CircleCI: Upgrade build pipeline tool
2020-05-21 09:34:48 +02:00
Arve Knudsen
afa9aef76a CircleCI: Revert to normal publishing
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-05-19 13:58:47 +02:00
Arve Knudsen
aee1438ff2 CircleCI: Enable internal v7.0.0 release (#24733)
* CircleCI: Sync with master branch

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* CirclecI: Temporarily modify release pipeline to only publish internally

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-05-15 16:30:30 +02:00
Arve Knudsen
0167f43d74 7.0.0 cherry-picks (#24726)
* TablePanel: Fix JSON tooltip positioning (#24420)

* Fix block element and overflow

* Width not needed

* Add to styles file

(cherry picked from commit f714357fbf)

* Minor UI touches (#24371)

* Justify to alignment in stat

* No stats label in inspect

* Use sentence case in panel names

* typos

* typo

* Typo

* Query -> query options

* prettier

* Transformer -> transform data

* Do not show deprecated plugins in the viz picker

* Update viz picker layout

(cherry picked from commit 63d25944c4)

* Reporting: tzdata is needed for reporting (#24422)

(cherry picked from commit de8c1b9ad7)

* Storybook: Position panel to right (#24429)

(cherry picked from commit 8257633b1d)

* Chore: move dataFramesReceived event to @grafana/data (#24443)

(cherry picked from commit 7e6ac12b9a)

* Explore: Revert QueryRows refactor (#24444)

While query fields should not rely on getting unmounted when the data source changes (and instead react to that change in e.g. componentDidUpdate()), query fields other than PromQueryField still rely on this.

(cherry picked from commit 221042c293)

* Logs: Clicking "Load more" from context overlay doesn't expand log row (#24299)

Closes #24184

(cherry picked from commit 35c097e475)

* Datasource/CloudWatch: Add data links to CloudWatch logs for deep linking to AWS (#24334)

* Datasource/CloudWatch: Fix encoding of CloudWatch Logs deep link URL

* Adds data links to cloudwatch logs responses for deep linking to aws console

* Implements PR feedback

(cherry picked from commit a655aa1ca8)

* OldTable: Make old table options align & look better (#24485)

(cherry picked from commit e333d61b97)

* Buttons: Use text color (#24439)

(cherry picked from commit c671fdbbf8)

* StatPanels: Hide calc option if all values is selected (#24416)

(cherry picked from commit 352f22042c)

* grafana/toolkit: Support paging in cherrypick task (#24402)

* Support paging in cherrypick task

* Update packages/grafana-toolkit/src/cli/tasks/cherrypick.ts

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update packages/grafana-toolkit/src/cli/tasks/cherrypick.ts

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Do not cherry pick closed PRs

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit c5fc18ac02)

* Reduce Transform: sort order is preserved as entered by user (#24494)

(cherry picked from commit e341d4b26f)

* TimeZone: added e2e tests for the custom time zone support. (#24442)

(cherry picked from commit a521a39ebf)

* CloudWatch/Logs: Add error message when log groups are not selected (#24361)

* Add error message

* Fix empty check

(cherry picked from commit d385045d16)

* CloudWatch/Log: Fix field autocomplete suggestions inside function (#24406)

* Fix autocomplete inside function

* Remove debug log

* Add comment and return type

(cherry picked from commit b16202acc2)

* Editor: No default suggestion selected (#24479)

* QueryField: No default suggestion selected

It's been a long-standing issue that careless typing lead to unwanted
tab completion insertions. With this change the completion item list no
longer selects the first item by default. The user has to actively click
ArrowDown to select the first one.

* Added type export

* Remove width limit of typeahead list

(cherry picked from commit 34f61934a1)

* TablePanel: Fixed persisting column resize time series fields (#24505)

(cherry picked from commit f13a15ae48)

* PluginsList: Remove unused panel options (#24501)

* Remove unused panel options

* satisfy ts

(cherry picked from commit 2e69b86990)

* CloudWatch/Logs: Language provider refactor and test (#24425)

(cherry picked from commit 876011d931)

* Datasource/CloudWatch: Usability improvements (#24447)

* Datasource/CloudWatch: Improve handling of long-running queries

* Datasource/CloudWatch: Make order of dataframe fields consistent

(cherry picked from commit c26374b0b2)

* CloudWatch/Logs: Fix suggestions of fields after comma (#24520)

(cherry picked from commit 2d29997bda)

* GraphLegend: Only display scrollbar if necessary (#24527)

(cherry picked from commit cb74bc6828)

* CloudWatch/Logs: Fix fields not being refetched when log group changed (#24529)

(cherry picked from commit 55533d12fd)

* Datasource/CloudWatch: Switch to metrics mode, logs API, when choosing stats query from cheatsheet (#24398)

* Datasource/CloudWatch: Switch to metrics mode, logs API, when choosing stats query from cheatsheet

(cherry picked from commit ae7f0aeb7a)

* azuremonitor: Deep linking from Log Analytic queries to the Azure Portal (#24417)

* azuremonitor: add gzipped and base64 encoded query to metadata

for Azure Log Analytic query responses

* azure monitor: add fields to metadata for log analytics

* azuremonitor: correction to text in query editor

* azuremonitor: adds subscription id to result metadata

* azuremonitor: build deep link url for Log Analytics

Most of the information needed for building the url
comes from the backend. The workspace friendly name
and the resource group that the workspace belongs
to are fetched in a separate API call. This call is
cached otherwise there would be a workspaces call
per query on the dashboard.

* docs: azure log analytics deep linking

* Apply suggestions from code review

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* docs: fixing review comments for azure monitor

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
(cherry picked from commit 67ed579647)

* Datasource/CloudWatch: Results of CloudWatch Logs stats queries are now grouped (#24396)

* Datasource/CloudWatch: Results of CloudWatch Logs stats queries are now grouped

(cherry picked from commit db91961405)

* PanelEditor: Fixed issue changing a panel from transparent back to normal  (#24483)

* PanelModel: Fixed issues with persisting some changes

* Fixed other issues

(cherry picked from commit 5caf7f59e6)

* LabelsToFields: avoid MutableDataFrame (#24493)

(cherry picked from commit c8d3d15292)

* Prometheus: Show results of instant queries only in table (#24508)

* Show results of instant queries only in table, remove them from graph

* Update table model

(cherry picked from commit 143a26769b)

* PanelEditor: Fix so defaults is selected when datasource can't be found. (#24526)

(cherry picked from commit cb4266bae0)

* Graphite: makes query annotations work again (#24556)

(cherry picked from commit 7992f8bfbc)

* azuremonitor: limit macro regex to known macros (#24528)

(cherry picked from commit 64046e9a27)

* TimePicker: fixed so you can enter a relative range in the time picker without being converted to absolute range (#24534)

* fixed so you can enter a relative date in the time range form.

* did some small adjustments to make sure proper value is stored.

(cherry picked from commit 28f54bc2f7)

* Admin Settings: makes long settings line break (#24559)

(cherry picked from commit 74ddfe07a2)

* Update light variable theme for dropdown (#24566)

(cherry picked from commit 67dab0b767)

* UI spelling: use US form of visualization (#24558)

(cherry picked from commit bffa0fa4f6)

* e2e: adds verify release (#24568)

(cherry picked from commit 7d800e7318)

* Search: Save folder expanded state (#24496)

* Search: Save folder expanded state

* Search: Remember expanded state on search close

(cherry picked from commit 0396b220a3)

* Data sources: Don't fail if URL doesn't specify protocol (#24497)

(cherry picked from commit 164242f5fd)

* Security: Tag value sanitization fix in OpenTSDB data source (#24539)

Adds HTML sanitization to the tag value of the OpenTSDB datasource.

Fixes #24537

(cherry picked from commit 125ba95686)

* Field: UI & Code consistency Title -> Display name  (#24507)

* Field: Change getFieldTitle to getFieldDisplayNamne and change the NAME of the title field config from Title to Display name

* Review feedback

* fixed unit tests

* Rename fieldConfig.title to displayName

* Fixed tests

* Added migration

* Renamed getFrameDisplayTitle to getFrameDisplayName

(cherry picked from commit 8de10a8b9f)

* Do not set insertText if the same as label (#24581)

(cherry picked from commit 20f0ee2f22)

* Plugins: Fix manifest verification (#24573)

(cherry picked from commit 892f9f789c)

* Search: Safari UI fixes (#24567)

* Search: Add height: 100% to page containers

* Search: Reset TagOption display to block

* Search: Add title to result list

* Search: Use flex-basis vs height

* Search: Remove IconButton

* Search: Do not shrink select options

* Search: Fix hasEditPermissionInFolders

* Search: Update tests

* Search: Fix prop

* Remove select wrapper class

* Update snapshot

(cherry picked from commit 15ac76a47b)

* OrgUsersTable: Fix width when there are long cells in table (#24533)

* Set width for cells and text overflow

* Add title and update snapshot

(cherry picked from commit 0c1f1dd8fd)

* Loki: Allow multiple derived fields with the same name (#24437)

(cherry picked from commit a50cb6aa1f)

* Datasource/CloudWatch: Fixes various autocomplete issues (#24583)

(cherry picked from commit c1919944ea)

* CircleCI: Update grabpl to 0.4.5 in order to include manifest with GEL (#24577)

* CircleCI: Update grabpl to 0.4.5
* GEL: Upgrade version

(cherry picked from commit 824eb94efe)

* CloudWatch/Logs: Make stats hint show consistently (#24392)

(cherry picked from commit 5feef22034)

* Table: fixes Cannot read property subRows of null (#24578)

(cherry picked from commit 2d19c046f2)

* TimePicker: some fixes and polish after testing feedback (#24585)

* make sure we render the delaynow value from dashboard to the time picker settings.

* Added the time zone in the tooltip.

(cherry picked from commit cab066f8ce)

* Onboarding: New getting started panel (#23826)

* image and card component

* change height of getting started panel

* progress

* setup basic step

* advanced steps

* step forward and backward

* do checks

* fix button size

* minor styling on butttons

* add correct links

* save tutorial click in localstorage

* types and gradients

* fix gradients

* use spacing variable

* lots of responsiveness

* add links to help

* Getting started work

* redo according to split panel design

* minor touch ups

* new background images

* split up docs card to different hrefs

* welcome bar touch ups

* hide icon on small screens

* transparent false on welcome banner

* fix urls

* source tag in welcome urls

* move images to panel dir, removed unused images

* Nicer loading message

* make the cards look nicer on wide screens

* append utm tag on render instead

* replace width with margin

* new background image for light

* remove target on a element

* removing buttonselect, add tag to href

* more polishing

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 36fa54a288)

* Chore: Fix strict null errors on getting started (#24605)

* fix strict nulls

* fix typings

(cherry picked from commit 1848900070)

* CircleCI: Upgrade grabpl in order to fix package publishing (#24609)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 03940c8471)

* Fix Safari Icon alignment (#24610)

(cherry picked from commit 04c75265b5)

* Transformations: Make transform dropdowns not cropped (#24615)

(cherry picked from commit 9e24c0944f)

* Inspect: Allow showing data without transformations and field config is applied (#24314)

* Inspect: Should not subscribe to transformed data

* PQR- allow controll whether or not field overrides and transformations should be applied

* UI for inspector data options

* fix

* Null check fix

* Update public/app/features/dashboard/components/Inspector/InspectDataTab.tsx

* Update public/app/features/dashboard/components/Inspector/InspectDataTab.tsx

* Apply transformations by default

* Update panel inspect docs

* Fix apply overrides

* Apply time formatting in panel inspect

* fix ts

* Post review update

* Update docs/sources/panels/inspect-panel.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* lazy numbering

* fix ts

* Renames

* Renames 2

* Layout update

* Run shared request without field config

* Minor details

* fix ts

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
(cherry picked from commit f23ecc40b4)

* Transformers: fix binary operation (#24604)

* check the display name

* remove unchanged line

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit 97e2837d7c)

* SharedPreferences: fixes so UI Theme can be set back to Default (#24628)

(cherry picked from commit cd9cbe5e16)

* Datasource/CloudWatch: Prevents hidden dataframe fields from displaying in tables (#24580)

* Datasource/CloudWatch: Prevents hidden dataframe fields from displaying in tables

(cherry picked from commit 277aee8642)

* Datasource/CloudWatch: Correctly interpolate variables in CloudWatch Logs queries (#24619)

Closes #24603

(cherry picked from commit bfd337dd00)

* Explore: Fix rendering of react query editors (#24593)

* Fix rendering of react query editors

* Refactor solution for improved readability

* Update

* Add test coverage

* Refactor

(cherry picked from commit 285ea7595d)

* CloudWatch: Don't assume that errors are awserr.Error instances (#24641)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 8e5a3a578a)

* Zipkin: Fix error when span contains remoteEndpoint (#24524)

(cherry picked from commit 0f964c0214)

* Templating: fixes so Textbox variables get value from url (#24623)

(cherry picked from commit 622246d56d)

* Templating: fixes filtering options with more than 1000 entries (#24614)

* Templating: fixes filtering options with more then 1000 entries

* Chore: reduces strict null errors by 2

(cherry picked from commit 083a2ce220)

* PanelEdit: Make sure side pane is displayed with tabs by default (#24636)

* Make sure side pane is displayed with tabs by default

* Update e2e tests for

(cherry picked from commit f769ed035d)

* @grafana/ui: Update RadioButtonGroup documentation (#23143)

* Add "When to use" info to RadioButtonGroup.mdx

* Clarify more clearly when to use 'Select' instead

* Update RadioButtonGroup.mdx

Add line explaining why we want select for more than four options instead of a radio button group

* Update RadioButtonGroup.mdx

remove part about when elements are triggering changes.

Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
(cherry picked from commit f1386c7892)

* Search: Fix select item pressing enter 404 (#24634)

* Remove appSubUrl for navigation

* stripBaseFromUrl

* Remove unused imports

(cherry picked from commit 37a2ac20c3)

* @grafana/ui: Buttons documentation (#23144)

* Add info: when to use which and how to mix buttons

* Update description for Button.mdx

- add note about scenario without primary action
- add note about secondary button being the default

* Refine docs info for secondary and destructive

Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
(cherry picked from commit 54a90166a5)

* Datasource Config: adds back correct styles for autofill fields (#24671)

(cherry picked from commit 9481b7bcf2)

* Changelog and Readme: Update packages to beta and add Select breaking change (#24670)

(cherry picked from commit 85ae144a87)

* Orgs: Add future deprecation notice (#24502)

* Orgs: Fist draft of orgs deprecation infobox

* adds warning about potentially deprecating orgs (#24512)

* Updates

* Fixed ts issue

Co-authored-by: Carl Bergquist <carl@grafana.com>
(cherry picked from commit 2f22781cd8)

* Provisioning: Use proxy as default access mode in provisioning (#24669)

fixes #24591
fixes #19501

(cherry picked from commit 7610d5717a)

* Fallback to process.cwd() when PWD is not present (#24677)

Fixes #24582 - Error running yarn dev command

(cherry picked from commit 660f2b4e99)

* SaveDashboard: Allow editing provisioned dashboard JSON and add confirmation when JSON is copied to dashboard (#24680)

(cherry picked from commit cfac591234)

* Units: adds scale symbol for currencies with suffixed symbol (#24678)

(cherry picked from commit 51509bb2ff)

* CloudWatch/Logs: Fix panic on multiple aggregations queries (#24683)

(cherry picked from commit c60765a178)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Docs: Updated instructions on screens for Dashboard Import (#24584)

* change text and image links

* Review feedback

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* uppercase JSON

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit abfa1b5d74)

* CloudWatch: Unify look of query mode select between dashboard and explore (#24648)

(cherry picked from commit e754bcdcf9)

* Datasources: fixes async mount errors (#24579)

* Chore: updates Elasticsearch DataLinks test async wrapper mount

* Chore: updates Loki DervidedFields test async wrapper mount

* Chore: fixes typecheck issues

* Chore: small strict-null fix

(cherry picked from commit e11504dcd2)

* Editor: New line on Enter, run query on Shift+Enter (#24654)

* Editor: New line on Enter, run query on Shift+Enter

- default Enter behavior on query editor fields should be a new line
- special behavior should require a special key: running a query is now
done on Shift-Enter
- Plugins order had to be changed because when typeahead is shown, Enter
is accepting the suggestion

* Run with ctrl-enter, hint in query placeholder

* Fix Kusto field behavior for Enter

* Fix Kusto field behavior for default suggestion

(cherry picked from commit 01bbcf4eea)

* Add deprecation note about the unofficial first version of backend plugins (#24675)

(cherry picked from commit 0c8ee5b2c9)

* CloudWatch/Logs: Fix autocomplete after by keyword (#24644)

(cherry picked from commit 2b9cc8ba30)

* TablePanel: Do not include angular options in options when switching from angular panel (#24684)

(cherry picked from commit c59f5436c0)

* Datasources: fix pre styles (#24687)

(cherry picked from commit 7fbed90b89)

* @grafana/ui: Checkbox docs (#23141)

* Add "When to use" info to Checkbox.mdx

Added info about how checkboxes generally work and when to use another component instead.

* Replaced words with proper component names

* Update Checkbox.mdx

Elaborate on explanations. Add examples for how to use checkboxes the user-friendliest way.

* Apply suggestions from code review

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit 405145fdd3)

* Logs: Fix total bytes process calculation (#24691)

- log stats for Loki are per query
- this change tracks the query stats by refId, preventing the summing of
    the same stats across multiple series of the same response.

(cherry picked from commit 25e1238022)

* Strict null fixes: updates return type of getMessageFromError, fixes QueryOperationAction props (#24690)

* Chore: updates getMessageFromError return type

* Chore: updates the position of incorrectly placed bang operator

* Chore: updates typing on dropdown typeahead directive

* Chore: updates QueryOperationAction props to require title

* Revert "Chore: updates QueryOperationAction props to require title"

(cherry picked from commit ee12f5e742)

* Docs: Panel inspector release highlights (#24686)

* Add Panel inspector highlight

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
(cherry picked from commit e4cbeb5cb3)

* Explore: fixes loading more logs in logs context view (#24135)

(cherry picked from commit d3a8f6d026)

* Datasource/CloudWatch: Handle invalidation of log groups when switching datasources (#24703)

(cherry picked from commit 1b29d3460e)

* PanelInspect: Make header names reflect the field name in the exported CSV file (#24624)

* fix header names and filename

* use panel title as filename

* add frame argument

* escaping double quotes

* wrapping header name in  quotes

* Fix replace

* Add test for csv double quotes escaping

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit bf1e5aa16c)

* CloudWatch/Logs: Fix query error when results are sparse (#24702)

(cherry picked from commit bc8c05137b)

* Datasource/CloudWatch: Allows a user to search for log groups that aren't there initially (#24695)

Closes #24554

(cherry picked from commit 0e8638ec92)

* Transform: fixes so we match the field based on the proper name. (#24659)

* fixes so we match the transformer based on name properly.

* changed the signature on the FieldMatcher.

* introduced a names option so you can filter in name specificly.

* changed so the matcher UI uses the new options format.

* moved the exported functions together.

* changing editors a bit.

* made the filter by name work with both regex and name filtering.

* fixed failing tests and make sure we always parse regex the same way.

* removed unused code.

* simplified to make the existing field overrides still working.

* fixed issue reported by hugo.

* added tests for the name matcher.

* added tests for filter by name.

* added more tests.

(cherry picked from commit 96f26cbd5b)

* Fix: changing so we are using date/time values in UTC during test. (#24707)

(cherry picked from commit 98d5633601)

* Docs: generated a 7.0 version of the packages reference docs. (#24708)

* fixes so we match the transformer based on name properly.

* changed the signature on the FieldMatcher.

* introduced a names option so you can filter in name specificly.

* changed so the matcher UI uses the new options format.

* moved the exported functions together.

* changing editors a bit.

* made the filter by name work with both regex and name filtering.

* fixed failing tests and make sure we always parse regex the same way.

* removed unused code.

* simplified to make the existing field overrides still working.

* fixed issue reported by hugo.

* added tests for the name matcher.

* added tests for filter by name.

* added more tests.

* generated new version of the packages docs.

* fixed spelling error.

* regenerated the docs.

(cherry picked from commit 6a0abf895e)

* Query: do not require datasource name and id (#24718)

(cherry picked from commit b73d237bf8)

* Metrictank: Fixed updated schema and dedupe strategy (#24685)

* Metrictank: Fixed updated schema and dedupe strategy

* revert schema change

* fix

(cherry picked from commit 7fcf2615e1)

* Release 7.0.0

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* CircleCI: Upgrade build pipeline tool

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Andreas Opferkuch <andreas.opferkuch@gmail.com>
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: David <david.kaltschmidt@gmail.com>
Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Rotem Reiss <reiss.r@gmail.com>
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
Co-authored-by: Jess <53754871+jessover9000@users.noreply.github.com>
Co-authored-by: Carl Bergquist <carl@grafana.com>
Co-authored-by: Lukas Siatka <lukasz.siatka@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-05-15 14:00:13 +02:00
Torkel Ödegaard
2169fc1a3f Prometheus: Fix for prometheus legend formats for instant time series queries (#24407)
* Prometheus: Fix for prometheus legend formats for instance time series queries

* correct old test
2020-05-08 09:13:40 +02:00
Steven Vachon
ca077f31f5 @grafana/e2e: only skip password reset on local tests (#24411) 2020-05-08 09:13:40 +02:00
Ivana Huckova
2a0138d1d0 Elastic: Fix building of raw document queries resulting in error Unknown BaseAggregationBuilder error (#24403)
* Fix building of elastic document query

* Update comments
2020-05-08 09:13:40 +02:00
Tobias Skarhed
908af75083 Forms: Remove Forms namespace [BREAKING] (#24378)
* Remove index and export

* Fix Forms import
2020-05-08 09:13:40 +02:00
Dominik Prokop
575d898955 PanelEdit: Field Config options Fix numeric option bug (#24397) 2020-05-08 09:13:40 +02:00
Ryan McKinley
10bf03b221 TransformersUI: move transformer ui to grafana app (#24360) 2020-05-08 09:13:40 +02:00
Amal
fbd3b4b969 Docs: Minor correction in documentation (#24259) 2020-05-08 09:13:40 +02:00
Amal
91824e2bfa Docs: Minor correction in documentation (#24306) 2020-05-08 09:13:40 +02:00
Amal
014fc0f3f5 Docs: Grammatical correction (#24248) 2020-05-08 09:13:40 +02:00
Marcus Olsson
2422fd7e26 Restructure plugin docs (#24381) 2020-05-08 09:13:40 +02:00
Arve Knudsen
01b5032fbc Release 7.0.0-beta3 (#24400)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-05-07 18:47:18 +02:00
597 changed files with 24457 additions and 4225 deletions

View File

@@ -15,7 +15,9 @@ aliases:
tags:
ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: master
ignore:
- master
- chore/test-release-pipeline
- &filter-only-master
branches:
only: master
@@ -39,7 +41,7 @@ executors:
- image: cimg/go:1.14
grafana-build:
docker:
- image: grafana/build-container:1.2.16
- image: grafana/build-container:1.2.19
grafana-publish:
docker:
- image: grafana/grafana-ci-deploy:1.2.5
@@ -54,7 +56,7 @@ commands:
- run:
name: "Install Grafana build pipeline tool"
command: |
VERSION=0.4.4
VERSION=0.4.14
curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${VERSION}/grabpl
chmod +x grabpl
mv grabpl /tmp
@@ -86,15 +88,15 @@ jobs:
command: |
if [[ -n $CIRCLE_TAG ]]; then
# A release build
/tmp/grabpl build-backend --edition << parameters.edition >> \
/tmp/grabpl build-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
--variants << parameters.variant >> $CIRCLE_TAG
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
# We're testing the release pipeline
/tmp/grabpl build-backend --edition << parameters.edition >> \
--variants << parameters.variant >> v6.7.0-beta1
/tmp/grabpl build-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
--variants << parameters.variant >> v7.0.0-test
else
# A master or PR build
/tmp/grabpl build-backend --edition << parameters.edition >> \
/tmp/grabpl build-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
--variants << parameters.variant >> --build-id $CIRCLE_WORKFLOW_ID
fi
- run:
@@ -153,7 +155,17 @@ jobs:
- node_modules
- run:
name: Build Grafana frontend
command: /tmp/grabpl build-frontend --edition << parameters.edition >>
command: |
if [[ -n $CIRCLE_TAG ]]; then
# A release build
/tmp/grabpl build-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> $CIRCLE_TAG
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
# We're testing the release pipeline
/tmp/grabpl build-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> 7.0.0-test
else
# A master or PR build
/tmp/grabpl build-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> --build-id $CIRCLE_WORKFLOW_ID
fi
- run:
name: Move artifacts
command: mkdir << parameters.edition >> && cp -r public << parameters.edition >>/
@@ -398,18 +410,24 @@ jobs:
source scripts/build/gpg-test-vars.sh
fi
# Necessary for signing bundled plugins
export GRAFANA_API_KEY=$GRAFANA_COM_API_KEY
if [[ -n $CIRCLE_TAG ]]; then
# A release build
/tmp/grabpl package --jobs 2 --edition oss $CIRCLE_TAG
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign $CIRCLE_TAG
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
# We're testing the release pipeline
/tmp/grabpl package --jobs 2 --edition oss v6.7.0-beta1
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign v7.0.0-test
elif [[ $CIRCLE_BRANCH == "master" ]]; then
# A master build
/tmp/grabpl package --jobs 2 --edition oss --build-id $CIRCLE_WORKFLOW_ID
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID
elif [[ -n "$CIRCLE_PR_NUMBER" ]]; then
# A forked PR build, don't sign as it requires an API secret
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --build-id $CIRCLE_WORKFLOW_ID --variants \
linux-x64,linux-x64-musl,osx64,win64
else
# A PR build
/tmp/grabpl package --jobs 2 --edition oss --build-id $CIRCLE_WORKFLOW_ID --variants \
# A non-forked PR build
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
linux-x64,linux-x64-musl,osx64,win64
fi
- run:
@@ -453,18 +471,25 @@ jobs:
- run:
name: Package Grafana
command: |
# Necessary for signing bundled plugins
export GRAFANA_API_KEY=$GRAFANA_COM_API_KEY
if [[ -n $CIRCLE_TAG ]]; then
# A release build
/tmp/grabpl package --jobs 2 --edition enterprise $CIRCLE_TAG
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign $CIRCLE_TAG
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
# We're testing the release pipeline
/tmp/grabpl package --jobs 2 --edition enterprise v6.7.0-beta1
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign v7.0.0-test
elif [[ $CIRCLE_BRANCH == "master" ]]; then
# A master build
/tmp/grabpl package --jobs 2 --edition enterprise --build-id $CIRCLE_WORKFLOW_ID
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID
elif [[ -n "$CIRCLE_PR_NUMBER" ]]; then
# A forked PR build, don't sign as it requires an API secret
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --build-id $CIRCLE_WORKFLOW_ID --variants \
linux-x64,linux-x64-musl,osx64,win64
else
# A PR build
/tmp/grabpl package --jobs 2 --edition enterprise --build-id $CIRCLE_WORKFLOW_ID --variants \
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
linux-x64,linux-x64-musl,osx64,win64
fi
- run:
@@ -597,6 +622,14 @@ jobs:
# This version is necessary for building cross-platform images
version: 18.09.3
- install-grabpl
- run:
name: Install gcloud SDK
command: |
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | \
sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk
# XXX: Is this necessary?
- run: docker run --privileged linuxkit/binfmt:v0.6
- run:
@@ -760,7 +793,7 @@ jobs:
- run:
# Important: all words have to be in lowercase, and separated by "\n".
name: exclude known exceptions
command: 'echo -e "unknwon\nreferer\nerrorstring\neror" > words_to_ignore.txt'
command: 'echo -e "unknwon\nreferer\nerrorstring\neror\niam" > words_to_ignore.txt'
- run:
name: check documentation spelling errors
command: "codespell -I ./words_to_ignore.txt docs/"
@@ -856,18 +889,13 @@ jobs:
when: on_success
build-docs-website:
executor: grafana-build
executor: base
steps:
- checkout
- setup_remote_docker
- run:
name: CI job started
command: "./scripts/ci-job-started.sh"
- run:
name: Install docker
command: |
apt-get update
apt-get install -y docker.io
- run:
name: Build Grafana docs website
command: |
@@ -919,6 +947,14 @@ jobs:
- run:
name: npm - Prepare auth token
command: "echo //registry.npmjs.org/:_authToken=$NPM_TOKEN >> ~/.npmrc"
- run:
name: Exit if release pipeline test
command: |
if [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
# We're testing the release pipeline
echo "We're testing the release pipeline, so stopping before publishing"
circleci step halt
fi
- run:
name: Release packages
command: ./scripts/build/release-packages.sh "${CIRCLE_TAG}"
@@ -991,172 +1027,146 @@ workflows:
variant: armv6
name: build-oss-backend-armv6
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-master-or-release
edition: oss
variant: armv7
name: build-oss-backend-armv7
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-master-or-release
edition: oss
variant: armv7-musl
name: build-oss-backend-armv7-musl
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-master-or-release
edition: oss
variant: arm64
name: build-oss-backend-arm64
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-master-or-release
edition: oss
variant: arm64-musl
name: build-oss-backend-arm64-musl
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-all
edition: oss
variant: osx64
name: build-oss-backend-osx64
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-all
edition: oss
variant: win64
name: build-oss-backend-win64
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-all
edition: oss
variant: linux-x64
name: build-oss-backend-linux-x64
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-all
edition: oss
variant: linux-x64-musl
name: build-oss-backend-linux-x64-musl
requires:
- test-backend
- test-frontend
- lint-go
- build-frontend:
filters: *filter-all
name: build-oss-frontend
edition: oss
requires:
- test-backend
- test-frontend
- build-plugins:
filters: *filter-all
name: build-oss-plugins
edition: oss
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-master-or-release
name: build-enterprise-backend-armv6
edition: enterprise
variant: armv6
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-master-or-release
name: build-enterprise-backend-armv7
edition: enterprise
variant: armv7
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-master-or-release
name: build-enterprise-backend-armv7-musl
edition: enterprise
variant: armv7-musl
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-master-or-release
name: build-enterprise-backend-arm64
edition: enterprise
variant: arm64
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-master-or-release
name: build-enterprise-backend-arm64-musl
edition: enterprise
variant: arm64-musl
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-all
name: build-enterprise-backend-osx64
edition: enterprise
variant: osx64
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-all
name: build-enterprise-backend-win64
edition: enterprise
variant: win64
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-all
name: build-enterprise-backend-linux-x64
edition: enterprise
variant: linux-x64
requires:
- test-backend
- test-frontend
- lint-go
- build-backend:
filters: *filter-all
name: build-enterprise-backend-linux-x64-musl
edition: enterprise
variant: linux-x64-musl
requires:
- test-backend
- test-frontend
- lint-go
- build-frontend:
filters: *filter-all
name: build-enterprise-frontend
edition: enterprise
requires:
- test-backend
- test-frontend
- build-plugins:
filters: *filter-all
name: build-enterprise-plugins
edition: enterprise
requires:
- test-backend
- test-frontend
- lint-go
- build-release-publisher:
filters: *filter-master-or-release
- codespell:

6
.gitignore vendored
View File

@@ -111,9 +111,9 @@ compilation-stats.json
/packages/grafana-e2e/cypress/videos
/packages/grafana-e2e/cypress/logs
/e2e/server.log
/e2e/suite1/screenshots
!/e2e/suite1/screenshots/expeced/*
/e2e/suite1/videos/*
/e2e/**/screenshots
!/e2e/**/screenshots/expeced/*
/e2e/**/videos/*
# report dumping the whole system env
/report.*.json

View File

@@ -6,12 +6,14 @@
- **Docker**: Our Ubuntu based images have been upgraded to Ubuntu [20.04 LTS](https://releases.ubuntu.com/20.04/).
- **Dashboard**: A global minimum dashboard refresh interval is now enforced and defaults to 5 seconds.
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
- **@grafana/ui**: Select API change for creating custom values, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
- **Interval calculation**: There is now a new option `Max data points` that controls the auto interval `$__interval` calculation. Interval was previously calculated by dividing the panel width by the time range. With the new max data points option it is now easy to set `$__interval` to a dynamic value that is time range agnostic. For example if you set `Max data points` to 10 Grafana will dynamically set `$__interval` by dividing the current time range by 10.
- **Datasource/Loki**: Support for [deprecated Loki endpoints](https://github.com/grafana/loki/blob/master/docs/api.md#lokis-http-api) has been removed.
**Deprecation warnings**
- Scripted dashboards is now deprecated. The feature is not removed but will be in a future release. We hope to address the underlying requirement of dynamic dashboards in a different way. [#24059](https://github.com/grafana/grafana/issues/24059)
- The unofficial first version of backend plugins together with usage of [grafana/grafana-plugin-model](https://github.com/grafana/grafana-plugin-model) is now deprecated and support for that will be removed in a future release. Please refer to [backend plugins documentation](https://grafana.com/docs/grafana/latest/developers/plugins/backend/) for information about the new officially supported backend plugins.
## 7.0 Feature highlights
@@ -43,10 +45,14 @@ This new option architecture and UI will make all panels have a consistent set o
We have yet to migrate all core panels to this new architecture so in 7.0 there will sadly be some big inconsistencies in the UI between panels. Hopefully this will be fixed soon in future releases as we update all the core panels and help the community update the community panel plugins.
### New tabel panel
### New table panel
Grafana 7.0 comes with a new table panel (and deprecates the old one). This new table panel supports horizontal scrolling and column resize. Paired with the new `Organize fields` transformation detailed above you can reorder, hide & rename columns. This new panel also supports new cell display modes, like showing a bar gauge inside a cell.
### Panel inspector
The panel inspector is a feature that every panel will support, including internal as well as external community plugins. In this new panel inspector, you can view the raw data in a table format, apply some pre-defined transformations, and download as CSV. You can find the __Inspect__ setting in the panel menu. Use the keyboard shortcut `i` when hovering over a panel to get the panel inspector to appear.
### Improved time zone support
Starting in version 7.0, you can override the time zone used to display date and time values in a dashboard.
@@ -55,6 +61,19 @@ With this feature, you can specify the local time zone of the service or system
We have also extended the time zone options so you can select any of the standard [ISO 8601 time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
# 7.0.0-beta3 (2020-05-08)
### Features / Enhancements
- **Docker**: Upgrade to Alpine 3.11. [#24056](https://github.com/grafana/grafana/pull/24056), [@aknuds1](https://github.com/aknuds1)
- **Forms**: Remove Forms namespace [BREAKING]. Will cause all `Forms` imports to stop working. See migration guide in [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)[#24378](https://github.com/grafana/grafana/pull/24378), [@tskarhed](https://github.com/tskarhed)
### Bug Fixes
- **CloudWatch**: Fix error with expression only query. [#24362](https://github.com/grafana/grafana/pull/24362), [@aocenas](https://github.com/aocenas)
- **Elasticsearch**: Fix building of raw document queries resulting in error Unknown BaseAggregationBuilder error. [#24403](https://github.com/grafana/grafana/pull/24403), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus**: Fix for prometheus legend formats for instant time series queries. [#24407](https://github.com/grafana/grafana/pull/24407), [@torkelo](https://github.com/torkelo)
# 7.0.0-beta2 (2020-05-07)
## Breaking changes
@@ -72,42 +91,42 @@ We have also extended the time zone options so you can select any of the standar
### Features / Enhancements
* **CloudWatch**: Adds more examples to CloudWatch Logs cheatsheet. [#24288](https://github.com/grafana/grafana/pull/24288), [@kaydelaney](https://github.com/kaydelaney)
* **Elasticsearch**: Changes terms min_doc_count default from 1 to 0. [#24204](https://github.com/grafana/grafana/pull/24204), [@Estrax](https://github.com/Estrax)
* **Login Page**: New design. [#23892](https://github.com/grafana/grafana/pull/23892), [@torkelo](https://github.com/torkelo)
* **Logs**: Add log level Fatal. [#24185](https://github.com/grafana/grafana/pull/24185), [@davkal](https://github.com/davkal)
* **Loki**: Show loki datasource stats in panel inspector. [#24190](https://github.com/grafana/grafana/pull/24190), [@davkal](https://github.com/davkal)
* **Migration**: Dashboard links. [#23553](https://github.com/grafana/grafana/pull/23553), [@peterholmberg](https://github.com/peterholmberg)
* **Plugins**: Require signing of external back-end plugins. [#24075](https://github.com/grafana/grafana/pull/24075), [@aknuds1](https://github.com/aknuds1)
* **Prometheus**: Add off switch for metric/label name lookup. [#24034](https://github.com/grafana/grafana/pull/24034), [@s-h-a-d-o-w](https://github.com/s-h-a-d-o-w)
* **Search**: Bring back open search by clicking dashboard name. [#24151](https://github.com/grafana/grafana/pull/24151), [@torkelo](https://github.com/torkelo)
* **Tracing**: Header updates. [#24153](https://github.com/grafana/grafana/pull/24153), [@aocenas](https://github.com/aocenas)
* **Transformations**: Improve time series support. [#23978](https://github.com/grafana/grafana/pull/23978), [@ryantxu](https://github.com/ryantxu)
- **CloudWatch**: Adds more examples to CloudWatch Logs cheatsheet. [#24288](https://github.com/grafana/grafana/pull/24288), [@kaydelaney](https://github.com/kaydelaney)
- **Elasticsearch**: Changes terms min_doc_count default from 1 to 0. [#24204](https://github.com/grafana/grafana/pull/24204), [@Estrax](https://github.com/Estrax)
- **Login Page**: New design. [#23892](https://github.com/grafana/grafana/pull/23892), [@torkelo](https://github.com/torkelo)
- **Logs**: Add log level Fatal. [#24185](https://github.com/grafana/grafana/pull/24185), [@davkal](https://github.com/davkal)
- **Loki**: Show loki datasource stats in panel inspector. [#24190](https://github.com/grafana/grafana/pull/24190), [@davkal](https://github.com/davkal)
- **Migration**: Dashboard links. [#23553](https://github.com/grafana/grafana/pull/23553), [@peterholmberg](https://github.com/peterholmberg)
- **Plugins**: Require signing of external back-end plugins. [#24075](https://github.com/grafana/grafana/pull/24075), [@aknuds1](https://github.com/aknuds1)
- **Prometheus**: Add off switch for metric/label name lookup. [#24034](https://github.com/grafana/grafana/pull/24034), [@s-h-a-d-o-w](https://github.com/s-h-a-d-o-w)
- **Search**: Bring back open search by clicking dashboard name. [#24151](https://github.com/grafana/grafana/pull/24151), [@torkelo](https://github.com/torkelo)
- **Tracing**: Header updates. [#24153](https://github.com/grafana/grafana/pull/24153), [@aocenas](https://github.com/aocenas)
- **Transformations**: Improve time series support. [#23978](https://github.com/grafana/grafana/pull/23978), [@ryantxu](https://github.com/ryantxu)
### Bug Fixes
* **CloudWatch logs**: Fix default region interpolation and reset log groups on region change. [#24346](https://github.com/grafana/grafana/pull/24346), [@aocenas](https://github.com/aocenas)
* **Dashboard**: Fix for folder picker menu not being visible outside modal when saving dashboard. [#24296](https://github.com/grafana/grafana/pull/24296), [@tskarhed](https://github.com/tskarhed)
* **Dashboard**: Go to explore now works even after discarding dashboard changes. [#24149](https://github.com/grafana/grafana/pull/24149), [@torkelo](https://github.com/torkelo)
* **Dashboard**: Only show cache timeout option in panel edit if enabled in data source plugin json. [#24095](https://github.com/grafana/grafana/pull/24095), [@peterholmberg](https://github.com/peterholmberg)
* **Dashboard**: Propagate unhandled errors when saving dashboard. [#24081](https://github.com/grafana/grafana/pull/24081), [@peterholmberg](https://github.com/peterholmberg)
* **Dashboard**: Variable without a current value in json model causes crash on load. [#24261](https://github.com/grafana/grafana/pull/24261), [@torkelo](https://github.com/torkelo)
* **DashboardManager**: Disable editing if there are no folder permissions. [#24237](https://github.com/grafana/grafana/pull/24237), [@tskarhed](https://github.com/tskarhed)
* **DataLinks**: Do not add empty links. [#24088](https://github.com/grafana/grafana/pull/24088), [@dprokop](https://github.com/dprokop)
* **Explore/Loki**: Removes old query syntax support for regex filter. [#24281](https://github.com/grafana/grafana/pull/24281), [@Estrax](https://github.com/Estrax)
* **Explore**: Fix showing of results of queries in table. [#24018](https://github.com/grafana/grafana/pull/24018), [@ivanahuckova](https://github.com/ivanahuckova)
* **Field options**: show field name when title option config is empty. [#24335](https://github.com/grafana/grafana/pull/24335), [@dprokop](https://github.com/dprokop)
* **Graph**: Fixed graph tooltip getting stuck / not being cleared when leaving dashboard. [#24162](https://github.com/grafana/grafana/pull/24162), [@torkelo](https://github.com/torkelo)
* **Graph**: Fixed issue with x-axis labels showing "MM/DD" after viewing dashboard with pie chart. [#24341](https://github.com/grafana/grafana/pull/24341), [@mckn](https://github.com/mckn)
* **Jaeger**: Fix how label is created in cascader. [#24164](https://github.com/grafana/grafana/pull/24164), [@aocenas](https://github.com/aocenas)
* **Loki**: Fix label matcher for log metrics queries. [#24238](https://github.com/grafana/grafana/pull/24238), [@ivanahuckova](https://github.com/ivanahuckova)
* **Panel inspect**: hides Query tab for plugins without Query ability. [#24216](https://github.com/grafana/grafana/pull/24216), [@hugohaggmark](https://github.com/hugohaggmark)
* **Prometheus**: Refresh query field metrics on data source change. [#24116](https://github.com/grafana/grafana/pull/24116), [@s-h-a-d-o-w](https://github.com/s-h-a-d-o-w)
* **Select**: Fixes so component loses focus on selecting value or pressing outside of input. [#24008](https://github.com/grafana/grafana/pull/24008), [@mckn](https://github.com/mckn)
* **Stat/Gauge/BarGauge**: Shows default cursor when missing links. [#24284](https://github.com/grafana/grafana/pull/24284), [@hugohaggmark](https://github.com/hugohaggmark)
* **Tracing**: Fix view bounds after trace change. [#23994](https://github.com/grafana/grafana/pull/23994), [@aocenas](https://github.com/aocenas)
* **Variables**: Migrates old tags format for consistency. [#24276](https://github.com/grafana/grafana/pull/24276), [@hugohaggmark](https://github.com/hugohaggmark)
* **Reporting**: Update report schedule as soon as a report is updated (Enterprise)
- **CloudWatch logs**: Fix default region interpolation and reset log groups on region change. [#24346](https://github.com/grafana/grafana/pull/24346), [@aocenas](https://github.com/aocenas)
- **Dashboard**: Fix for folder picker menu not being visible outside modal when saving dashboard. [#24296](https://github.com/grafana/grafana/pull/24296), [@tskarhed](https://github.com/tskarhed)
- **Dashboard**: Go to explore now works even after discarding dashboard changes. [#24149](https://github.com/grafana/grafana/pull/24149), [@torkelo](https://github.com/torkelo)
- **Dashboard**: Only show cache timeout option in panel edit if enabled in data source plugin json. [#24095](https://github.com/grafana/grafana/pull/24095), [@peterholmberg](https://github.com/peterholmberg)
- **Dashboard**: Propagate unhandled errors when saving dashboard. [#24081](https://github.com/grafana/grafana/pull/24081), [@peterholmberg](https://github.com/peterholmberg)
- **Dashboard**: Variable without a current value in json model causes crash on load. [#24261](https://github.com/grafana/grafana/pull/24261), [@torkelo](https://github.com/torkelo)
- **DashboardManager**: Disable editing if there are no folder permissions. [#24237](https://github.com/grafana/grafana/pull/24237), [@tskarhed](https://github.com/tskarhed)
- **DataLinks**: Do not add empty links. [#24088](https://github.com/grafana/grafana/pull/24088), [@dprokop](https://github.com/dprokop)
- **Explore/Loki**: Removes old query syntax support for regex filter. [#24281](https://github.com/grafana/grafana/pull/24281), [@Estrax](https://github.com/Estrax)
- **Explore**: Fix showing of results of queries in table. [#24018](https://github.com/grafana/grafana/pull/24018), [@ivanahuckova](https://github.com/ivanahuckova)
- **Field options**: show field name when title option config is empty. [#24335](https://github.com/grafana/grafana/pull/24335), [@dprokop](https://github.com/dprokop)
- **Graph**: Fixed graph tooltip getting stuck / not being cleared when leaving dashboard. [#24162](https://github.com/grafana/grafana/pull/24162), [@torkelo](https://github.com/torkelo)
- **Graph**: Fixed issue with x-axis labels showing "MM/DD" after viewing dashboard with pie chart. [#24341](https://github.com/grafana/grafana/pull/24341), [@mckn](https://github.com/mckn)
- **Jaeger**: Fix how label is created in cascader. [#24164](https://github.com/grafana/grafana/pull/24164), [@aocenas](https://github.com/aocenas)
- **Loki**: Fix label matcher for log metrics queries. [#24238](https://github.com/grafana/grafana/pull/24238), [@ivanahuckova](https://github.com/ivanahuckova)
- **Panel inspect**: hides Query tab for plugins without Query ability. [#24216](https://github.com/grafana/grafana/pull/24216), [@hugohaggmark](https://github.com/hugohaggmark)
- **Prometheus**: Refresh query field metrics on data source change. [#24116](https://github.com/grafana/grafana/pull/24116), [@s-h-a-d-o-w](https://github.com/s-h-a-d-o-w)
- **Select**: Fixes so component loses focus on selecting value or pressing outside of input. [#24008](https://github.com/grafana/grafana/pull/24008), [@mckn](https://github.com/mckn)
- **Stat/Gauge/BarGauge**: Shows default cursor when missing links. [#24284](https://github.com/grafana/grafana/pull/24284), [@hugohaggmark](https://github.com/hugohaggmark)
- **Tracing**: Fix view bounds after trace change. [#23994](https://github.com/grafana/grafana/pull/23994), [@aocenas](https://github.com/aocenas)
- **Variables**: Migrates old tags format for consistency. [#24276](https://github.com/grafana/grafana/pull/24276), [@hugohaggmark](https://github.com/hugohaggmark)
- **Reporting**: Update report schedule as soon as a report is updated (Enterprise)
# 7.0.0-beta1 (2020-04-28)
@@ -117,6 +136,7 @@ We have also extended the time zone options so you can select any of the standar
- **Docker**: Our Ubuntu based images have been upgraded to Ubuntu [20.04 LTS](https://releases.ubuntu.com/20.04/).
- **Dashboard**: A global minimum dashboard refresh interval is now enforced and defaults to 5 seconds.
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
- **@grafana/ui**: Select API change for creating custom values, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
- **Interval calculation**: There is now a new option `Max data points` that controls the auto interval `$__interval` calculation. Interval was previously calculated by dividing the panel width by the time range. With the new max data points option it is now easy to set `$__interval` to a dynamic value that is time range agnostic. For example if you set `Max data points` to 10 Grafana will dynamically set `$__interval` by dividing the current time range by 10.
- **Datasource/Loki**: Support for [deprecated Loki endpoints](https://github.com/grafana/loki/blob/master/docs/api.md#lokis-http-api) has been removed.

View File

@@ -126,7 +126,8 @@ connstr =
# This enables data proxy logging, default is false
logging = false
# How long the data proxy should wait before timing out default is 30 (seconds)
# How long the data proxy waits before timing out, default is 30 seconds.
# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
timeout = 30
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
@@ -234,6 +235,9 @@ versions_to_keep = 20
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
min_refresh_interval = 5s
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
default_home_dashboard_path =
#################################### Users ###############################
[users]
# disable user signup / registration

View File

@@ -127,7 +127,8 @@
# This enables data proxy logging, default is false
;logging = false
# How long the data proxy should wait before timing out default is 30 (seconds)
# How long the data proxy waits before timing out, default is 30 seconds.
# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
;timeout = 30
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
@@ -233,6 +234,9 @@
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;min_refresh_interval = 5s
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
;default_home_dashboard_path =
#################################### Users ###############################
[users]
# disable user signup / registration
@@ -454,6 +458,8 @@
;from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com
# SMTP startTLS policy (defaults to 'OpportunisticStartTLS')
;startTLS_policy = NoStartTLS
[emails]
;welcome_email_on_sign_up = false

View File

@@ -428,6 +428,14 @@
{
"text": "Bitcoin (฿)",
"value": "currencyBTC"
},
{
"text": "Milli Bitcoin (mBTC)",
"value": "currencymBTC"
},
{
"text": "Micro Bitcoin (μBTC)",
"value": "currencyμBTC"
}
],
"text": "currency"

View File

@@ -15,12 +15,18 @@
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 13844,
"iteration": 1566896059256,
"iteration": 1590677937026,
"links": [],
"panels": [
{
"content": "## Data center = $datacenter\n\n### server = $server\n\n#### pod = $pod",
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
@@ -29,7 +35,6 @@
},
"id": 4,
"mode": "markdown",
"options": {},
"targets": [
{
"refId": "A",
@@ -47,6 +52,12 @@
"colorValue": false,
"colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"],
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"format": "none",
"gauge": {
"maxValue": 100,
@@ -75,7 +86,6 @@
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"options": {},
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
@@ -119,18 +129,13 @@
},
{
"cacheTimeout": null,
"gridPos": {
"h": 9,
"w": 4,
"x": 16,
"y": 0
},
"id": 8,
"links": [],
"options": {
"fieldOptions": {
"calcs": ["mean"],
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {},
"links": [
{
"targetBlank": true,
@@ -142,7 +147,9 @@
"max": 100,
"min": 0,
"nullValueMode": "connected",
"thresholds": [
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
@@ -151,17 +158,30 @@
"color": "red",
"value": 80
}
],
]
},
"unit": "none"
},
"override": {},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 4,
"x": 16,
"y": 0
},
"id": 8,
"links": [],
"options": {
"orientation": "horizontal",
"reduceOptions": {
"calcs": ["mean"],
"values": false
},
"orientation": "horizontal",
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "6.4.0-pre",
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
@@ -175,19 +195,13 @@
},
{
"cacheTimeout": null,
"gridPos": {
"h": 9,
"w": 4,
"x": 20,
"y": 0
},
"id": 9,
"links": [],
"options": {
"displayMode": "basic",
"fieldOptions": {
"calcs": ["mean"],
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {},
"links": [
{
"targetBlank": true,
@@ -199,7 +213,9 @@
"max": 100,
"min": 0,
"nullValueMode": "connected",
"thresholds": [
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
@@ -208,15 +224,30 @@
"color": "red",
"value": 80
}
],
]
},
"unit": "none"
},
"override": {},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 4,
"x": 20,
"y": 0
},
"id": 9,
"links": [],
"options": {
"displayMode": "basic",
"orientation": "vertical",
"reduceOptions": {
"calcs": ["mean"],
"values": false
},
"orientation": "vertical"
"showUnfilled": true
},
"pluginVersion": "6.4.0-pre",
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
@@ -228,20 +259,108 @@
"title": "React gauge datalink",
"type": "bargauge"
},
{
"datasource": "CsvData",
"fieldConfig": {
"defaults": {
"custom": {
"align": null
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "server"
},
"properties": [
{
"id": "links",
"value": [
{
"title": "filter",
"url": "http://localhost:3000/d/-Y-tnEDWk/templating-nested-template-variables?var-datacenter=${__data.fields[datacenter]}&var-server=${__value.raw}"
}
]
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 9
},
"id": 11,
"options": {
"showHeader": true
},
"pluginVersion": "7.1.0-pre",
"targets": [
{
"data": [
{
"fields": [
{
"config": {},
"name": "datacenter",
"type": "string",
"values": ["A", "B", "C"]
},
{
"config": {},
"name": "server",
"type": "string",
"values": ["AA", "BB", "CC"]
}
]
}
],
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Data links that filter update variables on current dashboard",
"type": "table"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 13,
"w": 24,
"x": 0,
"y": 9
"y": 15
},
"hiddenSeries": false,
"id": 2,
"legend": {
"avg": false,
@@ -316,7 +435,7 @@
}
],
"refresh": false,
"schemaVersion": 19,
"schemaVersion": 25,
"style": "dark",
"tags": ["gdev", "templating"],
"templating": {
@@ -324,6 +443,7 @@
{
"allValue": null,
"current": {
"selected": true,
"text": "A",
"value": ["A"]
},
@@ -349,6 +469,7 @@
{
"allValue": null,
"current": {
"selected": true,
"text": "AA",
"value": ["AA"]
},
@@ -374,6 +495,7 @@
{
"allValue": null,
"current": {
"selected": true,
"text": "All",
"value": ["$__all"]
},
@@ -403,7 +525,7 @@
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
"refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
},
"timezone": "",
"title": "Templating - Nested Template Variables",

View File

@@ -428,6 +428,14 @@
{
"text": "Bitcoin (฿)",
"value": "currencyBTC"
},
{
"text": "Milli Bitcoin (mBTC)",
"value": "currencymBTC"
},
{
"text": "Micro Bitcoin (μBTC)",
"value": "currencyμBTC"
}
],
"text": "currency"

View File

@@ -0,0 +1,602 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 7,
"title": "Cell styles",
"type": "row"
},
{
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"custom": {
"align": "center",
"displayMode": "color-background"
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "blue",
"value": 20
},
{
"color": "orange",
"value": 60
},
{
"color": "red",
"value": 70
}
]
},
"unit": "degree"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Max"
},
"properties": [
{
"id": "custom.width",
"value": 84
}
]
},
{
"matcher": {
"id": "byName",
"options": "Last"
},
"properties": [
{
"id": "custom.width",
"value": 78
}
]
},
{
"matcher": {
"id": "byName",
"options": "Mean"
},
"properties": [
{
"id": "custom.width",
"value": 74
}
]
},
{
"matcher": {
"id": "byName",
"options": "Field"
},
"properties": [
{
"id": "custom.align",
"value": "left"
}
]
}
]
},
"gridPos": {
"h": 16,
"w": 7,
"x": 0,
"y": 1
},
"id": 4,
"options": {
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "Last"
}
]
},
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 15,
"stringInput": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Colored background",
"transformations": [
{
"id": "reduce",
"options": {
"reducers": ["max", "mean", "last"]
}
}
],
"type": "table"
},
{
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"custom": {
"align": null
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "orange",
"value": null
},
{
"color": "red",
"value": 50
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Value"
},
"properties": [
{
"id": "custom.displayMode",
"value": "gradient-gauge"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Info"
},
"properties": [
{
"id": "custom.width",
"value": 92
}
]
},
{
"matcher": {
"id": "byName",
"options": "Min"
},
"properties": [
{
"id": "custom.width",
"value": 76
}
]
},
{
"matcher": {
"id": "byName",
"options": "Max"
},
"properties": [
{
"id": "custom.width",
"value": 89
}
]
},
{
"matcher": {
"id": "byName",
"options": "Time"
},
"properties": [
{
"id": "custom.width",
"value": 165
}
]
}
]
},
"gridPos": {
"h": 16,
"w": 8,
"x": 7,
"y": 1
},
"id": 2,
"options": {
"showHeader": true,
"sortBy": [
{
"desc": false,
"displayName": "Min"
}
]
},
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
"scenarioId": "random_walk_table",
"stringInput": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Bar gauge cells",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true
},
"indexByName": {
"Info": 1,
"Max": 3,
"Min": 2,
"Time": 0,
"Value": 4
},
"renameByName": {}
}
}
],
"type": "table"
},
{
"datasource": "gdev-testdata",
"description": "",
"fieldConfig": {
"defaults": {
"custom": {
"align": null
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "blue",
"value": null
},
{
"color": "green",
"value": 50
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Value"
},
"properties": [
{
"id": "custom.displayMode",
"value": "lcd-gauge"
},
{
"id": "custom.align",
"value": "center"
}
]
}
]
},
"gridPos": {
"h": 16,
"w": 9,
"x": 15,
"y": 1
},
"id": 5,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
"scenarioId": "random_walk_table",
"stringInput": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Retro LCD cell",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Info": false,
"Max": true,
"Min": true,
"Time": false
},
"indexByName": {
"Info": 1,
"Max": 3,
"Min": 2,
"Time": 0,
"Value": 4
},
"renameByName": {}
}
}
],
"type": "table"
},
{
"collapsed": false,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 17
},
"id": 9,
"panels": [],
"title": "Data links",
"type": "row"
},
{
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"custom": {
"align": "center",
"displayMode": "color-text"
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "blue",
"value": 20
},
{
"color": "orange",
"value": 50
},
{
"color": "red",
"value": 70
}
]
},
"unit": "percent"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Time"
},
"properties": [
{
"id": "custom.align",
"value": null
}
]
},
{
"matcher": {
"id": "byName",
"options": "{name=\"S1\", server=\"A\"}"
},
"properties": [
{
"id": "links",
"value": [
{
"title": "Details",
"url": "http://detail?serverLabel=${__field.labels.server}&valueNumeric=${__value.numeric}"
}
]
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 18
},
"id": 3,
"maxDataPoints": "10",
"options": {
"showHeader": true
},
"pluginVersion": "7.1.0-pre",
"targets": [
{
"alias": "S1",
"labels": "server=A",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 1,
"stringInput": ""
},
{
"alias": "S2",
"labels": "server=B",
"refId": "B",
"scenarioId": "random_walk",
"seriesCount": 1,
"stringInput": ""
},
{
"alias": "S3",
"labels": "server=C",
"refId": "C",
"scenarioId": "random_walk",
"seriesCount": 1,
"stringInput": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "Data link with labels and numeric value",
"transformations": [
{
"id": "seriesToColumns",
"options": {}
}
],
"type": "table"
},
{
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"custom": {
"align": "center",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "blue",
"value": 20
},
{
"color": "orange",
"value": 60
},
{
"color": "red",
"value": 70
}
]
},
"unit": "degree"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 5,
"x": 12,
"y": 18
},
"id": 10,
"options": {
"showHeader": false,
"sortBy": [
{
"desc": true,
"displayName": "Last"
}
]
},
"pluginVersion": "7.1.0-pre",
"targets": [
{
"refId": "A",
"scenarioId": "random_walk_table",
"seriesCount": 5,
"stringInput": ""
}
],
"timeFrom": null,
"timeShift": null,
"title": "No header",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Min": true,
"Time": true,
"Value": true
},
"indexByName": {
"Info": 2,
"Max": 4,
"Min": 3,
"Time": 0,
"Value": 1
},
"renameByName": {}
}
}
],
"type": "table"
}
],
"schemaVersion": 25,
"style": "dark",
"tags": ["gdev", "panel-tests"],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
},
"timezone": "",
"title": "Panel Tests - React Table",
"uid": "U_bZIMRMk",
"version": 17
}

View File

@@ -0,0 +1,695 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 28,
"links": [],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 4,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"refId": "A",
"scenario": "random_walk",
"scenarioId": "random_walk",
"target": ""
}
],
"thresholds": [],
"timeFrom": "2s",
"timeRegions": [],
"timeShift": null,
"title": "Millisecond res x-axis and tooltip",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 0
},
"hiddenSeries": false,
"id": 3,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"refId": "A",
"scenario": "random_walk",
"scenarioId": "random_walk",
"target": ""
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Random walk series",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 7
},
"hiddenSeries": false,
"id": 5,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "B-series",
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"refId": "A",
"scenarioId": "csv_metric_values",
"stringInput": "1,20,90,30,5,0",
"target": ""
},
{
"refId": "B",
"scenarioId": "csv_metric_values",
"stringInput": "2000,3000,4000,1000,3000,10000",
"target": ""
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "2 yaxis and axis labels",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "percent",
"label": "Perecent",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": "Pressure",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 7
},
"hiddenSeries": false,
"id": 9,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "B-series",
"zindex": -3
}
],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"hide": false,
"refId": "B",
"scenarioId": "csv_metric_values",
"stringInput": "1,20,null,null,null,null,null,null,100,10,10,20,30,40,10",
"target": ""
},
{
"alias": "",
"hide": false,
"refId": "A",
"scenarioId": "csv_metric_values",
"stringInput": "1,20,90,30,5,10,20,30,40,40,40,100,10,20,20",
"target": ""
},
{
"alias": "",
"hide": false,
"refId": "C",
"scenarioId": "csv_metric_values",
"stringInput": "1,20,90,30,5,10,20,30,40,40,40,100,10,20,20",
"target": ""
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Stacking value ontop of nulls",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 0,
"fillGradient": 0,
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 15
},
"hiddenSeries": false,
"id": 21,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "C-series",
"steppedLine": true
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "",
"hide": false,
"refId": "B",
"scenarioId": "csv_metric_values",
"stringInput": "1,null,40,null,90,null,null,100,null,null,100,null,null,80,null",
"target": ""
},
{
"alias": "",
"hide": false,
"refId": "C",
"scenarioId": "csv_metric_values",
"stringInput": "20,null40,null,null,50,null,70,null,100,null,10,null,30,null",
"target": ""
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Null between points",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"decimals": 3,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 15
},
"hiddenSeries": false,
"id": 16,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"show": true,
"total": true,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"refId": "A",
"scenarioId": "csv_metric_values",
"stringInput": "1,20,90,30,5,0",
"target": ""
},
{
"refId": "B",
"scenarioId": "csv_metric_values",
"stringInput": "1,20,90,30,5,0",
"target": ""
},
{
"refId": "C",
"scenarioId": "csv_metric_values",
"stringInput": "1,20,90,30,5,0",
"target": ""
},
{
"refId": "D",
"scenarioId": "csv_metric_values",
"stringInput": "1,20,90,30,5,0",
"target": ""
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Legend Table No Scroll Visible",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": false,
"revision": 8,
"schemaVersion": 25,
"style": "dark",
"tags": ["gdev", "panel-tests", "graph", "table"],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "utc",
"title": "Panel Tests - Time zone support",
"uid": "5SdHCasdf",
"version": 1
}

View File

@@ -1,3 +1,4 @@
FROM prom/prometheus:v2.7.2
ADD prometheus.yml /etc/prometheus/
ADD alert.rules /etc/prometheus/
ADD recording.yml /etc/prometheus/
ADD alert.yml /etc/prometheus/

View File

@@ -1,10 +0,0 @@
# Alert Rules
ALERT AppCrash
IF process_open_fds > 0
FOR 15s
LABELS { severity="critical" }
ANNOTATIONS {
summary = "Number of open fds > 0",
description = "Just testing"
}

View File

@@ -0,0 +1,11 @@
groups:
- name: ALERT
rules:
- alert: AppCrash
expr: process_open_fds > 0
for: 15s
labels:
severity: critical
annotations:
summary: Number of open fds > 0
description: Just testing

View File

@@ -5,17 +5,17 @@ global:
# scrape_timeout is set to the global default (10s).
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
#rule_files:
# - "alert.rules"
# - "first.rules"
rule_files:
- "alert.yml"
- "recording.yml"
# - "second.rules"
# alerting:
# alertmanagers:
# - scheme: http
# static_configs:
# - targets:
# - "127.0.0.1:9093"
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- "alertmanager:9093"
scrape_configs:
- job_name: 'prometheus'

View File

@@ -0,0 +1,16 @@
groups:
- name: RECORDING_RULES
rules:
- record: instance_path:requests:rate5m
expr: rate(prometheus_http_requests_total{job="prometheus"}[5m])
- record: path:requests:rate5m
expr: sum without (instance)(instance_path:requests:rate5m{job="prometheus"})
- record: instance_path:reloads_failures:rate5m
expr: rate(prometheus_tsdb_reloads_failures_total{job="prometheus"}[5m])
- record: instance_path:reloads:rate5m
expr: rate(prometheus_tsdb_reloads_total{job="prometheus"}[5m])
- record: instance_path:request_failures_per_requests:ratio_rate5m
expr: |2
instance_path:reloads_failures:rate5m{job="prometheus"}
/
instance_path:reloads:rate5m{job="prometheus"}

View File

@@ -1,9 +1,4 @@
+++
title = "Contribute"
description = "Contribute"
title = "Developers"
type = "docs"
[menu.docs]
name = "Contribute"
identifier = "contribute"
weight = 20
+++

View File

@@ -3,9 +3,6 @@ title = "Contributor License Agreement (CLA)"
description = "Contributor License Agreement (CLA)"
type = "docs"
aliases = ["/docs/grafana/latest/project/cla", "docs/contributing/cla.html"]
[menu.docs]
parent = "contribute"
weight = 1
+++
# Grafana Labs Contributor License Agreement

View File

@@ -1,15 +1,10 @@
+++
title = "Developer resources"
description = "Resources for Grafana developers"
title = "Contribute to Grafana"
keywords = ["grafana", "documentation", "developers", "resources"]
type = "docs"
[menu.docs]
name = "Grafana resources"
identifier = "Developer resources"
weight = 30
+++
# Developer resources
# Contribute to Grafana
This page lists resources for developers who want to contribute to the Grafana software ecosystem or build plugins for Grafana.

View File

@@ -1,21 +1,17 @@
+++
title = "Build a plugin"
type = "docs"
[menu.docs]
parent = "developers"
identifier = "plugins"
weight = 3
+++
# Build a plugin
For more information on the types of plugins you can build, refer to the [Plugin Overview]({{< relref "../plugins/_index.md" >}}).
For more information on the types of plugins you can build, refer to the [Plugin Overview]({{< relref "../../plugins/_index.md" >}}).
## Get started
The easiest way to start developing Grafana plugins is to use the [Grafana Toolkit](https://www.npmjs.com/package/@grafana/toolkit).
Open the terminal, and run the following command in your [plugin directory]({{< relref "../installation/configuration/_index.md#plugins" >}}):
Open the terminal, and run the following command in your [plugin directory]({{< relref "../../installation/configuration/_index.md#plugins" >}}):
```bash
npx @grafana/toolkit plugin:create my-grafana-plugin
@@ -23,8 +19,8 @@ npx @grafana/toolkit plugin:create my-grafana-plugin
If you want a more guided introduction to plugin development, check out our tutorials:
- [Build a panel plugin]({{< relref "../../../../tutorials/build-a-panel-plugin.md" >}})
- [Build a data source plugin]({{< relref "../../../../tutorials/build-a-data-source-plugin.md" >}})
- [Build a panel plugin]({{< relref "../../../../../tutorials/build-a-panel-plugin.md" >}})
- [Build a data source plugin]({{< relref "../../../../../tutorials/build-a-data-source-plugin.md" >}})
## Go further
@@ -34,8 +30,8 @@ Learn more about specific areas of plugin development.
Deepen your knowledge through a series of high-level overviews of plugin concepts.
- [Data frames]({{< relref "../plugins/developing/dataframe.md" >}})
- [Authentication for data source plugins]({{< relref "../plugins/developing/auth-for-datasources.md" >}})
- [Data frames]({{< relref "data-frames.md" >}})
- [Authentication for data source plugins]({{< relref "authentication.md" >}})
### UI library
@@ -45,12 +41,12 @@ Explore the many UI components in our [Grafana UI library](https://developers.gr
If you're looking to build your first plugin, check out these introductory tutorials:
- [Build a panel plugin]({{< relref "../../../../tutorials/build-a-panel-plugin.md" >}})
- [Build a data source plugin]({{< relref "../../../../tutorials/build-a-data-source-plugin.md" >}})
- [Build a panel plugin]({{< relref "../../../../../tutorials/build-a-panel-plugin.md" >}})
- [Build a data source plugin]({{< relref "../../../../../tutorials/build-a-data-source-plugin.md" >}})
Ready to learn more? Check out our other tutorials:
- [Build a panel plugin with D3.js]({{< relref "../../../../tutorials/build-a-panel-plugin-with-d3.md" >}})
- [Build a panel plugin with D3.js]({{< relref "../../../../../tutorials/build-a-panel-plugin-with-d3.md" >}})
### API reference
@@ -58,13 +54,13 @@ Learn more about Grafana options and packages.
#### Metadata
- [Plugin metadata]({{< relref "../plugins/developing/plugin.json.md" >}})
- [Plugin metadata]({{< relref "metadata.md" >}})
#### Typescript
- [Grafana Data]({{< relref "../packages_api/data/_index.md" >}})
- [Grafana Runtime]({{< relref "../packages_api/runtime/_index.md" >}})
- [Grafana UI]({{< relref "../packages_api/ui/_index.md" >}})
- [Grafana Data]({{< relref "../../packages_api/data/_index.md" >}})
- [Grafana Runtime]({{< relref "../../packages_api/runtime/_index.md" >}})
- [Grafana UI]({{< relref "../../packages_api/ui/_index.md" >}})
#### Go

View File

@@ -1,10 +1,7 @@
+++
title = "Authentication for Datasource Plugins"
title = "Authentication for data source plugins"
type = "docs"
[menu.docs]
name = "Authentication for Datasource Plugins"
parent = "developing"
weight = 3
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/"]
+++
# Authentication for data source plugins

View File

@@ -1,14 +1,11 @@
+++
title = "Developing Backend Plugins"
title = "Backend plugins"
keywords = ["grafana", "plugins", "backend", "plugin", "backend-plugins", "documentation"]
type = "docs"
[menu.docs]
name = "Developing Backend Plugins"
parent = "developing"
weight = 5
aliases = ["/docs/grafana/latest/plugins/developing/backend-plugins-guide/"]
+++
# Backend Plugins
# Backend plugins
Grafana added support for plugins in Grafana 3.0 and this enabled the Grafana community to create panel plugins and data source plugins. It was wildly successful and has made Grafana much more useful as you can integrate it with anything and do any type of custom visualization that you want. However, these plugin hooks are on the frontend only and we also want to provide hooks into the Grafana backend to allow the community to extend and improve Grafana in new ways.

View File

@@ -1,13 +1,9 @@
+++
title = "Introduction Data frames"
title = "Data frames"
type = "docs"
[menu.docs]
name = "Data frames"
parent = "developing"
weight = 9
+++
## Introduction to data frames
# Data frames
Grafana supports a variety of different data sources, each with its own data model. To make this possible, Grafana consolidates the query results from each of these data sources into one unified data structure called a _data frame_.
@@ -17,7 +13,7 @@ The data frame structure is a concept that's borrowed from data analysis tools l
This document gives an overview of the data frame structure, and of how data is handled within Grafana.
### The data frame
## The data frame
A data frame is a columnar-oriented table structure, which means it stores data by column and not by row. To understand what this means, lets look at the TypeScript definition used by Grafana:
@@ -61,25 +57,25 @@ Each field has three values, and each value in a field must share the same type.
One restriction on data frames is that all fields in the frame must be of the same length to be a valid data frame.
#### Field configuration
### Field configuration
Each field in a data frame contains optional information about the values in the field, such as units, scaling, and so on.
By adding field configurations to a data frame, Grafana can configure visualizations automatically. For example, you could configure Grafana to automatically set the unit provided by the data source.
### Transformations
## Transformations
Along with the type information, field configs enables _data transformations_ within Grafana.
A data transformation is any function that accepts a data frame as input, and returns another data frame as output. By using data frames in your plugin, you get a range of transformations for free.
### Data frames as time series
## Data frames as time series
A data frame with at least one time field is considered a _time series_.
For more information on time series, refer to our [Introduction to time series](https://grafana.com/docs/grafana/latest/guides/timeseries/).
#### Wide format
### Wide format
When a collection of time series share the same _time index_—the time fields in each time series are identical—they can be stored together, in a _wide_ format. By reusing the time field, we can reduce the amount of data being sent to the browser.
@@ -126,7 +122,7 @@ Dimensions: 2 fields by 2 rows
The wide format can typically be used when multiple time series are collected by the same process. In this case, every measurement is made at the same interval and will therefore share the same time values.
#### Long format
### Long format
Some data sources return data in a _long_ format (also called _narrow_ format). This is common format returned by, for example, SQL databases.

View File

@@ -1,14 +1,12 @@
+++
title = "Developer Guide"
title = "Legacy plugins"
type = "docs"
aliases = ["/docs/grafana/latest/plugins/development/", "/docs/grafana/latest/plugins/datasources/", "/docs/grafana/latest/plugins/apps/", "/docs/grafana/latest/plugins/panels/"]
[menu.docs]
name = "Developer Guide"
parent = "developing"
weight = 1
aliases = ["/docs/grafana/latest/plugins/development/", "/docs/grafana/latest/plugins/datasources/", "/docs/grafana/latest/plugins/apps/", "/docs/grafana/latest/plugins/panels/", "/docs/grafana/latest/plugins/developing/development/"]
+++
# Developer Guide
# Legacy plugins
> **Note**: Since Grafana 7.0, writing plugins using Angular is no longer recommended. If you're looking to build a new plugin, refer to [Plugins]({{< relref "../_index.md" >}}).
You can extend Grafana by writing your own plugins and then share them with other users in [our plugin repository](https://grafana.com/plugins).
@@ -47,20 +45,20 @@ Grafana that can impact your plugin.
## Metadata
See the [coding styleguide]({{< relref "code-styleguide.md" >}}) for details on the metadata.
See the [coding styleguide]({{< relref "style-guide.md" >}}) for details on the metadata.
## module.(js|ts)
This is the entry point for every plugin. This is the place where you should export
your plugin implementation. Depending on what kind of plugin you are developing you
will be expected to export different things. You can find what's expected for [datasource]({{< relref "datasources.md" >}}), [panels]({{< relref "panels.md" >}})
will be expected to export different things. You can find what's expected for [datasource]({{< relref "data-sources.md" >}}), [panels]({{< relref "panels.md" >}})
and [apps]({{< relref "apps.md" >}}) plugins in the documentation.
The Grafana SDK is quite small so far and can be found here:
- [SDK file in Grafana](https://github.com/grafana/grafana/blob/master/public/app/plugins/sdk.ts)
The SDK contains three different plugin classes: PanelCtrl, MetricsPanelCtrl and QueryCtrl. For plugins of the panel type, the module.js file should export one of these. There are some extra classes for [data sources]({{< relref "datasources.md" >}}).
The SDK contains three different plugin classes: PanelCtrl, MetricsPanelCtrl and QueryCtrl. For plugins of the panel type, the module.js file should export one of these. There are some extra classes for [data sources]({{< relref "data-sources.md" >}}).
Example:
@@ -128,7 +126,7 @@ We have three different examples that you can fork/download to get started devel
- [Getting Plugins to work in Snapshot Mode]({{< relref "snapshot-mode.md" >}})
- [Plugin Defaults and Editor Mode]({{< relref "defaults-and-editor-mode.md" >}})
- [Grafana Plugin Code Styleguide]({{< relref "code-styleguide.md" >}})
- [Grafana Plugin Code Styleguide]({{< relref "style-guide.md" >}})
- [Grafana Apps]({{< relref "apps.md" >}})
- [Grafana Data Sources]({{< relref "datasources.md" >}})
- [plugin.json Schema]({{< relref "plugin.json.md" >}})
- [Grafana Data Sources]({{< relref "data-sources.md" >}})
- [plugin.json Schema]({{< relref "metadata.md" >}})

View File

@@ -1,14 +1,11 @@
+++
title = "Developing App Plugins"
title = "Legacy app plugins"
keywords = ["grafana", "plugins", "documentation"]
type = "docs"
[menu.docs]
name = "Developing App Plugins"
parent = "developing"
weight = 4
aliases = ["/docs/grafana/latest/plugins/developing/apps/"]
+++
# Grafana Apps
# Legacy app plugins
App plugins are a Grafana plugin that can bundle data source and panel plugins within one package. They also enable the plugin author to create custom pages within Grafana. The custom pages enable the plugin author to include things like documentation, sign-up forms, or to control other services with HTTP requests.

View File

@@ -1,14 +1,11 @@
+++
title = "Developing Datasource Plugins"
title = "Legacy data source plugins"
keywords = ["grafana", "plugins", "documentation"]
type = "docs"
[menu.docs]
name = "Developing Datasource Plugins"
parent = "developing"
weight = 5
aliases = ["/docs/grafana/latest/plugins/developing/datasources/"]
+++
# Data Sources
# Legacy data source plugins
Data source plugins enable people to develop plugins for any database that
communicates over HTTP. Its up to the plugin to transform the data into

View File

@@ -1,13 +1,10 @@
+++
title = "Plugin Defaults and Editor Mode"
title = "Legacy defaults and editor mode"
type = "docs"
[menu.docs]
name = "Plugin Defaults and Editor Mode"
parent = "developing"
weight = 3
aliases = ["/docs/grafana/latest/plugins/developing/defaults-and-editor-mode/"]
+++
# Plugin Defaults and Editor Mode
# Legacy defaults and editor mode
Most plugins allow users to customize the behavior by changing settings on an editor tab. These setting fields are saved in the dashboard json.

View File

@@ -1,21 +1,16 @@
+++
title = "Developing Panel Plugins"
title = "Legacy panel plugins"
keywords = ["grafana", "plugins", "panel", "documentation"]
type = "docs"
[menu.docs]
name = "Developing Panel Plugins"
parent = "developing"
weight = 4
aliases = ["/docs/grafana/latest/plugins/developing/panels/"]
+++
# Panels
# Legacy panel plugins
Panels are the main building blocks of dashboards.
## Panel development
### Scrolling
The grafana dashboard framework controls the panel height. To enable a scrollbar within the panel the PanelCtrl needs to set the scrollable static variable:
@@ -27,10 +22,7 @@ export class MyPanelCtrl extends PanelCtrl {
In this case, make sure the template has a single `<div>...</div>` root. The plugin loader will modify that element adding a scrollbar.
### Examples
- [clock-panel](https://github.com/grafana/clock-panel)
- [singlestat-panel](https://github.com/grafana/grafana/tree/master/public/app/plugins/panel/singlestat)

View File

@@ -1,13 +1,10 @@
+++
title = "Plugin Review Guidelines"
title = "Legacy review guidelines"
type = "docs"
[menu.docs]
name = "Plugin Review Guidelines"
parent = "developing"
weight = 2
aliases = ["/docs/grafana/latest/plugins/developing/plugin-review-guidelines/"]
+++
# Plugin Review Guidelines
# Legacy review guidelines
The Grafana team reviews all plugins that are published on Grafana.com. There are two areas we review, the metadata for the plugin and the plugin functionality.
@@ -157,7 +154,7 @@ A basic guide for data sources can be found [here](http://docs.grafana.org/plugi
If possible, any passwords or secrets should be be saved in the `secureJsonData` blob. To encrypt sensitive data, the Grafana server's proxy feature must be used. The Grafana server has support for token authentication (OAuth) and HTTP Header authentication. If the calls have to be sent directly from the browser to a third-party API, this will not be possible and sensitive data will not be encrypted.
Read more here about how [authentication for data sources]({{< relref "auth-for-datasources.md" >}}) works.
Read more here about how [authentication for data sources]({{< relref "../authentication.md" >}}) works.
If using the proxy feature, the Config page should use the `secureJsonData` blob like this:

View File

@@ -1,17 +1,14 @@
+++
title = "Snapshot Mode"
title = "Legacy snapshot mode"
type = "docs"
[menu.docs]
name = "Snapshot Mode"
parent = "developing"
weight = 6
aliases = ["/docs/grafana/latest/plugins/developing/snapshot-mode/"]
+++
# Getting Plugins to work in Snapshot Mode
# Legacy snapshot mode
{{< imgbox img="/img/docs/Grafana-snapshot-example.png" caption="A dashboard using snapshot data and not live data." >}}
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../reference/share_dashboard.md" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](http://snapshot.raintank.io/) if you want to send the snapshot to someone who does not have access to your Grafana server.
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../reference/share_dashboard.md" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](http://snapshot.raintank.io/) if you want to send the snapshot to someone who does not have access to your Grafana server.
{{< imgbox img="/img/docs/animated_gifs/snapshots.gif" caption="Selecting a snapshot" >}}

View File

@@ -1,13 +1,10 @@
+++
title = "Plugin Code Styleguide"
title = "Legacy code style guide"
type = "docs"
[menu.docs]
name = "Plugin Code Styleguide"
parent = "developing"
weight = 2
aliases = ["/docs/grafana/latest/plugins/developing/code-styleguide/"]
+++
# Grafana Plugin Code Styleguide
# Legacy code style guide
This guide has two parts. The first part describes the metadata and the second part is a styleguide for HTML/CSS and JavaScript in Grafana plugins and applies if you are using ES6 in your plugin. If using TypeScript then the [Angular TypeScript styleguide](https://angular.io/styleguide) is recommended.
@@ -30,7 +27,7 @@ grafana-piechart-panel
mtanda-histogram-panel
```
The full file format for plugin.json is described [here]({{< relref "plugin.json.md" >}}).
The full file format for plugin.json is described [here]({{< relref "metadata.md" >}}).
Minimal plugin.json:

View File

@@ -1,22 +1,19 @@
+++
title = "plugin.json Schema"
title = "plugin.json"
keywords = ["grafana", "plugins", "documentation"]
type = "docs"
[menu.docs]
name = "plugin.json Schema"
parent = "developing"
weight = 8
aliases = ["/docs/grafana/latest/plugins/developing/plugin.json/"]
+++
# Plugin.json
# plugin.json
The plugin.json file is mandatory for all plugins. When Grafana starts it will scan the plugin folders and mount every folder that contains a plugin.json file unless the folder contains a subfolder named `dist`. In that case grafana will mount the `dist` folder instead.
## Plugin.json Schema
## Schema
| Property | Description |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| id | Unique name of the plugin. See [naming conventions described in styleguide]({{< relref "code-styleguide.md" >}}) |
|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| id | Unique name of the plugin. |
| type | One of `app`, `datasource`, `panel` |
| name | Human-readable name of the plugin |
| dependencies.grafanaVersion | Required Grafana version for this plugin |

View File

@@ -79,7 +79,7 @@ In the query editor for a panel, after choosing your Azure Monitor data source,
The query editor will change depending on which one you pick. Azure Monitor is the default.
## Querying the Azure Monitor Service
## Querying the Azure Monitor service
The Azure Monitor service provides metrics for all the Azure services that you have running. It helps you understand how your applications on Azure are performing and to proactively find issues affecting your applications.
@@ -93,7 +93,7 @@ Examples of metrics that you can get from the service are:
{{< docs-imagebox img="/img/docs/v60/azuremonitor-service-query-editor.png" class="docs-image--no-shadow" caption="Azure Monitor Query Editor" >}}
### Formatting Legend Keys with Aliases for the Azure Monitor Service
### Formatting legend keys with aliases for Azure Monitor
The default legend formatting for the Azure Monitor API is:
@@ -106,7 +106,7 @@ Azure Monitor Examples:
- `dimension: {{dimensionvalue}}`
- `{{resourcegroup}} - {{resourcename}}`
### Alias Patterns for Azure Monitor
### Alias patterns for Azure Monitor
- `{{resourcegroup}}` = replaced with the value of the Resource Group
- `{{namespace}}` = replaced with the value of the Namespace (e.g. Microsoft.Compute/virtualMachines)
@@ -115,7 +115,7 @@ Azure Monitor Examples:
- `{{dimensionname}}` = replaced with dimension key/label (e.g. blobtype)
- `{{dimensionvalue}}` = replaced with dimension value (e.g. BlockBlob)
### Templating with Variables for the Azure Monitor Service
### Templating with variables for Azure Monitor
Instead of hard-coding things like server, application and sensor name in your metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data being displayed in your dashboard.
@@ -149,11 +149,11 @@ Examples:
Check out the [Templating]({{< relref "../../variables/templates-and-variables.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
### Azure Monitor Metrics Whitelist
### Azure Monitor metrics whitelist
Not all metrics returned by the Azure Monitor API have values. The Grafana data source has a whitelist to only return metric names if it is possible they might have values. This whitelist is updated regularly as new services and metrics are added to the Azure cloud. You can find the current whitelist [here](https://github.com/grafana/grafana/blob/master/public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/supported_namespaces.ts).
### Azure Monitor Alerting
### Azure Monitor alerting
Grafana alerting is supported for the Azure Monitor service. This is not Azure Alerts support. Read more about how alerting in Grafana works [here]({{< relref "../../alerting/rules.md" >}}).
@@ -163,7 +163,7 @@ Grafana alerting is supported for the Azure Monitor service. This is not Azure A
{{< docs-imagebox img="/img/docs/v60/appinsights-service-query-editor.png" class="docs-image--no-shadow" caption="Application Insights Query Editor" >}}
### Formatting Legend Keys with Aliases for the Application Insights Service
### Formatting legend keys with aliases for Application Insights
The default legend formatting is:
@@ -177,13 +177,13 @@ Application Insights Examples:
- `city: {{groupbyvalue}}`
- `{{groupbyname}}: {{groupbyvalue}}`
### Alias Patterns for Application Insights
### Alias patterns for Application Insights
- `{{groupbyvalue}}` = replaced with the value of the group by
- `{{groupbyname}}` = replaced with the name/label of the group by
- `{{metric}}` = replaced with metric name (e.g. requests/count)
### Filter Expressions for Application Insights
### Filter expressions for Application Insights
The filter field takes an OData filter expression.
@@ -194,7 +194,7 @@ Examples:
- `client/city ne 'Boydton' and client/city ne 'Dublin'`
- `client/city eq 'Boydton' or client/city eq 'Dublin'`
### Templating with Variables for Application Insights
### Templating with variables for Application Insights
Use the one of the following queries in the `Query` field in the Variable edit view.
@@ -214,13 +214,13 @@ Examples:
{{< docs-imagebox img="/img/docs/v60/appinsights-service-variables.png" class="docs-image--no-shadow" caption="Nested Application Insights Template Variables" >}}
### Application Insights Alerting
### Application Insights alerting
Grafana alerting is supported for Application Insights. This is not Azure Alerts support. Read more about how alerting in Grafana works [here]({{< relref "../../alerting/rules.md" >}}).
{{< docs-imagebox img="/img/docs/v60/azuremonitor-alerting.png" class="docs-image--no-shadow" caption="Azure Monitor Alerting" >}}
## Querying the Azure Log Analytics Service
## Querying the Azure Log Analytics service
Queries are written in the new [Azure Log Analytics (or KustoDB) Query Language](https://docs.loganalytics.io/index). A Log Analytics Query can be formatted as Time Series data or as Table data.
@@ -246,7 +246,7 @@ If your credentials give you access to multiple subscriptions then choose the ap
{{< docs-imagebox img="/img/docs/v60/azureloganalytics-service-query-editor.png" class="docs-image--no-shadow" caption="Azure Log Analytics Query Editor" >}}
### Azure Log Analytics Macros
### Azure Log Analytics macros
To make writing queries easier there are several Grafana macros that can be used in the where clause of a query:
@@ -268,13 +268,13 @@ To make writing queries easier there are several Grafana macros that can be used
If using the `All` option, then check the `Include All Option` checkbox and in the `Custom all value` field type in the following value: `all`. If `$myVar` has value `all` then the macro will instead expand to `1 == 1`. For template variables with a lot of options, this will increase the query performance by not building a large where..in clause.
### Azure Log Analytics Builtin Variables
### Azure Log Analytics builtin variables
There are also some Grafana variables that can be used in Azure Log Analytics queries:
- `$__interval` - Grafana calculates the minimum time grain that can be used to group by time in queries. More details on how it works [here]({{< relref "../../variables/templates-and-variables.md#interval-variables" >}}). It returns a time grain like `5m` or `1h` that can be used in the bin function. E.g. `summarize count() by bin(TimeGenerated, $__interval)`
### Templating with Variables for Azure Log Analytics
### Templating with variables for Azure Log Analytics
Any Log Analytics query that returns a list of values can be used in the `Query` field in the Variable edit view. There is also one Grafana function for Log Analytics that returns a list of workspaces.
@@ -313,11 +313,25 @@ Perf
| order by TimeGenerated asc
```
### Azure Log Analytics Alerting
### Deep linking from Grafana panels to the Log Analytics query editor in Azure Portal
Not implemented yet.
> Only available in Grafana v7.0+.
### Writing Analytics Queries For the Application Insights Service
{{< docs-imagebox img="/img/docs/v70/azure-log-analytics-deep-linking.png" max-width="500px" class="docs-image--right" caption="Azure Log Analytics deep linking" >}}
Click on a time series in the panel to see a context menu with a link to `View in Azure Portal`. Clicking that link opens the Azure Log Analytics query editor in the Azure Portal and runs the query from the Grafana panel there.
If you're not currently logged in to the Azure Portal, then the link opens the login page. The provided link is valid for any account, but it only displays the query if your account has access to the Azure Log Analytics workspace specified in the query.
<div class="clearfix"></div>
### Azure Log Analytics alerting
> Only available in Grafana v7.0+.
Grafana alerting is supported for Application Insights. This is not Azure Alerts support. Read more about how alerting in Grafana works in [Alerting rules]({{< relref "../../alerting/rules.md" >}}).
### Writing analytics queries For the Application Insights service
If you change the service type to "Application Insights", the menu icon to the right adds another option, "Toggle Edit Mode". Once clicked, the query edit mode changes to give you a full text area in which to write log analytics queries. (This is identical to how the InfluxDB data source lets you write raw queries.)

View File

@@ -149,7 +149,7 @@ Depending on the cardinality of the data and the time range MetricTank may retur
Since then we have been working towards removing PhantomJS. In October 2019, when Grafana v6.4 was released, we [announced](https://grafana.com/blog/2019/10/02/grafana-v6.4-released/#phantomjs-deprecation) the deprecation of PhantomJS. Grafana v7.0 removes all PhantomJS support which means that Grafana distribution no longer will include a built-in image renderer.
As a replacement for PhantomJS weve developed the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) which is a plugin that runs on the backend and handles rendering panels and dashboards as PNG images using headless Chromium/Chrome. The [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) can either be installed as a Grafana plugin running in its own process side-by-side with Grafana. or run as an external HTTP service, hosted using Docker or as a standalone application.
As a replacement for PhantomJS weve developed the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) which is a plugin that runs on the backend and handles rendering panels and dashboards as PNG images using headless Chromium/Chrome. The [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) can either be installed as a Grafana plugin running in its own process side-by-side with Grafana. or runs as an external HTTP service, hosted using Docker or as a standalone application.
Read more about [Image Rendering]({{< relref "../administration/image_rendering/" >}}) in the documentation for further instructions.

View File

@@ -226,7 +226,7 @@ Content-Type: application/json
}
```
> NOTE: `password` and `basicAuthPassword` should be defined under `secureJsonData` in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under `secureJsonFields` section in the response. See also the [Encrypting Sensitive Data]({{< relref "../plugins/developing/auth-for-datasources.md/#encrypting-sensitive-data">}}) documentation for more details.
> NOTE: `password` and `basicAuthPassword` should be defined under `secureJsonData` in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under `secureJsonFields` section in the response. See also the [Encrypting Sensitive Data]({{< relref "../developers/plugins/authentication.md/#encrypting-sensitive-data">}}) documentation for more details.
**Example Graphite Request with basic auth enabled**:
@@ -376,7 +376,7 @@ Content-Type: application/json
}
```
> NOTE: Similar to [creating a data source](#create-a-data-source), `password` and `basicAuthPassword` should be defined under `secureJsonData` in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under `secureJsonFields` section in the response. See also the [Encrypting Sensitive Data]({{< relref "../plugins/developing/auth-for-datasources.md/#encrypting-sensitive-data">}}) documentation for more details.
> NOTE: Similar to [creating a data source](#create-a-data-source), `password` and `basicAuthPassword` should be defined under `secureJsonData` in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under `secureJsonFields` section in the response. See also the [Encrypting Sensitive Data]({{< relref "../developers/plugins/authentication.md/#encrypting-sensitive-data">}}) documentation for more details.
## Delete an existing data source by id

View File

@@ -18,22 +18,26 @@ Grafana has a number of configuration options that you can specify in a `.ini` c
## Config file locations
*Do not* change `defaults.ini`! Grafana defaults are stored in this file. Depending on your OS, make all configuration changes in either `custom.ini` or `grafana.ini`.
_Do not_ change `defaults.ini`! Grafana defaults are stored in this file. Depending on your OS, make all configuration changes in either `custom.ini` or `grafana.ini`.
- Default configuration from `$WORKING_DIR/conf/defaults.ini`
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
- The custom configuration file path can be overridden using the `--config` parameter
### Linux
If you installed Grafana using the `deb` or `rpm` packages, then your configuration file is located at `/etc/grafana/grafana.ini` and a separate `custom.ini` is not used. This path is specified in the Grafana init.d script using `--config` file parameter.
### Docker
Refer to [Configure a Grafana Docker image]({{< relref "configure-docker.md" >}}) for information about environmental variables, persistent storage, and building custom Docker images.
### Windows
`sample.ini` is in the same directory as `defaults.ini` and contains all the settings commented out. Copy `sample.ini` and name it `custom.ini`.
### MacOS
By default, the configuration file is located at `/usr/local/etc/grafana/grafana.ini`. To configure Grafana, add a configuration file named `custom.ini` to the `conf` folder to override any of the settings defined in `conf/defaults.ini`.
## Comments in .ini Files
@@ -41,6 +45,7 @@ By default, the configuration file is located at `/usr/local/etc/grafana/grafana
Semicolons (the `;` char) are the standard way to comment out lines in a `.ini` file. If you want to change a setting, you must delete the semicolon (`;`) in front of the setting before it will work.
**Example**
```
# The http port to use
;http_port = 3000
@@ -56,7 +61,7 @@ All options in the configuration file can be overridden using environment variab
GF_<SectionName>_<KeyName>
```
Where the section name is the text within the brackets. Everything should be uppercase, `.` should be replaced by `_`. For example, if you have these configuration settings:
Where the section name is the text within the brackets. Everything should be uppercase, `.` and `-` should be replaced by `_`. For example, if you have these configuration settings:
```bash
# default section
@@ -67,6 +72,9 @@ admin_user = admin
[auth.google]
client_secret = 0ldS3cretKey
[plugin.grafana-image-renderer]
rendering_ignore_https_errors = true
```
You can override them on Linux machines with:
@@ -75,6 +83,7 @@ You can override them on Linux machines with:
export GF_DEFAULT_INSTANCE_NAME=my-instance
export GF_SECURITY_ADMIN_USER=owner
export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
export GF_PLUGIN_GRAFANA_IMAGE_RENDERER_RENDERING_IGNORE_HTTPS_ERRORS=true
```
> For any changes to `conf/grafana.ini` (or corresponding environment variables) to take effect, you must restart Grafana for the changes to take effect.
@@ -149,6 +158,7 @@ Another way is put a webserver like Nginx or Apache in front of Grafana and have
> **Note:** Grafana versions earlier than 3.0 are vulnerable to [POODLE](https://en.wikipedia.org/wiki/POODLE). So we strongly recommend to upgrade to 3.x or use a reverse proxy for ssl termination.
### socket
Path where the socket should be created when `protocol=socket`. Please make sure that Grafana has appropriate permissions.
### domain
@@ -170,6 +180,7 @@ callback URL to be correct).
> case add the subpath to the end of this URL setting.
### serve_from_sub_path
> Available in 6.3 and above
Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
@@ -229,8 +240,7 @@ will be stored.
### host
Only applicable to MySQL or Postgres. Includes IP or hostname and port or in case of Unix sockets the path to it.
For example, for MySQL running on the same host as Grafana: `host =
127.0.0.1:3306` or with Unix sockets: `host = /var/run/mysqld/mysqld.sock`
For example, for MySQL running on the same host as Grafana: `host = 127.0.0.1:3306` or with Unix sockets: `host = /var/run/mysqld/mysqld.sock`
### name
@@ -267,9 +277,11 @@ The path to the client cert. Only if server requires client authentication.
The common name field of the certificate used by the `mysql` or `postgres` server. Not necessary if `ssl_mode` is set to `skip-verify`.
### max_idle_conn
The maximum number of connections in the idle connection pool.
### max_open_conn
The maximum number of open connections to the database.
### conn_max_lifetime
@@ -491,7 +503,7 @@ value is `true`.
### google_analytics_ua_id
If you want to track Grafana usage via Google analytics specify *your* Universal
If you want to track Grafana usage via Google analytics specify _your_ Universal
Analytics ID here. By default this feature is disabled.
### check_for_updates
@@ -518,47 +530,61 @@ The interval string is a possibly signed sequence of decimal numbers, followed b
> This have been replaced with dashboards [provisioning]({{< relref "../administration/provisioning" >}}) in 5.0+
### enabled
`true` or `false`. Is disabled by default.
### path
The full path to a directory containing your json dashboards.
## [smtp]
Email server settings.
### enabled
defaults to `false`
### host
defaults to `localhost:25`
### user
In case of SMTP auth, defaults to `empty`
### password
In case of SMTP auth, defaults to `empty`
### cert_file
File path to a cert file, defaults to `empty`
### key_file
File path to a key file, defaults to `empty`
### skip_verify
Verify SSL for smtp server? defaults to `false`
### from_address
Address used when sending out emails, defaults to `admin@grafana.localhost`
### from_name
Name to be used when sending out emails, defaults to `Grafana`
### ehlo_identity
Name to be used as client identity for EHLO in SMTP dialog, defaults to instance_name.
## [log]
### mode
Either "console", "file", "syslog". Default is "console" and "file".
Use spaces to separate multiple modes, e.g. `console file`
@@ -646,15 +672,19 @@ Syslog tag. By default, the process's `argv[0]` is used.
For detailed instructions, refer to [Internal Grafana metrics]({{< relref "../administration/metrics.md" >}}).
### enabled
Enable metrics reporting. defaults true. Available via HTTP API `/metrics`.
### basic_auth_username
If set configures the username to use for basic authentication on the metrics endpoint.
### basic_auth_password
If set configures the password to use for basic authentication on the metrics endpoint.
### disable_total_stats
If set to `true`, then total stats generation (`stat_totals_*` metrics) is disabled. The default is `false`.
### interval_seconds
@@ -662,111 +692,140 @@ If set to `true`, then total stats generation (`stat_totals_*` metrics) is disab
Flush/Write interval when sending metrics to external TSDB. Defaults to 10s.
## [metrics.graphite]
Include this section if you want to send internal Grafana metrics to Graphite.
### address
Format `<Hostname or ip>`:port
### prefix
Graphite metric prefix. Defaults to `prod.grafana.%(instance_name)s.`
## [snapshots]
### external_enabled
Set to `false` to disable external snapshot publish endpoint (default `true`)
### external_snapshot_url
Set root URL to a Grafana instance where you want to publish external snapshots (defaults to https://snapshots-origin.raintank.io)
### external_snapshot_name
Set name for external snapshot button. Defaults to `Publish to snapshot.raintank.io`
### snapshot_remove_expired
Enabled to automatically remove expired snapshots
## [external_image_storage]
These options control how images should be made public so they can be shared on services like slack.
### provider
You can choose between (s3, webdav, gcs, azure_blob, local). If left empty Grafana will ignore the upload action.
## [external_image_storage.s3]
### endpoint
Optional endpoint URL (hostname or fully qualified URI) to override the default generated S3 endpoint. If you want to
keep the default, just leave this empty. You must still provide a `region` value if you specify an endpoint.
## path_style_access
Set this to true to force path-style addressing in S3 requests, i.e., `http://s3.amazonaws.com/BUCKET/KEY`, instead
of the default, which is virtual hosted bucket addressing when possible (`http://BUCKET.s3.amazonaws.com/KEY`).
Note: This option is specific to the Amazon S3 service.
### bucket
Bucket name for S3. e.g. grafana.snapshot.
### region
Region name for S3. e.g. 'us-east-1', 'cn-north-1', etc.
### path
Optional extra path inside bucket, useful to apply expiration policies.
### bucket_url
(for backward compatibility, only works when no bucket or region are configured)
Bucket URL for S3. AWS region can be specified within URL or defaults to 'us-east-1', e.g.
- http://grafana.s3.amazonaws.com/
- https://grafana.s3-ap-southeast-2.amazonaws.com/
### access_key
Access key, e.g. AAAAAAAAAAAAAAAAAAAA.
Access key requires permissions to the S3 bucket for the 's3:PutObject' and 's3:PutObjectAcl' actions.
### secret_key
Secret key, e.g. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.
## [external_image_storage.webdav]
### url
URL to where Grafana will send PUT request with images
### public_url
Optional parameter. URL to send to users in notifications. If the string contains the sequence ${file}, it will be replaced with the uploaded filename. Otherwise, the file name will be appended to the path part of the URL, leaving any query string unchanged.
Optional parameter. URL to send to users in notifications. If the string contains the sequence \${file}, it will be replaced with the uploaded filename. Otherwise, the file name will be appended to the path part of the URL, leaving any query string unchanged.
### username
basic auth username
### password
basic auth password
## [external_image_storage.gcs]
### key_file
Path to JSON key file associated with a Google service account to authenticate and authorize.
Service Account keys can be created and downloaded from https://console.developers.google.com/permissions/serviceaccounts.
Service Account should have "Storage Object Writer" role. The access control model of the bucket needs to be "Set object-level and bucket-level permissions". Grafana itself will make the images public readable.
### bucket
Bucket Name on Google Cloud Storage.
### path
Optional extra path inside bucket
## [external_image_storage.azure_blob]
### account_name
Storage account name
### account_key
Storage account key
### container_name
Container name where to store "Blob" images with random names. Creating the blob container beforehand is required. Only public containers are supported.
## [alerting]
### enabled
Defaults to `true`. Set to `false` to disable alerting engine and hide Alerting from UI.
### execute_alerts
@@ -774,11 +833,13 @@ Defaults to `true`. Set to `false` to disable alerting engine and hide Alerting
Makes it possible to turn off alert rule execution.
### error_or_timeout
> Available in 5.3 and above
Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
### nodata_or_nullvalues
> Available in 5.3 and above
Default setting for how Grafana handles nodata or null values in alerting. (alerting, no_data, keep_state, ok)
@@ -791,7 +852,6 @@ Alert notifications can include images, but rendering many images at the same ti
This limit will protect the server from render overloading and make sure notifications are sent out quickly. Default
value is `5`.
### evaluation_timeout_seconds
Default setting for alert calculation timeout. Default value is `30`
@@ -845,6 +905,7 @@ Set to true if you want to test alpha plugins that are not yet ready for general
Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
## [feature_toggles]
### enable
Keys of alpha features to enable, separated by space. Available alpha features are: `transformations`
@@ -911,9 +972,11 @@ Setting this to `true` turns off shared RPC spans. Leaving this available is the
<hr />
# Removed options
Please note that these options have been removed.
## [session]
**Removed starting from Grafana v6.2. Please use [remote_cache](#remote-cache) option instead.**
### provider

View File

@@ -27,7 +27,7 @@ For more on the query inspector read the Grafana Community article [Using Grafan
## Logging
If you encounter an error or problem, then you can check the Grafana server log. Usually located at `/var/log/grafana/grafana.log` on Unix systems or in `<grafana_install_dir>/data/log` on other platforms and manual installs.
If you encounter an error or problem, then you can check the Grafana server log. Usually located at `/var/log/grafana/grafana.log` on Unix systems or in `<grafana_install_dir>/data/log` on other platforms and manual installations.
You can enable more logging by changing log level in the Grafana configuration file.

View File

@@ -286,33 +286,6 @@
link: /plugins/
- name: Install plugins
link: /plugins/installation/
- name: Develop plugins
link: /plugins/developing/
children:
- link: /plugins/developing/development/
name: Developer Guide
- link: /plugins/developing/dataframe/
name: Introduction to data frames
- link: /plugins/developing/code-styleguide/
name: Plugin Code Styleguide
- link: /plugins/developing/plugin-review-guidelines/
name: Plugin Review Guidelines
- link: /plugins/developing/auth-for-datasources/
name: Authentication for Datasource Plugins
- link: /plugins/developing/defaults-and-editor-mode/
name: Plugin Defaults and Editor Mode
- link: /plugins/developing/apps/
name: Developing App Plugins
- link: /plugins/developing/panels/
name: Developing Panel Plugins
- link: /plugins/developing/backend-plugins-guide/
name: Developing Backend Plugins
- link: /plugins/developing/datasources/
name: Developing Datasource Plugins
- link: /plugins/developing/snapshot-mode/
name: Snapshot Mode
- link: /plugins/developing/plugin.json/
name: plugin.json Schema
- name: HTTP APIs
link: /http_api/
children:
@@ -363,14 +336,39 @@
- name: Users API
link: /http_api/user/
- name: Developers
link: /developers/
children:
- name: Developer resources
link: /developers/developer-resources/
- link: /developers/plugins/
name: Plugins
- name: Packages reference
- name: Plugins
children:
- name: Overview
link: /developers/plugins/
- name: plugin.json
link: /developers/plugins/metadata/
- name: Data frames
link: /developers/plugins/data-frames/
- name: Authentication
link: /developers/plugins/authentication/
- name: Backend plugins
link: /developers/plugins/backend/
- name: Legacy plugins
children:
- link: /developers/plugins/legacy/
name: Overview
- link: /developers/plugins/legacy/style-guide/
name: Code style guide
- link: /developers/plugins/legacy/review-guidelines/
name: Review guidelines
- link: /developers/plugins/legacy/defaults-and-editor-mode/
name: Defaults and editor mode
- link: /developers/plugins/legacy/apps/
name: App plugins
- link: /developers/plugins/legacy/data-sources/
name: Data source plugins
- link: /developers/plugins/legacy/snapshot-mode/
name: Snapshot mode
- name: API reference
link: /packages_api/
- name: Contribute
link: /developers/contribute/
- name: Contributor License Agreement (CLA)
link: /developers/cla/
- name: Docs Archive

View File

@@ -18,6 +18,7 @@ A library containing most of the core functionality and data types used in Grafa
| [AppendedVectors](./appendedvectors/) | This may be more trouble than it is worth. This trades some computation time for RAM -- rather than allocate a new array the size of all previous arrays, this just points the correct index to their original array values |
| [AppPlugin](./appplugin/) | |
| [ArrayVector](./arrayvector/) | |
| [BinaryOperationVector](./binaryoperationvector/) | |
| [CircularDataFrame](./circulardataframe/) | This dataframe can have values constantly added, and will never exceed the given capacity |
| [CircularVector](./circularvector/) | Circular vector uses a single buffer to capture a stream of values overwriting the oldest value on add.<!-- -->This supports addting to the 'head' or 'tail' and will grow the buffer to match a configured capacity. |
| [ConstantVector](./constantvector/) | |
@@ -34,13 +35,13 @@ A library containing most of the core functionality and data types used in Grafa
| [PanelOptionsEditorBuilder](./paneloptionseditorbuilder/) | Fluent API for declarative creation of panel options |
| [PanelPlugin](./panelplugin/) | |
| [Registry](./registry/) | |
| [ScaledVector](./scaledvector/) | |
| [SortedVector](./sortedvector/) | Values are returned in the order defined by the input parameter |
## Enumerations
| Enumeration | Description |
| --- | --- |
| [BinaryOperationID](./binaryoperationid/) | |
| [ColorScheme](./colorscheme/) | |
| [CoreApp](./coreapp/) | |
| [CSVHeaderStyle](./csvheaderstyle/) | |
@@ -96,9 +97,11 @@ A library containing most of the core functionality and data types used in Grafa
| [getDecimalsForValue(value, decimalOverride)](./getdecimalsforvalue/) | |
| [getDisplayProcessor(options)](./getdisplayprocessor/) | |
| [getDisplayValueAlignmentFactors(values)](./getdisplayvaluealignmentfactors/) | |
| [getFieldDisplayName(field, frame, allFrames)](./getfielddisplayname/) | |
| [getFieldMatcher(config)](./getfieldmatcher/) | |
| [getFlotPairs({ xField, yField, nullValueMode })](./getflotpairs/) | |
| [getFlotPairsConstant(seriesData, range)](./getflotpairsconstant/) | Returns a constant series based on the first value from the provide series. |
| [getFrameDisplayName(frame, index)](./getframedisplayname/) | Get an appropriate display title |
| [getFrameMatchers(config)](./getframematchers/) | |
| [getLogLevel(line)](./getloglevel/) | Returns the log level of a log line. Parse the line for level words. If no level is found, it returns <code>LogLevel.unknown</code>.<!-- -->Example: <code>getLogLevel('WARN 1999-12-31 this is great') // LogLevel.warn</code> |
| [getLogLevelFromKey(key)](./getloglevelfromkey/) | |
@@ -111,13 +114,13 @@ A library containing most of the core functionality and data types used in Grafa
| [guessFieldTypeForField(field)](./guessfieldtypeforfield/) | Looks at the data to guess the column type. This ignores any existing setting |
| [guessFieldTypeFromNameAndValue(name, v)](./guessfieldtypefromnameandvalue/) | Given a name and value, this will pick a reasonable field type |
| [guessFieldTypeFromValue(v)](./guessfieldtypefromvalue/) | Given a value this will guess the best column type<!-- -->TODO: better Date/Time support! Look for standard date strings? |
| [hasLinks(field)](./haslinks/) | |
| [locale(value, decimals)](./locale/) | |
| [parseFlags(text)](./parseflags/) | Converts any mode modifiers in the text to the Javascript equivalent flag |
| [parseLabels(labels)](./parselabels/) | Returns a map of label keys to value from an input selector string.<!-- -->Example: <code>parseLabels('{job=&quot;foo&quot;, instance=&quot;bar&quot;}) // {job: &quot;foo&quot;, instance: &quot;bar&quot;}</code> |
| [readCSV(csv, options)](./readcsv/) | |
| [reduceField(options)](./reducefield/) | |
| [renderMarkdown(str)](./rendermarkdown/) | |
| [resultsToDataFrames(rsp)](./resultstodataframes/) | |
| [reverseDataFrame(data)](./reversedataframe/) | Returns a copy with all values reversed |
| [scaledUnits(factor, extArray)](./scaledunits/) | |
| [setMarkdownOptions(optionsOverride)](./setmarkdownoptions/) | |
@@ -128,6 +131,7 @@ A library containing most of the core functionality and data types used in Grafa
| [stringToJsRegex(str)](./stringtojsregex/) | |
| [stringToMs(str)](./stringtoms/) | |
| [toCSV(data, config)](./tocsv/) | |
| [toDataFrame(data)](./todataframe/) | Inspect any object and return the results as a DataFrame |
| [toDataFrameDTO(data)](./todataframedto/) | Returns a copy that does not include functions |
| [toFixed(value, decimals)](./tofixed/) | |
| [toFixedScaled(value, decimals, scaledDecimals, additionalDecimals, ext)](./tofixedscaled/) | |
@@ -153,7 +157,6 @@ A library containing most of the core functionality and data types used in Grafa
| [AppRootProps](./approotprops/) | |
| [ArrowDataFrame](./arrowdataframe/) | |
| [BuildInfo](./buildinfo/) | Describes the build information that will be available via the Grafana configuration. |
| [CalculateFieldTransformerOptions](./calculatefieldtransformeroptions/) | |
| [ColorFieldConfigSettings](./colorfieldconfigsettings/) | |
| [Column](./column/) | |
| [ConfigOverrideRule](./configoverriderule/) | |
@@ -186,9 +189,9 @@ A library containing most of the core functionality and data types used in Grafa
| [DateTimeBuiltinFormat](./datetimebuiltinformat/) | |
| [DateTimeDuration](./datetimeduration/) | |
| [DateTimeLocale](./datetimelocale/) | |
| [DateTimeOptions](./datetimeoptions/) | |
| [DateTimeOptionsWhenParsing](./datetimeoptionswhenparsing/) | |
| [DateTimeOptionsWithFormat](./datetimeoptionswithformat/) | |
| [DateTimeOptions](./datetimeoptions/) | The type describing date and time options. Used for all the helper functions available to parse or format date and time values. |
| [DateTimeOptionsWhenParsing](./datetimeoptionswhenparsing/) | The type that describes options that can be passed when parsing a date and time value. |
| [DateTimeOptionsWithFormat](./datetimeoptionswithformat/) | The type describing the options that can be passed to the [dateTimeFormat](./data/datetimeformat.md) helper function to control how the date and time value passed to the function is formatted. |
| [DecimalInfo](./decimalinfo/) | |
| [Dimension](./dimension/) | |
| [DisplayValue](./displayvalue/) | |
@@ -211,9 +214,8 @@ A library containing most of the core functionality and data types used in Grafa
| [FieldOverrideContext](./fieldoverridecontext/) | |
| [FieldOverrideEditorProps](./fieldoverrideeditorprops/) | |
| [FieldReducerInfo](./fieldreducerinfo/) | |
| [FieldState](./fieldstate/) | |
| [FieldWithIndex](./fieldwithindex/) | |
| [FilterFieldsByNameTransformerOptions](./filterfieldsbynametransformeroptions/) | |
| [FilterFramesByRefIdTransformerOptions](./filterframesbyrefidtransformeroptions/) | |
| [FlotDataPoint](./flotdatapoint/) | |
| [FormattedValue](./formattedvalue/) | |
| [FrameMatcherInfo](./framematcherinfo/) | |
@@ -242,7 +244,6 @@ A library containing most of the core functionality and data types used in Grafa
| [NavModelBreadcrumb](./navmodelbreadcrumb/) | |
| [NavModelItem](./navmodelitem/) | |
| [NumberFieldConfigSettings](./numberfieldconfigsettings/) | |
| [OrganizeFieldsTransformerOptions](./organizefieldstransformeroptions/) | |
| [PanelData](./paneldata/) | |
| [PanelEditorProps](./paneleditorprops/) | |
| [PanelModel](./panelmodel/) | |
@@ -270,7 +271,7 @@ A library containing most of the core functionality and data types used in Grafa
| [RawTimeRange](./rawtimerange/) | |
| [ReadWriteVector](./readwritevector/) | Apache arrow vectors are Read/Write |
| [ReduceDataOptions](./reducedataoptions/) | Options for how to turn DataFrames into an array of display values |
| [ReduceTransformerOptions](./reducetransformeroptions/) | |
| [RegexpOrNamesMatcherOptions](./regexpornamesmatcheroptions/) | |
| [RegistryItem](./registryitem/) | |
| [RegistryItemWithOptions](./registryitemwithoptions/) | |
| [ScaledValue](./scaledvalue/) | |
@@ -279,7 +280,6 @@ A library containing most of the core functionality and data types used in Grafa
| [ScreenshotInfo](./screenshotinfo/) | |
| [SelectableValue](./selectablevalue/) | Used in select elements |
| [SelectFieldConfigSettings](./selectfieldconfigsettings/) | |
| [SeriesToColumnsOptions](./seriestocolumnsoptions/) | |
| [StandardEditorProps](./standardeditorprops/) | |
| [StandardEditorsRegistryItem](./standardeditorsregistryitem/) | |
| [StringFieldConfigSettings](./stringfieldconfigsettings/) | |
@@ -319,19 +319,19 @@ A library containing most of the core functionality and data types used in Grafa
| Variable | Description |
| --- | --- |
| [binaryOperators](./binaryoperators/) | |
| [booleanOverrideProcessor](./booleanoverrideprocessor/) | |
| [createDimension](./createdimension/) | |
| [createOrderFieldsComparer](./createorderfieldscomparer/) | |
| [DataLinkBuiltInVars](./datalinkbuiltinvars/) | |
| [dataLinksOverrideProcessor](./datalinksoverrideprocessor/) | |
| [dateTime](./datetime/) | |
| [dateTimeAsMoment](./datetimeasmoment/) | |
| [dateTimeFormat](./datetimeformat/) | |
| [dateTimeFormatISO](./datetimeformatiso/) | |
| [dateTimeFormatTimeAgo](./datetimeformattimeago/) | |
| [dateTimeFormatWithAbbrevation](./datetimeformatwithabbrevation/) | |
| [dateTimeFormat](./datetimeformat/) | Helper function to format date and time according to the specified options. If no options are supplied, then default values are used. For more details, see [DateTimeOptionsWithFormat](./data/datetimeoptionswithformat.md)<!-- -->. |
| [dateTimeFormatISO](./datetimeformatiso/) | Helper function to format date and time according to the standard ISO format e.g. 2013-02-04T22:44:30.652Z. If no options are supplied, then default values are used. For more details, see [DateTimeOptionsWithFormat](./data/datetimeoptionswithformat.md)<!-- -->. |
| [dateTimeFormatTimeAgo](./datetimeformattimeago/) | Helper function to return elapsed time since passed date. The returned value will be formatted in a human readable format e.g. 4 years ago. If no options are supplied, then default values are used. For more details, see [DateTimeOptions](./data/datetimeoptions.md)<!-- -->. |
| [dateTimeFormatWithAbbrevation](./datetimeformatwithabbrevation/) | Helper function to format date and time according to the Grafana default formatting, but it also appends the time zone abbreviation at the end e.g. 2020-05-20 13:37:00 CET. If no options are supplied, then default values are used. For more details please see [DateTimeOptions](./data/datetimeoptions.md)<!-- -->. |
| [dateTimeForTimeZone](./datetimefortimezone/) | |
| [dateTimeParse](./datetimeparse/) | |
| [dateTimeParse](./datetimeparse/) | Helper function to parse a number, text or Date to a DateTime value. If a timeZone is supplied the incoming value is parsed with that timeZone as a base. The only exception to this is if the passed value is in a UTC-based format. Then it will use UTC as the base. Examples on UTC-based values are Unix epoch and ISO formatted strings.<!-- -->It can also parse the Grafana quick date and time format, e.g. now-6h will be parsed as Date.now() - 6 hours and returned as a valid DateTime value.<!-- -->If no options are supplied, then default values are used. For more details please see [DateTimeOptions](./data/datetimeoptions.md)<!-- -->. |
| [DEFAULT\_DATE\_TIME\_FORMAT](./default_date_time_format/) | |
| [DEFAULT\_FIELD\_DISPLAY\_VALUES\_LIMIT](./default_field_display_values_limit/) | |
| [DefaultTimeRange](./defaulttimerange/) | |
@@ -381,7 +381,6 @@ A library containing most of the core functionality and data types used in Grafa
| [onUpdateDatasourceSecureJsonDataOptionSelect](./onupdatedatasourcesecurejsondataoptionselect/) | |
| [selectOverrideProcessor](./selectoverrideprocessor/) | |
| [setLocale](./setlocale/) | |
| [setTimeZoneResolver](./settimezoneresolver/) | |
| [standardEditorsRegistry](./standardeditorsregistry/) | |
| [standardFieldConfigEditorRegistry](./standardfieldconfigeditorregistry/) | |
| [standardTransformers](./standardtransformers/) | |
@@ -390,8 +389,10 @@ A library containing most of the core functionality and data types used in Grafa
| [textUtil](./textutil/) | |
| [thresholdsOverrideProcessor](./thresholdsoverrideprocessor/) | |
| [TIME\_FORMAT](./time_format/) | |
| [timeZoneAbbrevation](./timezoneabbrevation/) | |
| [toDataFrame](./todataframe/) | |
| [TIME\_SERIES\_TIME\_FIELD\_NAME](./time_series_time_field_name/) | |
| [TIME\_SERIES\_VALUE\_FIELD\_NAME](./time_series_value_field_name/) | |
| [timeZoneAbbrevation](./timezoneabbrevation/) | Helper function to return only the time zone abbreviation for a given date and time value. If no options are supplied, then default values are used. For more details please see [DateTimeOptions](./data/datetimeoptions.md)<!-- -->. |
| [timeZoneFormatUserFriendly](./timezoneformatuserfriendly/) | |
| [toDuration](./toduration/) | |
| [toLegacyResponseData](./tolegacyresponsedata/) | |
| [toPascalCase](./topascalcase/) | |
@@ -405,6 +406,7 @@ A library containing most of the core functionality and data types used in Grafa
| [valueMappingsOverrideProcessor](./valuemappingsoverrideprocessor/) | |
| [VAR\_CALC](./var_calc/) | |
| [VAR\_CELL\_PREFIX](./var_cell_prefix/) | |
| [VAR\_FIELD\_LABELS](./var_field_labels/) | |
| [VAR\_FIELD\_NAME](./var_field_name/) | |
| [VAR\_SERIES\_NAME](./var_series_name/) | |
@@ -412,15 +414,14 @@ A library containing most of the core functionality and data types used in Grafa
| Type Alias | Description |
| --- | --- |
| [BinaryOperation](./binaryoperation/) | |
| [Color](./color/) | |
| [ColorDefinition](./colordefinition/) | |
| [DataQueryResponseData](./dataqueryresponsedata/) | |
| [DataSourceOptionsType](./datasourceoptionstype/) | |
| [DataSourceQueryType](./datasourcequerytype/) | |
| [DataTransformer](./datatransformer/) | Function that transform data frames (AKA transformer) |
| [DateTimeFormatter](./datetimeformatter/) | |
| [DateTimeInput](./datetimeinput/) | |
| [DateTimeParser](./datetimeparser/) | |
| [DecimalCount](./decimalcount/) | |
| [Dimensions](./dimensions/) | |
| [DisplayProcessor](./displayprocessor/) | |
@@ -440,6 +441,7 @@ A library containing most of the core functionality and data types used in Grafa
| [PanelMigrationHandler](./panelmigrationhandler/) | Called when a panel is first loaded with current panel model |
| [PanelOptionEditorsRegistry](./paneloptioneditorsregistry/) | |
| [PanelTypeChangedHandler](./paneltypechangedhandler/) | Called before a panel is initialized. Allows panel inspection for any updates before changing the panel type. |
| [PreferredVisualisationType](./preferredvisualisationtype/) | |
| [ScaleCalculator](./scalecalculator/) | |
| [Subtract](./subtract/) | |
| [TimeFragment](./timefragment/) | |
@@ -447,7 +449,7 @@ A library containing most of the core functionality and data types used in Grafa
| [TimeSeriesValue](./timeseriesvalue/) | |
| [TimeZone](./timezone/) | |
| [TimeZoneBrowser](./timezonebrowser/) | |
| [TimeZoneResolver](./timezoneresolver/) | |
| [TimeZoneResolver](./timezoneresolver/) | The type to describe the time zone resolver function that will be used to access the default time zone of a user. |
| [TimeZoneUtc](./timezoneutc/) | |
| [UrlQueryMap](./urlquerymap/) | Type to represent the values parsed from the query string. |
| [UrlQueryValue](./urlqueryvalue/) | Type to represent the value of a single query variable. |

View File

@@ -2,22 +2,22 @@
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "setTimeZoneResolver"
title = "BinaryOperation"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## setTimeZoneResolver variable
## BinaryOperation type
### setTimeZoneResolver variable
### BinaryOperation type
<b>Signature</b>
```typescript
setTimeZoneResolver: (resolver: TimeZoneResolver) => void
export declare type BinaryOperation = (left: number, right: number) => number;
```
<b>Import</b>
```typescript
import { setTimeZoneResolver } from '@grafana/data';
import { BinaryOperation } from '@grafana/data';
```

View File

@@ -0,0 +1,33 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "BinaryOperationID"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## BinaryOperationID enum
### BinaryOperationID enum
<b>Signature</b>
```typescript
export declare enum BinaryOperationID
```
<b>Import</b>
```typescript
import { BinaryOperationID } from '@grafana/data';
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| Add | <code>&quot;+&quot;</code> | |
| Divide | <code>&quot;/&quot;</code> | |
| Multiply | <code>&quot;*&quot;</code> | |
| Subtract | <code>&quot;-&quot;</code> | |

View File

@@ -2,28 +2,28 @@
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "ScaledVector"
title = "BinaryOperationVector"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## ScaledVector class
## BinaryOperationVector class
<b>Signature</b>
```typescript
export declare class ScaledVector implements Vector<number>
export declare class BinaryOperationVector implements Vector<number>
```
<b>Import</b>
```typescript
import { ScaledVector } from '@grafana/data';
import { BinaryOperationVector } from '@grafana/data';
```
<b>Constructors</b>
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [constructor(source, scale)](#constructor-sourcescale) | | Constructs a new instance of the <code>ScaledVector</code> class |
| [constructor(left, right, operation)](#constructor-leftrightoperation) | | Constructs a new instance of the <code>BinaryOperationVector</code> class |
<b>Properties</b>
@@ -39,21 +39,22 @@ import { ScaledVector } from '@grafana/data';
| [toArray()](#toarray-method) | | |
| [toJSON()](#tojson-method) | | |
### constructor(source, scale)
### constructor(left, right, operation)
Constructs a new instance of the `ScaledVector` class
Constructs a new instance of the `BinaryOperationVector` class
<b>Signature</b>
```typescript
constructor(source: Vector<number>, scale: number);
constructor(left: Vector<number>, right: Vector<number>, operation: BinaryOperation);
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| source | <code>Vector&lt;number&gt;</code> | |
| scale | <code>number</code> | |
| left | <code>Vector&lt;number&gt;</code> | |
| right | <code>Vector&lt;number&gt;</code> | |
| operation | <code>BinaryOperation</code> | |
### length property

View File

@@ -2,22 +2,22 @@
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "DateTimeParser"
title = "binaryOperators"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## DateTimeParser type
## binaryOperators variable
### DateTimeParser type
### binaryOperators variable
<b>Signature</b>
```typescript
export declare type DateTimeParser<T extends DateTimeOptions = DateTimeOptions> = (value: DateTimeInput, options?: T) => DateTime;
binaryOperators: Registry<BinaryOperatorInfo>
```
<b>Import</b>
```typescript
import { DateTimeParser } from '@grafana/data';
import { binaryOperators } from '@grafana/data';
```

View File

@@ -1,70 +0,0 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "CalculateFieldTransformerOptions"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## CalculateFieldTransformerOptions interface
<b>Signature</b>
```typescript
export interface CalculateFieldTransformerOptions
```
<b>Import</b>
```typescript
import { CalculateFieldTransformerOptions } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [alias](#alias-property) | <code>string</code> | |
| [include](#include-property) | <code>string</code> | |
| [nullValueMode](#nullvaluemode-property) | <code>NullValueMode</code> | |
| [reducer](#reducer-property) | <code>ReducerID</code> | |
| [replaceFields](#replacefields-property) | <code>boolean</code> | |
### alias property
<b>Signature</b>
```typescript
alias?: string;
```
### include property
<b>Signature</b>
```typescript
include?: string;
```
### nullValueMode property
<b>Signature</b>
```typescript
nullValueMode?: NullValueMode;
```
### reducer property
<b>Signature</b>
```typescript
reducer: ReducerID;
```
### replaceFields property
<b>Signature</b>
```typescript
replaceFields?: boolean;
```

View File

@@ -23,10 +23,19 @@ import { Column } from '@grafana/data';
| Property | Type | Description |
| --- | --- | --- |
| [custom](#custom-property) | <code>Record&lt;string, any&gt;</code> | |
| [filterable](#filterable-property) | <code>boolean</code> | |
| [text](#text-property) | <code>string</code> | |
| [unit](#unit-property) | <code>string</code> | |
### custom property
<b>Signature</b>
```typescript
custom?: Record<string, any>;
```
### filterable property
<b>Signature</b>

View File

@@ -28,6 +28,7 @@ import { DataTransformerID } from '@grafana/data';
| --- | --- | --- |
| append | <code>&quot;append&quot;</code> | |
| calculateField | <code>&quot;calculateField&quot;</code> | |
| ensureColumns | <code>&quot;ensureColumns&quot;</code> | |
| filterByRefId | <code>&quot;filterByRefId&quot;</code> | |
| filterFields | <code>&quot;filterFields&quot;</code> | |
| filterFieldsByName | <code>&quot;filterFieldsByName&quot;</code> | |

View File

@@ -11,6 +11,8 @@ type = "docs"
### dateTimeFormat variable
Helper function to format date and time according to the specified options. If no options are supplied, then default values are used. For more details, see [DateTimeOptionsWithFormat](./data/datetimeoptionswithformat.md)<!-- -->.
<b>Signature</b>
```typescript

View File

@@ -11,6 +11,8 @@ type = "docs"
### dateTimeFormatISO variable
Helper function to format date and time according to the standard ISO format e.g. 2013-02-04T22:44:30.652Z. If no options are supplied, then default values are used. For more details, see [DateTimeOptionsWithFormat](./data/datetimeoptionswithformat.md)<!-- -->.
<b>Signature</b>
```typescript

View File

@@ -11,6 +11,8 @@ type = "docs"
### dateTimeFormatTimeAgo variable
Helper function to return elapsed time since passed date. The returned value will be formatted in a human readable format e.g. 4 years ago. If no options are supplied, then default values are used. For more details, see [DateTimeOptions](./data/datetimeoptions.md)<!-- -->.
<b>Signature</b>
```typescript

View File

@@ -11,6 +11,8 @@ type = "docs"
### dateTimeFormatWithAbbrevation variable
Helper function to format date and time according to the Grafana default formatting, but it also appends the time zone abbreviation at the end e.g. 2020-05-20 13:37:00 CET. If no options are supplied, then default values are used. For more details please see [DateTimeOptions](./data/datetimeoptions.md)<!-- -->.
<b>Signature</b>
```typescript

View File

@@ -9,6 +9,8 @@ type = "docs"
## DateTimeOptions interface
The type describing date and time options. Used for all the helper functions available to parse or format date and time values.
<b>Signature</b>
```typescript
@@ -23,10 +25,12 @@ import { DateTimeOptions } from '@grafana/data';
| Property | Type | Description |
| --- | --- | --- |
| [timeZone](#timezone-property) | <code>TimeZone</code> | |
| [timeZone](#timezone-property) | <code>TimeZone</code> | Specify this if you want to override the timeZone used when parsing or formatting a date and time value. If no timeZone is set, the default timeZone for the current user is used. |
### timeZone property
Specify this if you want to override the timeZone used when parsing or formatting a date and time value. If no timeZone is set, the default timeZone for the current user is used.
<b>Signature</b>
```typescript

View File

@@ -9,6 +9,8 @@ type = "docs"
## DateTimeOptionsWhenParsing interface
The type that describes options that can be passed when parsing a date and time value.
<b>Signature</b>
```typescript
@@ -23,10 +25,14 @@ import { DateTimeOptionsWhenParsing } from '@grafana/data';
| Property | Type | Description |
| --- | --- | --- |
| [roundUp](#roundup-property) | <code>boolean</code> | |
| [roundUp](#roundup-property) | <code>boolean</code> | If the input is a Grafana quick date, e.g. now-6h, then you can specify this to control whether the last part of the date and time value is included or excluded.<!-- -->Example: now-6h and the current time is 12:20:00 if roundUp is set to true the returned DateTime value will be 06:00:00. |
### roundUp property
If the input is a Grafana quick date, e.g. now-6h, then you can specify this to control whether the last part of the date and time value is included or excluded.
Example: now-6h and the current time is 12:20:00 if roundUp is set to true the returned DateTime value will be 06:00:00.
<b>Signature</b>
```typescript

View File

@@ -9,6 +9,8 @@ type = "docs"
## DateTimeOptionsWithFormat interface
The type describing the options that can be passed to the [dateTimeFormat](./data/datetimeformat.md) helper function to control how the date and time value passed to the function is formatted.
<b>Signature</b>
```typescript
@@ -23,11 +25,13 @@ import { DateTimeOptionsWithFormat } from '@grafana/data';
| Property | Type | Description |
| --- | --- | --- |
| [defaultWithMS](#defaultwithms-property) | <code>boolean</code> | |
| [format](#format-property) | <code>string</code> | |
| [defaultWithMS](#defaultwithms-property) | <code>boolean</code> | Set this value to <code>true</code> if you want to include milliseconds when formatting date and time values in the default [DEFAULT\_DATE\_TIME\_FORMAT](./data/default_date_time_format.md) format. |
| [format](#format-property) | <code>string</code> | Specify a [momentjs](https://momentjs.com/docs/#/displaying/format) format to use a custom formatting pattern of the date and time value. If no format is set, then [DEFAULT\_DATE\_TIME\_FORMAT](./data/default_date_time_format.md) is used. |
### defaultWithMS property
Set this value to `true` if you want to include milliseconds when formatting date and time values in the default [DEFAULT\_DATE\_TIME\_FORMAT](./data/default_date_time_format.md) format.
<b>Signature</b>
```typescript
@@ -36,6 +40,8 @@ defaultWithMS?: boolean;
### format property
Specify a [momentjs](https://momentjs.com/docs/#/displaying/format) format to use a custom formatting pattern of the date and time value. If no format is set, then [DEFAULT\_DATE\_TIME\_FORMAT](./data/default_date_time_format.md) is used.
<b>Signature</b>
```typescript

View File

@@ -11,6 +11,12 @@ type = "docs"
### dateTimeParse variable
Helper function to parse a number, text or Date to a DateTime value. If a timeZone is supplied the incoming value is parsed with that timeZone as a base. The only exception to this is if the passed value is in a UTC-based format. Then it will use UTC as the base. Examples on UTC-based values are Unix epoch and ISO formatted strings.
It can also parse the Grafana quick date and time format, e.g. now-6h will be parsed as Date.now() - 6 hours and returned as a valid DateTime value.
If no options are supplied, then default values are used. For more details please see [DateTimeOptions](./data/datetimeoptions.md)<!-- -->.
<b>Signature</b>
```typescript

View File

@@ -24,6 +24,7 @@ import { ExploreStartPageProps } from '@grafana/data';
| Property | Type | Description |
| --- | --- | --- |
| [datasource](#datasource-property) | <code>DataSourceApi</code> | |
| [exploreId](#exploreid-property) | <code>any</code> | |
| [exploreMode](#exploremode-property) | <code>ExploreMode</code> | |
| [onClickExample](#onclickexample-property) | <code>(query: DataQuery) =&gt; void</code> | |
@@ -35,6 +36,14 @@ import { ExploreStartPageProps } from '@grafana/data';
datasource?: DataSourceApi;
```
### exploreId property
<b>Signature</b>
```typescript
exploreId?: any;
```
### exploreMode property
<b>Signature</b>

View File

@@ -23,26 +23,16 @@ import { Field } from '@grafana/data';
| Property | Type | Description |
| --- | --- | --- |
| [calcs](#calcs-property) | <code>FieldCalcs</code> | Cache of reduced values |
| [config](#config-property) | <code>FieldConfig</code> | Meta info about how field and how to display it |
| [display](#display-property) | <code>DisplayProcessor</code> | Convert a value for display |
| [getLinks](#getlinks-property) | <code>(config: ValueLinkConfig) =&gt; Array&lt;LinkModel&lt;Field&gt;&gt;</code> | Get value data links with variables interpolated |
| [labels](#labels-property) | <code>Labels</code> | |
| [name](#name-property) | <code>string</code> | Name of the field (column) |
| [parse](#parse-property) | <code>(value: any) =&gt; T</code> | Convert text to the field value |
| [state](#state-property) | <code>FieldState &#124; null</code> | Cached values with appropriate display and id values |
| [type](#type-property) | <code>FieldType</code> | Field value type (string, number, etc) |
| [values](#values-property) | <code>V</code> | |
### calcs property
Cache of reduced values
<b>Signature</b>
```typescript
calcs?: FieldCalcs;
```
### config property
Meta info about how field and how to display it
@@ -101,6 +91,16 @@ Convert text to the field value
parse?: (value: any) => T;
```
### state property
Cached values with appropriate display and id values
<b>Signature</b>
```typescript
state?: FieldState | null;
```
### type property
Field value type (string, number, etc)

View File

@@ -37,9 +37,10 @@ import { FieldCache } from '@grafana/data';
| --- | --- | --- |
| [getFieldByName(name)](#getfieldbyname-method) | | Returns the first field with the given name. |
| [getFields(type)](#getfields-method) | | |
| [getFirstFieldOfType(type)](#getfirstfieldoftype-method) | | |
| [getFirstFieldOfType(type, includeHidden)](#getfirstfieldoftype-method) | | |
| [hasFieldNamed(name)](#hasfieldnamed-method) | | |
| [hasFieldOfType(type)](#hasfieldoftype-method) | | |
| [hasFieldWithNameAndType(name, type)](#hasfieldwithnameandtype-method) | | |
### constructor(data)
@@ -105,13 +106,14 @@ getFields(type?: FieldType): FieldWithIndex[];
<b>Signature</b>
```typescript
getFirstFieldOfType(type: FieldType): FieldWithIndex | undefined;
getFirstFieldOfType(type: FieldType, includeHidden?: boolean): FieldWithIndex | undefined;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| type | <code>FieldType</code> | |
| includeHidden | <code>boolean</code> | |
<b>Returns:</b>
@@ -151,3 +153,21 @@ hasFieldOfType(type: FieldType): boolean;
`boolean`
### hasFieldWithNameAndType method
<b>Signature</b>
```typescript
hasFieldWithNameAndType(name: string, type: FieldType): boolean;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| name | <code>string</code> | |
| type | <code>FieldType</code> | |
<b>Returns:</b>
`boolean`

View File

@@ -12,7 +12,7 @@ type = "docs"
<b>Signature</b>
```typescript
export interface FieldCalcs
export interface FieldCalcs extends Record<string, any>
```
<b>Import</b>

View File

@@ -30,6 +30,7 @@ import { FieldConfig } from '@grafana/data';
| [color](#color-property) | <code>FieldColor</code> | |
| [custom](#custom-property) | <code>TOptions</code> | |
| [decimals](#decimals-property) | <code>number &#124; null</code> | |
| [displayName](#displayname-property) | <code>string</code> | |
| [filterable](#filterable-property) | <code>boolean</code> | |
| [links](#links-property) | <code>DataLink[]</code> | |
| [mappings](#mappings-property) | <code>ValueMapping[]</code> | |
@@ -37,9 +38,7 @@ import { FieldConfig } from '@grafana/data';
| [min](#min-property) | <code>number &#124; null</code> | |
| [noValue](#novalue-property) | <code>string</code> | |
| [nullValueMode](#nullvaluemode-property) | <code>NullValueMode</code> | |
| [scopedVars](#scopedvars-property) | <code>ScopedVars</code> | |
| [thresholds](#thresholds-property) | <code>ThresholdsConfig</code> | |
| [title](#title-property) | <code>string</code> | |
| [unit](#unit-property) | <code>string</code> | |
### color property
@@ -66,6 +65,14 @@ custom?: TOptions;
decimals?: number | null;
```
### displayName property
<b>Signature</b>
```typescript
displayName?: string;
```
### filterable property
<b>Signature</b>
@@ -122,14 +129,6 @@ noValue?: string;
nullValueMode?: NullValueMode;
```
### scopedVars property
<b>Signature</b>
```typescript
scopedVars?: ScopedVars;
```
### thresholds property
<b>Signature</b>
@@ -138,14 +137,6 @@ scopedVars?: ScopedVars;
thresholds?: ThresholdsConfig;
```
### title property
<b>Signature</b>
```typescript
title?: string;
```
### unit property
<b>Signature</b>

View File

@@ -27,6 +27,7 @@ import { FieldDisplay } from '@grafana/data';
| [display](#display-property) | <code>DisplayValue</code> | |
| [field](#field-property) | <code>FieldConfig</code> | |
| [getLinks](#getlinks-property) | <code>() =&gt; LinkModel[]</code> | |
| [hasLinks](#haslinks-property) | <code>boolean</code> | |
| [name](#name-property) | <code>string</code> | |
| [rowIndex](#rowindex-property) | <code>number</code> | |
| [sparkline](#sparkline-property) | <code>GraphSeriesValue[][]</code> | |
@@ -64,6 +65,14 @@ field: FieldConfig;
getLinks?: () => LinkModel[];
```
### hasLinks property
<b>Signature</b>
```typescript
hasLinks: boolean;
```
### name property
<b>Signature</b>

View File

@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b>
```typescript
export declare type FieldMatcher = (field: Field) => boolean;
export declare type FieldMatcher = (field: Field, frame: DataFrame, allFrames: DataFrame[]) => boolean;
```
<b>Import</b>

View File

@@ -27,6 +27,9 @@ import { FieldMatcherID } from '@grafana/data';
| Member | Value | Description |
| --- | --- | --- |
| byName | <code>&quot;byName&quot;</code> | |
| byNames | <code>&quot;byNames&quot;</code> | |
| byRegexp | <code>&quot;byRegexp&quot;</code> | |
| byRegexpOrNames | <code>&quot;byRegexpOrNames&quot;</code> | |
| byType | <code>&quot;byType&quot;</code> | |
| numeric | <code>&quot;numeric&quot;</code> | |
| time | <code>&quot;time&quot;</code> | |

View File

@@ -0,0 +1,58 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "FieldState"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## FieldState interface
<b>Signature</b>
```typescript
export interface FieldState
```
<b>Import</b>
```typescript
import { FieldState } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [calcs](#calcs-property) | <code>FieldCalcs</code> | Cache of reduced values |
| [displayName](#displayname-property) | <code>string &#124; null</code> | An appropriate name for the field (does not include frame info) |
| [scopedVars](#scopedvars-property) | <code>ScopedVars</code> | Appropriate values for templating |
### calcs property
Cache of reduced values
<b>Signature</b>
```typescript
calcs?: FieldCalcs;
```
### displayName property
An appropriate name for the field (does not include frame info)
<b>Signature</b>
```typescript
displayName?: string | null;
```
### scopedVars property
Appropriate values for templating
<b>Signature</b>
```typescript
scopedVars?: ScopedVars;
```

View File

@@ -1,43 +0,0 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "FilterFieldsByNameTransformerOptions"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## FilterFieldsByNameTransformerOptions interface
<b>Signature</b>
```typescript
export interface FilterFieldsByNameTransformerOptions
```
<b>Import</b>
```typescript
import { FilterFieldsByNameTransformerOptions } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [exclude](#exclude-property) | <code>string[]</code> | |
| [include](#include-property) | <code>string[]</code> | |
### exclude property
<b>Signature</b>
```typescript
exclude?: string[];
```
### include property
<b>Signature</b>
```typescript
include?: string[];
```

View File

@@ -1,43 +0,0 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "FilterFramesByRefIdTransformerOptions"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## FilterFramesByRefIdTransformerOptions interface
<b>Signature</b>
```typescript
export interface FilterFramesByRefIdTransformerOptions
```
<b>Import</b>
```typescript
import { FilterFramesByRefIdTransformerOptions } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [exclude](#exclude-property) | <code>string</code> | |
| [include](#include-property) | <code>string</code> | |
### exclude property
<b>Signature</b>
```typescript
exclude?: string;
```
### include property
<b>Signature</b>
```typescript
include?: string;
```

View File

@@ -0,0 +1,35 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "getFieldDisplayName"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## getFieldDisplayName() function
### getFieldDisplayName() function
<b>Signature</b>
```typescript
export declare function getFieldDisplayName(field: Field, frame?: DataFrame, allFrames?: DataFrame[]): string;
```
<b>Import</b>
```typescript
import { getFieldDisplayName } from '@grafana/data';
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| field | <code>Field</code> | |
| frame | <code>DataFrame</code> | |
| allFrames | <code>DataFrame[]</code> | |
<b>Returns:</b>
`string`

View File

@@ -0,0 +1,36 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "getFrameDisplayName"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## getFrameDisplayName() function
### getFrameDisplayName() function
Get an appropriate display title
<b>Signature</b>
```typescript
export declare function getFrameDisplayName(frame: DataFrame, index?: number): string;
```
<b>Import</b>
```typescript
import { getFrameDisplayName } from '@grafana/data';
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| frame | <code>DataFrame</code> | |
| index | <code>number</code> | |
<b>Returns:</b>
`string`

View File

@@ -24,7 +24,7 @@ import { GrafanaThemeCommons } from '@grafana/data';
| Property | Type | Description |
| --- | --- | --- |
| [border](#border-property) | <code>{</code><br/><code> radius: {</code><br/><code> sm: string;</code><br/><code> md: string;</code><br/><code> lg: string;</code><br/><code> };</code><br/><code> width: {</code><br/><code> sm: string;</code><br/><code> };</code><br/><code> }</code> | |
| [breakpoints](#breakpoints-property) | <code>{</code><br/><code> xs: string;</code><br/><code> sm: string;</code><br/><code> md: string;</code><br/><code> lg: string;</code><br/><code> xl: string;</code><br/><code> }</code> | |
| [breakpoints](#breakpoints-property) | <code>{</code><br/><code> xs: string;</code><br/><code> sm: string;</code><br/><code> md: string;</code><br/><code> lg: string;</code><br/><code> xl: string;</code><br/><code> xxl: string;</code><br/><code> }</code> | |
| [height](#height-property) | <code>{</code><br/><code> sm: number;</code><br/><code> md: number;</code><br/><code> lg: number;</code><br/><code> }</code> | |
| [name](#name-property) | <code>string</code> | |
| [panelHeaderHeight](#panelheaderheight-property) | <code>number</code> | |
@@ -61,6 +61,7 @@ breakpoints: {
md: string;
lg: string;
xl: string;
xxl: string;
};
```

View File

@@ -2,32 +2,32 @@
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "resultsToDataFrames"
title = "hasLinks"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## resultsToDataFrames() function
## hasLinks() function
### resultsToDataFrames() function
### hasLinks() function
<b>Signature</b>
```typescript
export declare function resultsToDataFrames(rsp: any): DataFrame[];
export declare function hasLinks(field: Field): boolean;
```
<b>Import</b>
```typescript
import { resultsToDataFrames } from '@grafana/data';
import { hasLinks } from '@grafana/data';
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| rsp | <code>any</code> | |
| field | <code>Field</code> | |
<b>Returns:</b>
`DataFrame[]`
`boolean`

View File

@@ -37,7 +37,9 @@ import { LogLevel } from '@grafana/data';
| eror | <code>&quot;error&quot;</code> | |
| err | <code>&quot;error&quot;</code> | |
| error | <code>&quot;error&quot;</code> | |
| fatal | <code>&quot;critical&quot;</code> | |
| info | <code>&quot;info&quot;</code> | |
| information | <code>&quot;info&quot;</code> | |
| notice | <code>&quot;info&quot;</code> | |
| trace | <code>&quot;trace&quot;</code> | |
| unknown | <code>&quot;unknown&quot;</code> | |

View File

@@ -34,6 +34,7 @@ import { LogRowModel } from '@grafana/data';
| [rowIndex](#rowindex-property) | <code>number</code> | |
| [searchWords](#searchwords-property) | <code>string[]</code> | |
| [timeEpochMs](#timeepochms-property) | <code>number</code> | |
| [timeEpochNs](#timeepochns-property) | <code>string</code> | |
| [timeFromNow](#timefromnow-property) | <code>string</code> | |
| [timeLocal](#timelocal-property) | <code>string</code> | |
| [timeUtc](#timeutc-property) | <code>string</code> | |
@@ -128,6 +129,14 @@ searchWords?: string[];
timeEpochMs: number;
```
### timeEpochNs property
<b>Signature</b>
```typescript
timeEpochNs: string;
```
### timeFromNow property
<b>Signature</b>

View File

@@ -1,34 +0,0 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "OrganizeFieldsTransformerOptions"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## OrganizeFieldsTransformerOptions interface
<b>Signature</b>
```typescript
export interface OrganizeFieldsTransformerOptions extends OrderFieldsTransformerOptions, RenameFieldsTransformerOptions
```
<b>Import</b>
```typescript
import { OrganizeFieldsTransformerOptions } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [excludeByName](#excludebyname-property) | <code>Record&lt;string, boolean&gt;</code> | |
### excludeByName property
<b>Signature</b>
```typescript
excludeByName: Record<string, boolean>;
```

View File

@@ -32,6 +32,7 @@ import { PanelEvents } from '@grafana/data';
| --- | --- |
| [componentDidMount](./componentdidmount/) | |
| [dataError](./dataerror/) | |
| [dataFramesReceived](./dataframesreceived/) | |
| [dataReceived](./datareceived/) | |
| [dataSnapshotLoad](./datasnapshotload/) | |
| [editModeInitialized](./editmodeinitialized/) | |

View File

@@ -2,22 +2,23 @@
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "createOrderFieldsComparer"
title = "dataFramesReceived"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## createOrderFieldsComparer variable
## PanelEvents.dataFramesReceived variable
### createOrderFieldsComparer variable
### PanelEvents.dataFramesReceived variable
<b>Signature</b>
```typescript
createOrderFieldsComparer: (indexByName: Record<string, number>) => (a: string, b: string) => number
dataFramesReceived: import("./appEvents").AppEvent<DataFrame[]>
```
<b>Import</b>
```typescript
import { createOrderFieldsComparer } from '@grafana/data';
import { PanelEvents } from '@grafana/data';
const { dataFramesReceived } = PanelEvents;
```

View File

@@ -2,22 +2,22 @@
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "DateTimeFormatter"
title = "PreferredVisualisationType"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## DateTimeFormatter type
## PreferredVisualisationType type
### DateTimeFormatter type
### PreferredVisualisationType type
<b>Signature</b>
```typescript
export declare type DateTimeFormatter<T extends DateTimeOptions = DateTimeOptions> = (dateInUtc: DateTimeInput, options?: T) => string;
export declare type PreferredVisualisationType = 'graph' | 'table';
```
<b>Import</b>
```typescript
import { DateTimeFormatter } from '@grafana/data';
import { PreferredVisualisationType } from '@grafana/data';
```

View File

@@ -27,6 +27,8 @@ import { QueryEditorProps } from '@grafana/data';
| [datasource](#datasource-property) | <code>DSType</code> | |
| [exploreId](#exploreid-property) | <code>any</code> | |
| [exploreMode](#exploremode-property) | <code>ExploreMode</code> | |
| [history](#history-property) | <code>HistoryItem[]</code> | |
| [onBlur](#onblur-property) | <code>() =&gt; void</code> | |
| [onChange](#onchange-property) | <code>(value: TQuery) =&gt; void</code> | |
| [onRunQuery](#onrunquery-property) | <code>() =&gt; void</code> | |
| [query](#query-property) | <code>TQuery</code> | |
@@ -65,6 +67,22 @@ exploreId?: any;
exploreMode?: ExploreMode;
```
### history property
<b>Signature</b>
```typescript
history?: HistoryItem[];
```
### onBlur property
<b>Signature</b>
```typescript
onBlur?: () => void;
```
### onChange property
<b>Signature</b>

View File

@@ -29,6 +29,7 @@ import { QueryResultMeta } from '@grafana/data';
| [json](#json-property) | <code>boolean</code> | |
| [limit](#limit-property) | <code>number</code> | |
| [notices](#notices-property) | <code>QueryResultMetaNotice[]</code> | Meta Notices |
| [preferredVisualisationType](#preferredvisualisationtype-property) | <code>PreferredVisualisationType</code> | Currently used to show results in Explore only in preferred visualisation option |
| [query](#query-property) | <code>string</code> | |
| [rawQuery](#rawquery-property) | <code>string</code> | |
| [searchWords](#searchwords-property) | <code>string[]</code> | |
@@ -89,6 +90,16 @@ Meta Notices
notices?: QueryResultMetaNotice[];
```
### preferredVisualisationType property
Currently used to show results in Explore only in preferred visualisation option
<b>Signature</b>
```typescript
preferredVisualisationType?: PreferredVisualisationType;
```
### query property
<b>Signature</b>

View File

@@ -23,15 +23,15 @@ import { QueryResultMetaStat } from '@grafana/data';
| Property | Type | Description |
| --- | --- | --- |
| [title](#title-property) | <code>string</code> | |
| [displayName](#displayname-property) | <code>string</code> | |
| [value](#value-property) | <code>number</code> | |
### title property
### displayName property
<b>Signature</b>
```typescript
title: string;
displayName: string;
```
### value property

View File

@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b>
```typescript
convertRawToRange: (raw: RawTimeRange) => TimeRange
convertRawToRange: (raw: RawTimeRange, timeZone?: string | undefined) => TimeRange
```
<b>Import</b>

View File

@@ -2,42 +2,42 @@
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "ReduceTransformerOptions"
title = "RegexpOrNamesMatcherOptions"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## ReduceTransformerOptions interface
## RegexpOrNamesMatcherOptions interface
<b>Signature</b>
```typescript
export interface ReduceTransformerOptions
export interface RegexpOrNamesMatcherOptions
```
<b>Import</b>
```typescript
import { ReduceTransformerOptions } from '@grafana/data';
import { RegexpOrNamesMatcherOptions } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [fields](#fields-property) | <code>MatcherConfig</code> | |
| [reducers](#reducers-property) | <code>ReducerID[]</code> | |
| [names](#names-property) | <code>string[]</code> | |
| [pattern](#pattern-property) | <code>string</code> | |
### fields property
### names property
<b>Signature</b>
```typescript
fields?: MatcherConfig;
names?: string[];
```
### reducers property
### pattern property
<b>Signature</b>
```typescript
reducers: ReducerID[];
pattern?: string;
```

View File

@@ -1,34 +0,0 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "SeriesToColumnsOptions"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## SeriesToColumnsOptions interface
<b>Signature</b>
```typescript
export interface SeriesToColumnsOptions
```
<b>Import</b>
```typescript
import { SeriesToColumnsOptions } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [byField](#byfield-property) | <code>string</code> | |
### byField property
<b>Signature</b>
```typescript
byField?: string;
```

View File

@@ -28,6 +28,7 @@ standardTransformers: {
seriesToColumnsTransformer: import("..").DataTransformerInfo<import("./transformers/seriesToColumns").SeriesToColumnsOptions>;
renameFieldsTransformer: import("..").DataTransformerInfo<import("./transformers/rename").RenameFieldsTransformerOptions>;
labelsToFieldsTransformer: import("..").DataTransformerInfo<import("./transformers/labelsToFields").LabelsToFieldsOptions>;
ensureColumnsTransformer: import("..").DataTransformerInfo<any>;
}
```
<b>Import</b>

View File

@@ -0,0 +1,23 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TIME_SERIES_TIME_FIELD_NAME"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TIME\_SERIES\_TIME\_FIELD\_NAME variable
### TIME\_SERIES\_TIME\_FIELD\_NAME variable
<b>Signature</b>
```typescript
TIME_SERIES_TIME_FIELD_NAME = "Time"
```
<b>Import</b>
```typescript
import { TIME_SERIES_TIME_FIELD_NAME } from '@grafana/data';
```

View File

@@ -0,0 +1,23 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TIME_SERIES_VALUE_FIELD_NAME"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TIME\_SERIES\_VALUE\_FIELD\_NAME variable
### TIME\_SERIES\_VALUE\_FIELD\_NAME variable
<b>Signature</b>
```typescript
TIME_SERIES_VALUE_FIELD_NAME = "Value"
```
<b>Import</b>
```typescript
import { TIME_SERIES_VALUE_FIELD_NAME } from '@grafana/data';
```

View File

@@ -26,6 +26,7 @@ import { TimeSeries } from '@grafana/data';
| [datapoints](#datapoints-property) | <code>TimeSeriesPoints</code> | |
| [tags](#tags-property) | <code>Labels</code> | |
| [target](#target-property) | <code>string</code> | |
| [title](#title-property) | <code>string</code> | If name is manually configured via an alias / legend pattern |
| [unit](#unit-property) | <code>string</code> | |
### datapoints property
@@ -52,6 +53,16 @@ tags?: Labels;
target: string;
```
### title property
If name is manually configured via an alias / legend pattern
<b>Signature</b>
```typescript
title?: string;
```
### unit property
<b>Signature</b>

View File

@@ -11,6 +11,8 @@ type = "docs"
### timeZoneAbbrevation variable
Helper function to return only the time zone abbreviation for a given date and time value. If no options are supplied, then default values are used. For more details please see [DateTimeOptions](./data/datetimeoptions.md)<!-- -->.
<b>Signature</b>
```typescript

View File

@@ -0,0 +1,23 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "timeZoneFormatUserFriendly"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## timeZoneFormatUserFriendly variable
### timeZoneFormatUserFriendly variable
<b>Signature</b>
```typescript
timeZoneFormatUserFriendly: (timeZone: string | undefined) => string | undefined
```
<b>Import</b>
```typescript
import { timeZoneFormatUserFriendly } from '@grafana/data';
```

View File

@@ -11,6 +11,8 @@ type = "docs"
### TimeZoneResolver type
The type to describe the time zone resolver function that will be used to access the default time zone of a user.
<b>Signature</b>
```typescript

View File

@@ -7,17 +7,29 @@ keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## toDataFrame variable
## toDataFrame() function
### toDataFrame variable
### toDataFrame() function
Inspect any object and return the results as a DataFrame
<b>Signature</b>
```typescript
toDataFrame: (data: any) => DataFrame
export declare function toDataFrame(data: any): DataFrame;
```
<b>Import</b>
```typescript
import { toDataFrame } from '@grafana/data';
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| data | <code>any</code> | |
<b>Returns:</b>
`DataFrame`

View File

@@ -0,0 +1,23 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "VAR_FIELD_LABELS"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## VAR\_FIELD\_LABELS variable
### VAR\_FIELD\_LABELS variable
<b>Signature</b>
```typescript
VAR_FIELD_LABELS = "__field.labels"
```
<b>Import</b>
```typescript
import { VAR_FIELD_LABELS } from '@grafana/data';
```

View File

@@ -35,6 +35,8 @@ A library containing services, configurations etc. used to interact with the Gra
| [getEchoSrv()](./getechosrv/) | Used to retrieve the [EchoSrv](./runtime/echosrv.md) that can be used to report events to registered echo backends. |
| [getLocationSrv()](./getlocationsrv/) | Used to retrieve the [LocationSrv](./runtime/locationsrv.md) that can be used to automatically navigate the user to a new place in Grafana. |
| [loadPluginCss(options)](./loadplugincss/) | Use this to load css for a Grafana plugin by specifying a [PluginCssOptions](./runtime/plugincssoptions.md) containing styling for the dark and the light theme. |
| [toDataQueryError(err)](./todataqueryerror/) | Convert an object into a DataQueryError -- if this is an HTTP response, it will put the correct values in the error filds |
| [toDataQueryResponse(res)](./todataqueryresponse/) | Parse the results from \`<!-- -->/api/ds/query |
## Interfaces
@@ -58,7 +60,7 @@ A library containing services, configurations etc. used to interact with the Gra
| [MetaAnalyticsEvent](./metaanalyticsevent/) | Describes meta analytics event with predefined [EchoEventType.MetaAnalytics](./runtime/echoeventtype/metaanalytics.md) type. |
| [PluginCssOptions](./plugincssoptions/) | Option to specify a plugin css that should be applied for the dark and the light theme. |
| [SizeMeta](./sizemeta/) | Describes a size with width/height |
| [TemplateSrv](./templatesrv/) | Via the TemplateSrv consumers get access to all the available template variables that can be used within the current active dashboard.<!-- -->For a more in-depth description visit: https://grafana.com/docs/grafana/latest/variables/templates-and-variables |
| [TemplateSrv](./templatesrv/) | Via the TemplateSrv consumers get access to all the available template variables that can be used within the current active dashboard.<!-- -->For a more in-depth description visit: https://grafana.com/docs/grafana/latest/reference/templating |
## Variables
@@ -66,6 +68,7 @@ A library containing services, configurations etc. used to interact with the Gra
| --- | --- |
| [config](./config/) | Use this to access the [GrafanaBootConfig](./runtime/grafanabootconfig.md) for the current running Grafana instance. |
| [getBackendSrv](./getbackendsrv/) | Used to retrieve the [BackendSrv](./runtime/backendsrv.md) that can be used to communicate via http(s) to a remote backend such as the Grafana backend, a datasource etc. |
| [getLegacyAngularInjector](./getlegacyangularinjector/) | <b><i>(BETA)</i></b> WARNING: this function provides a temporary way for plugins to access anything in the angular injector. While the migration from angular to react continues, there are a few options that do not yet have good alternatives. Note that use of this function will be removed in the future. |
| [getTemplateSrv](./gettemplatesrv/) | Used to retrieve the [TemplateSrv](./runtime/templatesrv.md) that can be used to fetch available template variables. |
| [registerEchoBackend](./registerechobackend/) | Used to register echo backends that will receive Grafana echo events during application runtime. |
| [reportMetaAnalytics](./reportmetaanalytics/) | Helper function to report meta analytics to the [EchoSrv](./runtime/echosrv.md)<!-- -->. |

View File

@@ -37,7 +37,6 @@ import { DataSourceWithBackend } from '@grafana/runtime';
| [postResource(path, body)](#postresource-method) | | Send a POST request to the datasource resource path |
| [query(request)](#query-method) | | Ideally final -- any other implementation may not work as expected |
| [testDatasource()](#testdatasource-method) | | Checks the plugin health |
| [toDataQueryResponse(rsp)](#todataqueryresponse-method) | | This makes the arrow library loading async. |
### constructor(instanceSettings)
@@ -159,22 +158,3 @@ testDatasource(): Promise<any>;
`Promise<any>`
### toDataQueryResponse method
This makes the arrow library loading async.
<b>Signature</b>
```typescript
toDataQueryResponse(rsp: any): Promise<DataQueryResponse>;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| rsp | <code>any</code> | |
<b>Returns:</b>
`Promise<DataQueryResponse>`

View File

@@ -0,0 +1,28 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "getLegacyAngularInjector"
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
type = "docs"
+++
## getLegacyAngularInjector variable
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
### getLegacyAngularInjector variable
WARNING: this function provides a temporary way for plugins to access anything in the angular injector. While the migration from angular to react continues, there are a few options that do not yet have good alternatives. Note that use of this function will be removed in the future.
<b>Signature</b>
```typescript
getLegacyAngularInjector: () => auto.IInjectorService
```
<b>Import</b>
```typescript
import { getLegacyAngularInjector } from '@grafana/runtime';
```

View File

@@ -11,7 +11,7 @@ type = "docs"
Via the TemplateSrv consumers get access to all the available template variables that can be used within the current active dashboard.
For a more in-depth description visit: https://grafana.com/docs/grafana/latest/variables/templates-and-variables
For a more in-depth description visit: https://grafana.com/docs/grafana/latest/reference/templating
<b>Signature</b>
@@ -27,10 +27,13 @@ import { TemplateSrv } from '@grafana/runtime';
| Method | Description |
| --- | --- |
| [getVariables()](#getvariables-method) | |
| [getVariables()](#getvariables-method) | List the dashboard variables |
| [replace(target, scopedVars, format)](#replace-method) | Replace the values within the target string. See also |
### getVariables method
List the dashboard variables
<b>Signature</b>
```typescript
@@ -40,3 +43,24 @@ getVariables(): VariableModel[];
`VariableModel[]`
### replace method
Replace the values within the target string. See also
<b>Signature</b>
```typescript
replace(target: string, scopedVars?: ScopedVars, format?: string | Function): string;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| target | <code>string</code> | |
| scopedVars | <code>ScopedVars</code> | |
| format | <code>string &#124; Function</code> | |
<b>Returns:</b>
`string`

View File

@@ -0,0 +1,35 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "toDataQueryError"
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
type = "docs"
+++
## toDataQueryError() function
### toDataQueryError() function
Convert an object into a DataQueryError -- if this is an HTTP response, it will put the correct values in the error filds
<b>Signature</b>
```typescript
export declare function toDataQueryError(err: any): DataQueryError;
```
<b>Import</b>
```typescript
import { toDataQueryError } from '@grafana/runtime';
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| err | <code>any</code> | |
<b>Returns:</b>
`DataQueryError`

View File

@@ -0,0 +1,35 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "toDataQueryResponse"
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
type = "docs"
+++
## toDataQueryResponse() function
### toDataQueryResponse() function
Parse the results from \`<!-- -->/api/ds/query
<b>Signature</b>
```typescript
export declare function toDataQueryResponse(res: any): DataQueryResponse;
```
<b>Import</b>
```typescript
import { toDataQueryResponse } from '@grafana/runtime';
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| res | <code>any</code> | |
<b>Returns:</b>
`DataQueryResponse`

View File

@@ -97,12 +97,13 @@ A library containing the different design components of the Grafana ecosystem.
| [stylesFactory(stylesCreator)](./stylesfactory/) | Creates memoized version of styles creator |
| [SuggestionsPlugin({ onTypeahead, cleanText, onWillApplySuggestion, portalOrigin, })](./suggestionsplugin/) | |
| [useTheme()](./usetheme/) | |
| [ValuePicker({ label, icon, options, onChange, variant, size, isFullWidth, })](./valuepicker/) | |
| [ValuePicker({ label, icon, options, onChange, variant, size, isFullWidth, menuPlacement, })](./valuepicker/) | |
## Interfaces
| Interface | Description |
| --- | --- |
| [BadgeProps](./badgeprops/) | |
| [BigValueSparkline](./bigvaluesparkline/) | |
| [CascaderOption](./cascaderoption/) | |
| [CompletionItem](./completionitem/) | |
@@ -142,6 +143,7 @@ A library containing the different design components of the Grafana ecosystem.
| [Alert](./alert/) | |
| [ALERTING\_COLOR](./alerting_color/) | |
| [AlphaNotice](./alphanotice/) | |
| [Badge](./badge/) | |
| [Button](./button/) | |
| [ButtonCascader](./buttoncascader/) | |
| [CallToActionCard](./calltoactioncard/) | |
@@ -165,10 +167,11 @@ A library containing the different design components of the Grafana ecosystem.
| [Drawer](./drawer/) | |
| [EmptySearchResult](./emptysearchresult/) | |
| [ErrorWithStack](./errorwithstack/) | |
| [FeatureInfoBox](./featureinfobox/) | |
| [Field](./field/) | |
| [FieldConfigItemHeaderTitle](./fieldconfigitemheadertitle/) | |
| [fieldMatchersUI](./fieldmatchersui/) | |
| [Forms](./forms/) | |
| [FilterPill](./filterpill/) | |
| [FullWidthButtonContainer](./fullwidthbuttoncontainer/) | |
| [getAvailableIcons](./getavailableicons/) | |
| [getButtonStyles](./getbuttonstyles/) | |
@@ -176,12 +179,11 @@ A library containing the different design components of the Grafana ecosystem.
| [getLogRowStyles](./getlogrowstyles/) | |
| [getStandardFieldConfigs](./getstandardfieldconfigs/) | Returns collection of common field config properties definitions |
| [getStandardOptionEditors](./getstandardoptioneditors/) | Returns collection of standard option editors definitions |
| [getStandardTransformers](./getstandardtransformers/) | |
| [getTheme](./gettheme/) | |
| [GraphContextMenu](./graphcontextmenu/) | |
| [GraphLegend](./graphlegend/) | |
| [graphTickFormatter](./graphtickformatter/) | |
| [graphTimeFormat](./graphtimeformat/) | |
| [graphTimeFormatter](./graphtimeformatter/) | |
| [GraphWithLegend](./graphwithlegend/) | |
| [hasValidationEvent](./hasvalidationevent/) | |
| [HorizontalGroup](./horizontalgroup/) | |
@@ -244,6 +246,7 @@ A library containing the different design components of the Grafana ecosystem.
| [TimeRangePicker](./timerangepicker/) | |
| [ToggleButton](./togglebutton/) | |
| [Tooltip](./tooltip/) | |
| [useStyles](./usestyles/) | Hook for using memoized styles with access to the theme. |
| [validate](./validate/) | |
| [VerticalGroup](./verticalgroup/) | |
| [withTheme](./withtheme/) | |
@@ -253,6 +256,7 @@ A library containing the different design components of the Grafana ecosystem.
| Type Alias | Description |
| --- | --- |
| [AlertVariant](./alertvariant/) | |
| [BadgeColor](./badgecolor/) | |
| [ButtonProps](./buttonprops/) | |
| [ButtonVariant](./buttonvariant/) | |
| [FormAPI](./formapi/) | |

View File

@@ -2,22 +2,22 @@
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "getStandardTransformers"
title = "Badge"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## getStandardTransformers variable
## Badge variable
### getStandardTransformers variable
### Badge variable
<b>Signature</b>
```typescript
getStandardTransformers: () => TransformerRegistyItem<any>[]
Badge: React.NamedExoticComponent<BadgeProps>
```
<b>Import</b>
```typescript
import { getStandardTransformers } from '@grafana/ui';
import { Badge } from '@grafana/ui';
```

View File

@@ -2,22 +2,22 @@
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "graphTimeFormatter"
title = "BadgeColor"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## graphTimeFormatter variable
## BadgeColor type
### graphTimeFormatter variable
### BadgeColor type
<b>Signature</b>
```typescript
graphTimeFormatter: (timeZone?: string | undefined) => (epoch: number, format: string) => string
export declare type BadgeColor = 'blue' | 'red' | 'green' | 'orange' | 'purple';
```
<b>Import</b>
```typescript
import { graphTimeFormatter } from '@grafana/ui';
import { BadgeColor } from '@grafana/ui';
```

View File

@@ -0,0 +1,61 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "BadgeProps"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## BadgeProps interface
<b>Signature</b>
```typescript
export interface BadgeProps
```
<b>Import</b>
```typescript
import { BadgeProps } from '@grafana/ui';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [color](#color-property) | <code>BadgeColor</code> | |
| [icon](#icon-property) | <code>IconName</code> | |
| [text](#text-property) | <code>string</code> | |
| [tooltip](#tooltip-property) | <code>string</code> | |
### color property
<b>Signature</b>
```typescript
color: BadgeColor;
```
### icon property
<b>Signature</b>
```typescript
icon?: IconName;
```
### text property
<b>Signature</b>
```typescript
text: string;
```
### tooltip property
<b>Signature</b>
```typescript
tooltip?: string;
```

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More