Commit Graph

170 Commits

Author SHA1 Message Date
renovate[bot]
99b50ffa00
Update dependency @testing-library/dom to v8 (#40990)
* Update dependency @testing-library/dom to v8

* Update our use of useFakeTimers

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-27 16:57:20 +01:00
Marcus Andersson
07ef4060a3
Alerting: adding a time picker for selecting relative time. (#33689)
* adding placeholder for relative time range.

* fixed story.

* added basic structure to handle open/close of time range picker.

* removed section from TimeOptions since it isn't used any where.

* adding mapper and tests

* move relativetimepicker to its own dir

* added some simple tests.

* changed test.

* use relativetimerangeinput

* redo state management

* refactored the tests.

* replace timerange with relativetimerange

* wip

* wip

* did some refactoring.

* refactored time option formatting.

* added proper formatting and display of time range.

* add relative time description, slight refactor of height

* fixed incorrect import.

* added validator and changed formatting.

* removed unused dep.

* reverted back to internal function.

* fixed display of relative time range picker.

* fixed failing tests.

* fixed parsing issue.

* fixed position of time range picker.

* some more refactorings.

* fixed validation of really big values.

* added another test.

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
2021-05-12 17:51:31 +02:00
Hugo Häggmark
c6d4d14a89
LibraryPanels: Adds folder filter to manage library panel page (#33560)
* LibraryPanels: Adds folder filter

* Refactor: Adds folder filter to library search

* Refactor: splits huge function into smaller functions

* LibraryPanels: Adds Panels Page to Manage Folder tabs (#33618)

* Chore: adds tests to LibraryPanelsSearch

* Refactor: Adds reducer and tests

* Chore: changes GrafanaThemeV2

* Refactor: pulls everything behind the feature toggle

* Chore: removes clear icon from FolderFilter

* Chore: adds filter to SortPicker

* Refactor: using useAsync instead
2021-05-04 13:59:40 +02:00
kay delaney
bad048b7ba
Performance: Standardize lodash imports to use destructured members (#33040)
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.

* Remove unnecessary _ import from Graph component

* Enforce lodash import style

* Fix remaining lodash imports
2021-04-21 09:38:00 +02:00
Joan López de la Franca Beltran
610999cfa2
Auth: Allow soft token revocation (#31601)
* Add revoked_at field to user auth token to allow soft revokes

* Allow soft token revocations

* Update token revocations and tests

* Return error info on revokedTokenErr

* Override session cookie only when no revokedErr nor API request

* Display modal on revoked token error

* Feedback: Refactor TokenRevokedModal to FC

* Add GetUserRevokedTokens into UserTokenService

* Backendsrv: adds tests and refactors soft token path

* Apply feedback

* Write redirect cookie on token revoked error

* Update TokenRevokedModal style

* Return meaningful error info

* Some UI changes

* Update backend_srv tests

* Minor style fix on backend_srv tests

* Replace deprecated method usage to publish events

* Fix backend_srv tests

* Apply suggestions from code review

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* Minor style fix after PR suggestion commit

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Prettier fixes

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-03-16 17:44:02 +01:00
Dominik Prokop
8d339a279b
Eslint: no-duplicate-imports rule (bump grafana-eslint-config) (#30989)
* Eslint: no-duplicate-imports rule (bump grafana-eslint-config)

* Chore: Fix duplicate imports (#31041)

* Rebased this branch into eslint-no-duplicate-imports

* updated some changes

* merged uncaught duplicate imports

* fixes frontend test- I hope

* fixes e2e test- I hope

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-02-11 13:45:25 +01:00
Torkel Ödegaard
f109f06485
Graph: Fixes auto decimals issue in legend and tooltip (#30628)
* Graph: Fixes auto decimals issue in legend and tooltip

* Updated decimals
2021-01-26 12:37:48 +01:00
Torkel Ödegaard
1d689888b0
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00
Torkel Ödegaard
74c65eca26
EventBus: Introduces new event bus with emitter backward compatible interface (#27564)
* updated

* Experimenting with event bus with legacy support

* Before switch to emitter

* EventBus & Emitter unification

* Everything using new EventBus

* Making progress

* Fixing merge issues

* Final merge issues

* Updated

* Updates

* Fix

* Updated

* Update

* Update

* Rename methods to publish and subscribe

* Ts fixes

* Updated

* updated

* fixing doc warnigns

* removed unused file
2020-11-03 13:08:54 +01:00
Torkel Ödegaard
b37e132cec
Annotations: Fixes issue with showing error notice for cancelled annotation queries (#27557) 2020-09-14 09:59:12 +02:00
kay delaney
783391a861
CloudWatch Logs: Adjusts CloudWatch Logs timeout logic (#26621)
* CloudWatch Logs: Adjusts CloudWatch Logs timeout logic

Previously CloudWatch Logs queries would time out if,
after a number of attempts, a response was received with no additional data.
This commit changes the behavior so that a consecutive number of requests
yielding no additional data must be made before we cancel the query
2020-09-07 14:41:36 +01:00
Torkel Ödegaard
a49daf5676
BackendSrv: Improves logic for hiding requests from query inspector (#26877)
* BackendSrv: Improves logic for hiding requests from query inspector

* fixed tests

* Update explore query inspector
2020-08-10 16:08:11 +02:00
Torkel Ödegaard
3c1346d83a
BackendSrv: Fix error alert logic (#26411) 2020-07-17 17:01:21 +02:00
Torkel Ödegaard
81e955e6b5
BackendSrv: Cancellable requests & Observable all the way (#25746)
* BackendSrv: Observable all the way POC

* starting to unify code paths

* tests pass

* Unified error handling

* Single request path and error handling

* Fixed ts issue

* another ts issu

* Added back old requestId cancellation

* Slow progress trying to grasp the full picture of cancellation

* Updates

* refactoring

* Remove a bunch of stuff from backendSrv

* Removed another function

* Do not show error alerts for data queries

* Muu

* Updated comment

* fixed ts issue

* unify request options type

* Made query inspector subscribe to backendSrv stream instead of legacy app events

* Add back support for err.isHandled to limit scope

* never show success alerts

* Updated tests

* Fixing tests

* Minor weak

* Improved logic for the showErrorAlert and showSuccessAlert boolean flags, now they work more logically

* Fix issue
2020-07-07 21:22:47 +02:00
Hugo Häggmark
00a9af00fc
Templating: removes old Angular variable system and featureToggle (#24779)
* Chore: initial commit

* Tests: fixes MetricsQueryEditor.test.tsx

* Tests: fixes cloudwatch/specs/datasource.test.ts

* Tests: fixes stackdriver/specs/datasource.test.ts

* Tests: remove refrences to CustomVariable

* Refactor: moves DefaultVariableQueryEditor

* Refactor: moves utils

* Refactor: moves types

* Refactor: removes variableSrv

* Refactor: removes feature toggle newVariables

* Refactor: removes valueSelectDropDown

* Chore: removes GeneralTabCtrl

* Chore: migrates RowOptions

* Refactor: adds RowOptionsButton

* Refactor: makes the interface more explicit

* Refactor: small changes

* Refactor: changed type as it can be any variable type

* Tests: fixes broken test

* Refactor: changes after PR comments

* Refactor: adds loading state and call to onChange in componentDidMount
2020-06-04 13:44:48 +02:00
Hugo Häggmark
e65dbcfea1
Variables: enables cancel for slow query variables queries (#24430)
* Refactor: initial commit

* Tests: updates tests

* Tests: updates snapshots

* Chore: updates after PR comments

* Chore: renamed initVariablesBatch

* Tests: adds transactionReducer tests

* Chore: updates after PR comments

* Refactor: renames cancelAllDataSourceRequests

* Refactor: reduces cancellation complexity

* Tests: adds tests for cancelAllInFlightRequests

* Tests: adds initVariablesTransaction tests

* Tests: adds tests for cleanUpVariables and cancelVariables

* Always cleanup dashboard on unmount, even if init is in progress. Check if init phase has changed after services init is completed

* fixed failing tests and added some more to test new scenario.

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2020-06-04 08:59:57 +02:00
Alex Khomenko
9771b1c745
Search/fix folder sort (#23893)
* Search: Move layout to query reducer/hook

* Search: Refactor search_srv

* Search: Fix types

* Search: Move extra layout/sort logic to reducer

* Search: Fix Select min-width

* Search: Fix filter by starred

* Search: Update tests

* Search: Simplify query return

* Search: Set width to auto on HorizontalGroup

* Search: Fix tests
2020-04-27 15:08:48 +03:00
Alex Khomenko
1f2a70117b
Search: cleanup old Angular files (#23860)
* Search: Remove wrapperRef

* Search: Remove angular search files

* Search: Unify search types

* Search: Remove redundant hideHeader prop

* Search: Remove app/types/search.ts

* Search: Update imports

* Search: Fix type errors
2020-04-24 18:07:57 +03:00
Dominik Prokop
d2a13c4715
FieldOverride: Support data links via field overrides (#23590)
* Move xss and sanitize packages to grafana-data

* Move text, url and location utils to grafana-data

* Move grafana config types to grafana-data

* Move field display value proxy to grafana-data

* Fix

* Move data links built in vars to grafana-data

* Attach links supplier to when applying field overrides

* Prep tests

* Use links suppliers attached via field overrides

* locationUtil dependencies type

* Move sanitize-url declaration to grafana-data

* Revert "Move sanitize-url declaration to grafana-data"

This reverts commit 11db9f5e55.

* Fix typo

* fix ts vol1

* Remove import from runtime in data.... Make TS happy at the same time ;)

* Lovely TS, please shut up

* Lovely TS, please shut up vol2

* fix tests

* Fixes

* minor refactor

* Attach get links to FieldDisplayValue for seamless usage

* Update packages/grafana-data/src/field/fieldOverrides.ts

* Make storybook build
2020-04-20 07:37:38 +02:00
Ivana Huckova
1c58202b26
@grafana/ui: Replace various icons using Icon component (#23442)
* Replace icons in dashboard and settings

* Replace icons in alerting

* Update batch of icons

* Implement icons accross various files

* Style updates

* Search: Fix recent and starred icons

* Update styling and details

* Replace new icon created by unicons

* Fix e2e test, styling

* Minor styling updates

Co-authored-by: Clarity-89 <homes89@ukr.net>
2020-04-12 22:20:02 +02:00
Ryan McKinley
db166c4c41
Chore: remove file export (use inspector/toCSV()) (#23508)
* remove file export... use CSV download

* remove file export... use CSV download
2020-04-10 21:08:19 -07:00
Alex Khomenko
ce3a1fc56c
Search/migrate search filter actions (#23133)
* Search: Initial setup

* Search: Use icon prop

* Search: Add button variants

* Search: Enable toggle all

* Search: Fix starred filter

* Search: update tests

* Search: Enable filters

* Search: Use emotion styling

* Search: Enable dashboard deleting

* Search: Enable dashboard moving

* Search: Update tests

* Search: Add SearchResultsFilter.test.tsx

* Search: Tweak types

* Search: Remove onReset

* Search: Remove redundant fragment

* Search: Use HorizontalGroup

* Search: Alight top checkbox
2020-04-02 14:07:31 +03:00
Torkel Ödegaard
40d195e4a7
BackendSrv: Adds config to response to fix external plugins that use this (#23032)
* BackendSrv: Added config to response

* QueryInspector: Removing config from showing up

* Replace config with request and make it be the unmodified params sent in
2020-03-25 10:21:12 +01:00
Hugo Häggmark
8d5c6053db
BackendSrv: only add content-type on POST, PUT requests (#22910)
* BackendSrv: only add content-type on POST, PUT requests
Fixes #22869

* Tests: imports polyfill for Headers
2020-03-20 10:21:32 +01:00
Ivana Huckova
0d88a49126
Remove duplicated localStorage mock (#22872) 2020-03-19 09:24:28 +01:00
Hugo Häggmark
b30f4c7bb0
Fix: fixes issue with headers property with different casing (#22778)
Fixes #22756
2020-03-16 06:24:55 +01:00
Hugo Häggmark
b51e28bc15
Chore: reduces strict null errors to 824 (#22744)
* Chore: reduces strict null errors with 100+

* Chore: lowers the build error number
2020-03-12 10:22:33 +01:00
Marcus Andersson
cc813d71c6
Templating: Migrates some variable types from Angular to React/Redux (#22434)
* Refactor: Adds variables in state to TemplateSrv

* Refactor: Introduces some typings and structures

* Refactor: Introduces picker to adapter

* Refactor: Removes useState and introduces contains instead

* Refactor: Introduces Variable Editor

* Refactor: Adds uuid and simplifies state

* Refactor: Consolidates to VariableRenderer

* Refactor: Adds name change capability

* Refactor: Adds variableMiddleware

* Refactor: Adds ability to change Angular type to type in State

* Fix: Fixes so we check for duplicate names

* Refactor: Adds ability to change State type to type in Angular

* Refactor: Updates name in dashboard templating list

* Refactor: Adds label change to VariableEditor

* Refactor: Adds hide change to VariableEditor

* Refactor: Adds update ability

* Refactor: Adds tooltip

* Refactor: Adds SelectionOptionsEditor

* Refactor: Adds query editor and validation

* Refactor: Adds regex and sort to editor

* Refactor: Adds Selection options

* Refactor: Adds Varible Values Previewer

* Refactor: Changes from array in state to Record

* Refactor: Removes getVariableAtIndex from templateSrv

* Tests: Fixs broken tests

* Chore: Fixes duplicate merge import

* Refactor: Removes strict null errors

* Refactor: Adds duplicate variable

* Refactor: Adds remove variable

* Refactor: Adds change order of variables

* Refactor: Adds add new variable

* Chore: Fixes Prettier formatting

* Refactor: Adds VariablePicker

* Fixed so sub menu is displayed when we only have redux template variables.

* removed unused variable.

* tags will be visibile in the new react picker.

* added some nice colors to the tags.

* Added thunk for selecting a tag.

* Refactor: Cleans up templating state when dashboard unloads

* Refactor: Adds save capabilities for variables in state

* added possibility to select tag.

* Added so you can deselect a tag.

* Fixed issue with coloring on top.

* minor refactoring to make the code more slim.

* Refactor: Fixes dispatch return and copy of variable

* selecting options when tag i selected

* small refactoring.

* fixed so we use options.

* Refactor: Adds getValueForUrl capabilities

* first implementation of keyboard navigation on picker.

* removed comment.

* fixed so you can toggle all options.

* Refactor: Simplified state handling using Redux Toolkit and flat reducer structure

* Refactor: Adds sharedTemplatingReducer and queryVariableReducer

* Tests: Fixs broken tests

* Chore: Removes some strict null errors

* Tests: Fix broken tests

* Refactor: Splitted QueryVariablePicker into smaller components

* Refactor: Moves linktext and selected tags to component instead

* Fix: Fixes the ability to have multiple dropdowns opened at same time

* Fix: Fixes onKeyDown from prev refactor

* Refactor: Adds searchfilter searching

* Tests: Fixes after running e2e tests

* Refactor: Adds an attempt to solve dependencies at startup

* Refactor: Adds feature toggle

* Refactor: Resets all angular files to master

* Refactor: Move stuff to query folder

* Refactor: Initial commit for SubMenu component

* Refactor: Updated DashboardModel with new list

* Refactor: Adds feature toggle to dashboard model and friends

* Refactor: Adds picker to SubMenu

* Refactor: Fixes styling on SubMenu

* Refactor: Fixes processvariables

* Refactor: Initial EditorList skeleton

* Refactor: Refactors out VariableEditorList and VariableEditorContainer

* Refactor: Adds New variable functionality

* Refactor: Adds registred types

* Refactor: Adds edit existing variable functionality

* Refactor: Changes params to thunks

* Refactor: Small fix for cleaning up state when clicking update/add

* Refactor: Better typings for outer containers

* Refactor: Adds change order functionality

* Refactor: Removed notify angular args

* Change so the url is in sync with the redux template variables.

* Adding support for saving proper values and checking changes.

* Refactor: Adds duplicate variable functionality

* Feature: Adds remove variable functionality

* Refactor: Small refactor so e2e tests work as before

* Refactor: Returns null if no visible variables

* Refactor: Adds annotations to SubMenu

* Refactor: Fixes toggling of annotations in SubMenu

* added dashboard links to new submehu.

* Refactor: Small refactor breaking up into smaller components

* Fix: Fixes infinite recursive loop when changing varible name

* Templating: Do not mutate location query state

* Refactor: Fixes minor timing issue when adding new variable

* Refactor: removes initialization in variable_srv constructor

* Refactor: Suggestion on how to handle templating.list in DashboardExporter

* Refactor: Adds getVariables typings and changes ChangeTracker and ShareSnapshotCtrl

* Refactor: Adds getVariable on DashboardModel and changes DashboardMigrator

* Fix: Fixes repeated panels

* wip: starting to add custom variable type.

* Refactor: Merging two different toVariablePayload functions

* Tests: Fixes broken tests

* Fix: Reduces strict null errors

* Tests: Initial commit and fixes strange dependency order

* Tests: Covers sharedTemplatingReducer with tests

* Refactor: Rename state/index.ts => state/reducers.ts as every where else

* Refactor: Renames and moves adapters.ts

* Tests: Adds tests for templatingReducer

* Tests: Adds intitial tests for queryVariableReducer

* starting to ad custom variable.

* Tests: Adds more queryVariableReducer tests

* Added support for custom variable. Next up applying some DRY principles and refactoring.

* fixed compile issue.

* added todo.

* Tests: Fixes broken test

* Tests: Covers queryVariableReducer with tests and fixed a couple of bugs

* Fix: Fixes broken test

* Fix: Reduces strict null errors

* change so custom won't be depending on anything elese.

* fixed descriptions.

* removed unused dependency.

* Fixed issue when adding a new variable and editor is being unmount twice.

* fixed issue with select option loop.

* changed so we update query on typing in editor and removed it from component state.

* Moved runQuery up one level in the component tree.

* renamed action and moved it to custom actions.

* moved applyStateChanges to shared code.

* removed todo comment.

* first stab on moving picker to more general.

* Refactor: Changes so we always show variables type

* removed duplicate code regarding picker.

* Did some renamings.

* Feature: Adds text box variable type

* moved tests from query reducer to picker reducer.

* Removed picker from VariableState.

* removed reference to picker.

* Some more refactorings of the picker reducer + actions.

* Chore: Refactors away editor state to its own state slice (#22515)

* Refactor: Inital move, tests not working

* Tests: Adds editorReducer tests

* Refactor: Cleaning up

* Refactor: Moves logic to thunk instead

* Refactor: Initial commit

* Refactor: Combines reducers to one state

* Refactor: Adds combine reducers

* moved navigation logic flow to a thunk instead of in the component.

* fixed issue with rendering picker link.

* Refactor: Removes variable prop from templating.variables

* refactored and removed some more code.

* Feature: adds Constant variable type

* fixed so tags can be selected.

* Fix: fixes default hide for constant and enum order

* fixed so tags works again.

* Fix: fixes so we use Angular editor when newVariables is not defined

* Fix: fixes wrong hide default for Constant variable

* Fix: fixes bug when using duplicate button

* Fix: changes action id

* Tests: prepares for newVariables

* Chore: reduces strict null errors

* Refactor: removes uuidInEditorReducer for simplification

* Chore: changes after PR comments

* Chore: uses getConfig instead of config

* Tests: fixes so e2e tests check for feature toggle and fixed initLock bug

* Refactor: changes so sharedReducer uses createSlice instead

* Refactor: changes textBoxVariableReducer to use creactSlice instead

* Refactor: changes queryBoxVariableReducer to use creactSlice instead

* Refactor: changes customVariableReducer to use creactSlice instead

* Refactor: changes constantVariableReducer to use creactSlice instead

* Refactor: moves types to specific types.ts files instead

* changed so we use queryValue stored on the variable to populate options input when opening picker.

* Feature: adds the ability to test templating thunks using real store and middleware

* Chore: cleans up unused import

* excluded queryValue from the getSaveModel

* Refactor: adds whenAsyncActionIsDispatched to reduxTester

* Tests: adds initial tests for processVariables

* Added reducer tests for constant variable.

* added tests for custom reducer.

* added tets for texbox reducer.

* Tests: adds more tests for ProcessVariable

* Refactor: fixes processVariable flow so we do notrun updateOptions twice

* Tests: finishes tests for processVariables and removed skip test

* added actions tests for custom and constant.

* Tests: adds tests for setOptionFromUrl

* Tests: adds a naive variable mock builder

* Tests: adds tests for validateVariableSelectionState

* added tests for query variable actions.

* added last test for query actions.

* added more tests.

* some more tests.

* fixed typing errors.

* Fixed issues with variable tags.

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-10 08:53:41 +01:00
Hugo Häggmark
747b546c26
Chore: Adds cancellation to backendSrv request function (#22066)
* Chore: Adds cancellation to backendSrv request function

* Refactor: Corrects typing for requestId
2020-02-10 15:14:53 +01:00
Dominik Prokop
dd37d003ef
Links: Assure base url when single stat, panel and data links are built (#21956)
* Assure base url when single stat, panel and data links are built

* Update public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx

* Update public/app/features/panel/panellinks/link_srv.ts

* Update public/app/features/panel/panellinks/link_srv.ts

* Update public/app/features/panel/panellinks/link_srv.ts

* Update public/app/features/panel/panellinks/link_srv.ts

* Review updates

* Remove unnecessary code
2020-02-10 12:45:15 +01:00
Hugo Häggmark
cd6809685f BackendSrv: Returns correct error when a request is cancelled (#21992)
Fixes #21991
2020-02-10 06:29:52 +01:00
Hugo Häggmark
08d330b406
Fix: Fixes user logout for datasourceRequests with 401 from datasource (#21800) 2020-01-29 06:24:15 +01:00
Andrej Ocenas
c3a19c6d98
Influxdb: Fix issues with request creation and parsing (#21743) 2020-01-27 18:21:41 +01:00
Hugo Häggmark
84ef0ebb17
BackendSrv: Fixes POST body for form data (#21714)
* BackendSrv: Fixes POST body for form data
Fixes #21688

* Tests: Changes to POST examples
2020-01-27 08:47:27 +01:00
Hugo Häggmark
18788727f4
BackendSrv: Adds missing props back to response object in datasourceRequest (#21727)
* BackendSrv: Adds status, headers, statusText, redirect, type and url back to response
Fixes #21662

* BackendSrv: Adds request object back to datasourceRequest response
Fixes #21662
2020-01-27 07:25:24 +01:00
kay delaney
87af7d9987
backendSrv: Only stringifies request body if payload isn't already a string (#21639)
* backendSrv: Only stringifies request body if payload isn't already a string

* Add test cases to verify behaviour
2020-01-23 08:54:20 +00:00
kay delaney
cf2cc71393 Chore: Remove angular dependency from backendSrv (#20999)
* 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>
2020-01-21 10:08:07 +01:00
Torkel Ödegaard
98bea0990f
OrgSwitcher: Fixed issue rendering org switcher even when it's not open (#21061)
* OrgSwitcher: Fixed issue rendering org switcher even when it's not open

* Updated test

* Fixed unit test
2019-12-13 09:27:45 +01:00
Hendrik van Huyssteen
bf0d87aaf6 Graph: Add fill gradient option to series override line fill (#20941) 2019-12-10 09:09:48 +01:00
Torkel Ödegaard
a9bf8f80e9
Search: Fixed angular digest issues (#20906) 2019-12-05 19:17:26 +01:00
kay delaney
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
kay delaney
a093fbb51a Migration: Migrate org switcher to react (#19607)
* Migration: Migrate org switcher to react

* Improve modal overflow behavior

* Updated modal backdrop

* Renamed type

* Modal: Refactoring and reducing duplication
2019-12-03 22:47:19 +01:00
kay delaney
ca3dff99e8
Chore: Bumps prettier version for new typescript syntax support (#20463)
* Chore: Bumps prettier version for new typescript syntax support

* Ran new version of prettier against the codebase
2019-11-19 13:59:39 +00:00
Torkel Ödegaard
ba7049dd0f
Templating: highlight first item when searching a variable dropdown (#20264) 2019-11-08 09:57:32 +01:00
Hugo Häggmark
89c553cfe6
TablePanel: Prevents crash when data contains mixed data formats (#20202)
* Fix: Prevents crash when table receives mixed data formats
Fixes #20075

* Tests: Adds tests for data format reducers

* Refactor: Updates after PR comments

* Refactor: Missed a couple of places where filtering was needed
2019-11-06 16:57:15 +01:00
Andrej Ocenas
0a78652404
Explore: Add custom DataLinks on datasource level for Loki (#20060)
Adds a config section with derived fields which is a config that allows you to create a new field based on a regex matcher run on a log message create DataLink to it which is the clickable in the log detail.
2019-11-06 16:15:08 +01:00
Andrej Ocenas
dca872f75f
Explore: Memory leak fix due to dedup selector (#20107)
Change custom hashing and lodash.memoize based selector for standard reselect.
2019-11-01 16:38:34 +01:00
Hugo Häggmark
cb0e80e7b9 TemplateVariables: Introduces $__searchFilter to Query Variables (#19858)
* WIP: Initial hardcoded version

* Feature: Introduces SearchFiltering to Graphite

* Feature: Adds searchFiltering to MySql

* Tests: Adds tests to Graphite and MySql

* Feature: Adds $__searchFilter to TestData

* Refactor: Adds searchFilter to Postgres and extracts function

* Tests: Adds tests to variable

* Refactor: Adds debounce and lodash import optimization

* Docs: Adds documentation

* Refactor: Removes unused function and fixes typo

* Docs: Updates docs

* Fixed issue with UI not updating when no  was used due to async func and no .apply in the non lazy path
2019-10-18 11:40:08 +02:00
kay delaney
99411bf37a
Types: Adds type safety to appEvents (#19418)
* Types: Add type safety to appEvents
2019-10-14 09:27:47 +01:00
Andrej Ocenas
0490dbb88d
Explore: Generate log row uid (#18994) 2019-09-30 14:44:15 +02:00