156 Commits

Author SHA1 Message Date
d9414b4693 NewPanelEditor: Making angular panels reuse data and render on edit mode enter (#22229)
* First stab at angular panels load in new edit

* Things are working
2020-02-17 07:28:53 +01:00
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
2a44cbd137 AngularPanels: Check for digest cycle on root scope (#20919) 2019-12-06 09:03:14 +01:00
880fbcb09a Chore/Tech debt: Remove (most) instances of $q angular service use (#20668)
* Chore/Tech debt: Remove (most) instances of $q angular service use
Removes instances where the angular $q service is used and replaces
it with native Promises.
2019-12-05 09:04:03 +00:00
62f0aca3e6 AngularPanels: Fixed loading spinner being stuck in some rare cases (#20878) 2019-12-05 08:59:07 +01:00
767c672a2f PanelData: Support showing data and errors in angular panels (#20286) 2019-11-08 16:38:43 +01:00
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
92ab4d80f0 Error Handling: support errors and data in a response (#20169) 2019-11-05 15:20:04 -08:00
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
99411bf37a Types: Adds type safety to appEvents (#19418)
* Types: Add type safety to appEvents
2019-10-14 09:27:47 +01:00
40fbea977e Explore: Take root_url setting into account when redirecting from dashboard to explore (#19447)
* Explore: Take root_url setting into account when redirecting from dashboard to explore

* Explore: Move adding of subath to getExploreUrl function

* Explore: Fix explore redirect for key bindings
2019-09-27 10:17:07 +02:00
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
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
7d32caeac2 Transformers: configure result transformations after query(alpha) (#18740) 2019-09-09 08:58:57 +02:00
a838d2b30a Explore: Adds ability to save a panel's query from Explore (#17982)
* Explore: Adds ability to return to origin dashboard
2019-09-05 13:44:37 +01:00
2672b92206 Open new window when exploring panel metrics (#18802) 2019-09-02 12:47:33 +02:00
d9a3601094 Singlestat: Various fixes to singlestat and DataFrame (#18783)
* Singlestat: Various fixes to singlestat and DataFrame

* removed comment
2019-08-29 19:04:33 +02:00
22c9575a33 Going to Explore from a panel with mixed data sources now works (#18784)
Closes #18597
2019-08-29 14:27:27 +01:00
5f4b5dfecd Refactor: use data rather than series in stream callback(#18126) 2019-08-01 23:16:29 -07:00
c6d3ffce91 Panel: Show error in edit mode (#18175)
- the error was set, but has not been shown
- this change will force a digest before the query promises return with
their error handling
2019-07-18 16:09:04 +02:00
3f15170914 Refactor: move some files to @grafana/data (#17952)
* moving to data WIP

* more refactoring

* add missing test

* mock full path

* remove sinon from grafana-ui
2019-07-06 08:05:53 +02:00
b1126cb0ed AngularPanels: Fixed loading state indication for angular panels (#17900) 2019-07-03 16:58:38 +02:00
e7c3d0ed97 Refactor: rename SeriesData to DataFrame (#17854) 2019-07-01 12:00:29 -07:00
a0b6ef4d01 GraphPanel: use SeriesData directly (skip legacy transformation) (#17037)
* support streaming in angular panels

* keep the same dashboard number

* skip the legacy data conversion

* fix tests
2019-05-14 18:43:26 +02:00
7333f7ca17 Streaming: support streaming in MetricsPanelCtrl (#17034)
* support streaming in angular panels

* keep the same dashboard number
2019-05-14 17:47:41 +02:00
3c733638ee MetricsPanelCtrl: use shared queryRunner to support query execution (#16659)
* move queryRunner to panelModel

* remove isEditing from PanelChrome

* move listener to QueriesTab

* use queryRunner on MetricsPanelCtrl

* Added interval back as prop, not used yet

* QueryRunner: worked on tests

* PanelQueryRunner: Refactoring, added getQueryRunner to PanelModel

* PanelQueryRunner: interpolatel min interval

* merge master and remove grafana-live
2019-05-10 07:09:48 +02:00
5e48750868 Panels: Add types for DataList and range (#16500) 2019-04-11 07:57:24 +02:00
03951c00cb Feat: Angular panels & SeriesData to Table/TimeSeries (#16266)
Similar to how the react panels make sure all data is SeriesData before passing it to the react panels, this makes sure SeriesData is converted to TableData|TimeSeries before passing it to the angular panels.

It also changes the typing to encourage using SeriesData for future development
2019-03-28 18:21:53 +01:00
bf72b26c2c Refactoring of multi-value datasource PR #15812 2019-03-11 15:44:11 +01:00
a8486806aa Merge branch 'multiselect-repeatby-datasource' of https://github.com/jdoupe/grafana into jdoupe-multiselect-repeatby-datasource 2019-03-11 14:14:26 +01:00
5524dacc9d use explore icon 2019-03-05 23:00:43 -08:00
3f27d3ea23 Make datasource variables multiselect and dashboard repeatable
closes #7492 (and #7030)
2019-03-05 22:47:22 -06:00
aeaac7480b New solo panel route working in all scenarios I can test 2019-02-01 08:15:21 +01:00
b95650d19c Added function hasAccessToExplore in ContextSrv and refactored tests 2019-01-21 10:50:34 +01:00
9d6ac2c3d4 fix: Viewers can edit means that viewers have acces to Explore #14281 2019-01-21 08:47:41 +01:00
5b83f6d49d Fixes undefined issue with angular panels and editorTabs 2018-12-19 17:00:26 +01:00
6542bfb83e Merge branch 'fix-misspell-issues' of https://github.com/mjtrangoni/grafana into mjtrangoni-fix-misspell-issues 2018-12-19 11:21:34 +01:00
18b39967fc enable goto explore from query panel editor for all datasources 2018-12-17 16:44:57 +01:00
ab9f65a4cf public/app/features/*: Fix some misspell issues 2018-12-05 13:08:00 +01:00
dac02d3d73 React edit mode for angular panels progress 2018-11-16 08:31:29 +01:00
1eecda48f8 Moved query manipulations from metrics controller to metrics tab so they are more easily shared between angular and react panels 2018-11-14 14:40:03 +01:00
6d91e06f4d refactoring back the interval calculation, needs to be different for react panels 2018-11-13 16:01:52 +01:00
a3f1a1c6b3 wip: panel-header: Remove the TimeData type 2018-11-12 11:31:33 +01:00
8117a7559f wip: panel-header: Add proper typings to maxDataPoints and interval + remove code in comment 2018-11-12 11:31:33 +01:00
e55f3f883f wip: panel-header: Move getResolution and calculateInterval into utils-functions and use the same code from react and angular 2018-11-12 11:31:33 +01:00
9fd62b80d9 wip: panel-header: Start implementing the applyPanelTimeOverrides in the react panels by moving it to a util, make it pure and call it from angular and react. 2018-11-12 11:31:33 +01:00
11f66bb909 fixed issue with template refresh 2018-10-19 09:43:54 +02:00
2fb721d3c6 various fixes to to queries tab (in react mode) 2018-10-14 21:14:11 +02:00
d2bdf8cff1 wip: fixed issues now things are starting to work as before for angular panels 2018-10-09 17:07:13 +02:00
2f84101fe7 wip: restoring old angular panel tabs / edit mode 2018-10-07 10:39:47 -07:00