Commit Graph

61 Commits

Author SHA1 Message Date
Johannes Schill
406ef962fc Explore & Dashboard: New Refresh picker (#16505)
* Added RefreshButton

* Added RefreshSelect

* Added RefreshSelectButton

* Added RefreshPicker

* Removed the magic string Paused

* Minor style changes and using Off instead of Pause

* Added HeadlessSelect

* Added HeadlessSelect story

* Added SelectButton

* Removed RefreshSelectButton

* Added TimePicker and moved ClickOutsideWrapper to ui/components

* Added TimePickerPopOver

* Added react-calendar

* Missed yarn lock file

* Added inputs to popover

* Added TimePicker and RefreshPicker to DashNav

* Moved TimePicker and RefreshPicker to app/core

* Added react-calendar to app and removed from ui/components

* Fixed PopOver onClick

* Moved everything back to ui components because of typings problems

* Exporing RefreshPicker and TimePicker

* Added Apply and inputs

* Added typings

* Added TimePickerInput and logic

* Fixed parsing of string to Moments

* Fixed range string

* Styling and connecting the calendars and inputs

* Changed Calendar styling

* Added backward forward and zoom

* Fixed responsive styles

* Moved TimePicker and RefreshPicker into app core

* Renamed menuIsOpen to isOpen

* Changed from className={} to className=""

* Moved Popover to TimePickerOptionGroup

* Renamed all PopOver to Popover

* Renamed popOver to popover and some minor refactorings

* Renamed files with git mv

* Added ButtonSelect and refactored RefreshPicker

* Refactored TimePicker to use new ButtonSelect

* Removed HeadlessSelect as suggested

* fix: Fix typings and misc errors after rebase

* wip: Enable time picker on dashboard and add tooltip

* Merge branch 'master' into hugoh/new-timepicker-and-unified-component

# Conflicts:
#	packages/grafana-ui/package.json
#	packages/grafana-ui/src/components/Input/Input.test.tsx
#	packages/grafana-ui/src/components/Input/Input.tsx
#	packages/grafana-ui/src/utils/validate.ts
#	public/app/features/dashboard/panel_editor/QueryOptions.tsx
#	yarn.lock

* fix: Snapshot update

* Move TimePicker default options into the TimePicker as statics, pass the tooltipContent down the line when wanted and wrap the button in a tooltip element

* fix: Override internal state prop if we provide one in a prop

* Updated snapshots

* Let dashnav control refreshPicker state

* feat: Add a stringToMs function

* wip: RefreshPicker

* wip: Move RefreshPicker to @grafana/ui

* wip: Move TimePicker to @grafana/ui

* wip: Remove comments

* wip: Add refreshPicker to explore

* wip: Use default intervals if the prop is missing

* wip: Nicer way of setting defaults

* fix: Control the select component

* wip: Add onMoveForward/onMoveBack

* Remove code related to the new time picker and refresh picker from dashnav

* Fix: Typings after merge

* chore: Minor fix after merge

* chore: Remove _.map usage

* chore: Moved refresh-picker logic out of the refresh picker since it will work a little differently in explore and dashboards until we have replaced the TimeSrv

* feat: Add an Interval component to @grafana/ui

* chore: Remove intervalId from redux state and move setInterval logic from ExploreToolbar to its own Interval component

* feat: Add refreshInterval to Explore's URL state

* feat: Pick up refreshInterval from url on page load

* fix: Set default refreshInterval when no value can be retained from URL

* fix: Update test initial state with refreshInterval

* fix: Handle URLs before RefreshPicker

* fix: Move RefreshInterval to url position 3 since the segments can take multiple positions

* fix: A better way of detecting urls without RefreshInterval in Explore

* chore: Some Explore typings

* fix: Attach refresh picker to interval picker

* chore: Sass fix for refresh button border radius

* fix: Remove refreshInterval from URL

* fix: Intervals now start when previous interval is finished

* fix: Use clearTimeout instead of clearInterval

* fix: Make sure there's a delay set before adding a timeout when we have slow explore queries

* wip: Add refresh picker to dashboard

* feat: Add util for removing keys with empty values

* feat: RefreshPicker in dashboards and tmp rem out old RefreshPicker

* fix: Remove the jumpy:ness in the refreshpicker

* Changed placement and made it hide when your in dashboard settings

* chore: Move logic related to refresh picker out of DashNav to its own component

* feat: Add tooltip to refreshpicker

* fix: Fix bug with refreshpicker not updating when setting to 'off'

* fix: Make it possible to override refresh intervals using the dashboard intervals

* chore: Change name of Interval to SetInterval to align with ecmascripts naming since its basically the same but declarative and async

* fix: Use default intervals when auto refresh is empty in dashboard settings

* fix: Hide time/interval picker when hidden is true on the model, such as on the home dashboard

* fix: Interval picker will have to handle location changes since timeSrv wont

* RefreshPicker: Refactoring refresh picker

* RefreshPicker: minor refactoring
2019-04-16 09:15:23 +02:00
Hugo Häggmark
7eabc282e9
Chore: Adds typings to lodash (#16590) 2019-04-15 12:11:52 +02:00
Hugo Häggmark
e5c1cbabb1
Fix: Pass missing maxDataPoints to query in Explore (#16513)
Fixes: #16490
2019-04-11 13:57:04 +02:00
Hugo Häggmark
1341f4517a
Fix: Recalculate intervals in Explore on run queries (#16510)
Fixes: #16485
2019-04-11 13:56:09 +02:00
Torkel Ödegaard
47e51cb6b3
Refactor: Plugin exports & data source / panel types (#16364)
* wip: began work off removing meta and pluginExports from DataSourceApi interface

* WIP: changing how plugins are exports and loaded

* Down the refactoring rabit hole that keeps expanding

* TestData now returns DataSourcePlugin

* Refactoring: fixed app config page loading, type renamings and more typings

* Refactor: Correct casing on DatasourceStatus => DataSourceStatus
2019-04-04 18:30:15 +02:00
Hugo Häggmark
988b7c4dc3
Feat: Adds reconnect for failing datasource in Explore (#16226)
* Style: made outlined buttons and used it in Alert component

* Refactor: clean up state on load data source failure

* Refactor: test data source thunk created

* Refactor: move logic to changeDatasource and call that from intialize

* Refactor: move load explore datasources to own thunk

* Refactor: move logic to updateDatasourceInstanceAction

* Tests: reducer tests

* Test(Explore): Added tests and made thunkTester async

* Fix(Explore): Fixed so that we do not render StartPage if there is no StartPage

* Fix(Explore): Missed type in merge

* Refactor: Thunktester did not fail tests on async failures and prevented queires from running on datasource failures

* Feat: Fadein error alert to prevent flickering

* Feat: Refresh labels after reconnect

* Refactor: Move useLokiForceLabels into useLokiLabels from PR comments

* Feat: adds refresh metrics to Prometheus languageprovider

* Style: removes padding for connected datasources

* Chore: remove implicit anys
2019-04-01 07:38:00 +02:00
Ryan McKinley
bfba47c6c4 Refactor: Move LogLevel and Labels utils to @grafana/ui (#16285)
* rename Tags to Labels in SeriesData

* move some logs stuff to grafana/ui

* add roundtrip tests
2019-03-29 09:41:37 +01:00
Dominik Prokop
a8c50ed6ba
feat(explore): make it possible to close left pane of split view (#16155)
* feat(explore): make it possible to close left pane of split view

* Use action's type prop instead of enum
2019-03-25 12:49:15 +01:00
Hugo Häggmark
eedbc485dd
Makes it possible to navigate back/forward with browser buttons in Explore (#16150)
Make it possible to navigate back/forward with browser buttons in Explore
2019-03-22 15:24:30 +01:00
Peter Holmberg
cf55d68894 using refId from panel model 2019-03-14 17:20:33 +01:00
Torkel Ödegaard
d6bab53d3b
Merge pull request #15626 from grafana/davkal/15607-explore-line-colors
Explore: Make sure line graphs get different colors
2019-03-13 12:21:44 +01:00
Dominik Prokop
a853e2c36e
Fix deduplication results displaying wrong data (#15755)
The log rows were mutated in the store, what resulted in wrong deduplication results as well as made the selector memoization quirky - for "the same results" the selector was running twice.
2019-03-11 11:48:14 +01:00
David Kaltschmidt
e6a74eb1a2 Explore: Make sure line graphs get different colors
- lines for graphs from different query rows end up in different
transactions
- within each transaction the color distribution resets leading to color
overlap
- this change takes existing transaction colors into account
2019-02-24 10:01:50 -08:00
Dominik Prokop
0a66d8afc7 Merge branch 'master' into cli/watch-sass-var 2019-02-12 17:20:14 +01:00
Dominik Prokop
dd19ec3b22 Move explore selectors to a separate file 2019-02-12 12:36:46 +01:00
Dominik Prokop
1693f083cc Move deduplication calculation from Logs component to redux selector 2019-02-11 16:57:49 +01:00
Dominik Prokop
85780eb30c Remove not related code 2019-02-11 13:18:16 +01:00
Dominik Prokop
cee2e4788b Do not read store state from toggle panelaction creator 2019-02-11 12:56:37 +01:00
Dominik Prokop
c9fbd43231 Review changes 2019-02-11 11:59:48 +01:00
Dominik Prokop
229d646bfc Persis deduplication strategy in url 2019-02-07 18:01:09 +01:00
Hugo Häggmark
2c255fd85a Renamed initialQueries to queries 2019-02-05 06:19:40 +01:00
Hugo Häggmark
f74ebdade6 Missed to save 2019-02-04 15:11:19 +01:00
Hugo Häggmark
a0c4837eb5 Merge with master 2019-02-04 15:06:01 +01:00
Hugo Häggmark
34dd1a22ab Fixed bug with removing a QueryRow thats not part of nextQueries 2019-02-04 14:16:15 +01:00
Hugo Häggmark
96aef3bab8 Replaced intialQueris with queryKeys 2019-02-04 13:41:29 +01:00
Hugo Häggmark
6b98b05976 Removed modifiedQueries from state 2019-02-04 11:07:32 +01:00
Hugo Häggmark
1f5bb76718 Refactor of action, actionTypes and reducer 2019-02-04 07:50:17 +01:00
Hugo Häggmark
2d0fd96621 More types and some refactoring 2019-02-04 07:50:17 +01:00
Dominik Prokop
3c358e406e Make runQueries action independent from datasource loading 2019-02-01 14:56:54 +01:00
Dominik Prokop
2ddccb4a21 Temporarily run queries independently from UI state of explore panels 2019-02-01 12:57:09 +01:00
Dominik Prokop
6ab9355146 Restoring explore panels state from URL 2019-02-01 12:33:15 +01:00
Dominik Prokop
661de1efe1 Rename SetInitialQueries action to QueriesImported 2019-01-30 09:50:28 +01:00
Dominik Prokop
d746df485c Add missing code 2019-01-30 09:36:23 +01:00
Dominik Prokop
9ddbfed730 Wait for queries to be imported before proceeding with datasource change 2019-01-29 15:52:36 +01:00
Dominik Prokop
8ea72eeaf7 Remove commented code 2019-01-29 15:40:01 +01:00
Dominik Prokop
010f902003 Import queries before datasource is changed 2019-01-29 15:34:28 +01:00
Torkel Ödegaard
8510f0cd11
Merge pull request #15084 from grafana/fix/explore-datasource-change
Update datasource before the loading has started
2019-01-28 17:55:33 +01:00
Torkel Ödegaard
fd06e51776 Merge branch 'master' into fix/explore-do-not-clear-results 2019-01-28 17:16:39 +01:00
Torkel Ödegaard
a1a905cbb1 Removed the initial data source as I could not see it being used anywhere 2019-01-28 16:31:38 +01:00
Hugo Häggmark
08f5a3338a Making sure we do not pass a long invalid queries and save to state 2019-01-28 15:27:35 +01:00
Torkel Ödegaard
91d926f180 single import for types from @grafana/ui 2019-01-28 15:27:23 +01:00
Torkel Ödegaard
2c9a867bde Merge branch 'master' into fix/explore-datasource-change 2019-01-28 15:24:14 +01:00
Hugo Häggmark
6b0400eed2 Firing off an action instead of listening to location changes 2019-01-28 13:27:56 +01:00
Dominik Prokop
2ff62c42ac Prevents query result cleaning when new query trransaction starts 2019-01-28 12:57:09 +01:00
Hugo Häggmark
40f410562a Fixed reinitialise of Explore 2019-01-28 11:45:15 +01:00
Dominik Prokop
05f9eb0766 Update datasource before the loading has started 2019-01-28 11:06:50 +01:00
David Kaltschmidt
c0277ab595 Explore: Fix scanning for logs
- Redux migration caused the scanner to not be set
- this change adds the setting/unsetting of the scanner in the reducer
- added test
2019-01-23 15:05:54 +01:00
Torkel Ödegaard
79bd7f4077 Fixed data source selection in explore 2019-01-21 21:36:30 +01:00
Torkel Ödegaard
205e2acdd8 Added data source type to explore state 2019-01-17 19:17:29 +01:00
Torkel Ödegaard
ecab597e5e renaming DataSource type to DataSourceSettings and moved to grafana ui 2019-01-17 18:51:07 +01:00