Commit Graph

108 Commits

Author SHA1 Message Date
Alaister Young
0ea52ac220 chore: remove github pull requests query (#21941) 2024-03-11 12:43:06 +01:00
Ivan Vasilov
5ebdd4aeb7 fix: Fix all errored queries when self-hosting studio (#21815)
* Hide the logout button in selfhosted version.

* Don't call project-eligibility-query on selfhosted version.

* Add local api handlers for self-hosting version.

* Fix a missing monaco editor file in the self-hosting version.

* Deleted an obsolete api route.

* Import the right get function.
2024-03-08 14:36:42 +01:00
Joshen Lim
6b741bc964 Replace ui setnotification with toast midway (#21867)
Replace ui setnotification with toast
2024-03-08 15:46:52 +08:00
Joshen Lim
1c5fd8b07c Fix upgrade query ui (#21865) 2024-03-08 13:55:59 +08:00
Alaister Young
c5afd2e7f8 chore: add branching feature flag (#21840)
* chore: add branching feature flag

* rename BranchingWaitListPopover component

* remove preview branch opt in tag
2024-03-07 11:05:55 +00:00
Joshen Lim
cea8e45166 Chore/read replicas fixes 040324 (#21731)
* Remove size selection and add info on rr billing

* Add prompt in SQL editor if trying to run mutation query in read replica

* Fix

* Fix dropping replica not optimistically updating, and support new replica statuses

* Invalidate load balancers after read replicas are spun up

* fix
2024-03-06 15:31:09 +08:00
Beng Eu
26a10bee92 feat: add alert for restart of projects scheduled for migration, showing planned maintenance window (#21701)
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2024-03-05 21:12:54 +08:00
Kevin Grüneberg
136728f6ab perf: reorganize a few imports to improve bundle size (#21743) 2024-03-05 12:49:58 +08:00
Kevin Grüneberg
f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
Kevin Grüneberg
13cfc0abb5 fix: barrel imports (#21728)
Avoid importing all components via barrel files that lead to bloated bundles/chunks
2024-03-04 18:39:53 +08:00
Alaister Young
74563fbeba chore(branching): GitHub integration 2.0 (#21008)
* start new github integration

* query/mutation updates

* progress

* branch management

* update codegen

* progress

* progress

* Refactor GitHub integration URLs

* Refactor GitHubIntegrationAuthorize component

* Updates

* Do not remove GitHub connection when creating new one

* Deleting a GH connection when branching is enabled for the project, will also disable branching for that project

* Add link to configure connection from org integration settings page

* Slight refactor

* Support updating CWD path

* Change cwd_path to workdir and disallow empty values

* Allow for triggering branches on supabase directory changes only

* Pass missing supabaseChangesOnly value

* Small style fix

* Add Authorization GitHub step

* Small change

* Fix supabase integrations form in project settings

* Revert URLa nd client ID

* Fix UI issues

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com>
2024-03-04 18:17:26 +11:00
Alaister Young
a8ee3a212b feat: branching statuses first pass (#20631)
* feat: branching statuses first pass

* handle error

* use warning icon
2024-02-29 20:18:00 +11:00
Joshen Lim
0ddd1b4711 Remove duplicated types-query, use enumerated-types-query instead (#21632)
* Remove duplicated types-query, use enumerated-types-query instead

* Fix type
2024-02-29 11:29:57 +08:00
Jonathan Summers-Muir
eb5039c5e6 Feat/collapsible nav bar (#21550)
* Update IconButtons to expose all props and pass ref. Use UI lib tooltip instead.

* start making it collapsible

* Update app-state.ts

* more transition stuff

* add new icons in. add icon size control with constants

* rename component

* wordmark added

* fix up bottom options

* Update NavigationBar.tsx

* Update NavigationBar.tsx

* Update NavigationIconLink.tsx

* Update NavigationBar.tsx

* add button component

* Update NavigationBar.tsx

* Update NavigationIconButton.tsx

* Update NavigationBar.tsx

* Delete supabase-wordmark.svg

* Add key prop

* Lint classname

* Lint

* Small fixes

* Refactor some handleErrors in EQ

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-28 15:34:16 +08:00
Joshen Lim
95991e3135 Fix view definition query (#21590) 2024-02-27 15:18:07 +08:00
Joshen Lim
4e039c9bf5 Remove config cat flag for read replicas (#21587)
* Remove config cat flag for read replicas

* Remove
2024-02-27 13:14:21 +08:00
Joshen Lim
3e30172946 Chore/read replica fixes 260224 (#21547)
* Staging: only allow apse1 as selection for replica

* Fix modal stuck in loading state if dropping replica fails for some reason

* Add warnings for RR based on cloud provider and pg version, and fix support page not automatically selecting project ref from query param into form

* Add warnings on add ons side panels for compute and pitr RE replicas

* Add notice text RE changing compute size if read replicas are preent

* Add options to change compute size and delete all replicas from settings/infrastructure

* Lint
2024-02-27 11:52:12 +08:00
Joshen Lim
dcdc3cd230 Fix table editor unable to update PK after renaming table (#21285)
* Fix table editor unable to update PK after renaming table

* Lint
2024-02-26 06:21:42 +00:00
Joshen Lim
d1ab275bea Chore/read replica final touches (#21420)
* Add validation for max replicas check

* Small UI fixes

* Add useMemo for edges

* Fix nodes not shwoing up when switching between map and flow view

* Fix logs explorer copy button

* Add edge changes to useEffect

* Bump wait duration when creating replica

* Sync database selector and use pooler checkbox states across panels on settings database

* Fix InstanceConfiguration not showing any nodes

* Sort databases in DatabaseSelector to have primary first

* Logs explorer border fotter

* Add database selector for edge logs

* Make buttons more concise in logs

* Clean up

* Fix

* Fix home page empty empty state

* Attempt to support pooler logs

* minor qol fix for database selector

* Update shared-data pgbouncer to supavisor

* small fix
2024-02-23 18:08:06 +08:00
Joshen Lim
7556a3181c Update error handling for table editor RQs (#21443) 2024-02-22 16:29:10 +08:00
Joshen Lim
fc405ce035 Chore/expose load balancer api endpoint in api settings (#21314)
* Expose load balancer API endpoint in API settings

* Add load balancer as a node in infrastructure config

* Add load balancer node to infra config

* Fix
2024-02-21 16:58:15 +08:00
Joshen Lim
632f8f95f4 Chore/pooler strings for read replicas (#21383)
* Midway

* Show respective pooler parameters based on selected database

* Add optional params to DatabaseSelector to de-async state between connection string and connection params on database settings page

* remove badge
2024-02-21 14:50:53 +08:00
Ivan Vasilov
d07a820440 feat: Pro+ users can choose compute size during project creation (#21292) 2024-02-20 16:19:26 +08:00
Terry Sutton
46051bce17 Chore/table editor header simplification (#18366)
* start

* Update

* Types

* Passhref

* Cleanup

* Update

* Fix

* Updates

* Updates

* Enable RLS from table editor

* Cleanup

* Filter current table policies

* Fix missing footer

* Duplicate role picker

* Remove rls banner

* Add tooltip for rls enabled, but no policies

* Fix footer positioning

* Prettier

* Change wording

* Update button style

* Cleanup

* Small update

* Fix Auth policies button number bg color

* Fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-15 09:10:30 -03:30
Ivan Vasilov
4c7ff74a00 fix: Update the types in api.d.ts. (#21287)
* Update the types in api.d.ts.

* Send zero for integration id.
2024-02-15 13:01:12 +01:00
Joshen Lim
c915042250 Fix RQ error handling for views query (#21252) 2024-02-15 17:38:37 +08:00
Joshen Lim
7f084ce27b Improve loading states for project settings (#21254)
* Improve loading states for project settings

* Remove console log
2024-02-15 17:10:59 +08:00
Terry Sutton
646657937d Chore/table editor sidepanel revamp (#19977)
* Animate search, cleanup

* Replace icons, finish search, add rls status

* cleanup

* Cleanup

* chore: update styling, a11y and markup for table editor side panel (#21112)

* chore: removed a bunch of unnecessary tags, removed nested buttons for a11y and stopping duplicate onClick events, updated styling of table items to match design.

* fix: input issues

* Update TableEditorMenu.tsx

* chore: added Esc and backspace control

* Stroke width

* Focus states

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-13 09:25:35 -03:30
Joshen Lim
0ee75935f7 Support for composite foreign keys in table editor (#21078)
* Init foreign keys manage

* Midway

* Midway

* Implement functionality for new foreign key management flow in table editor

* Deprecate old add and remove foreign key queries

* Lint

* Set editor dirty when managing foreign keys

* Add basic validation in new ForeignKeySelector

* Remove FK management in column editor, deprecate old foreign key selector components

* Add validation on columnm types for foreign keys

* Set column type to foreign key type if new column

* Show appropriate notices for when referenced column doesnt match source column type

* fix

* Remove comment

* Lint

* ColumnEditor swap position of data type and Fk
2024-02-13 10:42:06 +08:00
Joshen Lim
53c5500be4 feat/sql editor support bulk deletes (#21004)
* Revert "Revert "Feat/sql editor support bulk deletes" (#21003)"

This reverts commit 30245c9490.

* ci: Autofix updates from GitHub workflow

* Lint

---------

Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
2024-02-07 18:03:15 +08:00
Ivan Vasilov
a18c11807d fix: Refetch project details when reseting the database password (#21053)
Invalidate the project details (and refetch the connection string) when the user resets the DB password.
2024-02-06 17:15:07 +01:00
Joshen Lim
351fa698ce Update GET and PATCH pooling config to use supavisor endpoints (#20944)
* Update GET and PATCH pooling config to use supavisor endpoints

* Fix TS warning

* Small fix

* Remove unused import
2024-02-06 15:03:10 +08:00
Ivan Vasilov
e81442de56 chore: Migrate TableStore (#20033)
* Add create, update and delete mutations for tables.

* Use the new mutations instead of the table store.

* Fully remove the TableStore from the MetaStore.

* Move the methods from MetaStore into pure functions in SidePanelEditor utils.

* Remove TableStore.

* Refactor the onError callbacks to be on the mutations.

* Convert some of the UIStore invocations.

* Fixed not closing the modal in case of an error. Migrate some uses of uiStore.

* Use onSettled on all RQ hooks.

* Remove the ui param to the create/updateTable functions.

* Add a missing connection string.

* Add progress bar for loading UI for importing rows

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

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

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-02-06 14:56:59 +08:00
Alaister Young
a4f86bce8f chore: increase react-query stale time (#19465)
* chore: increase react-query stale time

* keep staleTime: 0 for table rows

* use staleTime: 0 for all user sql queries

* use staleTime: 0 for all pg-meta queries

* Some fixes

* fix updating tables

* fix bug while editing column names

* Fix deleting column in database/tables column list not revalidating UI

* Fix updating column in database/tables column list throwing ane rror

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-06 13:47:05 +08:00
Alaister Young
3230747a58 fix: refetch project detail on unknown status (#21035) 2024-02-06 02:23:08 +00:00
Kevin Grüneberg
becd39cc23 feat: revamped instance size selection (#20765) 2024-02-05 12:03:43 +08:00
Joshen Lim
30245c9490 Revert "Feat/sql editor support bulk deletes" (#21003)
* Revert "Feat/sql editor support bulk deletes (#20927)"

This reverts commit 27c2cff395.

* ci: Autofix updates from GitHub workflow

* Lint

---------

Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
2024-02-05 14:01:24 +11:00
Joshen Lim
27c2cff395 Feat/sql editor support bulk deletes (#20927)
* Switch over existing delete content to version 2 on API for bulk deletes

* Streamline search behaviour for SQL editor

* Fix SQL query tooltips showing up when dorpdown menu is open or  modal is open for non active query

* Shift project snippets up above favourite snippets

* Basic bulk delete query support

* Support shift select in SQL editor for queries

* Fix lint
2024-02-05 10:31:03 +08:00
Joshen Lim
8e6870abbf Add error handling for subscription and addons (#20866) 2024-01-31 11:04:15 +07:00
Joshen Lim
0c155ec552 Chore/update pgbouncer status check (#20862)
* Update pg-bouncer status check

* Remove nextjs endpoint for pgbouncer check

* Add is platform check
2024-01-30 16:43:51 +07:00
Ivan Vasilov
3f75f791a6 feat: Show a badge if the pgbouncer hasn't been removed. (#20830)
* Add a badge if the pgbouncer hasn't been removed.

* Force the response to be a boolean.

* Add a CSP exception, just for testing.

* Minor correction for the CSP rule.

* Add a API route for checking whether the pgbouncer has been removed.

* Log the response and error.

* Minor fixes.

* Update based on feedback

* Add additional sanity checks on pg bouncer nextjs endpoint

* Update check

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-01-30 14:10:57 +07:00
Kevin Grüneberg
f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
Alaister Young
026d7ee2f3 fix: refetch project detail while project is coming up (#20819)
* fix: refetch project detail while project is not healthy

* switch to only refetching while coming up
2024-01-29 09:56:52 +00:00
Kang Ming
3ef2a4b584 refactor: use the platform route instead of v1 (#20668)
fix: use the platform route instead of v1
2024-01-24 13:43:29 +07:00
Kevin Grüneberg
c3976cf73e chore: align naming for micro instance (#20656) 2024-01-23 15:25:25 +08:00
Thomas
43cc703ce8 Improve Billing Breakdown section (#20498)
* Displays current costs

* Displays Compute Credits

* Adds tooltips for Compute Hours, Compute Credits, Current Costs and Projected Costs

* Formats amounts properly

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-01-22 13:18:51 +01:00
Joshen Lim
d76c46cc42 Chore/update db connection string kaizen 2 (#20621)
* Add logic to determine if project resolves to ipv6, change badge text on use pooler connection checkbox based on that

* Fix text

* Fix type
2024-01-22 18:10:25 +07:00
Nabhag Motivaras
eaf38b38c8 fix(dashboard): enumerated types window showing other types such as composite (#20576)
fix(dashboard): enumerated types window showing other types
2024-01-22 16:33:16 +11:00
Joshen Lim
89a96c788a Update network restrictions to support IPv6 (#20548)
* Update network restrictions to support IPv6

* Fix conditional

* Fix

* Fix
2024-01-22 11:24:35 +07:00
Joshen Lim
683fe3a6cd Chore/update database settings (#20575)
* Add connection string syntax

* Add more description to pooling modes

* Fix

* Test

* Fix

* Sm wording change

* Update apps/studio/components/interfaces/Settings/Database/ConnectionPooling/ConnectionPooling.tsx

* prettier

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-01-22 11:07:17 +07:00