Commit Graph

29 Commits

Author SHA1 Message Date
Alaister Young
e1eaa9844c fix: indexes in use (#33672)
* fix: indexes in use

* add error state for indexes in use

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-18 18:06:06 +08:00
Joshen Lim
ce6a432504 Remove 2dp for ms values in query performance advisor (#33472) 2025-02-10 15:36:14 +08:00
Joshen Lim
898fd44eca Support resetting query performance report on read replica (#33346) 2025-02-06 14:26:48 +08:00
Ivan Vasilov
98ca85156a chore: Use sql-formatter for formatting all SQL in the studio (#33071)
* Bump the sql-formatter dependency.

* Add a function formatQuery which is a wrapper around sql-formatter.

* Replace all formatSQL features to use the new function formatSql.

* Remove unneeded RQ for formatting.

* Small fix.
2025-01-27 13:04:31 +01:00
Joshen Lim
794529eddf Chore/add export functionality to advisors (#33030)
* Add export functionality to security and performance advisors

* Add download results button to query performance advisor

* Add refresh buttons to security and performance advisors

* Add LoadingLine to Query performance to make UI consistent with the other advisors

* Minor change
2025-01-23 17:06:28 +08:00
Ivan Vasilov
52735e38bf chore: Rename all uses of Tooltip_Shadcn_ to just Tooltip (#32860)
* Rename all uses of Tooltip_Shadcn_ to just Tooltip.

* Fix a leftover change.
2025-01-20 22:23:45 +01:00
Joshen Lim
559236dbd0 Chore/query performance fixes and improvements (#32747)
* Show tab max value in seconds if > 1000ms

* Fix incorrect sort option in initial state with no URL state

* Fix trim of undefined in Query Performance when retrieving index
2025-01-13 23:29:28 +08:00
Alaister Young
c26a1a7e63 chore(studio): remove unused files (#32623) 2025-01-08 12:39:00 +08:00
Joshen Lim
585477752a Update all documentation buttons (#30163) 2024-10-31 13:58:17 +08:00
Joshen Lim
d586346e27 Chore/sentry fixes 211024 (#30003)
* Resolve https://supabase.sentry.io/issues/5808689343

* Fix SecurityStatus map key prop issue

* Fix FileExplorerHeader to use ButtonTooltip

* Fix https://supabase.sentry.io/issues/5998687405

* Fix https://supabase.sentry.io/issues/5414129652

* Fix https://supabase.sentry.io/issues/5414129652

* Fix map key issue in QueryPerformanceGrid

* Add whitelist error for sign up mutation

* Fix map key in DiskUsage

* Fix prop name in info-tooltip
2024-10-22 15:21:06 +08:00
Joshen Lim
536dc37d58 Chore/user management v2 panel part 2 (#29515)
* Set up banning and unbanning user, although untested due to API CORs issue

* Update search filter UI for users management V2

* Update API types

* Minoir

* Small fix

* Update UI

* Add support for resizing and re-ordering columns

* Add google profile image url to csp

* Revert test button

* Implement toggling of columns

* Fix loading

* Fully implement banning/unbanning user

* Fix

* Update apps/studio/components/interfaces/Auth/Users/UserOverview.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Fallback non CSP supported avatar urls to user icon

* Fix some bugs

* Remove prism-react-renderer from studio, add to ui patterns

* Migrate users query from API to studio

* Address some feedback

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-10-01 14:32:46 +08:00
Ivan Vasilov
09a62662d8 chore: Clean up ui-patterns imports (#29132)
* Switch all top-level imports for ui-patterns components to use specific components when importing.

* Remove the @ui-patterns shorthand since it works exactly the same without the @.

* More import fixes.

* Fix the ui-patterns tests.
2024-09-30 21:41:26 +02:00
Ivan Vasilov
05a542ccea chore: Migrate all feather icons to lucide icons (#29038)
* Add lucide-react to docs (to make the autocomplete work).

* Migrate the docs app icons.

* Migrate the ui-patterns.

* Remove the old icons from ui package.

* Migrate the www app from react-feather icons.

* Migrate all of studio icons.

* Migrate the only component in design-system.

* Fix an old import in ui package. Revert an import in docs app.

* Fix some pages in www.

* Remove unneeded files used in generation of icons.

* Fix a prettier error.

* Fix more issues in www.

* Fix an issue in Log Date picker.

* Replace all string sizes with number sizes because the icons grew in some cases.

* Fix more imports in security page.

* Fix an extra import.

* Remove the size prop from all icons if they're in a button and they match the button size.

* Minor fixes for docs and www.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-04 19:46:21 +08:00
Ivan Vasilov
df52ea7ee0 feat: Replace all toasts with sonner (#28250)
* Update the design of the sonner toasts. Add the close button by default.

* Migrate studio and www apps to use the SonnerToaster.

* Migrate all toasts from studio.

* Migrate all leftover toasts in studio.

* Add a new toast component with progress. Use it in studio.

* Migrate the design-system app.

* Refactor the consent toast to use sonner.

* Switch docs to use the new sonner toasts.

* Remove toast examples from the design-system app.

* Remove all toast-related components and old code.

* Fix the progress bar in the toast progress component. Also make the bottom components vertically centered.

* Fix the width of the toast progress.

* Use text-foreground-lighter instead of muted for ToastProgress text

* Rename ToastProgress to SonnerProgress.

* Shorten the text in sonner progress.

* Use the correct classes for the close button. Add a const var for the default toast duration. Remove the custom width class from sonner.

* Set the position for all progress toasts to bottom right. Set the duration for all toasts to the default (when reusing a toast id from loading/progress toast, the duration is set to infinity).

* Fix the playwright tests.

* Refactor imports to use ui instead of @ui.

* Change all imports of react-hot-toast with sonner. These components were merged since the last commit to this branch.

* Remove react-hot-toast lib.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2024-08-31 07:50:51 +08:00
Alaister Young
70da0f1d1d chore: cleanup packages (#27770)
* chore: cleanup packages

- Avoid circular imports
- Export API-types as types
- pg-format without depending on Node internal Buffer (not browser-compatible)
- Avoid importing from barrel files in ui dir

* chore: avoid barrel file imports in studio (#27771)

* chore: avoid barrel file imports

- Removes some unused imports
- Avoids barrel file import for faster builds + less memory

* add eslint rule

* type fixes

* delete layouts barrel

* delete components/grid barrel file

* delete components/grid/utils barrel file

* delete components/grid/components/common barrel file

* delete components/grid/components/editor barrel file

* delete components/grid/components/formatter barrel file

* delete components/grid/components/grid barrel file

* delete components/grid/components/header/filter barrel file

* remote components/grid/store barrel file

* remove components/interfaces/Auth/Policies barrel file

* delete components/interfaces/Settings/Logs barrel file

* delete components/ui/CodeEditor barrel file

* delete components/ui/Forms barrel file

* delete components/ui/Shimmers barrel file

* delete data/analytics barrel file

* delete hooks barrel file

* cleanup lib/common/fetch barrel file

* final * barral files cleanup

* global react-data-grid styles

* remove console.log

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>

* fix build

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-07-04 14:48:10 +08:00
Terry Sutton
6fa71c6c8e Chore/allow index advisor for postgrest queries (#27364)
* Run index advisor on postgrest queries

* Fix loading state
2024-06-20 17:47:30 +03:00
Joshen Lim
4637140e72 Fix downgrade network error causing UI crash (#26919)
* Fix downgrade network error causing UI crash

* Ensure that all try blocks have at least a catch block and not an empty finally block

* Update apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Update

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-06-03 11:08:39 +08:00
Joshen Lim
0d7137209c Chore/sentry fixes 280524 (#26828)
* UpgradeToPro remove project ref and org slug props

* Add check in Docs/ResourceContent

* Add conditional for accessing query property in QueryPerformanceGrid

* Add fallback value for lastPage in notifications-v2-query

* Simplify logic for finding api key in TerminalInstructions, EdgeFunctionDetails, [ref]/api/index

* Minor fixes and refactors

* Fix type issues
2024-05-31 10:52:18 +08:00
Joshen Lim
0c81551110 RQ convert mutateAsync calls to mutate where possible, otherwise add try finally blocks (#26737)
* RQ convert mutateAsync calls to mutate where possible, otherwise add try finally blocks

* Skip eligibility query if project status is coming up

* Small UI update to replicas side panel

* Update apps/studio/components/interfaces/SQLEditor/RenameQueryModal.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Add error handling in CIDR

* Prettier lint

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-05-24 16:58:49 +08:00
Joshen Lim
82a0ad93c8 Fix ref issue on AlertError component (#26602) 2024-05-21 17:42:34 +08:00
Joshen Lim
1afaae6447 Chore/reports read replicas filter (#23711)
* Scaffold for API reports

* Add support for filtering database reports by replicas

* midway adding read replica support for custom reports

* Refactor reports page to use react query and deprecate project content mobxstore

* Reports add chart labels if metric is read replica specific

* Give an easier way to remove charts from reports

* make reports layout non-blocking

* Update apps/studio/components/interfaces/Reports/Reports.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-05-07 16:44:23 +08:00
Joshen Lim
755d75e55d Chore/add replica filter for query performance (#23409)
* Add replica filter for query performance

* Small fix

* Add ref in dep array

* Hide database selector if read replicas is not enabled for project
2024-05-03 16:24:49 +08:00
Joshen Lim
c304ce537f Add db inspect docs link (#23268)
* Add db inspect docs link

* Update
2024-04-26 12:52:44 +07:00
Joshen Lim
fea6d7f541 Fix query performance role query search (#23212) 2024-04-24 15:17:23 +07:00
Ivan Vasilov
5cf8f30e23 chore: Remove obsolete flags (#22915)
* Remove showS3Connection flag.

* Remove showAnonUserFilter flag.

* Remove   enableVercelConnectionsConfig flag.

* Remove indexAdvisor flag.

* Remove queryPerformanceV2 flag.

* Remove unused files.

* Remove unneeded packages.

* Remove the v2 suffix from the query performance folder.
2024-04-22 09:38:41 +02:00
Joshen Lim
3f957bc2a1 Fix query perf v1 (#22648) 2024-04-11 22:26:47 +08:00
Joshen Lim
ec59752bc0 Query Performance Facelift (#22568)
* Update

* Clean up + fix UI

* Add data values to tab

* Add comment

* Format sql query in query details

* Clean uo

* Deprecate old files

* Address comments

* chore: update styles (#22591)

* Add feature flag, reinstate old UI for feature flag

* Update apps/studio/components/interfaces/QueryPerformanceV2/QueryPerformance.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Update apps/studio/components/interfaces/QueryPerformance/QueryPerformance.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Address feedback

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-04-11 12:57:46 +08:00
Joshen Lim
65d572e1d2 Chore/update query performance page (#22467)
* Standardize to use FormHeader for all database pages

* Tidy up query performance page

* Add filter for roles

* Make search in query performance consistent with other pages and shift FilterPopover to ui
2024-04-05 15:03:28 +08:00
Jonathan Summers-Muir
c928148754 chore: move perf report and query perf report to database (#22423)
* chore: move perf report and query perf report to database

* Update linter.tsx

* Update query-performance.tsx

* fix redirects

* Fix layouts

* remove unused import

* Add notice for shifting query perf and project linter reports

* Add comment on notice removal for shifting reports

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-04-04 12:53:59 +08:00