Skip to content

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

Show all cron jobs even those with no names (#32765)

Joshen Lim53eaab0f7142
diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobCard.tsx b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobCard.tsx
index a7dcafb173c..98a830bf9e4 100644
--- a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobCard.tsx
+++ b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobCard.tsx
@@ -60,7 +60,14 @@ export const CronJobCard = ({ job, onEditCronJob, onDeleteCronJob }: CronJobCard
</div>
<div className="flex flex-col flex-0 overflow-y-auto w-full">
<div className="flex flex-row justify-between items-center">
- <span className="text-base text-foreground">{job.jobname}</span>
+ <span
+ className={cn(
+ 'text-base',
+ job.jobname === null ? 'text-foreground-lighter' : 'text-foreground'
+ )}
+ >
+ {job.jobname ?? 'No name provided'}
+ </span>
<div className="flex items-center gap-x-2">
{isLoading ? (
<Loader2 size={18} strokeWidth={2} className="animate-spin text-foreground-muted" />
diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.tsx b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.tsx
index 96952fd468e..89da2c34e28 100644
--- a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.tsx
+++ b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.tsx
@@ -60,7 +60,10 @@ export const CronjobsTab = () => {
</div>
)
- const filteredCronJobs = (cronJobs ?? []).filter((cj) => cj?.jobname?.includes(searchQuery || ''))
+ const filteredCronJobs =
+ searchQuery.length > 0
+ ? (cronJobs ?? []).filter((cj) => cj?.jobname?.includes(searchQuery || ''))
+ : cronJobs ?? []
const onOpenCreateJobSheet = () => {
sendEvent({ action: TelemetryActions.CRON_JOB_CREATE_CLICKED })