The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat: Show updated_at time for edge secrets (#33716)
Kamil Ogórekbcaf5d4f199e
diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecret.tsx b/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecret.tsxindex 21766dcdd14..4821b1a3093 100644--- a/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecret.tsx+++ b/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecret.tsx@@ -5,6 +5,7 @@ import Table from 'components/to-be-cleaned/Table'import { ButtonTooltip } from 'components/ui/ButtonTooltip'import type { ProjectSecret } from 'data/secrets/secrets-query'import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'+import { TimestampInfo } from 'ui-patterns'interface EdgeFunctionSecretProps {secret: ProjectSecret@@ -23,11 +24,21 @@ const EdgeFunctionSecret = ({ secret, onSelectDelete }: EdgeFunctionSecretProps)<p className="truncate py-2">{secret.name}</p></Table.td><Table.td>- <div className="flex items-center space-x-2">- <p className="font-mono text-sm truncate" title={secret.value}>- {secret.value}- </p>- </div>+ <p className="font-mono text-sm max-w-96 truncate" title={secret.value}>+ {secret.value}+ </p>+ </Table.td>+ <Table.td>+ {!!secret.updated_at ? (+ <TimestampInfo+ displayAs="utc"+ utcTimestamp={secret.updated_at}+ labelFormat="DD MMM YYYY HH:mm:ss (ZZ)"+ className="!text-sm"+ />+ ) : (+ '-'+ )}</Table.td><Table.td><div className="flex items-center justify-end">diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecrets.tsx b/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecrets.tsxindex 259f3e89dd2..774807393e6 100644--- a/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecrets.tsx+++ b/apps/studio/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecrets.tsx@@ -68,47 +68,51 @@ const EdgeFunctionSecrets = () => {icon={<Search size={14} />}/></div>- <Table- head={[- <Table.th key="secret-name">Name</Table.th>,- <Table.th key="secret-value" className="flex items-center gap-x-2">- Digest{' '}- <Badge color="scale" className="font-mono">- SHA256- </Badge>- </Table.th>,- <Table.th key="actions" />,- ]}- body={- secrets.length > 0 ? (- secrets.map((secret) => (- <EdgeFunctionSecret- key={secret.name}- secret={secret}- onSelectDelete={() => setSelectedSecret(secret)}- />- ))- ) : secrets.length === 0 && searchString.length > 0 ? (- <Table.tr>- <Table.td colSpan={3}>- <p className="text-sm text-foreground">No results found</p>- <p className="text-sm text-foreground-light">- Your search for "{searchString}" did not return any results- </p>- </Table.td>- </Table.tr>- ) : (- <Table.tr>- <Table.td colSpan={3}>- <p className="text-sm text-foreground">No secrets created</p>- <p className="text-sm text-foreground-light">- There are no secrets associated with your project yet- </p>- </Table.td>- </Table.tr>- )- }- />++ <div className="w-full overflow-hidden overflow-x-auto">+ <Table+ head={[+ <Table.th key="secret-name">Name</Table.th>,+ <Table.th key="secret-value" className="flex items-center gap-x-2">+ Digest{' '}+ <Badge color="scale" className="font-mono">+ SHA256+ </Badge>+ </Table.th>,+ <Table.th key="secret-updated-at">Updated at</Table.th>,+ <Table.th key="actions" />,+ ]}+ body={+ secrets.length > 0 ? (+ secrets.map((secret) => (+ <EdgeFunctionSecret+ key={secret.name}+ secret={secret}+ onSelectDelete={() => setSelectedSecret(secret)}+ />+ ))+ ) : secrets.length === 0 && searchString.length > 0 ? (+ <Table.tr>+ <Table.td colSpan={3}>+ <p className="text-sm text-foreground">No results found</p>+ <p className="text-sm text-foreground-light">+ Your search for "{searchString}" did not return any results+ </p>+ </Table.td>+ </Table.tr>+ ) : (+ <Table.tr>+ <Table.td colSpan={3}>+ <p className="text-sm text-foreground">No secrets created</p>+ <p className="text-sm text-foreground-light">+ There are no secrets associated with your project yet+ </p>+ </Table.td>+ </Table.tr>+ )+ }+ />+ </div></>)}</div>