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>
This commit is contained in:
Arve Knudsen
2020-05-15 14:00:13 +02:00
committed by GitHub
co-authored by Tobias Skarhed Dominik Prokop Leonard Gram Alexander Zobnin Andreas Opferkuch kay delaney Torkel Ödegaard Peter Holmberg Hugo Häggmark Marcus Andersson Andrej Ocenas David Daniel Lee Ryan McKinley Ivana Huckova Zoltán Bedi Alex Khomenko Rotem Reiss Agnès Toulet Jess Carl Bergquist Lukas Siatka Marcus Efraimsson
parent 2169fc1a3f
commit 0167f43d74
402 changed files with 7752 additions and 2674 deletions
+23 -10
View File
@@ -54,7 +54,7 @@ commands:
- run:
name: "Install Grafana build pipeline tool"
command: |
VERSION=0.4.4
VERSION=0.4.7
curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${VERSION}/grabpl
chmod +x grabpl
mv grabpl /tmp
@@ -398,19 +398,25 @@ 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 --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 --jobs 2 --edition oss --sign v6.7.0-beta1
elif [[ $CIRCLE_BRANCH == "master" ]]; then
# A master build
/tmp/grabpl package --jobs 2 --edition oss --build-id $CIRCLE_WORKFLOW_ID
else
# A PR build
/tmp/grabpl package --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID
elif [[ -n "$CIRCLE_PR_NUMBER" ]]; then
# A forked forked PR build, don't sign as it requires an API secret
/tmp/grabpl package --jobs 2 --edition oss --build-id $CIRCLE_WORKFLOW_ID --variants \
linux-x64,linux-x64-musl,osx64,win64
else
# A non-forked PR build
/tmp/grabpl package --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
linux-x64,linux-x64-musl,osx64,win64
fi
- run:
name: Move artifacts
@@ -453,18 +459,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 --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 --jobs 2 --edition enterprise --sign v6.7.0-beta1
elif [[ $CIRCLE_BRANCH == "master" ]]; then
# A master build
/tmp/grabpl package --jobs 2 --edition enterprise --build-id $CIRCLE_WORKFLOW_ID
/tmp/grabpl package --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID
elif [[ -n "$CIRCLE_PR_NUMBER" ]]; then
# A forked forked PR build, don't sign as it requires an API secret
/tmp/grabpl package --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 --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
linux-x64,linux-x64-musl,osx64,win64
fi
- run:
+3 -3
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
+54 -34
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.
@@ -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
}
@@ -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.)
@@ -362,4 +376,4 @@ datasources:
appInsightsApiKey: <app-insights-api-key>
logAnalyticsClientSecret: <log-analytics-client-secret>
version: 1
```
```
-2
View File
@@ -361,8 +361,6 @@
name: Defaults and editor mode
- link: /developers/plugins/legacy/apps/
name: App plugins
- link: /developers/plugins/legacy/panels/
name: Backend plugins
- link: /developers/plugins/legacy/data-sources/
name: Data source plugins
- link: /developers/plugins/legacy/snapshot-mode/
+25 -23
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. |
@@ -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';
```
@@ -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> | |
@@ -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
@@ -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';
```
@@ -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;
```
+9
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>
@@ -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> | |
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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>
+11 -11
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)
+22 -2
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`
+1 -1
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>
+9 -18
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>
@@ -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>
@@ -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>
@@ -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> | |
@@ -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;
```
@@ -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[];
```
@@ -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;
```
@@ -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`
@@ -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`
@@ -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;
};
```
@@ -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`
@@ -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> | |
@@ -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>
@@ -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>;
```
@@ -32,6 +32,7 @@ import { PanelEvents } from '@grafana/data';
| --- | --- |
| [componentDidMount](./componentdidmount/) | |
| [dataError](./dataerror/) | |
| [dataFramesReceived](./dataframesreceived/) | |
| [dataReceived](./datareceived/) | |
| [dataSnapshotLoad](./datasnapshotload/) | |
| [editModeInitialized](./editmodeinitialized/) | |
@@ -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;
```
@@ -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';
```
@@ -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>
@@ -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>
@@ -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
@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b>
```typescript
convertRawToRange: (raw: RawTimeRange) => TimeRange
convertRawToRange: (raw: RawTimeRange, timeZone?: string | undefined) => TimeRange
```
<b>Import</b>
@@ -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;
```
@@ -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;
```
@@ -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>
@@ -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';
```
@@ -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';
```
@@ -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>
@@ -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
@@ -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';
```
@@ -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
+15 -3
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`
@@ -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';
```
+4 -1
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)<!-- -->. |
@@ -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>`
@@ -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';
```
@@ -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`
@@ -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`
@@ -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`
+8 -4
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/) | |
@@ -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';
```
@@ -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';
```
@@ -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
+1 -1
View File
@@ -16,7 +16,7 @@ type = "docs"
```typescript
ColorPicker: React.FunctionComponent<Pick<import("./ColorPickerPopover").Props<import("./ColorPickerPopover").CustomPickersDescriptor> & {
children?: ColorPickerTriggerRenderer | undefined;
}, "onChange" | "color" | "children" | "customPickers" | "onColorChange" | "enableNamedColors" | "updatePopperPosition">>
}, "onChange" | "color" | "children" | "onColorChange" | "enableNamedColors" | "customPickers" | "updatePopperPosition">>
```
<b>Import</b>
@@ -0,0 +1,23 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "FeatureInfoBox"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## FeatureInfoBox variable
### FeatureInfoBox variable
<b>Signature</b>
```typescript
FeatureInfoBox: React.MemoExoticComponent<React.ForwardRefExoticComponent<FeatureInfoBox & React.RefAttributes<HTMLDivElement>>>
```
<b>Import</b>
```typescript
import { FeatureInfoBox } from '@grafana/ui';
```
@@ -0,0 +1,23 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "FilterPill"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## FilterPill variable
### FilterPill variable
<b>Signature</b>
```typescript
FilterPill: React.FC<FilterPillProps>
```
<b>Import</b>
```typescript
import { FilterPill } from '@grafana/ui';
```
File diff suppressed because one or more lines are too long
+8 -2
View File
@@ -35,7 +35,7 @@ import { Gauge } from '@grafana/ui';
| [componentDidUpdate()](#componentdidupdate-method) | | |
| [draw()](#draw-method) | | |
| [getFontScale(length)](#getfontscale-method) | | |
| [getFormattedThresholds()](#getformattedthresholds-method) | | |
| [getFormattedThresholds(decimals)](#getformattedthresholds-method) | | |
| [render()](#render-method) | | |
### canvasElement property
@@ -117,8 +117,14 @@ getFontScale(length: number): number;
<b>Signature</b>
```typescript
getFormattedThresholds(): Threshold[];
getFormattedThresholds(decimals: number): Threshold[];
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| decimals | <code>number</code> | |
<b>Returns:</b>
`Threshold[]`
@@ -0,0 +1,23 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "graphTickFormatter"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## graphTickFormatter variable
### graphTickFormatter variable
<b>Signature</b>
```typescript
graphTickFormatter: (epoch: number, axis: any) => string
```
<b>Import</b>
```typescript
import { graphTickFormatter } from '@grafana/ui';
```
+1 -1
View File
@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b>
```typescript
export declare type IconName = 'fa fa-spinner' | 'grafana' | 'question-circle' | 'angle-up' | 'history' | 'angle-down' | 'filter' | 'angle-left' | 'angle-right' | 'pen' | 'envelope' | 'percentage' | 'rocket' | 'power' | 'trash-alt' | 'slack' | 'download-alt' | 'mobile-android' | 'plus-square' | 'folder-plus' | 'folder-open' | 'folder' | 'file-copy-alt' | 'file-alt' | 'exchange-alt' | 'import' | 'exclamation-triangle' | 'times' | 'signin' | 'cloud-upload' | 'step-backward' | 'square-shape' | 'share-alt' | 'tag-alt' | 'forward' | 'check' | 'check-circle' | 'copy' | 'lock' | 'unlock' | 'panel-add' | 'arrow-random' | 'arrow-down' | 'arrows-h' | 'comment-alt' | 'code-branch' | 'arrow-right' | 'circle' | 'arrow-up' | 'arrow-from-right' | 'keyboard' | 'search' | 'chart-line' | 'search-minus' | 'clock-nine' | 'sync' | 'sign-in-alt' | 'cloud-download' | 'cog' | 'bars' | 'save' | 'apps' | 'link' | 'upload' | 'columns' | 'home-alt' | 'channel-add' | 'calendar-alt' | 'play' | 'pause' | 'calculator-alt' | 'compass' | 'sliders-v-alt' | 'bell' | 'database' | 'user' | 'camera' | 'plug' | 'shield' | 'key-skeleton-alt' | 'users-alt' | 'graph-bar' | 'book' | 'bolt' | 'comments-alt' | 'document-info' | 'info-circle' | 'bug' | 'cube' | 'star' | 'list-ul' | 'edit' | 'eye' | 'eye-slash' | 'monitor' | 'plus-circle' | 'arrow-left' | 'repeat' | 'external-link-alt' | 'minus' | 'signal' | 'search-plus' | 'minus-circle' | 'table' | 'plus' | 'heart' | 'heart-break' | 'ellipsis-v' | 'favorite' | 'line-alt' | 'sort-amount-down';
export declare type IconName = 'fa fa-spinner' | 'grafana' | 'question-circle' | 'angle-up' | 'history' | 'angle-down' | 'filter' | 'angle-left' | 'angle-right' | 'pen' | 'envelope' | 'percentage' | 'rocket' | 'power' | 'trash-alt' | 'slack' | 'download-alt' | 'mobile-android' | 'plus-square' | 'folder-plus' | 'folder-open' | 'folder' | 'file-copy-alt' | 'file-alt' | 'exchange-alt' | 'import' | 'exclamation-triangle' | 'times' | 'signin' | 'cloud-upload' | 'step-backward' | 'square-shape' | 'share-alt' | 'tag-alt' | 'forward' | 'check' | 'check-circle' | 'copy' | 'lock' | 'unlock' | 'panel-add' | 'arrow-random' | 'arrow-down' | 'arrows-h' | 'comment-alt' | 'code-branch' | 'arrow-right' | 'circle' | 'arrow-up' | 'arrow-from-right' | 'keyboard' | 'search' | 'chart-line' | 'search-minus' | 'clock-nine' | 'sync' | 'sign-in-alt' | 'cloud-download' | 'cog' | 'bars' | 'save' | 'apps' | 'link' | 'upload' | 'columns' | 'home-alt' | 'channel-add' | 'calendar-alt' | 'play' | 'pause' | 'calculator-alt' | 'compass' | 'sliders-v-alt' | 'bell' | 'database' | 'user' | 'camera' | 'plug' | 'shield' | 'key-skeleton-alt' | 'users-alt' | 'graph-bar' | 'book' | 'bolt' | 'comments-alt' | 'document-info' | 'info-circle' | 'bug' | 'cube' | 'star' | 'list-ul' | 'edit' | 'eye' | 'eye-slash' | 'monitor' | 'plus-circle' | 'arrow-left' | 'repeat' | 'external-link-alt' | 'minus' | 'signal' | 'search-plus' | 'minus-circle' | 'table' | 'plus' | 'heart' | 'heart-break' | 'ellipsis-v' | 'favorite' | 'line-alt' | 'sort-amount-down' | 'cloud';
```
<b>Import</b>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -23,7 +23,6 @@ import { UnitPicker } from '@grafana/ui';
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [defaultProps](#defaultprops-property) | <code>static</code> | <code>{</code><br/><code> width: number;</code><br/><code> }</code> | |
| [onChange](#onchange-property) | | <code>(value: SelectableValue&lt;string&gt;) =&gt; void</code> | |
<b>Methods</b>
@@ -32,16 +31,6 @@ import { UnitPicker } from '@grafana/ui';
| --- | --- | --- |
| [render()](#render-method) | | |
### defaultProps property
<b>Signature</b>
```typescript
static defaultProps: {
width: number;
};
```
### onChange property
<b>Signature</b>
+25
View File
@@ -0,0 +1,25 @@
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "useStyles"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## useStyles variable
### useStyles variable
Hook for using memoized styles with access to the theme.
<b>Signature</b>
```typescript
useStyles: (getStyles: (theme?: GrafanaTheme | undefined) => any) => any
```
<b>Import</b>
```typescript
import { useStyles } from '@grafana/ui';
```
+2 -2
View File
@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b>
```typescript
export declare function ValuePicker<T>({ label, icon, options, onChange, variant, size, isFullWidth, }: ValuePickerProps<T>): JSX.Element;
export declare function ValuePicker<T>({ label, icon, options, onChange, variant, size, isFullWidth, menuPlacement, }: ValuePickerProps<T>): JSX.Element;
```
<b>Import</b>
@@ -25,7 +25,7 @@ import { ValuePicker } from '@grafana/ui';
| Parameter | Type | Description |
| --- | --- | --- |
| { label, icon, options, onChange, variant, size, isFullWidth, } | <code>ValuePickerProps&lt;T&gt;</code> | |
| { label, icon, options, onChange, variant, size, isFullWidth, menuPlacement, } | <code>ValuePickerProps&lt;T&gt;</code> | |
<b>Returns:</b>
+8 -4
View File
@@ -19,7 +19,7 @@ The panel inspector displays Inspect: <NameOfPanelBeingInspected> at the top of
The panel inspector consists of four tabs:
* **Data tab -** Shows the raw data returned by the query with transformations applied. Field options such as overrides and value mappings are not applied.
* **Data tab -** Shows the raw data returned by the query with transformations applied. Field options such as overrides and value mappings are not applied by default.
* **Stats tab -** Shows how long your query takes and how much it returns.
* **JSON tab -** Allows you to view and copy the panel JSON, panel data JSON, and data frame structure JSON. This is useful if you are provisioning or administering Grafana.
* **Query tab -** Shows you the requests to the server sent when Grafana queries the data source.
@@ -42,14 +42,18 @@ The panel inspector pane opens on the right side of the screen.
### Inspect raw query results
View raw query results in a table. This is the data returned by the query with transformations applied and before the panel applies field configurations or overrides.
View raw query results in a table. This is the data returned by the query with transformations applied and before the panel applies field options or field option overrides.
1. Open the panel inspector and then click the **Data** tab or in the panel menu click **Inspect > Data**.
2. If your panel contains multiple queries or queries multiple nodes, then you have additional options.
1. If your panel contains multiple queries or queries multiple nodes, then you have additional options.
* **Select result -** Choose which result set data you want to view.
* **Transform data**
* **Join by time -** View raw data from all your queries at once, one result set per column. Click a column heading to reorder the data.
View raw query results in a table with field options and options overrides applied:
1. Open the **Data** tab in panel inspector.
1. Click on **Data display options** above the table.
1. Click on **Apply field configuration** toggle button.
### Download raw query results as CSV
+5 -5
View File
@@ -29,14 +29,14 @@ the dashboard, and will also be added as an required input when the dashboard is
## Importing a dashboard
To import a dashboard open dashboard search and then hit the import button.
To import a dashboard click the + icon in the side menu, and then click **Import**.
{{< docs-imagebox img="/img/docs/v50/import_step1.png" max-width="700px" >}}
{{< docs-imagebox img="/img/docs/v70/import_step1.png" max-width="700px" >}}
From here you can upload a dashboard json file, paste a [Grafana.com](https://grafana.com) dashboard
URL or paste dashboard json text directly into the text area.
From here you can upload a dashboard JSON file, paste a [Grafana.com](https://grafana.com) dashboard
URL or paste dashboard JSON text directly into the text area.
{{< docs-imagebox img="/img/docs/v50/import_step2.png" max-width="700px" >}}
{{< docs-imagebox img="/img/docs/v70/import_step2_grafana.com.png" max-width="700px" >}}
In step 2 of the import process Grafana will let you change the name of the dashboard, pick what
data source you want the dashboard to use and specify any metric prefixes (if the dashboard use any).
+2 -1
View File
@@ -8,6 +8,7 @@ CMD="start"
PARAMS=""
SLOWMO=0
URL=${BASE_URL:-"http://$DEFAULT_HOST:$DEFAULT_PORT"}
SUITE=${SUITE:-$DEFAULT_SUITE}
if [ "$1" == "debug" ]; then
echo -e "Debug mode"
@@ -23,5 +24,5 @@ fi
cd packages/grafana-e2e
yarn $CMD --env BASE_URL=$URL,CIRCLE_SHA1=$CIRCLE_SHA1,SLOWMO=$SLOWMO \
--config integrationFolder=../../e2e/suite1/specs,screenshotsFolder=../../e2e/suite1/screenshots,videosFolder=../../e2e/suite1/videos,fileServerFolder=./cypress,viewportWidth=1920,viewportHeight=1080,trashAssetsBeforeRuns=false \
--config integrationFolder=../../e2e/$SUITE/specs,screenshotsFolder=../../e2e/$SUITE/screenshots,videosFolder=../../e2e/$SUITE/videos,fileServerFolder=./cypress,viewportWidth=1920,viewportHeight=1080,trashAssetsBeforeRuns=false \
$PARAMS
+29
View File
@@ -0,0 +1,29 @@
import { e2e } from '@grafana/e2e';
export const smokeTestScenario = {
describeName: 'Smoke tests',
itName: 'Login scenario, create test data source, dashboard, panel, and export scenario',
addScenarioDataSource: true,
addScenarioDashBoard: true,
skipScenario: false,
scenario: () => {
e2e.getScenarioContext().then(({ lastAddedDashboardUid }: any) => {
e2e.flows.openDashboard(lastAddedDashboardUid);
});
e2e.pages.Dashboard.Toolbar.toolbarItems('Add panel').click();
e2e.pages.AddDashboard.addNewPanel().click();
e2e.components.DataSource.TestData.QueryTab.scenarioSelect().select('CSV Metric Values');
// Make sure the graph renders via checking legend
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('be.visible');
// Expand options section
e2e.components.Panels.Visualization.Graph.VisualizationTab.legendSection().click();
// Disable legend
e2e.components.Panels.Visualization.Graph.Legend.showLegendSwitch().click();
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('not.exist');
},
};
+2 -27
View File
@@ -1,29 +1,4 @@
import { e2e } from '@grafana/e2e';
import { smokeTestScenario } from '../../shared/smokeTestScenario';
e2e.scenario({
describeName: 'Smoke tests',
itName: 'Login scenario, create test data source, dashboard, panel, and export scenario',
addScenarioDataSource: true,
addScenarioDashBoard: true,
skipScenario: false,
scenario: () => {
e2e.getScenarioContext().then(({ lastAddedDashboardUid }: any) => {
e2e.flows.openDashboard(lastAddedDashboardUid);
});
e2e.pages.Dashboard.Toolbar.toolbarItems('Add panel').click();
e2e.pages.AddDashboard.addNewPanel().click();
e2e.components.DataSource.TestData.QueryTab.scenarioSelect().select('CSV Metric Values');
// Make sure the graph renders via checking legend
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('be.visible');
// Expand options section
e2e.components.Panels.Visualization.Graph.VisualizationTab.legendSection().click();
// Disable legend
e2e.components.Panels.Visualization.Graph.Legend.showLegendSwitch().click();
e2e.components.Panels.Visualization.Graph.Legend.legendItemAlias('A-series').should('not.exist');
},
});
e2e.scenario(smokeTestScenario);
@@ -0,0 +1,94 @@
import { e2e } from '@grafana/e2e';
e2e.scenario({
describeName: 'Dashboard time zone support',
itName: 'Tests dashboard time zone scenarios',
addScenarioDataSource: false,
addScenarioDashBoard: false,
skipScenario: false,
scenario: () => {
e2e.flows.openDashboard('5SdHCasdf');
const fromTimeZone = 'UTC';
const toTimeZone = 'America/Chicago';
const offset = -5;
const panelsToCheck = [
'Random walk series',
'Millisecond res x-axis and tooltip',
'2 yaxis and axis labels',
'Stacking value ontop of nulls',
'Null between points',
'Legend Table No Scroll Visible',
];
const timesInUtc: Record<string, string> = {};
for (const title of panelsToCheck) {
e2e.components.Panels.Panel.containerByTitle(title)
.should('be.visible')
.within(() =>
e2e.components.Panels.Visualization.Graph.xAxis
.labels()
.should('be.visible')
.last()
.should(element => {
timesInUtc[title] = element.text();
})
);
}
e2e.pages.Dashboard.Toolbar.toolbarItems('Dashboard settings').click();
e2e.components.TimeZonePicker.container()
.should('be.visible')
.within(() => {
e2e.components.Select.singleValue()
.should('be.visible')
.should('have.text', fromTimeZone);
e2e.components.Select.input()
.should('be.visible')
.click();
e2e.components.Select.option()
.should('be.visible')
.contains(toTimeZone)
.click();
});
e2e.components.BackButton.backArrow().click();
for (const title of panelsToCheck) {
e2e.components.Panels.Panel.containerByTitle(title)
.should('be.visible')
.within(() =>
e2e.components.Panels.Visualization.Graph.xAxis
.labels()
.should('be.visible')
.last()
.should(element => {
const utc = timesInUtc[title];
const tz = element.text();
const isCorrect = isTimeCorrect(utc, tz, offset);
assert.isTrue(isCorrect, `Panel with title: "${title}"`);
})
);
}
},
});
const isTimeCorrect = (utc: string, tz: string, offset: number): boolean => {
const minutes = 1000 * 60;
const a = Cypress.moment(utc, 'HH:mm')
.set('seconds', 0)
.set('milliseconds', 0);
const b = Cypress.moment(tz, 'HH:mm')
.set('seconds', 0)
.set('milliseconds', 0)
.add('hours', offset);
return a.diff(b, 'minutes') <= 6 * minutes;
};
+6 -19
View File
@@ -112,30 +112,17 @@ e2e.scenario({
e2e.components.PanelEditor.DataPane.content().should('be.visible');
// Field & Overrides tabs (need to switch to React based vis, i.e. Table)
e2e.components.PanelEditor.OptionsPane.select()
.should('be.visible')
.click()
.within(() => {
// Can change to Fields tab
e2e.components.Select.option()
.should('be.visible')
.eq(1)
.click();
});
e2e.components.PanelEditor.OptionsPane.tab('Field').should('be.visible');
e2e.components.PanelEditor.OptionsPane.tab('Overrides').should('be.visible');
e2e.components.PanelEditor.OptionsPane.tab('Field').click();
e2e.components.FieldConfigEditor.content().should('be.visible');
e2e.components.OverridesConfigEditor.content().should('not.be.visible');
e2e.components.PanelEditor.OptionsPane.select()
e2e.components.PanelEditor.OptionsPane.tab('Field').should('be.visible');
e2e.components.PanelEditor.OptionsPane.tab('Overrides')
.should('be.visible')
.click()
.within(() => {
// Can change to Overrides tab
e2e.components.Select.option()
.should('be.visible')
.eq(2)
.click();
});
.click();
e2e.components.OverridesConfigEditor.content().should('be.visible');
e2e.components.FieldConfigEditor.content().should('not.be.visible');
+1
View File
@@ -6,3 +6,4 @@ PACKAGE_FILE=dist/grafana-*linux-amd64.tar.gz
PROV_DIR=$RUNDIR/conf/provisioning
DEFAULT_HOST=localhost
DEFAULT_PORT=3001
DEFAULT_SUITE=suite1
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
. e2e/variables
SUITE=verify ./e2e/run-suite
+4
View File
@@ -0,0 +1,4 @@
import { e2e } from '@grafana/e2e';
import { smokeTestScenario } from '../../shared/smokeTestScenario';
e2e.scenario(smokeTestScenario);
+7
View File
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"types": ["cypress"]
},
"extends": "../../tsconfig.json",
"include": ["**/*.ts", "../../packages/grafana-e2e/cypress/support/index.d.ts"]
}
+1 -1
View File
@@ -2,5 +2,5 @@
"npmClient": "yarn",
"useWorkspaces": true,
"packages": ["packages/*"],
"version": "7.0.0-beta.3"
"version": "7.0.0"
}
+1 -1
View File
@@ -3,7 +3,7 @@
"license": "Apache-2.0",
"private": true,
"name": "grafana",
"version": "7.0.0-beta3",
"version": "7.0.0",
"repository": "github:grafana/grafana",
"scripts": {
"api-tests": "jest --notify --watch --config=devenv/e2e-api-tests/jest.js",
+1 -1
View File
@@ -1,5 +1,5 @@
# Grafana Data Library
> **@grafana/data is currently in ALPHA**. Core API is unstable and can be a subject of breaking changes!
> **@grafana/data is currently in BETA**.
This package holds the root data types and functions used within Grafana.
+1 -1
View File
@@ -2,7 +2,7 @@
"author": "Grafana Labs",
"license": "Apache-2.0",
"name": "@grafana/data",
"version": "7.0.0-beta.3",
"version": "7.0.0",
"description": "Grafana Data Library",
"keywords": [
"typescript"
@@ -57,9 +57,9 @@ export class FieldCache {
return types && types.length > 0;
}
getFirstFieldOfType(type: FieldType): FieldWithIndex | undefined {
getFirstFieldOfType(type: FieldType, includeHidden = false): FieldWithIndex | undefined {
const fields = this.fieldByType[type];
const firstField = fields.find(field => !(field.config.custom && field.config.custom['Hidden']));
const firstField = fields.find(field => includeHidden || !field.config.custom?.hidden);
return firstField;
}
@@ -14,14 +14,15 @@ import {
TimeSeriesValue,
FieldDTO,
DataFrameDTO,
TIME_SERIES_FIELD_NAME,
TIME_SERIES_VALUE_FIELD_NAME,
TIME_SERIES_TIME_FIELD_NAME,
} from '../types/index';
import { isDateTime } from '../datetime/moment_wrapper';
import { ArrayVector } from '../vector/ArrayVector';
import { MutableDataFrame } from './MutableDataFrame';
import { SortedVector } from '../vector/SortedVector';
import { ArrayDataFrame } from './ArrayDataFrame';
import { getFieldTitle } from '../field/fieldState';
import { getFieldDisplayName } from '../field/fieldState';
function convertTableToDataFrame(table: TableData): DataFrame {
const fields = table.columns.map(c => {
@@ -71,13 +72,13 @@ function convertTimeSeriesToDataFrame(timeSeries: TimeSeries): DataFrame {
const fields = [
{
name: 'Time',
name: TIME_SERIES_TIME_FIELD_NAME,
type: FieldType.time,
config: {},
values: new ArrayVector<number>(times),
},
{
name: TIME_SERIES_FIELD_NAME,
name: TIME_SERIES_VALUE_FIELD_NAME,
type: FieldType.number,
config: {
unit: timeSeries.unit,
@@ -88,7 +89,7 @@ function convertTimeSeriesToDataFrame(timeSeries: TimeSeries): DataFrame {
];
if (timeSeries.title) {
(fields[1].config as FieldConfig).title = timeSeries.title;
(fields[1].config as FieldConfig).displayName = timeSeries.title;
}
return {
@@ -118,13 +119,13 @@ function convertGraphSeriesToDataFrame(graphSeries: GraphSeriesXY): DataFrame {
name: graphSeries.label,
fields: [
{
name: graphSeries.label || TIME_SERIES_FIELD_NAME,
name: graphSeries.label || TIME_SERIES_VALUE_FIELD_NAME,
type: FieldType.number,
config: {},
values: x,
},
{
name: 'Time',
name: TIME_SERIES_TIME_FIELD_NAME,
type: FieldType.time,
config: {
unit: 'dateTimeAsIso',
@@ -332,7 +333,7 @@ export const toLegacyResponseData = (frame: DataFrame): TimeSeries | TableData =
return {
alias: frame.name,
target: getFieldTitle(valueField, frame),
target: getFieldDisplayName(valueField, frame),
datapoints: rows,
unit: fields[0].config ? fields[0].config.unit : undefined,
refId: frame.refId,

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