Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

moved components

Jonathan Summers-Muir39180971cbb3
diff --git a/studio/pages/project/[ref]/functions/interfaces/CommandRender.tsx b/studio/components/interfaces/functions/CommandRender.tsx
similarity index 100%
rename from studio/pages/project/[ref]/functions/interfaces/CommandRender.tsx
rename to studio/components/interfaces/functions/CommandRender.tsx
diff --git a/studio/pages/project/[ref]/functions/interfaces/FunctionLayout.tsx b/studio/components/interfaces/functions/FunctionLayout.tsx
similarity index 100%
rename from studio/pages/project/[ref]/functions/interfaces/FunctionLayout.tsx
rename to studio/components/interfaces/functions/FunctionLayout.tsx
diff --git a/studio/pages/project/[ref]/functions/interfaces/FunctionLogsItem.tsx b/studio/components/interfaces/functions/FunctionLogsItem.tsx
similarity index 100%
rename from studio/pages/project/[ref]/functions/interfaces/FunctionLogsItem.tsx
rename to studio/components/interfaces/functions/FunctionLogsItem.tsx
diff --git a/studio/pages/project/[ref]/functions/interfaces/Functions.Constants.ts b/studio/components/interfaces/functions/Functions.Constants.ts
similarity index 100%
rename from studio/pages/project/[ref]/functions/interfaces/Functions.Constants.ts
rename to studio/components/interfaces/functions/Functions.Constants.ts
diff --git a/studio/pages/project/[ref]/functions/interfaces/Functions.types.ts b/studio/components/interfaces/functions/Functions.types.ts
similarity index 100%
rename from studio/pages/project/[ref]/functions/interfaces/Functions.types.ts
rename to studio/components/interfaces/functions/Functions.types.ts
diff --git a/studio/pages/project/[ref]/functions/interfaces/FunctionsLayout.tsx b/studio/components/interfaces/functions/FunctionsLayout.tsx
similarity index 97%
rename from studio/pages/project/[ref]/functions/interfaces/FunctionsLayout.tsx
rename to studio/components/interfaces/functions/FunctionsLayout.tsx
index a455bd69ff1..9e3b0c9e4e3 100644
--- a/studio/pages/project/[ref]/functions/interfaces/FunctionsLayout.tsx
+++ b/studio/components/interfaces/functions/FunctionsLayout.tsx
@@ -3,7 +3,7 @@ import { observer } from 'mobx-react-lite'
import { useStore, withAuth } from 'hooks'
import { IconCode, IconSlash, Loading, Tabs } from '@supabase/ui'
import { Tab } from '@headlessui/react'
-import FunctionsNav from '../interfaces/FunctionsNav'
+import FunctionsNav from './FunctionsNav'
import React, { useEffect } from 'react'
import { useRouter } from 'next/router'
import WarningBanner from 'components/ui/WarningBanner'
diff --git a/studio/pages/project/[ref]/functions/interfaces/FunctionsListItem.tsx b/studio/components/interfaces/functions/FunctionsListItem.tsx
similarity index 100%
rename from studio/pages/project/[ref]/functions/interfaces/FunctionsListItem.tsx
rename to studio/components/interfaces/functions/FunctionsListItem.tsx
diff --git a/studio/pages/project/[ref]/functions/interfaces/FunctionsNav.tsx b/studio/components/interfaces/functions/FunctionsNav.tsx
similarity index 100%
rename from studio/pages/project/[ref]/functions/interfaces/FunctionsNav.tsx
rename to studio/components/interfaces/functions/FunctionsNav.tsx
diff --git a/studio/pages/project/[ref]/functions/[id]/details.tsx b/studio/pages/project/[ref]/functions/[id]/details.tsx
index 2a7c9f2cfdc..81544ceda9d 100644
--- a/studio/pages/project/[ref]/functions/[id]/details.tsx
+++ b/studio/pages/project/[ref]/functions/[id]/details.tsx
@@ -1,8 +1,8 @@
import { observer } from 'mobx-react-lite'
import { useStore, withAuth } from 'hooks'
-import FunctionLayout from './../interfaces/FunctionLayout'
-import CommandRender from '../interfaces/CommandRender'
+import FunctionLayout from '../../../../../components/interfaces/functions/FunctionLayout'
+import CommandRender from '../../../../../components/interfaces/functions/CommandRender'
import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'
import { toJS } from 'mobx'
diff --git a/studio/pages/project/[ref]/functions/[id]/index.tsx b/studio/pages/project/[ref]/functions/[id]/index.tsx
index ba8a205b25c..1ad2353474e 100644
--- a/studio/pages/project/[ref]/functions/[id]/index.tsx
+++ b/studio/pages/project/[ref]/functions/[id]/index.tsx
@@ -14,7 +14,7 @@ import ChartHandler from 'components/to-be-cleaned/Charts/ChartHandler'
import { get } from 'lib/common/fetch'
import { API_URL, DATE_FORMAT } from 'lib/constants'
-import FunctionLayout from '../interfaces/FunctionLayout'
+import FunctionLayout from '../../../../../components/interfaces/functions/FunctionLayout'
const CHART_INTERVALS = [
{
diff --git a/studio/pages/project/[ref]/functions/[id]/invocations.tsx b/studio/pages/project/[ref]/functions/[id]/invocations.tsx
index e5137b72771..b3603421de8 100644
--- a/studio/pages/project/[ref]/functions/[id]/invocations.tsx
+++ b/studio/pages/project/[ref]/functions/[id]/invocations.tsx
@@ -5,7 +5,7 @@ import { observer } from 'mobx-react-lite'
import { withAuth } from 'hooks'
import { LOG_TYPE_LABEL_MAPPING } from 'components/interfaces/Settings/Logs'
import LogsPreviewer from 'components/interfaces/Settings/Logs/LogsPreviewer'
-import FunctionLayout from '../interfaces/FunctionLayout'
+import FunctionLayout from '../../../../../components/interfaces/functions/FunctionLayout'
/**
* Placeholder page for logs previewers until we figure out where to slot them
diff --git a/studio/pages/project/[ref]/functions/[id]/logs-old.tsx b/studio/pages/project/[ref]/functions/[id]/logs-old.tsx
deleted file mode 100644
index 2ea9a01b332..00000000000
--- a/studio/pages/project/[ref]/functions/[id]/logs-old.tsx
+++ /dev/null
@@ -1,341 +0,0 @@
-import { observer } from 'mobx-react-lite'
-import { withAuth } from 'hooks'
-
-import FunctionLayout from './../interfaces/FunctionLayout'
-import {
- Button,
- Checkbox,
- Dropdown,
- IconAlertCircle,
- IconAlertOctagon,
- IconCalendar,
- IconCheck,
- IconCheckCircle,
- IconChevronRight,
- IconExternalLink,
- IconGlobe,
- IconSearch,
- Input,
- Popover,
- SidePanel,
-} from '@supabase/ui'
-import { useState } from 'react'
-import Table from 'components/to-be-cleaned/Table'
-import { memoryUsage } from 'process'
-import FunctionsListItem from './../interfaces/FunctionsListItem'
-
-import LogsData from './../data/logs.json'
-import FunctionLogsItem from '../interfaces/FunctionLogsItem'
-import dayjs from 'dayjs'
-import router, { useRouter } from 'next/router'
-
-const EmptyFunctions = () => {
- return (
- <>
- <p className="text-scale-1200 text-base max-w-lg">
- Scalable pay-as-you-go functions as a service (FaaS) to run your code with zero server
- management.
- </p>
- <p className="text-scale-1100 text-sm max-w-lg">
- No servers to provision, manage, or upgrade Automatically scale based on the load Integrated
- monitoring, logging, and debugging capability Built-in security at role and per function
- level based on the principle of least privilege Key networking capabilities for hybrid and
- multi-cloud scenarios
- </p>
- <div className="flex gap-2">
- <Button iconRight={<IconChevronRight />}>Get started</Button>
- <Button type="link" iconRight={<IconExternalLink />}>
- Documentation
- </Button>
- </div>
- <div className="bg-scale-300 rounded px-10 py-8 flex flex-col gap-8">
- <h2 className="text-sm text-scale-1100">Function examples</h2>
- <div className="grid lg:grid-cols-3 gap-8">
- <div className="flex flex-col gap-3">
- <div
- className="
- h-10 w-10
- bg-indigo-900
- bordershadow-indigo-900
- rounded-md
- text-scale-fixed-100
- flex items-center justify-center
- "
- >
- <IconGlobe />
- </div>
- <div className="">
- <h3 className="text-scale-1200">Stripe payments</h3>
- <p className="text-scale-1100">
- Charge a payment credit card when a database event occurs
- </p>
- </div>
- </div>
- <div className="flex flex-col gap-3">
- <div
- className="
- h-10 w-10
- bg-indigo-900
- bordershadow-indigo-900
- rounded-md
- text-scale-fixed-100
- flex items-center justify-center
- "
- >
- <IconGlobe />
- </div>
- <div className="">
- <h3 className="text-scale-1200">Stripe payments</h3>
- <p className="text-scale-1100">
- Charge a payment credit card when a database event occurs
- </p>
- </div>
- </div>
- <div className="flex flex-col gap-3">
- <div
- className="
- h-10 w-10
- bg-indigo-900
- bordershadow-indigo-900
- rounded-md
- text-scale-fixed-100
- flex items-center justify-center
- "
- >
- <IconGlobe />
- </div>
- <div className="">
- <h3 className="text-scale-1200">Stripe payments</h3>
- <p className="text-scale-1100">
- Charge a payment credit card when a database event occurs
- </p>
- </div>
- </div>
- </div>
- </div>
- </>
- )
-}
-
-const FunctionsList = () => {
- const [detailVisible, setDetailVisible] = useState(false)
-
- const router = useRouter()
- const { ref } = router.query
-
- const PageState = {
- functions: [
- {
- name: 'hello-world',
- id: 1,
- runtime: 'Node14',
- memory: 256,
- created_at: 1646524256,
- },
- {
- name: 'charge',
- id: 2,
- runtime: 'Node14',
- memory: 256,
- created_at: 1646524256,
- },
- {
- name: 'projects',
- id: 3,
- runtime: 'Node14',
- memory: 512,
- created_at: 1646524256,
- },
- ],
- }
-
- const logDetails = (
- <div className="grid grid-cols-12 gap-2">
- <span className="col-span-3 text-sm text-scale-900 w-32">Status</span>
- <div className="col-span-7">
- <div className="flex">
- <div className="text-sm bg-scale-500 text-scale-1200 rounded px-2">200 OK</div>
- </div>
- </div>
-
- <div className="col-span-3 text-sm text-scale-900 w-32">ID</div>
- <div className="col-span-7 text-sm text-scale-1200">
- <span className="">{LogsData[0].id}</span>
- </div>
-
- <div className="col-span-3 text-sm text-scale-900 w-32">Time</div>
- <div className="col-span-7 text-sm text-scale-1200">
- <span className="">{dayjs(LogsData[0].created_at).format('DD MMM, YYYY HH:mm')}</span>
- </div>
-
- <div className="col-span-3 text-sm text-scale-900 w-32">IP Address</div>
- <div className="col-span-7 text-sm text-scale-1200">
- {/*
- // @ts-ignore */}
- <span className="">{LogsData[0].ip_address}</span>
- </div>
-
- <div className="col-span-3 text-sm text-scale-900 w-32">API Version</div>
- <div className="col-span-7 text-sm text-scale-1200">
- <span className="">v0.1</span>
- </div>
-
- <div className="col-span-3 text-sm text-scale-900 w-32">Source</div>
- <div className="col-span-7 text-sm text-scale-1200">
- <span className="">Something</span>
- </div>
-
- {/* <div className="col-span-3 text-sm text-scale-900 w-32 grow">User agent</div>
- <div className="col-span-7 flex text-scale-1200">
- <span className="">{LogsData[0].user_agent}</span>
- </div> */}
- </div>
- )
-
- return (
- <div className="flex flex-col gap-3">
- <div className="flex items-center justify-between gap-3">
- <div className="flex items-center gap-3">
- <Input icon={<IconSearch size={14} />} placeholder="Filter by anything.." size="tiny" />
- <div className="flex -space-x-px">
- <Button
- type="secondary"
- style={{ borderTopRightRadius: 0, borderBottomRightRadius: 0 }}
- >
- Last Hour
- </Button>
- <Button
- type="default"
- icon={<IconCalendar />}
- style={{ borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }}
- >
- Custom
- </Button>
- </div>
- <Popover
- size="medium"
- align="end"
- portalled
- showClose
- side="bottom"
- header={
- <div className="flex justify-between items-center">
- <Button size="tiny" type="default">
- Clear
- </Button>
- <h5 className="text-sm text-scale-1200">Status</h5>
- <Button type="primary">Save</Button>
- </div>
- }
- onOpenChange={function noRefCheck() {}}
- overlay={[
- <>
- <div className="py-6 space-y-4">
- <Checkbox
- className="px-3"
- defaultValue="100%"
- description="Show all 200 responses"
- label="Succeeded"
- size="medium"
- />
- <Popover.Seperator />
- <Checkbox
- className="px-3"
- defaultValue="100%"
- description="Show all 5XX responses"
- label="Failed"
- size="medium"
- />
- </div>
- </>,
- ]}
- >
- <Button as="span" type="default">
- Status
- </Button>
- </Popover>
- </div>
- <Button
- type="default"
- iconRight={<IconExternalLink size={14} />}
- onClick={() =>
- router.push(
- `http://localhost:8082/project/${ref}/logs/database?q=timestamp+%3C+TIMESTAMP_SUB%28CURRENT_TIMESTAMP%28%29%2C+INTERVAL+10+MINUTE%29&s=&te=`
- )
- }
- >
- Open in logs explorer
- </Button>
- </div>
- <div className="grid grid-cols-2 h-full">
- <div>
- <Table
- head={
- <>
- <Table.th className="w-16">Response</Table.th>
- <Table.th className="w-16">Method</Table.th>
- <Table.th>URL</Table.th>
- <Table.th>Timestamp</Table.th>
- </>
- }
- body={
- <>
- {LogsData.length > 0 &&
- LogsData.map((x: any) => (
- <FunctionLogsItem
- key={x.id}
- log={x}
- onClick={() => {
- setDetailVisible(true)
- }}
- />
- ))}
- </>
- }
- />
- </div>
- <div className="border-t border-l border-r px-6 py-4 space-y-6">
- <h3 className="text-xl font-medium text-scale-1200 mb-4">
- POST /readededeaded/functions/hello-world
- </h3>
- {logDetails}
- <SidePanel.Seperator />
- <h3 className="text-base text-scale-1200">Response body</h3>
- </div>
- </div>
- <SidePanel
- size="large"
- header={'POST /readededeaded/functions/hello-world'}
- visible={detailVisible}
- onCancel={() => setDetailVisible(false)}
- >
- <div className="py-4 flex flex-col space-y-8">
- <SidePanel.Content>{logDetails}</SidePanel.Content>
- <SidePanel.Seperator />
- <SidePanel.Content>
- <h3 className="text-base text-scale-1200">Response body</h3>
- </SidePanel.Content>
- </div>
- </SidePanel>
- </div>
- )
-}
-
-const PageLayout = () => {
- const [pageState, setPageState] = useState('list')
-
- const Selection = () => (
- <div>
- <Button onClick={() => setPageState('empty')}>empty list</Button>
- <Button onClick={() => setPageState('list')}>list</Button>
- </div>
- )
-
- return (
- <FunctionLayout>
- <FunctionsList />
- </FunctionLayout>
- )
-}
-
-export default withAuth(observer(PageLayout))
diff --git a/studio/pages/project/[ref]/functions/[id]/logs.tsx b/studio/pages/project/[ref]/functions/[id]/logs.tsx
index 22ec95b12c8..b553e520703 100644
--- a/studio/pages/project/[ref]/functions/[id]/logs.tsx
+++ b/studio/pages/project/[ref]/functions/[id]/logs.tsx
@@ -5,7 +5,7 @@ import { observer } from 'mobx-react-lite'
import { withAuth } from 'hooks'
import { LOG_TYPE_LABEL_MAPPING } from 'components/interfaces/Settings/Logs'
import LogsPreviewer from 'components/interfaces/Settings/Logs/LogsPreviewer'
-import FunctionLayout from '../interfaces/FunctionLayout'
+import FunctionLayout from '../../../../../components/interfaces/functions/FunctionLayout'
/**
* Placeholder page for logs previewers until we figure out where to slot them
diff --git a/studio/pages/project/[ref]/functions/[id]/triggers.tsx b/studio/pages/project/[ref]/functions/[id]/triggers.tsx
index 94a159273e9..feb8d9299c8 100644
--- a/studio/pages/project/[ref]/functions/[id]/triggers.tsx
+++ b/studio/pages/project/[ref]/functions/[id]/triggers.tsx
@@ -1,7 +1,7 @@
import { observer } from 'mobx-react-lite'
import { withAuth } from 'hooks'
-import FunctionLayout from './../interfaces/FunctionLayout'
+import FunctionLayout from '../../../../../components/interfaces/functions/FunctionLayout'
const PageLayout = () => {
return <FunctionLayout>Triggers</FunctionLayout>
diff --git a/studio/pages/project/[ref]/functions/data/logs.json b/studio/pages/project/[ref]/functions/data/logs.json
deleted file mode 100644
index a15bc768fa6..00000000000
--- a/studio/pages/project/[ref]/functions/data/logs.json
+++ /dev/null
@@ -1,128 +0,0 @@
-[
- {
- "id": 1,
- "url": "/readededeaded/functions/hello-world",
- "method": "POST",
- "runtime": "Node14",
- "memory": 256,
- "created_at": 1646524256,
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
- "memory_used": "113",
- "init_duration": "431.44",
- "duration": "1394.57 ms",
- "edge_status": "200",
- "function_status": "200"
- },
- {
- "id": 2,
- "url": "/readededeaded/functions/hello-world",
- "method": "POST",
- "runtime": "Node14",
- "memory": 256,
- "created_at": 1646524256,
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
- "memory_used": "113",
- "init_duration": "431.44",
- "duration": "1394.57 ms",
- "edge_status": "200",
- "function_status": "200"
- },
- {
- "id": 3,
- "url": "/readededeaded/functions/hello-world",
- "method": "POST",
- "runtime": "Node14",
- "memory": 512,
- "created_at": 1646524256,
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
- "memory_used": "113",
- "init_duration": "431.44",
- "duration": "1394.57 ms",
- "edge_status": "200",
- "function_status": "200"
- },
- {
- "id": 3,
- "url": "/readededeaded/functions/hello-world",
- "method": "POST",
- "runtime": "Node14",
- "memory": 512,
- "created_at": 1646524256,
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
- "memory_used": "113",
- "init_duration": "431.44",
- "duration": "1394.57 ms",
- "edge_status": "200",
- "function_status": "200"
- },
- {
- "id": 3,
- "url": "/readededeaded/functions/hello-world",
- "method": "POST",
- "runtime": "Node14",
- "memory": 512,
- "created_at": 1646524256,
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
- "memory_used": "113",
- "init_duration": "431.44",
- "duration": "1394.57 ms",
- "edge_status": "200",
- "function_status": "200"
- },
- {
- "id": 3,
- "url": "/readededeaded/functions/hello-world",
- "method": "POST",
- "runtime": "Node14",
- "memory": 512,
- "created_at": 1646524256,
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
- "memory_used": "113",
- "init_duration": "431.44",
- "duration": "1394.57 ms",
- "edge_status": "200",
- "function_status": "200"
- },
- {
- "id": 3,
- "url": "/readededeaded/functions/hello-world",
- "method": "POST",
- "runtime": "Node14",
- "memory": 512,
- "created_at": 1646524256,
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
- "memory_used": "113",
- "init_duration": "431.44",
- "duration": "1394.57 ms",
- "edge_status": "200",
- "function_status": "200"
- },
- {
- "id": 3,
- "url": "/readededeaded/functions/hello-world",
- "method": "POST",
- "runtime": "Node14",
- "memory": 512,
- "created_at": 1646524256,
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
- "memory_used": "113",
- "init_duration": "431.44",
- "duration": "1394.57 ms",
- "edge_status": "200",
- "function_status": "200"
- },
- {
- "id": 3,
- "url": "/readededeaded/functions/hello-world",
- "method": "POST",
- "runtime": "Node14",
- "memory": 512,
- "created_at": 1646524256,
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36",
- "memory_used": "113",
- "init_duration": "431.44",
- "duration": "1394.57 ms",
- "edge_status": "200",
- "function_status": "200"
- }
-]
diff --git a/studio/pages/project/[ref]/functions/data/request_sample.json b/studio/pages/project/[ref]/functions/data/request_sample.json
deleted file mode 100644
index c43f0f33599..00000000000
--- a/studio/pages/project/[ref]/functions/data/request_sample.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "custom_fields": {
- "0": {
- "name": "Project name",
- "value": "1a1a1a1a1a1a1a1a1a1a1a"
- }
- }
-}
diff --git a/studio/pages/project/[ref]/functions/data/response_sample.json b/studio/pages/project/[ref]/functions/data/response_sample.json
deleted file mode 100644
index 1e64e950ac4..00000000000
--- a/studio/pages/project/[ref]/functions/data/response_sample.json
+++ /dev/null
@@ -1,178 +0,0 @@
-[
- {
- "id": "in_1a1a1a1a1a1a1a1a1a1a1a",
- "object": "1a1a1a1a1a1a1a1a1a1a1a",
- "account_country": "US",
- "account_name": "1a1a1a1a1a1a1a1a1a1a1a",
- "account_tax_ids": null,
- "amount_due": 0,
- "amount_paid": 0,
- "amount_remaining": 0,
- "application_fee_amount": null,
- "attempt_count": 0,
- "attempted": false,
- "auto_advance": true,
- "automatic_tax": {
- "enabled": false,
- "status": null
- },
- "billing_reason": "1a1a1a1a1a1a1a1a1a1a1a",
- "charge": null,
- "collection_method": "charge_automatically",
- "created": 1646526032,
- "currency": "usd",
- "custom_fields": [
- {
- "name": "Project name",
- "value": "1a1a1a1a1a1a1a1a1a1a1a"
- }
- ],
- "customer": "cus_in_1a1a1a1a1a1a1a1a1a1a1a",
- "customer_address": null,
- "customer_email": "[email protected]",
- "customer_name": null,
- "customer_phone": null,
- "customer_shipping": null,
- "customer_tax_exempt": "none",
- "customer_tax_ids": [],
- "default_payment_method": null,
- "default_source": null,
- "default_tax_rates": [],
- "description": null,
- "discount": null,
- "discounts": [],
- "due_date": null,
- "ending_balance": null,
- "footer": null,
- "hosted_invoice_url": null,
- "invoice_pdf": null,
- "last_finalization_error": null,
- "lines": {
- "object": "list",
- "data": [
- {
- "id": "il_in_1a1a1a1a1a1a1a1a1a1a1a",
- "object": "line_item",
- "amount": 0,
- "currency": "usd",
- "description": "1 × Free tier (at $0.00 / month)",
- "discount_amounts": [],
- "discountable": true,
- "discounts": [],
- "livemode": true,
- "metadata": {
- "project_id": "29167",
- "project_ref": "1a1a1a1a1a1a1a1a1a1a1a",
- "project_name": "1a1a1a1a1a1a1a1a1a1a1a",
- "organization_id": "1a1a1a1a1a1a1a1a1a1a1a",
- "organization_slug": "1a1a1a1a1a1a1a1a1a1a1a-1a1a1a1a1a1a1a1a1a1a1a-1a1a1a1a1a1a1a1a1a1a1a"
- },
- "period": {
- "end": 1649204401,
- "start": 1646526001
- },
- "plan": {
- "id": "price_1a1a1a1a1a1a1a1a1a1a1a",
- "object": "plan",
- "active": true,
- "aggregate_usage": null,
- "amount": 0,
- "amount_decimal": "0",
- "billing_scheme": "per_unit",
- "created": 1615645622,
- "currency": "usd",
- "interval": "month",
- "interval_count": 1,
- "livemode": true,
- "metadata": {
- "price": "0000"
- },
- "nickname": null,
- "product": "prod_1a1a1a1a1a1a1a1a1a1a1a",
- "tiers_mode": null,
- "transform_usage": null,
- "trial_period_days": null,
- "usage_type": "licensed"
- },
- "price": {
- "id": "price_1a1a1a1a1a1a1a1a1a1a1a",
- "object": "price",
- "active": true,
- "billing_scheme": "per_unit",
- "created": 1615645622,
- "currency": "usd",
- "livemode": true,
- "lookup_key": null,
- "metadata": {
- "price": "0000"
- },
- "nickname": null,
- "product": "prod_1a1a1a1a1a1a1a1a1a1a1a",
- "recurring": {
- "aggregate_usage": null,
- "interval": "month",
- "interval_count": 1,
- "trial_period_days": null,
- "usage_type": "licensed"
- },
- "tax_behavior": "unspecified",
- "tiers_mode": null,
- "transform_quantity": null,
- "type": "recurring",
- "unit_amount": 0,
- "unit_amount_decimal": "0"
- },
- "proration": false,
- "proration_details": {
- "credited_items": null
- },
- "quantity": 1,
- "subscription": "sub_1a1a1a1a1a1a1a1a1a1a1a",
- "subscription_item": "si_1a1a1a1a1a1a1a1a1a1a1a",
- "tax_amounts": [],
- "tax_rates": [],
- "type": "subscription"
- }
- ],
- "has_more": false,
- "total_count": 1,
- "url": "/v1/invoices/in_1a1a1a1a1a1a1a1a1a1a1a/lines"
- },
- "livemode": true,
- "metadata": {},
- "next_payment_attempt": 1646529632,
- "number": null,
- "on_behalf_of": null,
- "paid": false,
- "paid_out_of_band": false,
- "payment_intent": null,
- "payment_settings": {
- "payment_method_options": null,
- "payment_method_types": null
- },
- "period_end": 1646526001,
- "period_start": 1644106801,
- "post_payment_credit_notes_amount": 0,
- "pre_payment_credit_notes_amount": 0,
- "quote": null,
- "receipt_number": null,
- "starting_balance": 0,
- "statement_descriptor": null,
- "status": "draft",
- "status_transitions": {
- "finalized_at": null,
- "marked_uncollectible_at": null,
- "paid_at": null,
- "voided_at": null
- },
- "subscription": "sub_1a1a1a1a1a1a1a1a1a1a1a",
- "subtotal": 0,
- "tax": null,
- "test_clock": null,
- "total": 0,
- "total_discount_amounts": [],
- "total_tax_amounts": [],
- "transfer_data": null,
- "webhooks_delivered_at": null
- }
-]
diff --git a/studio/pages/project/[ref]/functions/index.tsx b/studio/pages/project/[ref]/functions/index.tsx
index ed2c6324ba5..6312801a979 100644
--- a/studio/pages/project/[ref]/functions/index.tsx
+++ b/studio/pages/project/[ref]/functions/index.tsx
@@ -1,21 +1,21 @@
import { observer } from 'mobx-react-lite'
import { useStore, withAuth } from 'hooks'
-import FunctionsLayout from './interfaces/FunctionsLayout'
+import FunctionsLayout from '../../../../components/interfaces/functions/FunctionsLayout'
import { Button, IconBookOpen, IconSearch, IconTerminal, Input, Loading } from '@supabase/ui'
import { useEffect } from 'react'
import Table from 'components/to-be-cleaned/Table'
-import FunctionsListItem from './interfaces/FunctionsListItem'
+import FunctionsListItem from '../../../../components/interfaces/functions/FunctionsListItem'
import { useRouter } from 'next/router'
import { post } from 'lib/common/fetch'
import { API_URL, PROJECT_STATUS } from 'lib/constants'
-import CommandRender from './interfaces/CommandRender'
+import CommandRender from '../../../../components/interfaces/functions/CommandRender'
import Link from 'next/link'
-import { Function } from './interfaces/Functions.types'
+import { Function } from '../../../../components/interfaces/functions/Functions.types'
const EmptyFunctions = () => {
const router = useRouter()