Commit Graph

168 Commits

Author SHA1 Message Date
Tobias Skarhed
9a67e94618
StatPanel: Return base color when there is no value set (#22690) 2020-03-10 16:57:23 +01:00
Shavonn Brown
65370c5443
on update for checkbox and switch (#22656)
* on update for checkbox and switch

* use ? instead
2020-03-10 08:45:08 -04:00
Torkel Ödegaard
5d8fc6a1a9
StatPanel: Fixes base color is being used for null values (#22646)
* StatPanel: Fixed color for null values

* StatPanels: Show base value for null values
2020-03-09 17:00:25 +01:00
Dominik Prokop
9d858220ce
FieldOverrides: Add value mappings editor to standard config properties registry (#22648) 2020-03-09 15:09:32 +01:00
Shavonn Brown
b27985ef38
Azure Monitor: config editor updates, update sameas switch, fix test snaps (#22554)
* azure monitor config editor updates, do not show helper for sameas unless just switched, not create

* update snapshots
2020-03-04 09:11:11 -05:00
Emil Tullstedt
3c6a7a51bf
Logs: Improve log level guess (#22094)
Fixes #22075
2020-03-04 09:48:21 +01:00
Ryan McKinley
f09ee3d8c2
ArrowDataFrame: allow empty results (#22524) 2020-03-02 23:56:01 -08:00
Torkel Ödegaard
c002a39456
NewPanelEditor: Angular panel options, and angular component state to redux major change (#22448)
* NewPanelEdit: Added angular options to new panel editor and started looking and angular component state

* Moved angular component state to redux

* Close to working 100%

* Think everything is working

* AlertTab: Alert tab now gets angularComponent from redux

* Fixed panel menu access to angular panel component

* Added new tests

* Fixed unit test

* Fixed strict null errors

* Fixed typescript issues

* fixed issues
2020-02-28 11:04:40 +01:00
Steven Vachon
2b6a88bf59
Optimized package.json files (#22475)
* Used repository shortcut syntax where possible
* Added repository directories for monorepo packages
* Alphabetically sorted npm scripts
2020-02-27 12:00:36 -05:00
Marcus Andersson
e2038e0614
Docs: adding API reference documentation support for the packages libraries. (#21931)
* trying out api-extractor.

* works with our setup of build.

* wip.

* changed the packages so it works better with the api-extractor.

* Changes to make the api-extractor to work.

* cleaned up the api-extractor config files.

* added some more documentation.

* added tsdoc-metadata to gitignore.

* removed the generated docs (will do that in another PR).

* added execute permission to script for generating dosc.

* added so we will push generated docs to branch.

* will clean packages_api on abort.

* Fixed failing tests.

* fixed formatting issue with typedoc comment.

* temporarily disabled tslint rules about namespace until https://github.com/microsoft/rushstack/issues/1029 is resolved

* temporary enabled bable namespaces.

* updated build script.

* updated script.

* updated script with some colors.

* changed to camelCase.

* removed spacing.

* Starting to add documentation guidelines.

* added examples headline.

* added parameters and return values.

* Fixed merge error.

* changed so we use the eslint ignore syntax.

* changed to correct eslint ingnore comment.

* fixed some spelling errors reported by codespell.

* added script to generate docs in current folder.

* lerna bootstrap.

* removed file that should be ignored.

* updated locKFILE.

* referenced the code comments guidelines.

* updated packages.

* updated deps.
2020-02-25 13:59:11 +01:00
Steven Vachon
7bf3f0b9c1
grafana/data: runtime dependencies moved from devDependencies (#22283)
... so that they get installed within consumer projects
2020-02-19 14:40:41 +01:00
Torkel Ödegaard
c162af8142
FieldOverrides: Fix issue with same series name for every display value (#22234)
* fieldOverrides: Fix issue with same series name for every display value

* Added unit test
2020-02-16 14:56:24 +01:00
Ryan McKinley
cc589a0d76
Inspector: find the datasource from the refId, not the metadata (#22231)
* remove datasource

* get datasoure from refId

* metrictank does not need to say the datasource
2020-02-16 05:12:40 -08:00
Ryan McKinley
2c9b321c48
FieldOverides: apply field overrides based on configuration (#22047)
* test apply

* test apply

* Move standard field config editor registry to grafana-data

* merge master

* Apply field config defaults

* Make field and dataFrameIndex optional on on FieldOverrideContext

* Apply custom field config overrides

* Gauge - make sure thresholds are set

* Move series and field scoped vars calculation

* Enable template variables interpolation in title fields

* Expose standars field configs from grafana ui via function

* Add missing option to the config for the min value to be derived from field values

* Fix ts issue

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-02-13 21:37:24 +01:00
Torkel Ödegaard
df1d43167a
NewPanelEditor: Panel editor tabs in state (url) (#22102)
* tabs & style tweaks

* Styling updates

* ok look

* tweaks

* Updated snapshots

* Moved transforms

* Updated
2020-02-12 10:42:57 +01:00
Dominik Prokop
e612d7a2f9
New panel edit: data links edit (#22077)
* Move data links suggestions to grafana-data

* Data links -  field config and overrides

* Lint

* Fix test

* Add variable suggestions  to field override context

* Revert "Move data links suggestions to grafana-data"

This reverts commit 5d8d01a65e.

* Move FieldConfigEditor to core
2020-02-11 13:48:36 +01:00
Dominik Prokop
1728742096 New panel edit: field overrides ui (#22036)
* Add title editor

* Wip

* FIeld config overrides UI (v1)

* Basic property override editors

* name to prop

* use prop not path

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-02-09 14:34:42 +01:00
Torkel Ödegaard
34c397002c PanelChrome: Use react Panel Header for angular panels. (#21265)
* WIP: Angular panel chrome, this is going to be tricky

* AngularPanelChrome: initial render works

* Options are showing up

* viz options working

* Fixed singlestat background

* AngularPanels: Fixed alert tab

* Removed anuglar loading spinner

* Dashboard: Refactor dashboard reducer & actions

* Dashboard: minor refactoring

* PanelChrome: loading state moved to header

* Subscribe to render events to solve title update issue

* Time info and query errors now works

* PanelHeader: unifying angular and react behavior

* added getPanelMenu test

* Scrollable now works again

* Various fixes

* Making stuff work

* seperate event emitter for angular

* Fixed issue sending updated dimensions to angular panel

* Minor tweaks

* Fixed tests

* Alerting: alert state now works

* Fixed unit tests

* Fixed a few null check errors

* Simplified events handling

* Fixed strict null checks
2020-02-09 10:53:34 +01:00
Ryan McKinley
66191f946d New Editor: use unit picker (#22033)
* use unit picker

* export correct file name

* override is the same
2020-02-09 10:29:10 +01:00
Ryan McKinley
da395729c3 FieldEditor: extendable FieldConfig UI (#21882)
* initial POC

* fix import

* field config editor in the sidebar

* field config editor in the sidebar

* field config editor in the sidebar

* sidebar

* include threshold in sidebar

* include threshold in sidebar

* include threshold in sidebar

* init to empty threshold

* merge

* Make sure editor is fully rendered when page is refreshed

* use scrollbars

* add matcher UI folder

* remove

* Field options basic editors

* Removed deebugger

* Make number field editor controlled

* Update public/app/features/dashboard/state/PanelModel.ts

* Update public/app/plugins/panel/gauge/GaugePanel.tsx

* Ready for production

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-02-08 18:29:09 +01:00
Ryan McKinley
d0470409d6
Chore: export arrow dataframe utilities (#22016)
* export arrow dataframe

* use the same table
2020-02-08 09:50:35 +01:00
Steven Vachon
f48169633c
TSLint → ESLint (#21006)
* Alphabetized tslint and tsconfig files

* Optimized tsconfig files

* Optimized editorconfig & prettier config files

… to reduce redundancy

* Switched to @grafana/tsconfig

… and:
* de-duped options
* removed options with default values

* Fixed nasty issue with types for nested slate-react

* Replaced TSLint with ESLint

* TSLint disables → ESLint disables

… also JSHint removals, which haven’t had an affect since it was replaced with TSLint.

* Compliances for ESLint, Prettier and TypeScript

* Updated lockfile
2020-02-08 02:40:04 +01:00
Lukas Siatka
df48d1c19f
Explore: Adds Loki explore query editor (#21497)
* Explore: updates grafana-data explore query field props with explore mode

* Explore: updates query row to pass down explore mode to query fields

* Explore: adds LokiExploreQueryEditor

* Explore: updates loki query field form to render children

* Explore: adds loki explore extra field component

* Explore: adds extra field element to loki query field form

* Explore: updates loki explore query editor to use extra field element

* Explore: moves ExploreMode to grafana-data

* Explore: updates query row limit string

* Explore: adds maxLines to DataQuery

* Explore: adds maxLines to loki datasource runRangeQueryWithFallback

* Explore: adds onChangeQueryLimit to LokiExploreQueryEditor

* Explore: updates loki explore query editor to render extra field only in logs mode

* Explore: fixes query limits for live and legacy queries

* Explore: fixes result processor max lines limit in get logs result

* Explore: fixes Loki datasource limit test

* Explore: removes unnecessary ExploreMode from Loki language provider

* Explore: fixes formatting

* Explore: updates grafana-data datasource types - replaces strings with explore mode enum

* Explore: updates loki explore query field props to take ReactNode

* Explore: updates the way we calculate loki query lines limit to fall back to 0 lines on negative or invalid input instead of datasource maxLines

* Explore: updates result processor get logs result method to avoid counting invalid/negative line limits

* Explore: updates loki result transformer to process only an appropriate slice of a result instead of an entire one

* Explore: adds a method for query limit preprocessing/mapping

* Explore: updates loki datasource run range query with fallback method to use options.maxDataPoints in dashboards

* Explore: removes unnecessary maxlineslimt from getLogsResult in resultProcessor

* Explore: moves line limit to metadata

* Explore: adds an ability to specify input type of extra field

* Explore: updates LokiExploreQueryEditor - adds an input type

* Explore: updates LokiExploreQueryEditor to run queries when maxLines is positive

* Explore: fixes failing import of ExploreMode

* Explore: fixes reducers test imports formatting

* Explore: updates Loki extra field with min value set to 0

* Explore: exports LokiExploreExtraFieldProps

* Explore: adds render test of LokiExploreQueryEditor

* Explore: adds LokiExploreQueryEditor snapshot

* Explore: updates LokiExploreQueryEditor onChangeQueryLimit method to prevent it from running when query input is empty - fixes cheatsheet display issue

* Explore: updates Loki editor snapshots

* Explore: fixes typo in test set name in LokiExploreQueryEditor

* Explore: adds a render test of LokiExploreExtraField

* Explore: fixes typo in LokiExploreQueryEditor

* Explore: updates LokiExploreQueryEditor snapshot due to timezone issues

* Explore: updates LokiExploreExtraField to export both functional component and a version using memo

* Explore: updates LokiExploreQueryEditor to export both functional component and memoized function

* Explore: updates LokiExploreQueryEditor - removes unnecessary react fragment

* Explore: updates LokiExploreQueryEditor snapshot

* Explore: adds LokiExploreQueryEditor tests for different explore mode cases

* Explore: fixes Loki datasource and result transformer

* Explore: updates LokiExploreQueryEditor snapshot

* Explore: updates LokiExploreQueryEditor tests and test setup

* Explore: updates LokiExploreQueryEditor - refactors component

* Explore: updates LokiExploreQueryEditor to use default import from LokiExploreExtraField

* Explore: updates LokiExploreQueryEditor snapshot

* Explore: fixes formatting

* Explore: updates LokiExploreQueryEditor max lines change

* Explore: updates LokiExploreQueryEditor tests checking ExtraFieldElement

* Explore: adds mock loki datasource to LokiExploreQueryEditor

* Explore: updates LokiExploreQueryEditor test mock - adds language provider

* Explore: updates LokiExploreQueryEditor snapshot

* Explore: updates Loki ResultTransformer to filter out rows on limit - logic to be moved into a component with new form styles

* Explore: updates LokiExploreQueryEditor tests
2020-02-06 12:34:52 +00:00
Ryan McKinley
c140d110c6
grafana/data: Remove unused PanelSize interface (#21877) 2020-02-03 08:14:34 +01:00
Ryan McKinley
c15ddc295c
DataFrame: update golden test files (#21808) 2020-01-29 08:30:03 -08:00
Marcus Andersson
cab082438e
Fix: prevents the BarGauge from exploding when the datasource returns empty result. (#21791)
* Fixed issue where gauge throw error on empty result.

* Some refactorings to improve the code.

* Added some tests to make sure this doesn't happen again.
2020-01-29 11:40:30 +01:00
Ryan McKinley
67c5531961 grafana/data: Add type for secure json in DataSourceAPI (#21772) 2020-01-28 07:13:20 +01:00
Andrej Ocenas
0fda3c4f44
Explore: Fix context view in logs, where some rows may have been filtered out. (#21729)
* Fix timestamp formats and use uid to filter context rows

* Remove timestamps from tests
2020-01-26 23:13:56 +01:00
Ivana Huckova
e75840737e
Loki: Fix Loki with repeated panels and interpolation for Explore (#21685) 2020-01-24 09:50:09 +01:00
Ivana Huckova
6feb4a3221
Explore: Fix log level color and add tests (#21646) 2020-01-21 17:20:22 +01:00
Leonard Gram
4a1f993fd1
next version 6.7.0 (#21617)
* next version 6.7.0

* updates grafana/toolkit and co

* Verison: manually fixed version
2020-01-21 15:15:38 +01:00
kay delaney
cf2cc71393 Chore: Remove angular dependency from backendSrv (#20999)
* Chore: Remove angular dependency from backendSrv

* Refactor: Naive soultion for logging out unauthorized users

* Refactor: Restructures to different streams

* Refactor: Restructures datasourceRequest

* Refactor: Flipped back if statement

* Refactor: Extracted getFromFetchStream

* Refactor: Extracts toFailureStream operation

* Refactor: Fixes issue when options.params contains arrays

* Refactor: Fixes broken test (but we need a lot more)

* Refactor: Adds explaining comments

* Refactor: Adds latest RxJs version so cancellations work

* Refactor: Cleans up the takeUntil code

* Refactor: Adds tests for request function

* Refactor: Separates into smaller functions

* Refactor: Adds last error tests

* Started to changed so we require getBackendSrv from the @grafana-runtime when applicable.

* Using the getBackendSrv from @grafana/runtime.

* Changed so we use the getBackendSrv from the @grafana-runtime when possible.

* Fixed so Server Admin -> Orgs works again.

* Removed unused dependency.

* Fixed digest issues on the Server Admin -> Users page.

* Fix: Fixes digest problems in Playlists

* Fix: Fixes digest issues in VersionHistory

* Tests: Fixes broken tests

* Fix: Fixes digest issues in Alerting => Notification channels

* Fixed digest issues on the Intive page.

* Fixed so we run digest after password reset email sent.

* Fixed digest issue when trying to sign up account.

* Fixed so the Server Admin -> Edit Org works with backendSrv

* Fixed so Server Admin -> Users works with backend srv.

* Fixed digest issues in Server Admin -> Orgs

* Fix: Fixes digest issues in DashList plugin

* Fixed digest issues on Server Admin -> users.

* Fix: Fixes digest issues with Snapshots

* Fixed digest issue when deleting a user.

* Fix: Fixes digest issues with dashLink

* Chore: Changes RxJs version to 6.5.4 which includes the same cancellation fix

* Fix: Fixes digest issue when toggling folder in manage dashboards

* Fix: Fixes bug in executeInOrder

* Fix: Fixes digest issue with CreateFolderCtrl and FolderDashboardsCtrl

* Fix: Fixes tslint error in test

* Refactor: Changes default behaviour for emitted messages as before migration

* Fix: Fixes various digest issues when saving, starring or deleting dashboards

* Fix: Fixes digest issues with FolderPickerCtrl

* Fixed digest issue.

* Fixed digest issues.

* Fixed issues with angular digest.

* Removed the this.digest pattern.

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>
2020-01-21 10:08:07 +01:00
Ivana Huckova
c738a889ed
Explore: Context tooltip to copy labels and values from graph (#21405) 2020-01-17 15:52:08 +01:00
Ryan McKinley
29e9b1f774
DataFrames: add arrow test and capture metadata parsing errors (#21524) 2020-01-15 14:33:56 -08:00
Ryan McKinley
76ba2db4e7
DataLinks: allow using values from other fields in the same row (#21478) 2020-01-15 12:02:52 -08:00
Dominik Prokop
3f957a3735
grafana/data: Update plugin config page typings (BREAKING) (#21503)
* Change typyings of plugins config pages

* Update plugin config page types of core plugins
2020-01-15 19:42:44 +01:00
Shavonn Brown
a7509d2ca0
More datasource funcs poc (#21047)
* remove anon funcs, removed options from state, removed update method, static selects as constants

* cancellable promise

* cancel promise on unmount

* use new datasource funcs for dryer component

* event handler funcs

* updated funcs and moved to utils, updating config editors

* S has no keys. never will never work

* remove report json

* update azure snapshot

* DataSourceSettings keyof

* rename reset funcs
2020-01-10 14:26:33 -05:00
David
a3c99f4871
Logs: Fix parsing for logfmt fields that have parens (#21407)
* Logs: Fix parsing for logfmt fields that have parens

- added `()`, `[]`, and `{}` to be allowed in logfmt field names

* Fix matcher
2020-01-10 13:53:31 +01:00
Ryan McKinley
bf18704490
Inspector: support custom metadata display (#20854) 2020-01-09 22:59:23 -08:00
Ryan McKinley
f7053e19d2
TimeZones: fix utc test (#21393) 2020-01-07 14:01:06 -08:00
Ryan McKinley
1aa52f259c
Arrow: don't export arrow... breaking phantomjs e2e test (#21331) 2020-01-03 10:00:30 -08:00
Ryan McKinley
e550572033
DataFrame: round trip metadata to arrow Table (#21277) 2020-01-03 08:12:19 -08:00
Ryan McKinley
e1acc77297
@grafana/data: use timeZone parameter rather than isUtc (#21276) 2020-01-02 08:11:28 -08:00
Ryan McKinley
c1b707874d
Units: support dynamic count and currency units (#21279) 2020-01-02 07:46:49 -08:00
Ryan McKinley
d9e9843a10
FieldConfig: add thresholds and color modes (#21273) 2019-12-28 17:32:58 -08:00
Torkel Ödegaard
45b7de1910
Explore: Moves PromContext from query level to DataQueryRequest level (#21260)
Closes #19598

Fixes bug introduced recently where the new PromQueryEditor did not preserve
the PromContext.Explore set on the query model by PromQueryField which caused
the table to be empty for Prometheus in explore.
2019-12-27 09:11:16 +01:00
Ryan McKinley
af2cd77655
Units: support farenheit (existing misspelling) (#21249) 2019-12-23 22:05:26 -08:00
Torkel Ödegaard
3347b45a95
Table: Component progress & custom FieldConfig options (#21231)
* Table: Set & use field display processor

* Use applyFieldOverrides outside in story instead

* Change types a bit

* Table: Move to flexible layout

* Simplest possible custom field option

* Skip default column

* Added textAlign

* Explore: Set display processor for table data frame

* Fixed storybook

* Refactoring

* Progress on cell display mode

* Major progress

* Progress & refactoring

* Fixes

* Updated tests

* Added more tests

* Table: Progress on cell style customization

* Restored testdata random walk table scenario

* put back unrelated change

* remove unused things

* Updated table story

* Renamed property

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2019-12-23 06:22:54 +01:00
Ryan McKinley
8d537b7afb Chore: remove StreamHandler and DataStreamState (#21234)
* remove StreamHandler

* remove DataStreamState
2019-12-23 06:16:04 +01:00
Ryan McKinley
b8c0924ab1
NewsPanel: add news as a builtin panel (#21128) 2019-12-20 10:47:45 -08:00