* 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
* WIP: inital POC
* Wip: Moving forward
* Wip
* Refactor: Makes loading indicator work for Prometheus
* Refactor: Reverts prom observable queries because they did not work for multiple targets
* Refactor: Transforms all epics into thunks
* Fix: Fixes scanning
* Fix: Fixes so that Instant and TimeSeries Prom query loads in parallel
* Fix: Fixes negation logic error
* Wip: Introduces PanelData as a carries for query responses
* Refactor: Makes errors work again
* Refactor: Simplifies code somewhat and removes comments
* Tests: Fixes broken tests
* Fix query latency
* Remove unused code
* 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
* Editor: Fixes issue where only entire lines were being copied
Closes#18768
* Simplifies onCopy handler and factors out logic for easier testing
Also adds tests to verify behaviour
* 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
Fixes#18533
To recreate the bug described in the original issue in the simplest possible way:
1. Setup dashboard with a single panel and repeat it using variables
2. Set the dashboard refresh to 5s
3. Hover over repeated panel during the refresh
What happened there?
When panels are repeated every time the dashboard is refreshed or variables change the repeated PanelModels are recreated. In https://github.com/grafana/grafana/blob/master/public/app/features/dashboard/state/DashboardModel.ts#L322 the models are removed from dashboard panel's model property what makes the dashboard re-render with source panel only, and then back again with the repeated panels when models are re-created. This means creating new DashboardPanel components. But when the repeated PanelModels are removed, they are not destroyed what results in a behaviour described in #18533.
This is a quick fix for this issue. Ideally I think we should use some cache and update the repeated PanelModels when the refresh or variables change trigger re-render, instead of re-creating those every time. I don't want to do this ATM as the logic around repeating panels is quite complex and require some <3.
* Changes brace-insertion behavior to be less annoying
* Removes use of braces plugin
* Revert "Removes use of braces plugin"
This reverts commit 4cf4a6073b.
* WIP: inital POC
* Wip: Moving forward
* Wip
* Refactor: Makes loading indicator work for Prometheus
* Refactor: Reverts prom observable queries because they did not work for multiple targets
* Refactor: Transforms all epics into thunks
* Fix: Fixes scanning
* Fix: Fixes so that Instant and TimeSeries Prom query loads in parallel
* Fix: Fixes negation logic error
* Propagate errors in stream events, and close streams
* 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
* move queryRunner to panelModel
* remove isEditing from PanelChrome
* move listener to QueriesTab
* add shared query datasource
* expose getDashboardSrv to react
* no changes to panel chrome
* issue queries when in fullscreen
* moved to regular QueryEditor interface
* moved to regular QueryEditor interface
* lower limit
* add dashboard query
* no changes to editor row
* fix sort order
* fix sort order
* make it an alpha panel
* make panelId a getter
* fix angular constructor
* rename SeriesData to DataFrame
* merge with master
* use series
* add simple tests
* check unsubscribe
* Minor code cleanup, creating Subjects look cheap and does not need to be lazy, simplifies code
* minor refactor
* Minor refacforing, renames
* added test dashboard
* Fixes several usability issues with QueryField component
- Can now indent with tab and `mod+[`, `mod+]`
- Copy/Cut preserves new lines, and paste correctly splits blocks now
- Adds support for selection hotkeys
This introduces change to TimeSrv that enables time & time.window query param. Thanks to that time range of a dashboard can be specified as a window(time.window param) around given timestamp(time param)
Since React and other dependencies bump caused some troubles with building packages that @kaydelaney and me tried to debug without any success, we decided to revert React 16.9.0 bump.
* rewrite user profile edit to react (#17525)
* disableLogin change, still need to fix tooltip
* left out disable form for other auth
* PR changes - wrapper to render, userId instead of bool, optional user in state, change provider child param order
* moved directive to angular_wrappers
* catch api error
* finally
* move user arg back to end- optional
* optional type sig
* Added prometheus metric labels to data returned for normal time series queries
* Fixed result transformer tests for new return layout with prometheus labels
* Fixed prettier formatting
* SQLite migrations
* cleanup
* migrate end times
* switch to update with a query
* real migration
* anno migrations
* remove old docs
* set isRegion from time changes
* use <> for is not
* add comment and fix index decleration
* single validation place
* add test
* fix test
* add upgrading docs
* use AnnotationEvent
* fix import
* remove regionId from typescript
* Rerun query on input changes
Added "this.onRunQuery" for update of the input fields so that the panel updates when changed
* typo in comment
changed "fullu" to "fully"
* modified to onBlur for legend, interval
legend and interval (min step) now call for query re-run when they go 'onBlur' instead of 'onChange'
* PromQueryEditor: Updated snapshot
* Explore/Prometheus: More consistently allows for multi-line queries
Allows a user to hit shift+enter to create a new line in the query field, even
when the autocomplete suggestions are displayed.
Also fixes an issue where a new line was inserted when selecting a suggestion
Closes#18341
* Fixes behavior where query wasn't running on pressing Enter
Also adds test to verify this behavior
* Migrating login services
* Add user signup
* Remove lodash
* Remove media query and extarct LoginServices
* Add React LoginCtrl
* Handle location with Redux and start form validation
* Fix proposal
* Add basic validation
* Fix validation
* Remove state from controller
* Extract login forms
* Fix things up
* Add change password and LoginPage
* Add React page and route to it
* Make redux connection work
* Add validation for password change
* Change pws request
* Fix feedback
* Fix feedback
* LoginPage to FC
* Move onSkip to a method
* Experimenting with animations
* Make animations work
* Add input focus
* Fix focus problem and clean animation
* Working change password request
* Add routing with window.location instead of Redux
* Fix a bit of feedback
* Move config to LoginCtrl
* Make buttons same size
* Change way of validating
* Update changePassword and remove angular controller
* Remove some console.logs
* Split onChange
* Remove className
* Fix animation, onChange and remove config.loginError code
* Add loginError appEvent
* Make flex and add previosuly removed media query
* Wip: Compiles and runs
* WIP: Logs Graph partially working
* Refactor: Adds GraphSeriesToggler
* Refactor: Adds tickDecimals to YAxis
* Refactor: Adds TimeZone and PlotSelection to Graph
* Refactor: Makes the graphResult work in Explore
* Refactor: Adds ExploreGraphPanel that is used by Logs and Explore
* Fix: Fixes strange behaviour with ExploreMode not beeing changed
* Fix: Adds onSelectionChanged to GraphWithLegend
* Refactor: Cleans up unused comments
* ExploreGraph: Disable colorpicker
Existing /api/alert-notifications now requires at least editor access.
Existing /api/alert-notifiers now requires at least editor access.
New /api/alert-notifications/lookup returns less information than
/api/alert-notifications and can be access by any authenticated user.
Existing /api/org/users now requires org admin role.
New /api/org/users/lookup returns less information than
/api/org/users and can be access by users that are org admins,
admin in any folder or admin of any team.
UserPicker component now uses /api/org/users/lookup instead
of /api/org/users.
Fixes#17318
* Fix: Avoid glob of single-value array variables
Based on our current implementation of templates, when multi-select
variables are part of a dashboard query the default/fallback formatting option is `glob`.
Some data sources do not support glob (e.g. metrics.{a}.* instead of
metrics.a.*) for single variable queries. This behaviour breaks dashboards.
This commit introduces an alternative formatting option where globing is avoided if it's there is only one value as part of the query variable.
This means, queries previously formatted as `query=metrics.{a}.*.*`, are
now formatted as `query=metrics.a.*.*`. However, queries formatted as
`query=metrics.{a,b}.*.*` continue to be as is.
In response to #18282
DataLinksEditor does not limit amount of links by default now (it was 1 link before, unless maxLinks prop was specified). Also, links that do not have label specified, are not rendered anymore.
This commit addresses half of #13749 by making sure GetMetricData
works for alerting. Math Expressions (compound metrics) will still not
work for alerting, this would require a bigger refactoring of Grafana's
alerting service. However, with this commit at least alerting for basic
metrics with non empty query Id will work.
Fixes half of #13749
Allow non admins to see plugins list but only with readme. Any config tabs are hidden from the plugin page. Also plugin panel does not show action buttons (like Enable) for non admins.