Commit Graph

280 Commits

Author SHA1 Message Date
Ryan McKinley
26bd76b4c2
Refactor: move NavModel to @grafana/ui (#16813) 2019-04-30 07:46:46 -07:00
Andrej Ocenas
eb82a75668
Provisioning: Show file path of provisioning file in save/delete dialogs (#16706)
* Add file path to metadata and show it in dialogs

* Make path relative to config directory

* Fix tests

* Add test for the relative path

* Refactor to use path relative to provisioner path

* Change return types

* Rename attribute

* Small fixes from review
2019-04-30 13:32:18 +02:00
Marcus Efraimsson
02cb7ff436
Explore: Support user timezone (#16469)
Explore now uses the timezone of the user to decide if local browser 
time or UTC should be used. 
- Now uses TimeRange instead of RawTimeRange in explore item
state tree and only parsing actual time in a few action
handlers.
- Time picker should now properly handle moving back/forward and
apply time range when both utc and non utc time zone.
- URL range representation is changed from YYYY-MM-DD HH:mm:ss
to epoch ms.
- Now uses AbsoluteTimeRange in graph component instead of moment.
- Makes a copy of the time range passed to timeSrv to make sure immutability
of explore time range when for example elasticsearch test datasources uses
timeSrv and sets a time range of last 1 min.
- Various refactorings and cleanup.

Closes #12812
2019-04-29 18:28:41 +02:00
Ryan McKinley
c5097e2ef3
Plugins: move app/feature/plugin properties into PluginMeta (#16809) 2019-04-29 09:14:39 -07:00
Ryan McKinley
5c2d38126d
Plugins: move PanelPluginMeta to grafana/ui (#16804) 2019-04-29 08:17:35 -07:00
Torkel Ödegaard
060e97bea8
Plugins: ReactPanelPlugin to VizPanelPlugin (#16779)
* Plugins: ReactPanelPlugin renamed

* Plugins: renamed PanelPlugin to PanelPluginMeta and VizPanelPlugin to PanelPlugin
2019-04-26 19:16:38 +02:00
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
Brian Gann
d23f50ab23 Build: Fix missing icon typing (#16601) 2019-04-15 19:55:12 +02:00
Torkel Ödegaard
6724aaeff9 Plugins: added missing prop to type 2019-04-15 17:55:17 +02:00
Ryan McKinley
5a0cf1a83c AppPlugins: fix app support and add an alpha example (#16528)
* app pages

* app pages

* workign example

* started alpha support

* bump controller limit

* bump controller limit

* existing plugin pages work again

* save Plugin in cache

* remove AppPage wip
2019-04-15 16:54:00 +02:00
Hugo Häggmark
3f7aaedd8c Chore: Remove implicit anys for DashboardModel and tests (#16553)
Progress: #14714
2019-04-12 17:05:44 +02:00
Ryan McKinley
3c21a121eb Plugins: Unifying alpha state & options for all plugins (#16530)
* app pages

* app pages

* workign example

* started alpha support

* remove app stuff

* show warning on alpha/beta panels

* put app back on plugin file

* fix go

* add enum for PluginType and PluginIncludeType

* Refactoring and moving settings to plugins section

fixes #16529
2019-04-12 13:46:42 +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
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
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
Ryan McKinley
e5c8375ec2 only call onPanelMigration when the version actually changes (#16186)
* set the plugin version if there is a migration handler
* only call panel migration if the version changes
* set the version after change also
* avoid NPE... check that we have options
* destroy is based on the previous panel type, not the next one
* Panels: Minor refactoring on panel plugin version code, #16186
2019-03-25 14:10:23 +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
Torkel Ödegaard
0a2d69c794
Merge pull request #16089 from grafana/no-implicit-any-fixes-p4
Fixed no implicit any for form dropdown & panel model
2019-03-20 07:01:14 +01:00
Torkel Ödegaard
4f134ea4b8
Merge pull request #16080 from grafana/hugoh/no-implicit-any
Cleaning up no implicit anys in search_srv and tests
2019-03-19 18:26:28 +01:00
Torkel Ödegaard
42c87141a5 Minor progress on fixing no-implicit any issues 2019-03-19 18:24:47 +01:00
Hugo Häggmark
d845aacbdc refactor: merged types and updated references 2019-03-19 17:44:58 +01:00
Hugo Häggmark
53c74fa2f5 teams: refactor so that you can only delete teams if you are team admin 2019-03-19 14:01:21 +01:00
Leonard Gram
b783fa7039 team: renames teams.CanUpdate teamguardian.CanAdmin 2019-03-19 14:01:12 +01:00
Hugo Häggmark
3c46b786d2 teams: change back to permissionlevel for Member to 0 2019-03-19 13:57:26 +01:00
Hugo Häggmark
3c74ac3044 teams: update only the selected user 2019-03-19 13:57:25 +01:00
Hugo Häggmark
7888457aae teams: basic ui for permission in team members view 2019-03-19 13:57:23 +01:00
Peter Holmberg
384e11fd68 Copied from new timepicker and unified component branch 2019-03-18 15:41:46 +01:00
Peter Holmberg
1994b18b5a fix return type 2019-03-13 11:37:33 +01:00
Peter Holmberg
9c33a9410f adding types 2019-03-13 10:50:21 +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
Torkel Ödegaard
cfea8bdcae Prettier had not been running as a precommit hook for some time so had to run in on all files again 2019-02-13 11:14:53 +01:00
Torkel Ödegaard
3b0ae4bd0a
Merge pull request #15368 from grafana/15217-panels-without-queries
POC: Panels without queries can skip DataPanel
2019-02-13 08:06:25 +01:00
Torkel Ödegaard
a1453607a9 Changed noQueries to a dataFormats array that will allow a panel to define supported formats and prefered (first in array) 2019-02-12 16:05:29 +01:00
Johannes Schill
075fb8e91c chore: Rename isDataPanel to noQueries 2019-02-12 12:28:53 +01:00
Johannes Schill
c4b2dcefbe feat: Introduce IsDataPanel attribute to plugin.json 2019-02-12 12:28:53 +01:00
Dominik Prokop
1693f083cc Move deduplication calculation from Logs component to redux selector 2019-02-11 16:57:49 +01:00
Dominik Prokop
14bf960b64 Merge branch 'master' into explore/dedup-strategu-url 2019-02-11 12:03:45 +01:00
Torkel Ödegaard
9565e48f03 Fixed issue where double clicking on back button closes sidemenu 2019-02-11 09:37:13 +01:00
Dominik Prokop
229d646bfc Persis deduplication strategy in url 2019-02-07 18:01:09 +01:00
Torkel Ödegaard
2eca4caa5d added reducers tests 2019-02-07 13:58:24 +01:00
Torkel Ödegaard
dd0afd0a0b Big refactoring for dashboard init redux actions 2019-02-06 19:42:04 +01:00
Torkel Ödegaard
8574dca081 making changes suggested in review and improving typings 2019-02-06 17:31:52 +01:00
Torkel Ödegaard
a53c3b45fc Added a basic test for initDashboard thunk 2019-02-06 14:35:53 +01:00
Torkel Ödegaard
fa32198831 Merge branch 'master' into dashboard-react-page 2019-02-05 17:56:04 +01:00
Torkel Ödegaard
08925ffad8 Basic loading state for slow dashboards 2019-02-05 13:53:11 +01:00
Torkel Ödegaard
28fc27c4ae Merge branch 'master' of github.com:grafana/grafana into dashboard-react-page 2019-02-05 09:23:58 +01:00
Hugo Häggmark
2c255fd85a Renamed initialQueries to queries 2019-02-05 06:19:40 +01:00
Torkel Ödegaard
3baaf2c3e4 Added handling of kiosk mode 2019-02-04 17:36:04 +01:00
Hugo Häggmark
a0c4837eb5 Merge with master 2019-02-04 15:06:01 +01:00
Torkel Ödegaard
f695975f65 Fixed handling of orgId 2019-02-04 15:02:35 +01:00