Commit Graph

225 Commits

Author SHA1 Message Date
Joshen Lim
9081324666 Chore/fix oauth app api auth (#28093)
* Fix oauth app api auth

* Fix style

* Update codegen

* Fix

* Fix
2024-07-19 20:20:47 +08:00
Jonathan Summers-Muir
a4b4167a5b fix: temporary remove default sorting (#28072)
* Update table-rows-query.ts

* Add comment

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-07-19 11:20:58 +08:00
Kevin Grüneberg
9d4d1369aa chore: adjust billing for edge function count (#28019)
Co-authored-by: Thomas Eckl <31189692+ecktoteckto@users.noreply.github.com>
2024-07-18 17:12:49 +08:00
Joshen Lim
d99c9ea13c Improvement to database extensions UI (#28037)
* Improvement to database extensions UI

* Prettier
2024-07-18 13:58:55 +08:00
Joshen Lim
17e0c5dbcf Improve snippet organization in SQL Editor (#27881)
* Init changes for sql fodlers

* Added upsert logic in sql-editor-v2 valtio, hooked up with templates and quickstarts

* Do up logic for creating new snippets by typing in /new or by clicking new query button

* Do up logic for updating and deleting snippets

* Do up logic for favourites and shared snippets

* Do up logic for favourites and shared snippets

* Fix

* Fix saving indicator, add empty states for favorites and shared snippets

* Implement sorting

* Some minor QOL improvements

* Minor fix on empty state for private snippets

* Add delete folder mutation

* Implement create and update folder

* Fix reinstate with AI renaming for new snippets under folder

* Support controlled multi select behaviour in private snippets

* Undo changes to tree-view-multi-select

* Support bulk deletes

* Support moving queries + rendering queries in folders

* Support deleting folders and creating a new folder when moving a query

* Fix bug where renaming query removes content

* Add initial loading state in sql editor nav + handle fallback if cannot retrieve content by id

* Fix some spelling

* Fix TS issue in sql folders mutation keys

* Fix toggling favorite

* Lint

* Revert fallback behaviour in ]id] for now

* Fix favorites and shared snippets not showing

* Fix moving currently opened snippet leads to loading

* Support bulk moving

* Improve multi select logic a little

* Nit lint

* Reinstate AI retitling for untitled snippets when running query

* Remove hardcode in useAFlag

* Support creating new snippet in a folder directly

* Fix sharing snippets that are within a folder

* Fix sharing snippets within a folder

* Fix favorite

* Add loading state when fetching folder contents

* Fix favoriting snippets in folders
2024-07-17 12:23:19 +08:00
Joshen Lim
914901e779 Swap warehouse endpoints to /platform (#27957) 2024-07-15 11:28:05 +08:00
Joshen Lim
2a818ffc7b Swap all warehouse endpoints to v0 (#27955)
* Swap all warehouse endpoints to v0

* Fix

* Update api.type
2024-07-12 20:34:40 +08:00
Joshen Lim
5d0d63284b Support using API schema in create project (#27918)
* Support using API schema in create project

* Fixes
2024-07-12 10:25:34 +08:00
Jordi Enric
003cfd6425 feat: warehouse explorer (#27611)
* add basic feature

* rename to datasource

* rename elements in left sidebar

* update copy in titles in left sidebar

* Add optional 'enabled' parameter in useLogsQuery hook

* Update warehouse query state and components

* add template selector for warehouse query builder

* update deprecated input compo

* fix create token and console warnings

* fix type errors

* fix dupped import

* update endpoints and add missing permissions

* update queries with new api path

* fix type errors

* undo last commit

* undo missing file

* fix imports in logs page

* import fixes

* add settings link like in storage menu

* sort imports, fix form submit

* rename access tokens settings section

* align dropdwn

* add overflow to templates dropdown

* add name as defaultvalue to udpate form

* update rm collection dialog

* capitalize

* Update apps/studio/pages/project/[ref]/logs/explorer/index.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* fix typo

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-07-11 12:05:44 +02:00
Kamil Ogórek
d249d5d94d ref: Cleanup vercel_configuration_id metadata (#27857) 2024-07-11 17:00:44 +08:00
Joshen Lim
b78eea5176 Support hardening api via custom schema in api settings (#27894)
* Support hardening api via custom schema in api settings

* Update UI based on discussion

* Changes to language

* Update changes

* Remove unnecessary check on pg_graphql extension

* Fix

* Fix
2024-07-11 15:48:06 +08:00
Monica Khoury
4c6f0dd8b6 Fix: escape single quotes in queries to prevent syntax errors (#27417)
* Fix: escape single quotes in queries to prevent syntax errors

* Update apps/studio/data/database/retrieve-index-advisor-result-query.ts

* Update apps/studio/data/database/retrieve-index-advisor-result-query.ts

* Cleanup

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-07-04 12:43:40 +03:00
Joshen Lim
e0ae4942f4 Optimize table editor count (#27612)
* Optimize table editor count

* Add additional logic on when to enforce exact count

* Update apps/studio/data/table-rows/table-rows-count-query.ts

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

* Reset enforceExactCount whenever a filter is applied

* Update showing exact row count warning logic

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-07-04 15:27:01 +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
Joshen Lim
54320ddb73 Chore/support showing all entities in database tables page (#27749)
* Support showing views in database tables page

* Support showing materialized views in database tables page

* Support showing foreign tables in database tables page

* Prevent deleting non table entities in database/tables, consistent with table editor

* Fix invalidation logic when deleting tables in database/tables
2024-07-03 14:40:45 +08:00
Paul Cioanca
90d9d6cb1e chore: only display compute addons if cloud provider supports them (#27599)
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-07-02 10:02:56 +00:00
Joshen Lim
1127c4ba88 Project Level Permissions (#27347)
* fix: update Permission params

* fix: upgrade check permission hook to support project level role

* fix: usePermissionsLoaded

* fix: Permission params can be undefined

* Scaffold new access management UI

* Add validation

* Update roles view

* Add tooltip

* Add button to apply role to all projects

* Update UI to select projects first instead of roles

* Merge master update UI

* Midway trying to implementation project level perms API

* First pass implementating updating project level permissions

* Add client side validation for assigning/removing roles

* Midway implementing new invites

* Integrate most of the project level permissions functionality

* fix: filter out org-level permissions before checking

* Add relevant UI guards in org level pages for project role POV

* Minor refactors

* Small refactors

* More fixes

* Moar refactors

* More fixes

* More fixes

* Refactor update role logic and smack some test cases on it

* Fixes

* Fix type issue

* Fix type

* more fixes, refactors, adding checks...

* MORE fixes

* Add perms checking for replicas

* Add ButtonTooltip component and use them to prevent repetition of pointer events auto for buttons with tooltips

* Convert all buttons with tooltips to use ButtonTooltip

* refactor

* PRettier

* Small fix

* Remove commented out code in organization-invitation-accept-mutation

* fix: switch to use the platform oauth authorizations routes

* Add perms checking for org audit logs and org oauth apps

* PRettier

* Fix incorrect URL for oauth app flow

* Fix incorrect URL for oauth app flow

* Fix

* Add perms checking for warehouse related UI

* Update roles helper icon

* remove unused lib

* Update package lock... again

* Update package lock... again

* Smalllll update

* Update some checks

* Add gate for project level permissions

* Last fix

* update codegen

* Update warehouse endpoint routes

* Fix

---------

Co-authored-by: phamhieu <phamhieu1998@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
2024-07-01 17:59:54 +08:00
Ivan Vasilov
ee8f901bfd feat: RLS policies for realtime channels (#27490)
* Add queries and mutations for realtime channels.

* Change the layout, add a link for policies and modal for creating a channel.

* Add a page for policies.

* Add templates for realtime tables.

* Fix the spacing in the PolicyDetails component. Add better types.

* Pass templateData to the template generating functions.

* Various CSS fixes.

* Add components for rendering the realtime policies page.

* Fix the editing policy flow.

* Fix refetching when adding or deleting policies.

* Minor various fixes.

* Remove an old console.log.

* More fixes for templates.

* Make the realtime policies open by default when clicking on realtime.

* Update the realtime policy templates.

* Use a dropdown button for the three types of policies.

* Fix a copy-paste mistake.

* Fix icons.

* Fix the toast.

* Clean up the previous components.

* Clean up more unneeded code.

* Remove templateData prop.

* Remove unneeded queries and mutations.

* More cleanup.

* Reuse the components from the Auth Policies.

* Minor fixes for the new components.

* Add a feature flag for AuthZ.

* Revert some changes.

* Fix a build error.

* Fix all definitions.

* Fix an issue with copying large lines which from templates which are word-wrapped.

* Addressed various comments by Joshen.

* Revert the UI changes in the Policy Editor.

* Update the template names.

* Small style fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-26 13:27:29 +02:00
Joshen Lim
3530c022ec Support filtering by entity types in table editor (#27555)
* Support filtering by entity types in table editor

* Address feedback

* Small language change
2024-06-26 18:21:49 +08:00
Joshen Lim
ae8dafd0a4 Chore/optimizations for table editor query (#27553)
* Optimize table editor select query when cutting off column values

* Fix auto limit logic to consider offset
2024-06-26 17:15:20 +08:00
Kevin Grüneberg
15efe26730 fix: EU tax ids for Orb (#27539) 2024-06-26 16:20:42 +08:00
Jonathan Summers-Muir
eb55650d76 [Dashboard] add data api option to new project form (#26809)
* init layouts in project settings

* Update general.tsx

* update gap

* Update Scaffold.tsx

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* spacing issues

* now added a enabled switch

* Revert "now added a enabled switch"

This reverts commit f22050302a.

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* revert

* Update project-postgrest-config-update-mutation.ts

* add bottom padding

* init changes

* Update PostgrestConfig.tsx

* Update [slug].tsx

* add radio group

* add types

* Update PostgrestConfig.tsx

* fix

* Update PostgrestConfig.tsx

* Update project-create-mutation.ts

* update API types

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* Update api.d.ts

* Update API codegen typings

* fix: issue with booleans in radios

* add warning box

* Update [slug].tsx

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-25 15:47:24 +08:00
Alaister Young
c918aea9ee chore: new project statuses (#27213)
* chore: new project statuses

* add restarting layout

* add restore failed state

* update project cards

* update wording

* fix ts errors

* address feedback

* add pause failed state
2024-06-24 16:06:58 +08:00
Joshen Lim
d80befbae2 More auth related sentry whitelist errors (#27481)
* More auth related sentry whitelist errors

* Make pretty
2024-06-24 14:29:12 +08:00
Joshen Lim
0bf85c32d6 Update restore validity logic for paused projects behind feature flag (#27404)
* Reinstate 90 day restore disable logic with feature flag

* Update types

* Fix

* Fix conditionalg

* Fix minor UI papercuts

* Add exact date for pause disable

* Error handler for pause status

* Update flag nmame
2024-06-24 13:43:52 +08:00
Kevin Grüneberg
bcda19a3bc chore: text adjustments for upcoming invoice section (#27419)
Co-authored-by: Thomas <31189692+ecktoteckto@users.noreply.github.com>
2024-06-21 17:26:57 +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
Terry Sutton
d6f9cb53f9 Set the primary key as the default sort if no other sort exists (#27097)
* Set the primary key as the default sort if no other sort exists

* Rename

* Add contextual toast messages when trying to update/delete row on table with no PKs

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-19 14:58:48 +08:00
Kevin Grüneberg
f541107196 chore: use new tax id endpoints (#27246)
Adapts the tax id view to the new MGMT-API endpoints. Users can now only manage a single tax id instead of adding multiple.

Besides
- Use non-deprecated fetchers
- Use Shadcn components
2024-06-19 12:19:20 +08:00
Joshen Lim
a6b2b93f92 Disable restores if project paused for longer than 90 days (#27053)
* Disable restores if project paused for longer than 30 days

* Update to 90 days

* Update copy

* PRetty

* Update based on API changfes

* Prettier

* Update

* Minor copy fix

* simplify wording

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2024-06-11 18:02:56 +07:00
Kevin Grüneberg
6f708d3f62 chore: adapt to new v2 customer update endpoint (#27081) 2024-06-07 15:40:06 +08:00
Ivan Vasilov
1e108491c1 chore: Refactor the StorageExplorerStore to use API calls from the data folder (#23222)
* Migrate all API calls to data folder.

* Remove unused mutation.

* MInor leftover type fixes.

* chore: Make the `StorageExplorerStore` fully typed (#23397)

* Migrate all API calls to data folder.

* Convert the poor man enums into proper enums.

* Add types to most of the methods.

* Add types around the methods for uploading files.

* Add types for file cache.

* Add types for buckets.

* Fix bunch of type errors.

* Add types to all store methods. Fix all types in components related to the store.

* Remove all anys from the Storage components.

* Fix the multiple selection.

* Fix the selected checkbox.

* Set all private methods to private and delete some unneeded code.

* Remove unneeded mutation.

* Update all mutations for storage explorer to follow template syntax

* Update apps/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.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-06-07 14:01:45 +07:00
Joshen Lim
72fd5f5121 More whitelisting non critical errors (#27057)
* More whitelisting non critical errors

* 2 more whitelist errors
2024-06-07 13:51:20 +07:00
Jonathan Summers-Muir
330ae6e407 [Dashboard] Chore/refactor new project form (#26997)
* init layouts in project settings

* Update general.tsx

* update gap

* Update Scaffold.tsx

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* spacing issues

* now added a enabled switch

* Revert "now added a enabled switch"

This reverts commit f22050302a.

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* revert

* Update project-postgrest-config-update-mutation.ts

* add bottom padding

* init changes

* Update PostgrestConfig.tsx

* Update [slug].tsx

* Update PostgrestConfig.tsx

* fix

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* Pull updates, resolve conflicts

* remove staging/local specific logic.

• stopped provider Select from flashing
•

* Update [slug].tsx

* split up region query

* Update [slug].tsx

* Update [slug].tsx

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-06 19:32:10 +08:00
Alaister Young
95aa2c6d14 fix: quote get cell value column (#27036) 2024-06-06 13:02:33 +07:00
Joshen Lim
3a9e99f30e Add sentry alerts for critical points of failures (#27029)
* Add sentry alerts for critical points of failures

* Prettier
2024-06-06 11:07:34 +07:00
Joshen Lim
21890675e5 Chore/sentry fixes 050624 (#27025)
* Add check before generating nodes in settings infrastructure

* Fix conditional in ResourceContent and add some typing

* Wrap checkIfPrivate with try catch

* Add ? in TableEditor.utils generateTableFieldsFromPostgresTable

* More typing

* Add ternary in RPC

* Remove mobx from API docs v1

* Fix renaming folder in storage explorer
2024-06-05 16:32:24 +07:00
Kevin Grüneberg
56c9b5e651 chore: adapt to new payment endpoints (#26990) 2024-06-04 21:13:11 +08:00
Ivan Vasilov
09b4e2b336 fix: Check the message if it's a string when handling API errors (#26436)
Check for string when handling API errors.
2024-06-04 13:22:46 +02:00
Joshen Lim
9e45053d25 Chore/sql editor pagination of results (#26857)
* Add pagination to SQL editor for results longer than 100 rows

* Change pagination to automatically setting a limit

* Fix

* Address initial comments

* Compress SQL editor actions when ai assistant is open and screen is of a certain width

* Fix checking

* Add some fixes and tests

* Add a message if the query had an error and the limit was applied

* Rename to suffixWithLimit

* Small refactor and fix
2024-06-04 15:20:18 +07:00
Joshen Lim
63493daa65 Allow viewing ongoing queries and aborting them (#26887)
* Allow viewing ongoing queries and aborting them

* Fix

* Add refresh button + shift view running queries CTA

* Fix scrolling in SqlEditorMenu

* Small styling fix for table editor menu schema selector error state
2024-06-04 13:07:55 +07:00
Alaister Young
8e47d317fa chore: pg-meta functions (#26881)
* start pg-meta functions

* pg meta create function

* pg meta database functions update and delete

* fix ts

* update execute sql error type

* update execute sql error type

* remove duplicate database functions query
2024-06-03 23:21:19 +08:00
Jordi Enric
aa84f7f60b fix warehouse rows & update UI for event detail (#26891)
* ui fixes, rendering data in warehouse table fixed

* reduce padding in header

* rm test of copy button since it was moved elsewhere
2024-05-31 20:59:28 +02:00
Wen Bo Xie
cd930f5a2f feat: add IPv4 add on direct conn notice (#26903)
* feat: add IPv4 add on direct conn notice

* feat: add session mode warning

* fix: remove statement from Supavisor-related types

* Revert change in api types file

* Revert change in api types file

* Update API types file via codegen

* Smol feex

* Temp lint fix

* Fix

* fix: include serverless mention

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-05-31 17:07:25 +00: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
Jordi Enric
483492564d disable warehouse tenant query when ff is disabled (#26873)
* disable warehouse tenant query when ff is disabled

* rm unecessary check

* disable warehouse queries when warehouse flag is off or not in warehouse querytype

* fix useeffect forcing query to refetch when disabled
2024-05-30 01:30:43 +02:00
Ivan Vasilov
e1cf9d61ae fix: Fix the sort feature in the Table editor (#26865)
* Expand the Sort type with a table property.

* Add a qualifier for the sort when sending a fetch table query.

* Fix the tests.
2024-05-29 17:02:54 -02:30
Joshen Lim
0a0f2260f9 Chore/gracefully handle large text or json in table editor (#26792)
* Support rendering large text/jsons in grid

* Support rendering large json in side panel, and large text in grid

* Support rendering large text in side panel

* Fix

* Update comment

* Fix the editValue type for json fields.

* Fix

* Update blur value

* Fix

* Feex

* Padding bump

* Small refactor

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-05-29 17:10:07 +08:00
Jonathan Summers-Muir
81b1dc2161 [Dashboard] Postgrest API settings renamed to "Data API" settings. now using react-hook-form (#26793)
* init layouts in project settings

* Update general.tsx

* update gap

* Update Scaffold.tsx

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* spacing issues

* now added a enabled switch

* Revert "now added a enabled switch"

This reverts commit f22050302a.

* Update PostgrestConfig.tsx

* Update project-postgrest-config-update-mutation.ts

* add bottom padding

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* Update multi-select.tsx

* Update multi-select.tsx

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx

* Update PostgrestConfig.tsx
2024-05-29 17:01:56 +08:00
Jordi Enric
9fd85e76fb feature: warehouse (#23714)
* add event collection ui, queries, routing

* fix alignment issue

* renaming

* wip

* feat: initial data hooks and integration with feature flagging

* update with naming, correct mocks, etc

* feat: add source crud integration

* mock data, fix form, add motion to drawer

* feat: optimize warehouse fetch behaviour

* feat: add in valid query

* chore: ermove collection mocks

* feat: optimize tenant fetching

* cleanup + update openapi client + fix fetch calls

* cleanup imporst

* on delete success, redirect to main logs page

* fix dropdown event propagating to link and opening page

* Refactor code to use useParams and useRouter in CreateWarehouseCollection.tsx, WarehouseCollectionDetail.tsx, and LogsLayout.tsx

* clean warehouse query

* warehouse access tokens create, list

* add warehouse access token revokal

* fix access tokens table, fix access tokens revoke feature

* format date in access tokens table

* fix some state issues and warnings in access tokens forms

* warehouse/feat: introduction when creating event collections (#23244)

feat: add introduction for event collections

* warehouse/feat: rename headers and nav items (#23243)

* feat: rename headers

* feat: use feature flag for navigation bar

* move header name flag to component

* fix typeerror in create collection query

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>

* ui fixes, rm deprecated icons

* render table with events

* fix typeerror results arr

* add pagination

* some ui fixes

* fix loading states, format dates, test connection dialog

* patch type errors

* Fix access token selection in TestCollectionDialog and update column name in WarehouseAccessTokens

* rm unused querytype

* rm unused querytype in logtable

* patch type errors in warhouse collection mutations

* rm unused component

* mr unused import

* show connection dialog in staging

* fix Run btn now showing up

* fix undef argument

* show pagination only when there are results

* fix issues in connection dialog, improve ux

* Update apps/studio/components/interfaces/DataWarehouse/CreateWarehouseAccessToken.tsx

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>

* Update apps/studio/components/interfaces/DataWarehouse/CreateWarehouseAccessToken.tsx

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>

* fix infinite render loop, adapt component to render log metadata on log selection

* rm unused import, prevent ui from breaking when some data may be missing from an event

* update WAT create mutation to use template

* follow mutation template in delete access token mutation

* refactor naming, improve code in some areas

* rm unused mocks for msw

* skip tests - this will get fixed on the vitest PR

* Update apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* fix loading compo

* rm unused import

* use correct alert title

* rm unnecessary div

* fix layout in projectpaused alert

* fix type err, refactor to new method

* rm observer

* rm observer

* refactor warehouse collections update

* use correct get method, comment out so it doesnt err

* use correct method

* fix formatting issues

* ref imports

* ref imports

* clean up imports

* clean imports

* clean imports

* rename props

* destructure props

* cleanup imports

* Update apps/studio/components/interfaces/DataWarehouse/CreateWarehouseCollection.tsx

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>

* ref scale class

* cleanup divs

* Update apps/studio/components/interfaces/DataWarehouse/TestCollectionDialog.tsx

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>

* refactor to rhf

* reuse types, cleanup, refactor to react query hooks instead of el events

* refactor table component to handle empty state

* Update TestCollectionDialog to use unique keys for SelectItem components

* Update TestCollectionDialog to use unique keys for SelectItem components

* Update TestCollectionDialog to use unique keys for SelectItem components

* fix empty state ui

* use destructured queries

* rename query types

* Update apps/studio/components/interfaces/DataWarehouse/WarehouseAccessTokens.tsx

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>

* chore: Refactor WarehouseCollectionDetail component

* rm unused imports

* rename loadolder

* rm typcast

* rhf in create token

* improve err handling

* refactor to rhf, refactor queries, use cn utils, cleanup

* fix loading logselection

* add correct type to warehouse access tokens query

* use correct types in err & clean unused types

* toggle token in curl exampel

* use product empty state component in warehouse

* add client side validation of collection name, temp fix

* add New badge

* update testcolldialog

* cleanup unnecessary div and rm double border

* code style fixes

* handle err

* code style fix

* add correct type

* add correct err type

* fix type error

* fix type err

* fix missing type

---------

Co-authored-by: TzeYiing <ty@tzeyiing.com>
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-05-29 10:32:46 +02:00