Commit Graph

91 Commits

Author SHA1 Message Date
kay delaney
e0a2d4beac Grafana/Loki: Adds support for new Loki endpoints and metrics (#20158)
* Grafana/Loki: Adds support for new Loki endpoints and metrics

* Adds `/loki/` prefix to new loki endpoints and updates response interfaces

* Improved legacy support

* Removed changes related to plugin.json and added Loki-specific hacks

* Fixes live streaming for legacy loki datasources
2019-11-15 16:38:25 +01:00
kay delaney
f1c8330877
Chore: Upgrade typescript to 3.7 (#20375)
* Chore: Upgrade typescript to 3.7
2019-11-15 09:18:09 +00:00
Šimon Podlipský
4260cd548f DataFrame processing: Require table rows to be array (#20357) 2019-11-13 14:30:08 +01:00
Henrique Oliveira
9e0499000c ValueFormats: fix description for dateTimeAsUS (#20355) 2019-11-13 13:16:31 +01:00
Torkel Ödegaard
b756aa0bb1
Prometheus: Adds hint support to dashboard and fixes prometheus link in query editor (#20275)
* Prometheus: moved hints into query editor, and fixed missing refIds in responses

* Minor fix

* Removed unused type import
2019-11-11 16:47:17 +01:00
Ryan McKinley
8430a182ef
Transformations: filter results by refId (#20261) 2019-11-08 11:47:35 -08:00
Ryan McKinley
818aa8eefa
DataFrame: move labels to field (#19926) 2019-11-07 07:50:45 -08:00
Dominik Prokop
225ecd680a
Explore: Configure explore series colours via field config (#20239) 2019-11-07 14:58:50 +01:00
Hugo Häggmark
e66fc3d47a
ReactPanels: Adds Explore menu item (#20236)
* Fix: Adds Explore menuitem to React Panels
Fixes #19865

* Refactor: Adds CMD|CTRL+click to Explore menu item
2019-11-07 13:49:45 +01:00
Dominik Prokop
96dbed5efc
Graph: introduce Tooltip to React graph (#20046) 2019-11-07 12:37:46 +01:00
Ryan McKinley
8484b43001
DisplayProcessor: improve time field support (#20223) 2019-11-07 00:08:25 -08:00
Andrej Ocenas
0a78652404
Explore: Add custom DataLinks on datasource level for Loki (#20060)
Adds a config section with derived fields which is a config that allows you to create a new field based on a regex matcher run on a log message create DataLink to it which is the clickable in the log detail.
2019-11-06 16:15:08 +01:00
David
9507eda9d1
QueryField: Prevent query runs on blur in Explore (#20180)
As discussed in a UX feedback session, it's annoying that queries are
automatically executed in Explore. This change adds props to override
the blur behavior.

- add `onBlur` to Explore query field props
- Explore's query row will pass down an empty function for onBlur to the
query fields
- pass onBlur through to the QueryField component for Loki and
Prometheus
- add test to QueryField to make sure if onBlur is specified, the
onRunQuery is not executed
2019-11-06 15:08:30 +00:00
Dominik Prokop
9117fab43a
grafana/data: Make display processor work with time fields (#20174)
* Enable display processor on time fields

* Export default date time formats from grafana/data

* Add data time formatter for timezone

* Move date format from display process options to field config
2019-11-06 11:03:43 +01:00
lzd
31e7e35bff Datasource/Elasticsearch: Fix logs which were displayed with incorrect timestamp in Explore logs tab (#20009) 2019-11-06 07:42:36 +00:00
Ryan McKinley
92ab4d80f0
Error Handling: support errors and data in a response (#20169) 2019-11-05 15:20:04 -08:00
Ryan McKinley
4acceff0de Units: Add milli/microSievert, milli/microSievert/h and pixels (#20144)
* add more radiation units

* add pixels
2019-11-01 15:33:58 -04:00
Ivana Huckova
a5e8e0e291 Explore: UI change for log row details (#20034)
Add LogDetail section that is shown when log line is clicked and expanded. Contains labels/fields and actions to show stats and add/remove label filter.
2019-11-01 10:01:00 +01:00
Dominik Prokop
9b7748ec13
Chore: Reorg packages (#20111)
Primarily- moving majority of the types and utils from @grafana/ui to @grafana/data

* Move types from grafana-ui to grafana-data

* Move valueFormats to grafana-data

* Move utils from grafana-ui to grafana-data

* Update imports in grafana-ui

* revert data's tsconfig change

* Update imports in grafana-runtime

* Fix import paths in grafana-ui

* Move rxjs to devDeps

* Core import updates batch 1

* Import updates batch 2

* Imports fix batch 3

* Imports fixes batch i don't know

* Fix imorts in grafana-toolkit

* Fix imports after master merge
2019-10-31 10:48:05 +01:00
Ryan McKinley
9e004b9211
DataLinks: Implement javascript callback (#19851) 2019-10-28 04:08:19 -07:00
Kyle Brandt
1ffcb002db DataFrame: guess number field when on NaN (#19833) 2019-10-16 15:13:27 +02:00
Torkel Ödegaard
b37444f3ea
InputDataSource: Fixed issue with config editor (#19818) 2019-10-16 12:58:49 +02:00
kay delaney
99411bf37a
Types: Adds type safety to appEvents (#19418)
* Types: Add type safety to appEvents
2019-10-14 09:27:47 +01:00
Torkel Ödegaard
22fbaa7ac8
Singlestat: Fixed issue with mapping null to text (#19689) 2019-10-09 09:00:39 +02:00
Hugo Häggmark
13ffb03b57
Chore: Fixes lines that exceeded 150 chars (#19694)
(cherry picked from commit c29b3e2433)
2019-10-08 03:35:44 -07:00
Marcus Efraimsson
0ad2242fb8
Table: Proper handling of json data with dataframes (#19596)
When using Raw Document query with Elasticsearch there's a special 
response from datasource that is used which includes a type field with 
the value json. In the table panel there is a transformation for JSON 
data which up until this fix didn't work at all due to the new data 
structure we call data frames.

Co-Authored-By: Hugo Häggmark <hugo.haggmark@grafana.com>

Fixes #19531
2019-10-08 09:33:33 +02:00
Torkel Ödegaard
99c1c16a04
DataFormats: When transforming TableModel -> DataFrame -> Table preserve the type attribute (#19621) 2019-10-07 09:06:25 +02:00
Andrej Ocenas
0490dbb88d
Explore: Generate log row uid (#18994) 2019-09-30 14:44:15 +02:00
Hugo Häggmark
889f8e3131 PanelData: Adds timeRange prop to PanelData (#19361)
* Refactor: Adds newTimeRange property to PanelData

* Refactor: Handles timeRange prop after requests

* Refactor: Makes timeRange mandatory

* Refactor: Adds DefaultTimeRange
2019-09-25 11:19:17 +02:00
Peter Holmberg
bb0a438705
grafana/ui: Add Timezone picker (#19364)
* first things and story

* fixed data structure and fixed picker

* remove console log

* move variables into global scope
2019-09-24 15:34:12 +02:00
kay delaney
c93325cdd8
Chore: Bump typescript to version 3.6.3 (#19308) 2019-09-24 10:40:16 +01:00
Ryan McKinley
6787e7b5ab
Vector: remove toJSON() from interface (#19254) 2019-09-20 08:22:33 -07:00
Brenda Harjala
c9e566b156 Docs: Minor edits to the README and several md files (#19238)
* Update README.md

Capitalized the G and S in "Getting Started," and moved "guide" to match the section title in the docs.

* Fixed sentence structure. Changed "download" to "grafana.com/get" and changed "get" to "download".

* Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)

*  Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)

* Docs: Replace "datasources" with "data sources" (#19111)
2019-09-20 00:04:56 +02:00
Dominik Prokop
5c0f424d1b
grafana/data: Reorganise code (#19136)
* Organise data frame and vectors code

* Organise transformations

* Move dataframe utils to dataframe dir

* Organise datetime utils

* Organise text utils

* Organise logs utils

* Revert "Organise logs utils"

This reverts commit c24115c755.

* registry -> Registry

* Transformations reorg
2019-09-17 08:23:47 +02:00
Dominik Prokop
1a71501440
Chore: cross-package security bumps (#19131)
* Bump lodash to 4.17.15

* Bump pretty-format to 24.9.0
2019-09-16 15:50:15 +02:00
Torkel Ödegaard
e968a2aa86
DataFrame: Fixes to dealing with empty results (#19119)
* DataFrame: Fixes to dealing with empty results

* review feedback fixes
2019-09-16 13:02:26 +02:00
Torkel Ödegaard
fd21e0ba14
DataLinks: enable access to labels & field names (#18918)
* POC: trying to see if there is a way to support objects in template interpolations

* Added support for nested objects, and arrays

* Added accessor cache

* fixed unit tests

* First take

* Use links supplier in graph

* Add field's index to cache items

* Get field index from field cache

* CHange FiledCacheItem to FieldWithIndex

* Add refId to TimeSeries class

* Make field link supplier work with _series, _field and _value vars

* use field link supplier in graph

* Fix yaxis settings

* Update dashboard schema version and add migration for data links variables

* Update snapshots

* Update build in data link variables

* FieldCache - idx -> index

* Add current query results to panel editor

* WIP Updated data links dropdown to display new variables

* Fix build

* Update variables syntac in field display, update migration

* Field links supplier: review updates

* Add data frame view and field name to TimeSeries for later inspection

* Retrieve data frame from TimeSeries when clicking on plot graph

* Use data frame's index instead of view

* Retrieve data frame by index instead of view on TimeSeries

* Update data links prism regex

* Fix typecheck

* Add value variables to suggestions list

* UI update

* Rename field to config in DisplayProcessorOptions

* Proces single value of a field instead of entire data frame

* Updated font size from 10px to 12px for auto complete

* Replace fieldName with fieldIndex in TimeSeries

* Don't use .entries() for iterating in field cache

* Don't use FieldCache when retrieving field for datalinks in graph

* Add value calculation variable to data links (#19031)

* Add support for labels with dots in the name (#19033)

* Docs update

* Use field name instead of removed series.fieldName

* Add test dashboard

* Typos fix

* Make visualization tab subscribe to query results

* Added tags to dashboard so it shows up in lists

* minor docs fix

* Update singlestat-ish variables suggestions to contain series variables

* Decrease suggestions update debounce

* Enable whitespace characters(new line, space) in links and strip them when processing the data link

* minor data links UI update

* DataLinks: Add __from and __to variables suggestions to data links (#19093)

* Add from and to variables suggestions to data links

* Update docs

* UI update and added info text

* Change ESC global bind to bind (doesn't capture ESC on input)

* Close datalinks suggestions on ESC

* Remove unnecessary fragment
2019-09-13 16:38:21 +02:00
Torkel Ödegaard
140ecbcf79
QueryProcessing: Observable query interface and RxJS for query & stream processing (#18899)
* I needed to learn some rxjs and understand this more, so just playing around

* Updated

* Removed all the complete calls

* Refactoring

* StreamHandler -> observable start

* progress

* simple singal works

* Handle update time range

* added error handling

* wrap old function

* minor changes

* handle data format in the subscribe function

* Use replay subject to return last value to subscribers

* Set loading state after no response in 50ms

* added missing file

* updated comment

* Added cancelation of network requests

* runRequest: Added unit test scenario framework

* Progress on tests

* minor refactor of unit tests

* updated test

* removed some old code

* Shared queries work again, and also became so much simplier

* unified query and observe methods

* implict any fix

* Fixed closed subject issue

* removed comment

* Use last returned data for loading state

* WIP: Explore to runRequest makover step1

* Minor progress

* Minor progress on explore and runRequest

* minor progress

* Things are starting to work in explore

* Updated prometheus to use new observable query response, greatly simplified code

* Revert refId change

* Found better solution for key/refId/requestId problem

* use observable with loki

* tests compile

* fix loki query prep

* Explore: correct first response handling

* Refactorings

* Refactoring

* Explore: Fixes LoadingState and GraphResults between runs (#18986)

* Refactor: Adds state to DataQueryResponse

* Fix: Fixes so we do not empty results before new data arrives
Fixes: #17409

* Transformations work

* observable test data

* remove single() from loki promise

* Fixed comment

* Explore: Fixes failing Loki and Prometheus unit tests (#18995)

* Tests: Makes datasource tests work again

* Fix: Fixes loki datasource so highligthing works

* Chore: Runs Prettier

* Fixed query runner tests

* Delay loading state indication to 200ms

* Fixed test

* fixed unit tests

* Clear cached calcs

* Fixed bug getProcesedDataFrames

* Fix the correct test is a better idea

* Fix: Fixes so queries in Explore are only run if Graph/Table is shown (#19000)

* Fix: Fixes so queries in Explore are only run if Graph/Table is shown
Fixes: #18618

* Refactor: Removes unnecessary condition

* PanelData: provide legacy data only when needed  (#19018)

* no legacy

* invert logic... now compiles

* merge getQueryResponseData and getDataRaw

* update comment about query editor

* use single getData() function

* only send legacy when it is used in explore

* pre process rather than post process

* pre process rather than post process

* Minor refactoring

* Add missing tags to test datasource response

* MixedDatasource: Adds query observable pattern to MixedDatasource (#19037)

* start mixed datasource

* Refactor: Refactors into observable parttern

* Tests: Fixes tests

* Tests: Removes console.log

* Refactor: Adds unique requestId
2019-09-12 17:28:46 +02:00
Dominik Prokop
c2dea633e6
Packages: update versioning and release process (#18195) 2019-09-12 08:00:31 +02:00
Torkel Ödegaard
7ca77b8a98
Calcs: Fixed calc reducer (#18998) 2019-09-11 09:02:33 +02:00
Peter Holmberg
196f8503a8
grafana/ui: Add Time of day picker (#18894)
* Adding DashboardPicker component

* fix prop names

* fix prop names pt2

* add component and modify utils

* add showHour prop

* add minuteStep to TimeOfDayPicker, add value to DashboardPicker

* fix for dashboard picker, missed adding file

* Adding story

* add another story for hiding hour and style fixes

* fix these generated files

* fixes after review

* rename current value

* fix type issue on onChange

* fix story
2019-09-11 09:00:14 +02:00
Ryan McKinley
7520ebadac
Refactor: move ScopedVars to grafana/data (#18992) 2019-09-10 12:06:01 -07:00
Andrej Ocenas
0e3e874eee
Annotations: Add annotations support to Loki (#18949) 2019-09-10 11:04:44 +02:00
Ryan McKinley
7d32caeac2 Transformers: configure result transformations after query(alpha) (#18740) 2019-09-09 08:58:57 +02:00
Dominik Prokop
5f1bb3947c
Storybook: fix type error (#18934)
* Use window.setTimeout/Interval instead of nodejs versions

* Remove awesome-typescript-loader dependency
2019-09-06 10:23:24 +02:00
kay delaney
7985aa1e57
Performance/Webpack: Introduces more aggressive code-splitting and other perf improvements (#18544)
* Performance/Webpack: Introduces more aggressive code-splitting and other perf improvements
- Introduces dynamic imports for built-in plugins
- Uses dynamic imports for various packages (rst2html, brace)
- Introduces route-based dynamic imports
- Splits angular and moment into separate bundles
2019-09-03 09:29:02 +01:00
Ryan McKinley
c777301535 DataFrame: split DataFrameHelper into MutableDataFrame and FieldCache (#18795)
* add appending utility

* add appending utility

* update comment

* rename to mutable

* move mutable functions out of DataFrameHelper

* move mutable functions out of DataFrameHelper

* move mutable functions out of DataFrameHelper

* turn DataFrameHelper into FieldCache

* guess time from name

* graph the numbers

* return the timeField, not just the index

* just warn on duplicate field names

* only use a parser if the input is a string

* append init all fields to the same length

* typo

* only parse string if value is a string

* DataFrame: test fixes

* Switch to null for missing values

* Fixed tests
2019-09-01 14:44:22 +02:00
Torkel Ödegaard
8e9cb5c81a
Explore: Fixes query hint issues (#18803)
* Explore: clear results when you change datasource

* Explore: Clear results on data source change, and fix query hints issue

* Clear results on clear all

* Prometheus: Update logic of when to re-check query hints
2019-08-30 15:22:36 +02:00
Ryan McKinley
5fcbc33710 @grafana/data: Matchers and Transforms (#16756)
* add extension framework

* add filter transformer

* more logging

* adding more tests

* make stats an extension

* make stats an extension

* test registry init

* first get a function, then call it

* move files to data package

* not used

* update to columnar

* Add more tests for nameMatcher

* Fix invert predicate

* add fluent API

* remove calc snapshot

* split Field matchers and Frame matchers

* split filter transformers

* Fix typo
2019-08-28 13:37:46 +02:00
Ryan McKinley
ff6b8c5adc DataLinks: enable data links in Gauge, BarGauge and SingleStat2 panel (#18605)
* datalink on field

* add dataFrame to view

* Use scoped variables to pass series name and value time to data links interpolation

* Use scoped variables to pass series name and value time to data links interpolation

* Enable value specific variable suggestions when Gauge is displaying values

* Fix prettier

* Add basic context menu with data links to GaugePanel

* Fix incorrect import in grafana/ui

* Add custom cursor indicating datalinks available via context menu (in Gauge only now)

* Add data links to SingleStat2

* Minor refactor

* Retrieve data links in a lazy way

* Update test to respect links retrieval being lazy

* delay link creation

* cleanup

* Add origin to LinkModel and introduce field & panel links suppliers

* Add value time and series name field link supplier

* Remove links prop from visualization and implement common UI for data links context menu

* Update snapshot

* Rename className prop to clickTargetClassName

* Simplify condition

* Updated drilldown dashboard and minor changes

* Use class name an onClick handler on the top level dom element in visualization

* Enable series name interpolation when presented value is a calculation
2019-08-28 08:50:43 +02:00