Commit Graph
100 Commits
Author SHA1 Message Date
Ashley Harrison 8d489dfd9b Navigation: Landing pages behind feature toggles (#54576)
* super quick attempt

* feature toggle everything

* only construct alertNav if there are navChildren

* fix toggle name

* plugin landing pages poc

* add apps route + put behind feature toggle

* use toIconName

* rename to NavLandingPage

* feature toggle new routes

* don't modify GetServerAdminNode

* some fairly hacky code to check if the plugin has a root page

* remove trailing slash
2022-09-05 10:07:13 +01:00
Ashley Harrison 0ab548a8b5 Chore: fixing some anys/type assertions (#54661)
* fixing some anys/type assertions

* make types consistent
2022-09-02 16:39:09 +00:00
Ashley Harrison 3e8d178fc1 convert LokiQueryEditor test to RTL (#54639) 2022-09-02 15:11:13 +01:00
Ashley Harrison 22e5ee3b52 update LokiExploreQueryEditor test to RTL (#54644) 2022-09-02 14:46:14 +01:00
Ashley Harrison 11689c0385 convert ConfigEditor test to RTL (#54636) 2022-09-02 12:48:37 +01:00
Ashley Harrison 9e74050472 Update latest.json (#54484) 2022-08-31 09:17:59 +01:00
Ashley Harrison db4a2d58a1 convert DerivedField test to RTL (#54334) 2022-08-30 10:28:06 +01:00
Ashley Harrison 5e394c0385 Convert influxdb ConfigEditor test to RTL (#54332) 2022-08-30 09:30:10 +01:00
Ashley Harrison 91948ce554 Convert elasticsearch ConfigEditor.test.tsx to RTL (#54301) 2022-08-26 13:29:31 +01:00
Ashley Harrison 15e19cef95 Navigation: improve page toolbar responsiveness (#54223)
* improve page toolbar responsiveness

* rename emotion style to be more descriptive

* remove unnecessary max-width
2022-08-25 16:21:29 +01:00
Ashley Harrison d765aaff49 use navId + pageNav on datasource pages (#54218) 2022-08-25 13:58:41 +01:00
Ashley Harrison 211c9991c5 Navigation: Add responsive behaviour to ToolbarButtonRow (#53739)
* hacky first attempt

* slightly cleaner...

* behaviour mostly working...

* remove unnecessary wrapper

* css tweaks

* much cleaner implementation with intersectionobserver

* set style props directly on children

* separate story, integrate when toggle is off

* improve story, integrate when toggle is on

* remove styles from DashNavTimeControls

* mock IntersectionObserver for all unit tests

* prettier

* don't use dropdown anymore

* add some basic documentation

* add right alignment to scenes toolbarbuttonrow

* just use the react children api to prevent duplicating children
2022-08-24 11:19:36 +01:00
Ashley Harrison 3cf95d7eee Chore: fix some anys pt.2 (#53928)
* correctly type some more any's

* undo this change for now...
2022-08-22 16:51:33 +01:00
Ashley Harrison 0f4b8c5e54 convert AzureCredentialsForm test to RTL (#53959) 2022-08-22 13:22:19 +01:00
Ashley Harrison f91f05f32c Chore: convert DebugSection test to RTL (#53965)
* convert DebugSection test to RTL

* remove unused import
2022-08-22 13:19:46 +01:00
Ashley Harrison 0b322a0f5d fix some anys (#53789) 2022-08-19 16:46:58 +01:00
Ashley Harrison b6835ef87d convert TestRuleResult to RTL (#53953) 2022-08-19 15:00:53 +01:00
Ashley Harrison 0550808126 use navId over navModel, add page descriptions + create pageNav for child pages (#53936) 2022-08-19 13:32:43 +01:00
Ashley Harrison 78995e252a implement responsive breadcrumb behaviour (#53764) 2022-08-19 09:17:52 +01:00
Ashley Harrison 7eab08364e Navigation: Improve responsiveness of TopSearchBar (#53777)
* remove some magic numbers + used grid for better responsiveness

* remove old responsive styles
2022-08-16 15:09:22 +01:00
Ashley Harrison 6cdeeeda3c remove UseState from last 2 stories (#53596) 2022-08-11 16:28:22 +01:00
Ashley Harrison f32c0058a1 remove UseState from legacy Select story (#53519) 2022-08-10 15:30:02 +01:00
Ashley Harrison 26e81cad21 Add tests for Breadcrumbs (#53514) 2022-08-10 12:56:25 +01:00
Ashley Harrison e51c80f8dd Storybook: remove UseState from ButtonSelect story (#53509)
* remove UseState from ButtonSelect story

* leave this type assertion for now
2022-08-10 07:00:19 -04:00
Ashley Harrison aaccb592cc remove UseState from Drawer story (#53503) 2022-08-10 11:40:33 +01:00
Ashley Harrison 6d495a6a8e Navigation: Improve breadcrumb accessibility (#53471)
* refactor breadcrumbs into their own folder, add appropriate accessibility

* rename Breadcrumb to BreadcrumbItem
2022-08-10 09:24:21 +01:00
Ashley Harrison d38e86f3a6 Storybook: add controls support + remove UseState from RelativeTimeRangePicker story (#53459)
* add controls support + remove UseState from RelativeTimeRangePicker story

* don't need this displayName

* exclude onChange
2022-08-10 08:55:22 +01:00
Ashley Harrison e73e3cac11 add controls support + remove UseState from WeekStartPicker.story.tsx (#53455) 2022-08-09 16:00:39 +01:00
Ashley Harrison 8185b6fdf7 refactor component to be more dumb, use LinkButton for icons and fix alignment (#53383) 2022-08-09 11:46:27 +01:00
Ashley Harrison 25c7dc9151 Add controls support + remove UseState from TimeRangePicker.story.tsx (#53376) 2022-08-09 11:20:03 +01:00
Ashley Harrison f1295e4bd0 Chore: Update version of @grafana/eslint-config (#53403)
* use let/const over var

* use new version of @grafana/eslint-config
2022-08-08 15:19:15 +01:00
Ashley Harrison 2fea3f0d9a BarGauge: Show empty bar when value, minValue and maxValue are all equal (#53314)
* prevent returning NaN from getValuePercent

* return 0 instead of NaN always
2022-08-08 09:11:46 +01:00
Ashley Harrison 202f5d38c8 Add missing package to @grafana/schema (#53252) 2022-08-03 11:28:01 -04:00
Ashley Harrison 9d6faa7e9a Storybook: remove UseState + add controls support to TimeZonePicker story (#53219)
* remove UseState + add controls support to TimeZonePicker story

* remove redundant check
2022-08-03 16:17:42 +01:00
Ashley Harrison 9c6aab3bc9 Chore: remove UseState + add support for controls in TimeOfDayPicker/TimeRangeInput story (#53040)
* remove UseState + add support for controls in TimeOfDayPicker story

* remove UseState + add controls support in TimeRangeInput story

* Add documentation + fix error when clearing

* properly type range
2022-08-02 13:33:59 +01:00
Ashley Harrison 4d47d7085b don't show dashboards or starred items in navbar when unauthenticated (#53051) 2022-08-02 09:57:32 +01:00
Ashley Harrison f64b241d32 Navigation: split logic, reenable unit test, copy whole node to prevent recursion error (#53033)
* split logic, reenable unit test, copy whole node to prevent recursion error

* remove double assignment
2022-08-01 14:47:52 +01:00
Ashley Harrison 6781041860 Import: prevent recursion blowup in redux + reintroduce import e2e test (#52985)
* prevent recursion blowup in redux, attempt to reintroduce import e2e test

* try importing json like this instead?

* need the panel validation

* Update text so it finds Panel data instead of Dataframe JSON

* skip test for now
2022-08-01 12:53:31 +01:00
Ashley Harrison 921d32d70b Chore: use new pa11y-ci version (#52953)
* use new pa11y-ci version, update some thresholds and set standard to WCAG2AA

* remove unneeded comment

* PRs won't have unified alerting enabled...
2022-07-28 12:49:41 -04:00
Ashley Harrison a98920f910 Storybook: add controls support + remove UseState from Collapse story (#52869)
* add controls support + remove UseState from Collapse story

* exclude className as well

* exclude className prop as well
2022-07-27 15:36:54 +01:00
Ashley Harrison 85e80d1d7b Don't make the whole row a drag handle, use css instead (#52795) 2022-07-27 09:18:16 +01:00
Ashley Harrison 4c9786ea18 add a note about starred dashboards in the navbar to the documentation (#52660) 2022-07-26 12:32:45 +01:00
Ashley Harrison 2b46138202 improve meta and story typings (#52659) 2022-07-22 17:19:16 +01:00
Ashley Harrison 64d30e37b2 add support for controls in DataSourceHttpSettings story (#52618) 2022-07-22 13:27:43 +01:00
Ashley Harrison c68ae0b616 remove UseState from SpectrumPalette story (#52612) 2022-07-21 16:20:31 +01:00
Ashley Harrison 27542445ce Chore: remove UseState from ColorPicker story (#52611)
* remove UseState from ColorPicker story

* remove story meta type assertion
2022-07-21 16:15:55 +01:00
Ashley Harrison f25c609105 Convert MultiModeGraphTooltip test to RTL (#52595)
* Convert MultiModeGraphTooltip test to RTL

* don't export these styles

* use theme instead of hardcoded style values
2022-07-21 15:54:18 +01:00
Ashley Harrison 986b766ca0 Chore: Make betterer tests more stable (#51703)
* rewrite eslint test to not care about position of errors

* changing file contents shouldn't require a betterer.results update

* fix up eslint test

* fix the undocumented stories test

* ignore .test.ts files as well
2022-07-04 12:13:20 +01:00
Ashley Harrison 2a6b32598d Chore: some low-hanging type assertion fruit (#51618)
* some low-hanging type assertion fruit

* results
2022-06-30 10:40:00 +01:00
Ashley Harrison 67802e64e6 keep the betterer message generic (#51563) 2022-06-29 15:57:49 +01:00
Ashley Harrisonanddsotirakis f654152dc8 Chore: split betterer into it's own CI step and allow failures for now (#51543)
* split betterer into it's own CI step and allow failures for now

* Run make drone

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-06-29 15:04:52 +01:00
Ashley HarrisonandLevente Balogh 688164bbd6 Chore: add a betterer test for undocumented stories (#51444)
* add a betterer test for undocumented stories

* update results

* Update .betterer.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* update results

* prettier

* slightly nicer regexp

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-29 12:25:31 +01:00
Ashley Harrisonandkay delaney 683bbc7373 Templating: Changing between variables with the same name now correctly triggers a dashboard refresh (#51490)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.ts

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.test.ts

* linting

* update betterer

Co-authored-by: kay delaney <kay@grafana.com>
2022-06-29 09:10:55 +01:00
Ashley Harrison 9251e5abf7 Fix lockfile... (#51516) 2022-06-28 12:26:17 -04:00
Ashley Harrison 2429fe1c70 Search: Add unit tests for SearchResultsTable (#51269)
* initial scaffolding for unit tests

* more tests for searchresultstable

* skip failing test, remove unused css

* Correctly mock stuff so TableCell renders correctly!
2022-06-28 12:48:59 +01:00
Ashley Harrison ee3f4f1709 Navigation: Display Starred dashboards in the Navbar (#51038)
* remove feature toggle, add empty state and fix bug with initial starring

* Extract empty message into lingui

* remove full stop

* add empty message in the backend

* remove unused import

* translate starred + empty starred states

* betterer changes
2022-06-27 15:41:00 +01:00
Ashley Harrison 9f4365be13 remove --cache from betterer command due to bug (#51419) 2022-06-27 10:12:56 +01:00
Ashley Harrison dd9bd7eec2 Chore: Add some betterer documentation (#51422)
* some betterer documentation

* slight tweak
2022-06-27 10:12:33 +01:00
Ashley Harrison 0124dc8e6b Chore: reintroduce type assertion test + change emitted metric names (#51375)
* reintroduce type assertion test + change emitted metric names

* rename test to better eslint to be more generic
2022-06-25 07:45:38 -04:00
Ashley Harrison fa466e2134 Chore: comment out type assertions check due to bug (#51371)
* comment out type assertions check due to bug

* forgot to push the merge 🤦
2022-06-24 11:56:31 +01:00
Ashley Harrison 64356509b5 upate betterer results again.... (#51336) 2022-06-23 17:49:28 +02:00
Ashley Harrison 2705edf5f5 update betterer cache (#51317) 2022-06-23 13:26:31 +02:00
Ashley Harrisonandjoshhunt ded3d53d89 Chore: Additional betterer tests for type assertions and explicit any (#45901)
* Add betterer tests to prevent adding more type assertions and explicit any's into the codebase

* update betterer results file

* better glob matching

* updated results

* update results again...

* use more up to date betterer packages

* they're devdeps...

* Commit latest betterer results

* latest .betterer.results

Co-authored-by: joshhunt <josh@trtr.co>
2022-06-23 11:36:20 +01:00
Ashley Harrison be6a878fd6 Annotations: Fixes a problem where annotation autocomplete would crash the panel (#51164)
* use custom formatCreateLabel in AnnotationEditorForm

* give `TagFilter` it's own formatCreateLabel

* only show TagBadge if the label is a string
2022-06-22 14:54:42 +01:00
Ashley Harrison 05fbfdaa13 Search: add unit tests for FolderView (#51114)
* add unit tests for FolderView

* add basic unit test for Alert component

* prevent flicker of `No results found`
2022-06-21 09:35:03 +01:00
Ashley Harrison 1b9dd378f2 Chore: Unit tests for FolderSection (#50961)
* unit test scaffolding for FolderSection

* remove redundant spinner + more test scaffolding

* more test experimentation

* clear localStorage between test runs

* more tests + add back spinner when renderStandaloneBody

* bit of tidy up

* update Spinner data-testid

* fix import ordering
2022-06-17 10:14:33 +01:00
Ashley Harrison d0fa326798 Chore: Remove newNavigation feature toggle and old navbar code (#50872)
* Remove newNavigation feature toggle + old code

* fix unit tests

* remove buildCreateNavLinks
2022-06-16 10:48:38 +01:00
94d585063e Dashboard: Prevent non-repeating panels being dropped from repeated rows when collapsed/expanded (#50764)
* Mob: fix issue with repeating panels+rows, add e2e test

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: polibb <polina.boneva@grafana.com>

* Fix describe block description

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: polibb <polina.boneva@grafana.com>
2022-06-15 11:07:54 +01:00
Ashley Harrison 3430928294 Convert InviteesTable test to RTL (#50674) 2022-06-15 09:54:26 +01:00
Ashley Harrison 803473f479 Chore: Enable useUnknownInCatchVariables for stricter type checking in catch blocks (#50591)
* wrap a bunch of errors

* wrap more things!

* fix up some unit tests

* wrap more errors

* tiny bit of tidy up
2022-06-15 08:59:29 +01:00
Ashley Harrison 759e3ec4fa Never set gridPos to null (#50400) 2022-06-13 16:43:42 +01:00
Ashley Harrison 27e3e79661 Docs: Update documentation now create functionality has moved (#50663)
* Update documentation now + button functionality has moved

* Updates following comments
2022-06-13 15:23:53 +01:00
Ashley Harrison d23bc5c390 Convert ApiKeysAddedModal test to RTL (#50669) 2022-06-13 14:52:17 +01:00
Ashley Harrison 6da4feb2a9 Convert OrgProfile test to RTL (#50525) 2022-06-09 16:07:40 +01:00
Ashley Harrison 3fa7f72d6c scroll nav elements into view when using the keyboard (#50434) 2022-06-09 09:07:15 +01:00
Ashley Harrison a1cf709ad2 Playlists: Save button now correctly creates a new playlist (#50381)
* Add type="submit" to PlaylistForm submit button

* fix linting errors
2022-06-08 10:39:36 +01:00
Ashley Harrison f7d5c8cdbd ignore deps blocked by react 18 for now (#50300) 2022-06-07 14:21:22 +01:00
Ashley Harrison 13a71e7219 Add back a lower z-index (#50285) 2022-06-07 10:25:34 +01:00
Ashley Harrison 6fcb2cd307 remove exported test globals from test/lib/common (#50256) 2022-06-06 15:38:37 +01:00
Ashley Harrison 22fbcebabf Chore: convert DashboardsTable test to RTL (#50252)
* convert DashboardsTable test to RTL

* ensure render does not throw
2022-06-06 15:27:40 +01:00
Ashley Harrison 0de9808008 Draggable: only set drag handle props on the drag handle itself (#50025) 2022-06-02 13:34:05 +02:00
333195ce21 Chore: Dashboard schema (#49993)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:pkg/coremodel/dashboard/lineage.cue

* user essentials mob! 🔱

Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2022-06-01 10:05:27 -04:00
Ashley Harrison 0089779945 add feature highlighting in the expanded menu (#49892) 2022-05-31 12:03:38 +01:00
Ashley Harrison 216565aa00 Chore: Upgrade to jest 28 (#49679)
* bump packages to jest 28

* changes needed for jest 28

* map react-colorful as well

* use customResolver and fix last test

* don't need react-colorful installed if we're using a custom resolver

* return correct thing in mock

* remove watchPathIgnorePatterns since we don't have node_modules anymore
2022-05-30 14:14:34 +01:00
Ashley Harrison 10680c1775 cap mobile nav height (#49785) 2022-05-30 11:58:38 +01:00
Ashley Harrison 309ad38fd6 add event tracking to navigation (#49800) 2022-05-30 11:55:07 +01:00
Ashley Harrison a12cdf8283 convert PartialHighlighter test to RTL (#49708) 2022-05-26 17:09:44 +01:00
Ashley Harrison 43249464bb convert bargauge test to RTL (#49701) 2022-05-26 14:58:01 +01:00
Ashley Harrison e402b3617b ValueMapping: Add support for regex replacement over multiple lines (#49607) 2022-05-26 12:19:40 +01:00
Ashley Harrison 8b509eb6dd Notification history: Enable by default (#49502)
* remove persistNotifications feature flag

* remove unused imports
2022-05-26 12:03:04 +01:00
Ashley Harrison ec65332c82 convert Typeahead test to RTL (#49509) 2022-05-25 16:53:55 +01:00
Ashley Harrison a0b707ebe0 Apply .page-toolbar class correctly (#49603) 2022-05-25 16:39:21 +01:00
970c395fb1 Cue: Use BarGauge, DashList and Gauge panel cue schemas (#49580)
* user essentials mob! 🔱

* Wip

* user essentials mob! 🔱

lastFile:public/app/plugins/panel/bargauge/module.tsx

* user essentials mob! 🔱

* update betterer results file

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
2022-05-25 14:18:21 +01:00
Ashley Harrison 5455174de5 don't close drawer when clicking a select within it (#49583) 2022-05-25 12:05:30 +01:00
Ashley Harrison 8166d7dc4d Fix escape in Modal/DashboardSettings + add some unit tests (#49500) 2022-05-24 15:34:47 +01:00
Ashley Harrison fe16680c6d Notification history: Use Card instead of reusing alert (#49418)
* Use Card instead of reusing alert

* only need clearSelectedNotifications now
2022-05-23 16:48:17 +01:00
Ashley Harrison ce86b4ebe7 Navigation: Show starred items in the NavBar (#49219)
* switch saved items to starred items

* hook up redux properly

* Better query + hook up DashList

* update initial state so it's never undefined

* update GetDashboard call

* use new star service

* add scroll + maxwidth to navbar hover menu, sort starred items alphabetically

* increase height, revert changes to CustomScrollbar

* ellipsis!

* update starred dashboard name in navtree

* sort after renaming

* limit to first 50 starred dashboards found
2022-05-23 16:45:46 +01:00
Ashley Harrison 349d9973de Notification history: Add checkboxes for multiple selection (#49392)
* Add checkboxes for selection

* className is optional...

* review comments
2022-05-23 12:50:26 +01:00
Ashley Harrison ae8c11bfa4 Tweak name + add description (#49387) 2022-05-23 10:52:52 +01:00
Ashley Harrison b864442717 Gauge: convert tests to RTL (#49251)
* Move logic into utils file, add EXTREMELY basic RTL test

* initialise array with value
2022-05-20 10:51:11 +01:00