Commit Graph
157 Commits
Author SHA1 Message Date
Joshen LimandTzeYiing d025e0f739 chore/fix studio jest tests (#25872)
* Fix tests in tests/unit, tests/components and files under tests, looking into tests/pages

* Fix tests under pages/projects root

* Fix

* Comment out broken tests that im stuck with

* Fix api-report.test

* Fix storage-report-test

* chore: fix some tests

* chore: remove logging

* Fix LogsPreviewer.test.js

* Fix most of logs-query-test

* Skip broken tests instead of false positiving them

---------

Co-authored-by: TzeYiing <ty@tzeyiing.com>
2024-05-11 12:05:25 +02:00
Wen Bo Xie db24eb2e90 fix: revert renaming vector to pgvector on the client (#25911)
* Revert "docs: rename vector to pgvector (#23308)"

This reverts commit c30d5f0b1f.

* Revert "docs: update vector reference to pgvector (#23305)"

This reverts commit b2bae1351c.

* Revert "Fix vector extension (#23386)"

This reverts commit 7341b30c27.

* Revert "Rename vector to pgvector on client side (#23286)"

This reverts commit b48b6e201b.

* docs: add note to pgvector docs that ext name is vector

* fix: add link to vector ext card
2024-05-09 21:19:02 -07:00
Terry Sutton 8adf98ed96 Pass exposed schemas to lint query (#25784)
* Pass exposed schemas to lint query

* Type cleanup
2024-05-08 15:02:55 -02:30
Kamil Ogórek b18be7e4d2 feat: Allow for configuring target envs for Vercel integration (#25782) 2024-05-07 21:19:07 +10:00
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 LimandAlaister Young c7678d1d27 Shift filtering of enum types lenght out of react query to just the enum types page (#25826)
* Shift filtering of enum types lenght out of react query to just the enum types page

* Update apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx

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

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-05-07 13:14:11 +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 0d292c668d Contextual error toasts for deleting referenced rows (#23135)
* Contextual error toasts for deleting referenced rows

* Update message
2024-05-02 13:58:52 +08:00
Ivan Vasilov 52e63f2e8d chore: Update the linter with the latest changes (#23434)
Update the linter with the latest changes.
2024-04-30 11:23:54 +03:00
Bobbie Soedirgo 9190bbe206 feat(studio): db-pool postgrest config (#22865)
* feat(studio): db-pool postgrest config

* chore: prettier

* chore: openapi
2024-04-29 18:31:14 +08:00
Joshen Lim ac8cdcc58c Read replicas fix not removing node from UI when replica is dropped (#23267)
* read replicas fix not removing node from UI when replica is dropped

* Update refresh durationm
2024-04-29 16:54:33 +08:00
Joshen Lim 7341b30c27 Fix vector extension (#23386) 2024-04-29 04:03:09 +00:00
Ivan Vasilov e50aecc594 chore: Update the linter with the latest code (#23271)
Update the linter with the latest code.
2024-04-26 10:57:56 -02:30
Kamil Ogórek 8776db145e Revert "ref: Add sentry logging to debug vercel issue" (#23292)
Revert "ref: Add sentry logging to debug vercel issue (#23289)"

This reverts commit 8f6ea0c755.
2024-04-26 10:11:06 +00:00
Kamil Ogórek 8f6ea0c755 ref: Add sentry logging to debug vercel issue (#23289) 2024-04-26 09:04:57 +00:00
Jonathan Summers-MuirandIvan Vasilov c73af5ec8f move to shared types (#23210)
* move to shared types

* Rename the package to api-types.

* Fix a forgotten dependency.

* Add more forgotten deps.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-04-24 11:03:17 +02:00
Ivan Vasilov eadf3d5353 fix: Escape the escape chars so that auth_rls_initplan rule works properly (#23176)
Escape the escape chars so that auth_rls_initplan rule works properly.
2024-04-23 16:42:58 -02:30
Joshen LimandTerry Sutton e1b6db4b43 Add file size validation for storage explorer when uploading files (#23190)
* Add file size validation for storage explorer when uploading files

* Rearrange wording

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-04-23 14:33:32 -02:30
Ivan Vasilov 1edaf9ed0c fix: Add another lint rule for accessing user metadata in RLS (#22904)
* Remove selectedRow which was row index but the info was already available through selectedLint.

* Update the lint query with the new code.

* Merge a render function into its calling component.

* Remove duplicated logic for entity name and icon.

* Fix minor mapping logic.

* Unite the loading flags in the security advisor.
2024-04-19 13:40:15 +02:00
Jordi Enric 79f3d5ceca Fix: s3 connection warning paused projects (#22875)
* add warning when project is paused.

* add warning when project is paused.

* disable access key btn and show tooltip

* rename creds to access keys in some components

* fix types in query, show warning in access keys section too
2024-04-19 13:24:28 +02:00
41a1737a9a feat: long otp expiry lint (#22891)
* feat: long otp expiry lint

* refetch auth query on re-run lints

* Remove duplicate lint rule

* clean up

* Update apps/studio/pages/project/[ref]/database/security-advisor.tsx

Co-authored-by: Inian <inian1234@gmail.com>

* add auth otp short length lint

* Only check phone OTP for linting if the phone provider is enabled.

---------

Co-authored-by: Inian <inian1234@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-04-19 09:44:33 +00:00
Terry Sutton 8916d8022b Chore/linter v3 (#22842)
* Add links to docs, new categories and update lint script

* Split linter into security and performance

* Move not found to own component

* Move type

* Split linter into two pages, DRY components

* Cleanup
2024-04-18 14:23:11 -02:30
Alaister Young 08a0a86c77 fix: table deletion invalidation (#22858) 2024-04-18 19:04:03 +10:00
Terry Sutton 6b1a44524c Chore/linter v2 (#22790)
* Start mocking in v2 elements

* wip

* Cleanup header

* Get side panel working

* Style side panel

* Cleanup

* Add new lint

* Start filters

* Add lint filters

* Nudge loading state

* Fix empty state

* Cleanup

* Cleanup

* Font nudges

* Visual nudges

* Fix filters

* Fix shimmer

* Cleanup
2024-04-17 12:42:54 -02:30
Bobbie Soedirgo 8ad3a33104 fix(studio): backslash escaping in linter query (#22829) 2024-04-17 12:05:00 +00:00
Bobbie Soedirgo 1d58f2a11b chore: use @supabase/pg-meta for role queries (#22821)
* chore: use @supabase/pg-meta for role queries

* chore: prettier

* fix: typo
2024-04-17 16:19:49 +07:00
Bobbie SoedirgoandAlaister Young f327f2b234 chore: use @supabase/pg-meta for schema mutation (#22619)
* chore: use @supabase/pg-meta for schema mutation

* fix schemas query invalidation

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2024-04-17 11:04:21 +07:00
Joshen LimandAlaister Young 05eac4af51 Chore/switch index advisor installation to db extension (#22773)
* Switch installing index advisor to via db extension rather than direct sql

* Add CTA if index advisor is not available

* Update language

* Update copy

* Fix checking index advisor ext

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-04-16 21:27:11 +07:00
f569a46528 feat: add docs and creds management for storage connections (#22620)
* add docs, and creds management

* FIx api types.

* add accesskey to table

* cmt

* fix issues, url, styles, rm unused mutation keys

* Apply suggestions from code review

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

* renaming of things and use correct compos

* Update apps/studio/components/to-be-cleaned/Storage/StorageSettings/S3Connection.tsx

Co-authored-by: Inian <inian1234@gmail.com>

* rename storage url to endpoint

* when a user clicks the X after creating a credential, reset the form

* Fix button component disabled state when loading is true, and add docs url to s3 connection section

* Fixes

* fix btn disabled prop not reaching btn

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Inian <inian1234@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-04-15 19:32:06 +02:00
Ivan Vasilov 1ca7cc36ce fix: Another lint update (#22682)
* Update the lint query with the latest from splinter.

* Fix a misspell.
2024-04-13 08:13:05 -02:30
Ivan Vasilov 5458fa4f32 fix: Update the lint query with the latest from splinter repo (#22672)
* Update the lint query with the latest from splinter repo.

* Update the lint to exclude some extension schemas.
2024-04-12 17:56:22 +02:00
Jordi EnricandJoshen Lim ca3ee86125 add anon users filter (#22440)
* add filter

* Fix type issue

* move anon users query to the api

* rm unused stuff

* type fix

* add featurefalg

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-04-12 12:26:45 +02:00
b07f8304e0 Feat/integrate index advisor (#22641)
* 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)

* Midway integrating index advisor

* Add feature flag, reinstate old UI for feature flag

* First iteration of integrating index advisor

* Add more details in index advisor and add feature flag

* Shift explain_query function into pg_temp

* Clean uo

* fix padding

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

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

* Update UI

* Address some feedback

* Moar addressing feedback

* Update docs url

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-04-11 23:27:34 +08:00
Ivan VasilovandTerry Sutton db2fb81ec8 feat: Add more lint rules (#22594)
* Refactor the functions page to keep its state in the URL.

* Derive the filter options from currently active lints.

* Update the lint query sql.

* Update the urls to the docs.

* Fix the paddings on the filterPopover.

* Add handling for the other types of lints.

* Comment out the ignore lint functionality.

* Fix a misspell.

* unbest

* Bring back the CTA button.

* Update the SQL code from the splinter repo.

* Add handling for the duplicate index lint rule.

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-04-11 11:50:17 +02:00
Kamil OgórekandAlaister Young 5c34fb3597 feat: Introduce persistent branches toggle (#22145)
* feat: Introduce persistent branches toggle

* tweak styling

* add tooltip and confirmation modal

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2024-04-11 18:14:47 +10:00
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
Charis fef87b78fb fix: change remediation links for database linter (#22520)
* fix: change remediation links for database linter

* fix: tab update behavior
2024-04-05 19:58:23 +00:00
Kevin Grüneberg 9be160a51f feat: add supavisor egress breakdown (#22375) 2024-04-02 22:12:28 +08:00
Joshen Lim 1f388cc98e Set different colors for RLS templates UPDATE and ALL, and add placeholders with using and with check monaco fields (#22401) 2024-04-02 14:51:35 +02:00
280928a8e6 Feat/lints (#22003)
* Add lints, 2

* Add basic table

* Handle ignoring lints

* Add loading state

* Cleanup

* move utils

* Cleanup

* Shift lint to react query

* Merge master solve import lint issue

* Update lints UI

* Optional params

* Add entity and schema name

* Rename lints to linter, format results

* Wrap in markdown

* Adjust layout of some components

* Add CTAs to each lint

* fix ignored problems section

* Update type

* Add cta buttons for auth rls initialization issues

* Change metadata object

* Remove unneeded file.

* Add a component for CTA for a lint row.

* Make the lint query to be more type-safe.

* Various fixes to the lint table.

* Show the remediation link.

* Fix the button icons.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-04-01 20:37:48 +00:00
Bobbie Soedirgo 8888bb0023 feat: initial version of @supabase/pg-meta (#22307)
* feat: initial version of @supabase/pg-meta

Unlike supabase/postgres-meta, this will be a pure-JS SQL & Zod schema builder

* chore: typescript 5.4

* fix: typescript errors
2024-04-01 18:07:34 +08:00
Joshen Lim 2fe00724a9 Read replicas support enabling physical backups (#22330)
* Read replicas support enabling physical backups rather than forcing a PITR addon

* Update

* Update endpoint

* Add missing warning for compute size on read replicas

* Update text

* Address feedback
2024-04-01 16:08:36 +07:00
Kevin Grüneberg e197f3f8be feat: breakdown for function egress (#22231) 2024-04-01 08:20:25 +00:00
Pamela Chia 39be400fef Feat/add upgrade survey flow (#22310)
* feat: add upgrade survey flow

* add codegen changes
2024-04-01 14:58:59 +07:00
Alaister Young bd3807c356 feat: reset preview branches (#22210) 2024-03-28 20:44:41 +11:00
Kevin Grüneberg 27f9f96ff7 chore: upgrade to node 20 (#22240) 2024-03-26 18:54:22 +07:00
Jordi Enric aa01f780ea feat: store sql editor charts (#21990)
* save chart config when the user changes it

* add optimistic update on change

* fix wrong snippet being updated when changing fast or internet slow

* fix ui state resetting between changes 2

* fix chart config not changing state when working on a new query that only exists locally
2024-03-26 16:37:25 +07:00
Joshen Lim 5e5586d0ad Remove the check for connection string in create schema mutation (#22229) 2024-03-26 15:42:35 +07:00
Joshen Lim 4327d58df5 Hybrid RLS Assistant (#21806)
* Midway checking on hybrid rls assistant

* Demo

* Midway

* Polish + hook up everything for policy creation

* Temp fix for open in sql editor

* Resolve conflicts

* Support updating policies with new hybrid ui

* Fix generateQuery for altering policies

* Update to support feature preview

* Fix spelling lint

* Addressing small bugs

* Fix

* Clean upo

* Add new MultiSelectV2 in ui-patterns, use in RLS editor

* More clean uo

* Fix RadioGroupLargeItem label cursor state when disabled

* Lint lowercase sql
2024-03-25 16:02:50 +07:00
Alaister Young 0ea52ac220 chore: remove github pull requests query (#21941) 2024-03-11 12:43:06 +01:00