Commit Graph

50 Commits

Author SHA1 Message Date
Josh Hunt
3c6e0e8ef8
Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
Torkel Ödegaard
d07fa0ce5e
AngularJS: Move angular stuff into app/angular (#41415)
* Moving more angular parts

* Moving more angular stuff

* Moving components

* Move more things
2021-11-08 18:41:04 +01: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
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
Alex Khomenko
15ac76a47b
Search: Safari UI fixes (#24567)
* Search: Add height: 100% to page containers

* Search: Reset TagOption display to block

* Search: Add title to result list

* Search: Use flex-basis vs height

* Search: Remove IconButton

* Search: Do not shrink select options

* Search: Fix hasEditPermissionInFolders

* Search: Update tests

* Search: Fix prop

* Remove select wrapper class

* Update snapshot
2020-05-12 17:10:48 +03:00
Alex Khomenko
0396b220a3
Search: Save folder expanded state (#24496)
* Search: Save folder expanded state

* Search: Remember expanded state on search close
2020-05-12 13:51:00 +03:00
Alex Khomenko
3a2c844a8a
Search: folder view improvements (#24324)
* Search: Do not set items if no results returned

* Search: Simplify canSave logic

* Search: Add initialLoading state

* Search: Add itemsFetching state to folder

* Search: Fix props and tests

* Search: Fix strict null check
2020-05-06 12:53:28 +03:00
Alex Khomenko
ab07326169
Search: close overlay on Esc press (#24003)
* Search: Close on Esc

* Search: Increase bottom padding for the last item in section

* Search: Move closing search to keybindingsSrv

* Search: Fix folder view

* Search: Do not move folders if already in folder
2020-04-29 19:18:37 +03:00
Alex Khomenko
32492dd650
Search/ui issues (#23945)
* Search: Move layout to query reducer/hook

* Search: Move extra layout/sort logic to reducer

* Search: Tweak action row spacing

* Search: Update TagOption

* Search: Remove duplicate function

* Search: Add Clear tags button

* Search: Align checkbox

* Search: Add TagFilter.displayName

* Search: Update default placeholder

* Search: Return all dashboards for list view

* Search: Apply custom line-height to ActionRow checkbox
2020-04-27 19:16:03 +03: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
Alex Khomenko
c0fe565499
Search add sorting picker (#23746)
* Search: Extend search_srv with getSortOptions

* Search: Enable sorting

* Search: Fullwidth search

* Search: Add SortPicker

* Search: Add useSearchLayout

* Search: Update sort query

* Search: Refactor items rendering

* Search: Add sort to manage dashboards

* Search: Add sort icon

* Search: Mock getSortOptions

* Search: Fix Select sizes

* Search: Move SortPicker to Select

* Grafana-UI: Add ActionRow.tsx

* Grafana-UI: Use ActionRow in dashboard search

* Grafana-UI: Update ActionRow styles

* Search: Update tests

* Search: enable clearing TagFilter

* Search: Move getSortOptions outside of component

* Search: Fix import

* Search: Limit container width

* Search: Replace SearchField's clear text with icon

* Search: Fix section items query #23792

* Search: Add icons for layout switch

* Search: Remove layout switch for folder page
2020-04-23 08:18:53 +03: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
Alex Khomenko
d04dce6a37
Search/refactor dashboard search (#23274)
* Search: add search wrapper

* Search: add DashboardSearch.tsx

* Search: enable search

* Search: update types

* Search: useReducer for saving search results

* Search: use default query

* Search: add toggle custom action

* Search: add onQueryChange

* Search: debounce search

* Search: pas dispatch as a prop

* Search: add tag filter

* Search: Fix types

* Search: revert changes

* Search: close overlay on esc

* Search: enable tag filtering

* Search: clear query

* Search: add autofocus to search field

* Search: Rename close to closeSearch

* Search: Add no results message

* Search: Add loading state

* Search: Remove Select from Forms namespace

* Remove Add selectedIndex

* Remove Add getFlattenedSections

* Remove Enable selecting items

* Search: add hasId

* Search: preselect first item

* Search: Add utils tests

* Search: Fix moving selection down

* Search: Add findSelected

* Search: Add type to section

* Search: Handle Enter key press on item highlight

* Search: Move reducer et al. to separate files

* Search: Remove redundant render check

* Search: Close overlay on Esc and ArrowLeft press

* Search: Add close button

* Search: Document utils

* Search: use Icon for remove icon

* Search: Add DashboardSearch.test.tsx

* Search: Move test data to a separate file

* Search: Finalise DashboardSearch.test.tsx

* Add search reducer tests

* Search: Add search results loading indicator

* Search: Remove inline function

* Search: Do not mutate item

* Search: Tweak utils

* Search: Do not clear query on tag clear

* Search: Fix folder:current search

* Search: Fix results scroll

* Search: Update tests

* Search: Close overlay on cog icon click

* Add mobile styles for close button

* Search: Use CustomScrollbar

* Search: Memoize TagList.tsx

* Search: Fix type errors

* Search: More strictNullChecks fixes

* Search: Consistent handler names

* Search: Fix search items types in test

* Search: Fix merge conflicts

* Search: Fix strictNullChecks errors
2020-04-08 18:14:03 +03:00
Alex Khomenko
85dc4e565e
Search/migrate search results (#22930)
* Search: Setup SearchResults.tsx

* Search: add watchDepth

* Search: Use SearchResults.tsx in Angular template

* Search: Render search result header

* Search: Move new search components to features/search

* Search: Render nested dashboards

* Search: Expand dashboard folder

* Search: Remove fa prefix from icon names

* Search: Enable search results toggling

* Search: Add onItemClick handler

* Search: Add missing aria-label

* Search: Add no results message

* Search: Fix e2e selectors

* Search: Update SearchField imports

* Search: Add conditional classes

* Search: Abstract DashboardCheckbox

* Search: Separate ResultItem

* Search: Style ResultItem

* Search: Separate search components

* Search: Tweak checkbox styling

* Search: Simplify component names

* Search: Separate tag component

* Search: Checkbox docs

* Search: Remove inline on click

* Add Tag component

* Add Tag story

* Add TagList

* Group Tab and TabList

* Fix typechecks

* Remove Meta

* Use forwardRef for the Tag

* Search: Use TagList from grafana/ui

* Search: Add media query for TagList

* Search: Add types

* Search: Remove selectThemeVariant from SearchItem.tsx

* Search: Style section + header

* Search: Use semantic html

* Search: Adjust section padding

* Search: Setup tests

* Search: Fix tests

* Search: tweak result styles

* Search: Expand SearchResults tests

* Search: Add SearchItem tests

* Search: Use SearchResults in search.html

* Search: Toggle search result sections

* Search: Make selected prop optional

* Search: Fix tag selection

* Search: Fix tag filter onChange

* Search: Fix uncontrolled state change warning

* Search: Update icon names

* Search: memoize SearchCheckbox.tsx

* Search: Update types

* Search: Cleanup events

* Search: Semantic html

* Use styleMixins

* Search: Tweak styling

* Search: useCallback for checkbox toggle

* Search: Add stylesFactory

Co-authored-by: CirceCI <circleci@grafana.com>
2020-03-26 10:09:08 +01: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
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
Hugo Häggmark
7eabc282e9
Chore: Adds typings to lodash (#16590) 2019-04-15 12:11:52 +02:00
Hugo Häggmark
d845aacbdc refactor: merged types and updated references 2019-03-19 17:44:58 +01:00
Hugo Häggmark
c1d585b156 chore: cleaning up noimplicit anys in search_srv and tests
progress: #14714
2019-03-19 14:48:35 +01:00
Torkel Ödegaard
16ad0f65ea Increase recent and starred limit in search and home dashboard, closes #13950 2018-12-19 11:40:38 +01:00
Patrick O'Carroll
5e0d0c5816 changed var to const (#13061) 2018-08-29 14:26:50 +02:00
Torkel Ödegaard
9b978b7203
tslint: autofix of let -> const (#13033) 2018-08-26 17:14:40 +02:00
Marcus Efraimsson
a879dd8c0c dashboards: render correct link for folder when searching for dashboards (#10763)
Fixes #10761
2018-02-05 13:23:24 +01:00
Daniel Lee
512f6992f1 dashfolders: rename Root folder to General. Closes #10692 2018-02-02 10:39:26 +01:00
Marcus Efraimsson
035b724725 dashboards: remove slug property in dashboard search responses
Removes slug property in dashboard search responses since this property isn't needed
anymore and it haven't been released to any stable release.
2018-01-31 18:40:54 +01:00
Marcus Efraimsson
92a0171a9b folders: change the front end route for browsing folders
Change the front end route for folders to /dashboards/f/<uid>/<slug of folder title>.
Use new route for deleting dashboard/folder by uid.
Retrieve dashboard/folder by uid when moving or deleting dashboards/folders.
2018-01-31 18:40:54 +01:00
Marcus Efraimsson
f2014223b4 dashboards: use new *url* prop from dashboard search for linking to dashboards
#7883
2018-01-31 00:42:17 +01:00
Torkel Ödegaard
85879a7014 prettier: change to single quoting 2017-12-20 12:33:33 +01:00
Torkel Ödegaard
2a360c45a2 ux: minor name change to search sections 2017-12-20 12:26:52 +01:00
Torkel Ödegaard
fadfc665e4 tech: ran pretttier on all typescript files 2017-12-19 16:06:54 +01:00
Marcus Efraimsson
196a05d487 dashfolders: bulk move/delete improvements
Use slug and url instead of uri
Check/uncheck a folder will check/uncheck all its children dashboards
Allow to move dashboards when there are both folders and dashboards selected
Hide the header of section when only managing one folder
#10081 #10181
2017-12-14 11:26:16 +01:00
Torkel Ödegaard
313735bd75 search: worked on search results 2017-12-13 15:51:59 +01:00
Marcus Efraimsson
d0a9770b8b dashboard: fix edge case with keyboard nav in dashboard search. #10100
If expanding a folder using mouse, unselect current keyboard selection
2017-12-07 11:14:43 +01:00
Marcus Efraimsson
f87b9aaa8a dashboard: keyboard nav in dashboard search - closes #10100
Pressing enter/return for a folder toggles it.
Pressing enter/return for a dashboard navigates to it.
2017-12-06 20:34:41 +01:00
Marcus Efraimsson
dd3c9da009 dashboard: Dashboard folder page wip #10083 2017-12-06 14:11:25 +01:00
Daniel Lee
781349d360 dashboard: dashboard search results component. closes #10080 2017-12-05 14:20:44 +01:00
Marcus Efraimsson
8f4ad1e496 dashlist: handle recent dashboards removed from backend 2017-11-28 09:07:28 +01:00
Torkel Ödegaard
7f3a3b9e55 search fix and update buttons on dashboard list page 2017-11-27 14:49:31 +01:00
Torkel Ödegaard
00df24b348 ux: search progress 2017-11-24 16:54:55 +01:00
Torkel Ödegaard
bc81298d4c worked on search 2017-11-24 16:18:56 +01:00
Daniel Lee
41a3431c4e dashlist: starred filter search 2017-11-22 18:44:57 +01:00
Daniel Lee
bd2b26e9f5 dashlist: fix tag filtering and some css 2017-11-21 14:47:19 +01:00
Daniel Lee
8daff73ba2 dashlist: started fixing js/css after design changes 2017-11-20 18:15:59 +01:00
Torkel Ödegaard
a8552bac21 more work on search 2017-11-20 16:21:50 +01:00
Torkel Ödegaard
c1539b90b7 minor update to dashboard search 2017-11-20 15:46:16 +01:00
Torkel Ödegaard
9ace21b689 improved search srv 2017-11-20 15:11:32 +01:00
Torkel Ödegaard
6c5e19c1e0 dashboard search 2017-11-20 13:37:26 +01:00
Torkel Ödegaard
fc1d8416a7 working on dashboard search 2017-11-20 12:47:03 +01:00
Torkel Ödegaard
c1fcfdb536 search: began writing test for new search 2017-11-02 16:54:33 +01:00