* Chore: Remove angular dependency from backendSrv
* Refactor: Naive soultion for logging out unauthorized users
* Refactor: Restructures to different streams
* Refactor: Restructures datasourceRequest
* Refactor: Flipped back if statement
* Refactor: Extracted getFromFetchStream
* Refactor: Extracts toFailureStream operation
* Refactor: Fixes issue when options.params contains arrays
* Refactor: Fixes broken test (but we need a lot more)
* Refactor: Adds explaining comments
* Refactor: Adds latest RxJs version so cancellations work
* Refactor: Cleans up the takeUntil code
* Refactor: Adds tests for request function
* Refactor: Separates into smaller functions
* Refactor: Adds last error tests
* Started to changed so we require getBackendSrv from the @grafana-runtime when applicable.
* Using the getBackendSrv from @grafana/runtime.
* Changed so we use the getBackendSrv from the @grafana-runtime when possible.
* Fixed so Server Admin -> Orgs works again.
* Removed unused dependency.
* Fixed digest issues on the Server Admin -> Users page.
* Fix: Fixes digest problems in Playlists
* Fix: Fixes digest issues in VersionHistory
* Tests: Fixes broken tests
* Fix: Fixes digest issues in Alerting => Notification channels
* Fixed digest issues on the Intive page.
* Fixed so we run digest after password reset email sent.
* Fixed digest issue when trying to sign up account.
* Fixed so the Server Admin -> Edit Org works with backendSrv
* Fixed so Server Admin -> Users works with backend srv.
* Fixed digest issues in Server Admin -> Orgs
* Fix: Fixes digest issues in DashList plugin
* Fixed digest issues on Server Admin -> users.
* Fix: Fixes digest issues with Snapshots
* Fixed digest issue when deleting a user.
* Fix: Fixes digest issues with dashLink
* Chore: Changes RxJs version to 6.5.4 which includes the same cancellation fix
* Fix: Fixes digest issue when toggling folder in manage dashboards
* Fix: Fixes bug in executeInOrder
* Fix: Fixes digest issue with CreateFolderCtrl and FolderDashboardsCtrl
* Fix: Fixes tslint error in test
* Refactor: Changes default behaviour for emitted messages as before migration
* Fix: Fixes various digest issues when saving, starring or deleting dashboards
* Fix: Fixes digest issues with FolderPickerCtrl
* Fixed digest issue.
* Fixed digest issues.
* Fixed issues with angular digest.
* Removed the this.digest pattern.
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>
* Calculate min period based on time range and no of queries
* Use hardcoded array of periods if period is not defined actively by the user
* Fix broken tests
* Use a smaller max period for auto interval
* Fix broken tests
* Test period calculation
* Test min retention period
* Fix broken test
* Rewrite angular segments for filter and group by in react
* wip: refactoring
* Update metric find queries
* Remove old maps used to create labels - use one map for all types instead
* Use value as label (again) for filters ang groupby
* Remove old filter
* Remove not used code
* Fixes after pr feedback
* Fix broken tests and add new metadata tests
* Add index file to make imports cleaner
* Cleanup. Remove old angular filter code
* Fix broken tests
* Use type switching instead of if statements
* Use globals for regex
* Updates after pr feedback
* Make sure it's possible to filter using the same key multiple times
* Replace metric select with segment component
* Pass template vars as props
* Refactor meta labels code
* Reorder template variables
* Fix broken tests
* Reset metric value when changing service
* Fix lint issue.
* Make tests independant of element order
* Include kubernetes.io in regex
* Add instruction in help section
* Rename old cascader
* Change name of old cascader
* Add basic cascader without search
* Add basic cascader without search
* Flatten options to make it searchable
* Add regex search and make backspace work
* Add barebone search without styles
* Add SearchResult list
* Add search navigation
* Rewrite of cascader and add some things to SelectBase
* Make SelectBase controlllable
* Cleanup
* Add initial value functionality
* Add onblur to hand caret direction
* New storyboom format for ButtonCascader
* Add knobs to story
* Add story and docs for UnitPicker
* Make UnitPicker use Cascader
* Fix backspace issue and empty value
* Fix backspace issue for real
* Remove unused code
* Fix focus issue
* Change children to items and remove ButtonCascaderProps
* Remove local CascaderOption
* Fix failed test
* Revert UnitPicker changes and change format for ButtonCascader
* Fix failing tests
* wrap content in autosizer
* replace lib
* removing react-virtualized, correct type in editor.ts
* remove caret
* remove dep from grafana/ui and remove story util
* wip: react rewrite
* Cleanup
* Break out non annontations specific fields
* Cleanup. Make annontations editor a functional component
* Remove redundant classnames
* Add paneldata to props
* Cleanup
* Fix rebase merge problem
* Updates after pr feedback
* Fix conflict with master
* Fixed so when clicking a plot on a touch device we won't display the annotation context menue.
* Refactorings after feedback.
* changed to standard-ish comment.
* add common backend
* use const for range
* likely not differnt
* send the right orgId
* Add DataSourceWithBackend to @grafana/runtime mock in root reducer test
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* add min_interval_seconds setting to alerting config
It will let operator enforce a minimum time for the scheduler to enqueue evaluations
* Introduce UI modifications
* Update docs
Co-authored-by: Martin <uepoch@users.noreply.github.com>
* refactoring BigValue layout to use polymorphism
* Renamed file
* StatPanel: Fixed min & max handling, white theme background
* Typescript and test fixes
* Fixed justify center logic
* Updated test dashboard
* Updated test dashboard
* Adjust time xMax to align with last data point if it's close
* Fixed color issue
* removed text shadow
* Removed unused stuff
* Fixed auto min max
* Fixed strict typescript issues
* Updated
* remove anon funcs, removed options from state, removed update method, static selects as constants
* cancellable promise
* cancel promise on unmount
* use new datasource funcs for dryer component
* event handler funcs
* updated funcs and moved to utils, updating config editors
* S has no keys. never will never work
* remove report json
* update azure snapshot
* DataSourceSettings keyof
* rename reset funcs
* create tabs component
* replace tabs in pageheader
* splitting two different types of tabitems
* fix index and conditionals in tabs
* redo tabs to not render anchor links
* rename to className and use cx to combine classes
* reverting back to a simpler use case
* moving type to types file
* fix import
* redoing Tabs to simpler composition components
* pr feedback
* update snapshot
* use icon component, added knob for storybook
* Added text align option to column styles, tests
* table panel migrations
* added tests
* default column style is now auto
* tests and fixtures...
* wrong comments need removing
* xss guard
* test
* Some test for invalid options, formatting.
* Remote branch tracking.
* Footer: Single footer implementation for both react & angular pages
* Export type
* Updates
* Use footer links in help menu
* Updates & Fixes
* Updated snapshot
* updated snapshot
* Prometheus: user metrics metadata to inform query hints
- no longer analyse datapoints
- either use metrics metadata to determine metrics type or use metric
name suffix
- removed testcases based on datapoints
* Added hint certainty and tests
* Prometheus: Disable suggestions at beginning of value
- fixed comparison operator regex
- no longer suggest anything at beginning of label value
* Detect cursor in front of label values
* Loki: fix filter expression suggestions
- dont suggest term completion items in filter expression
- allow at least one character before suggesting term items
- keep logql expression when switching between Metrics/Logs mode
- show only history by default in completion items
* Clear results when changing mode
- `unless`, `or` and `and` are binary operators
- if they appear in a query the query was broken up so the suggestor
only works on the current term
- this change fixes the splitter logic to make sure those keywords are
not inside a word
* Prometheus data source: Update tooltip for _Scrape interval_
The old tool tip was plainly wrong. The globally configured scrape
interval is not necessarily the most used scrape interval, so the new
wording is describing what actually matters. The evaluation interval
wasn't even mentioned before. And finally, the configured value is
not strictly a lower limit for the step query parameter as it can be
overridden by the panel option _Min time interval_.
I plan to explain the overriding intricacies in the tool tip for _Min
time interval_.
Signed-off-by: beorn7 <beorn@grafana.com>
* Improve tooltip for _Min step_
The previous tool tip was mostly addressing aspects that are not
specific to _Min step_ (and might be more appropriate to be added to
the _Min time interval_ tool tip as that setting has a wider
scope). The new version emphasizes the important gotchas: that this is
an _additional_ lower limit, and that it is _not_ multiplied by the
resolution factor.
Signed-off-by: beorn7 <beorn@grafana.com>
* Fixed snapshot
Co-authored-by: David <david.kaltschmidt@gmail.com>
Closes#19598
Fixes bug introduced recently where the new PromQueryEditor did not preserve
the PromContext.Explore set on the query model by PromQueryField which caused
the table to be empty for Prometheus in explore.
* Pagerduty notifier: configurable severity
Instead of hardcoding `critical` make it configurable per notification channel instance.
* fix html
* Add a test to ensure default severity is correct
* Notifications doc
* Add a non-default test
* Add err check on NewJson (all tests)
* Add default severity (critical) to AlertNotificationEditCtrl class
- prometheus explore editor introduced new styles for the hint display
- when multiple rows are rendered the hints are covered because they are
forced to have 0 height
- this change removes the 0-height
Much easier to wrap one's head around it if it is expressed more
directly.
This is not mathematically the same as the previous version involved
more rounding than necessary because of the way the intervalFactor was
handled. I'd argue the new version is better because it gets closer to
the 11,000 points limit and thus approaches better what the user
wanted within the limits of Prometheus.
Note that in practice, the 11,000 points limit should never be of
relevance. (Even a 4k screen doesn't have 11k points on the x axis.)
Signed-off-by: beorn7 <beorn@grafana.com>
* Table: Set & use field display processor
* Use applyFieldOverrides outside in story instead
* Change types a bit
* Table: Move to flexible layout
* Simplest possible custom field option
* Skip default column
* Added textAlign
* Explore: Set display processor for table data frame
* Fixed storybook
* Refactoring
* Progress on cell display mode
* Major progress
* Progress & refactoring
* Fixes
* Updated tests
* Added more tests
* Table: Progress on cell style customization
* Restored testdata random walk table scenario
* put back unrelated change
* remove unused things
* Updated table story
* Renamed property
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Dashboard: started to implement new time picker.
* TimePicker: working in full screen (except calendar).
* TimePicker: first draft on narrow screen variant.
* TimePicker: small adjustments to the narrow design.
* TimePicker: enabled range selection and started to style calendar.
* TimePicker: applied some more styling.
* Calendar: added so the calendar range selection is styled properly.
* Calendar: added styling for timepicker calendar in narrow screen.
* TimePicker: made it possible to select range from calendar.
* TimePicker: made the calendar have previous selected value.
* TimePicker: moved calendar to be able to update form state.
* TimePicker: calendar is now displayed onFocus or onClick.
* TimePicker: calendar will be closed if click outside input.
* Calendar: fixed the styling of the calendar in narrow screen.
* Calendar: made it work properly with narrow screen.
* TimePicker: connected recent to absolute time range.
* TimePicker: changed the label on recent ranges.
* TimePicker: cleaned up the range list and options.
* TimePicker: some more cleaning up.
* TimePicker: cleaned up the calendar a bit.
* TimePicker: some more refactorings.
* TimePicker: refactorings.
* TimePicker: styled modal properly.
* TimePicker: empty recent list.
* TimePicker: width when calendar in full screen.
* TimePicker: will validate input value.
* TimePicker: removed unused code.
* TimePicker: positioning with emotion instead of sass.
* Calendar: Made sure we send the dates in the correct order to the calendar.
* TimePicker: fixed theme.
* TimePicker: fixed positioning of the content.
* TimePicker: positioning of narrow.
* TimePicker: added some simple tets.
* TimePicker: fixed issue with invalid and added error message.
* TimePicker: added history.
* TimePicker: cleaned up snapshot data.
* TimePicker: fixed so we keep the quick values in the input.
* TimePicker: fixed the missing styling on UTC.
* TimePicker: added missing caret icon.
* TimePicker: fixed formatting on recent time ranges.
* TimePicker: added missing -.
* TimePicker: refactorings after feedback.
* TimePicker: renamed reserved prop name.
* TimePicker: added missing onChange call.
* TimePicker: removed alternative return type.
* TimePicker: fixed the sorting order on the recent list.
* TimePicker: added useCallback for the onEvent functions.
* TimePicker: moving away from default export.
* TimePicker: used the isMathString instead of private function.
* TimePicker: minor refactoring simplify the code.
* TimePicker: Added empty container that will expand when less then 4 recent searches.
* TimePicker: changed the top to be absolute relative to the container.
* TimePicker: updated snapshots for failing tests.
* Fixed shadow
* Move it down a bit
* added some more tests.
* Fixed so we change the anchor point of the time picker in really small screens.
* removed memo.
* fixed snapshot.
* Make sure that we always use the correct timeZone when formatting output.
* Fixed form background.
* Some minor fixes after demo.
* Making sure that empty info box is centered.
* updated snapshots for timepicker after css changes.
* fixed so we don't overflow when input validation error.
* adjusted final things on the time picker.
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Tooltip: preventing xss injections via the colors variable.
* added xss check for single series tooltop color.
* added sanitize to the hoverInfo.value.
* first working example
* Support sorting, adding types while waiting for official ones
* using react-window for windowing
* styles via emotion
* sizing
* set an offset for the table
* change table export
* fixing table cell widths
* Explore: Use new table component in explore (#21031)
* Explore: Use new table component in explore
* enable oncellclick
* only let filterable columns be clickable, refactor renderrow
* remove explore table
* Keep using old merge tables logic
* prettier
* remove unused typings file
* fixing tests
* Fixed explore table issue
* NewTable: Updated styles
* Fixed unit test
* Updated TableModel
* Minor update to explore table height
* typing
* Refactor: Adds params to visit
* Refactor: Restructures exported Pages somewhat
* Refactor: Moves more into new framework but holdup because of bugs in digest
* Refactor: Finish migrating templating e2e tests to new framework
* Refactor: Changes after merge with master
* Refactor: Removes weird change
* Refactor: Adds duplication test
* Refactor: Adds move down and move up variable asserts
* Refactor: Adds some test to value select dropdown
* Prometheus: Display HELP and TYPE of metrics if available
- Prometheus recently added a metadata API around HELP and TYPE of
metrics
- request metadata when datasource instance is created
- use metadata to show help and type in typeahead suggestions and in
metrics selector as tooltip
* Fix types
* Refactor: Adds ScenarioContext
* Refactor: Removes async
* Refactor: Adds video and reverts CIRCLE_SHA2 to CIRCLE_SHA1
* Refactor: Adds videos to release job as well
Adds support for region annotations in Postgres, MySQL and
MSSQL data sources by adding a column named timeend to
annotation query.
Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Closes#20918
Ref #10589
* use default from datasource if not saved on dash/query
* find datasource default workspace in returned workspace list
* don't need the find
* fix dropdown
* UI: ConfirmButton component
* UI: add link button variant
* UI: add ConfirmButton story with delete option
* Chore: use ConfirmButton instead of DeleteButton
* UI: remove DeleteButton
* UI: rename confirmButtonVariant to confirmVariant
* UI: use Form.Button in ConfirmButton
* Chore: use sm ConfirmButton size after changing defaults
* Revert "UI: add link button variant"
This reverts commit 4372350daa.
* Chore: add 'link' variant type to the Button
* UI: DeleteButton component on top of ConfirmButton
* Chore: use DeleteButton instead of ConfirmButton
* Chore: DeleteButton, use md size by default
* Chore: update test snapshots
* feat: adding lookup limit to OpenTSDB settings
Adding lookup to OpenTSDB datasource settings and using it in the datasource for tag value lookup and suggest
* Document the change.
* feat: UI for configuring OpenTSDB lookup limit.
* Apply prettier.
* Fix compilation error.
* Logs: Optional logs label column
- reintroduces label column that was removed when log details were
introduced
- added to explore and also as a new option to logs panel
- explore column settings now stored in localstorage
- labels are rendered with font size xs
- labels that start with `_` or are called `level` or `filename` are not
displayed
- removed click handlers and moved remaining `LogLabel` logic into `LogLabels`
* Added prop to satisfy interface
* Review feedback
* removed comment
* Changed label of label column switch
* Add support for primitive values/onchange
* Fix segment clickaway bug
* Fix onchange
* Use primitive in cloudwatch
* Add placeholder
* Use placeholder in cloudwatch editor
* Fix lint error
* Fix lodash import
* Use new component story format
* Add support for autofocus
* Use selectable value for onchange event
* Fix lint error
* UI: ConfirmModal component based on Modal
* UI: refactor ConfirmModal after Modal changes
* UI: use Icon component for Modal
* UI: ConfirmModal tests
* UI: ConfirmModal story
* Prometheus: disable dynamic label lookup on big datasources
- when a prometheus datasource has more than 10000 metrics, label lookup
for the query field is disabled
- installations of that size have slow typehead lookup times and make
the editor sluggish
* Raise dynamic lookup threshold to 10000 metrics
* Run start tasks again
- since the API update, the URL fallback was working, but the response
format also needed adapting: `data` (v1) vs `values` (pre-v1)
- this change looks for either data or values in the response for test
and metadata requests
* 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.
* Datasource/Loki: Fixes issue where time range wasn't being supplied with annotation query
Closes#20667
* Add test to verify new behavior
* Added end/start check to test
* update fixed
* update fixed
* update fixed
* don't change any tests
* add mising space
* Custom unit formats
* return a string for kbn
* return a string for kbn
* return a string for kbn
* Simplify unit tests
* More units
* fix more tests
* fix more tests
* fix more tests
* format values
* format values
* TimeSeries to string
* more kbn tests
* use the formatted value
* BarGauge: Fixed font size calculations
* support prefix
* add si support
* avoid npe
* BarGauge/BigValue: value formatting
* fix some tests
* fix tests
* remove displayDateFormat
* another unicode char
* Graph: Use react unit picker
* Updated unit picker
* Fixed build errors
* more formatting
* graph2 tooltip formatting
* optional chaining
* TablePanel: Don't include hidden columns in CSV export
Fixes#12076
* GraphPanel: Don't include hidden series in CSV export
Series are hidden if all values are zero/empty and the relevant graph
option is enabled as well. (e.g. "Hide series: With only nulls")
Fixes#12076
* adding configeditor
* fix method signature and add state for metrictankhelper
* fix onChangeHandler
* prettier fix
* remove config and fix autoversion
* adding optional parameter to make this build
* set default version if none specified
* Graphite: removed version detection
* Loki: Fix query error for step parameter
- Loki does not fully support float steps like prometheus and returns a
query error
- this change makes sure that the step parameter is rounded to an
integer
* Added test and comments
* Panels: Added support to set panel padding to zero
* WIP: fullChromeControl work
* Tweaks to header position
* Reverted some overlay mechanic and now back to no title only
* Fixed test
* Fixed transparent flag
* Added show title
* Added font weight to value
* Reverted back to no padding option
* Fixed issue with border and width and height
* refactor to multiple rows
* added name for org user struct
* added name getorgusers
* added user name to tableview
* made test pass
* updated userMocks to user name field
* added missing UsersTable snapshot
* added name on teammembers page, be able to search query for name, login and email
* added the updated snapshots
* conform to same sorting as output form
* conform to previous way of using it
* sort first by login and after by email, as it was before
* Remove highres flag since it's not being used
* Remove not used code. Init id field correctly
* Fix broken tests
* Remove GMS related calculations
* Rename period field
* Add breaking changes to changelog. Also update upgrading docs
* Update snapshot
* Update docs after feedback
* Changes after feedback
* convert config editor to react
* tests and some cleanup
* test
* snaps
* updating per comments
* remove anonymous funcs, remove config from state
* remove unecessaries
* 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
* Chore: Move and wrap Cascader component to @grafana/ui
Closes#19042
* Removes unneeded props from interface and removes rc-trigger
* Removes more unneeded props
* CloudWatch: Datasource improvements
* Add statistic as template variale
* Add wildcard to list of values
* Template variable intercept dimension key
* Return row specific errors when transformation error occured
* Add meta feedback
* Make it possible to retrieve values without known metrics
* Add curated dashboard for EC2
* Fix broken tests
* Use correct dashboard name
* Display alert in case multi template var is being used for some certain props in the cloudwatch query
* Minor fixes after feedback
* Update dashboard json
* Update snapshot test
* Make sure region default is intercepted in cloudwatch link
* Update dashboards
* Include ec2 dashboard in ds
* Do not include ec2 dashboard in beta1
* Display actual region