mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-06-27 20:29:44 +02:00
Update job-rules routes to manage-triggers to better reflect purpose
This commit is contained in:
parent
5ff6e4377d
commit
c99cd9ccd3
19 changed files with 25 additions and 25 deletions
|
|
@ -55,7 +55,7 @@ export function JobView({ projectId, jobId }: { projectId: string; jobId: string
|
||||||
'Deployment ID': reason.triggerDeploymentId,
|
'Deployment ID': reason.triggerDeploymentId,
|
||||||
},
|
},
|
||||||
payload: reason.payload,
|
payload: reason.payload,
|
||||||
link: reason.triggerDeploymentId ? `/projects/${projectId}/job-rules/triggers/${reason.triggerDeploymentId}` : null
|
link: reason.triggerDeploymentId ? `/projects/${projectId}/manage-triggers/triggers/${reason.triggerDeploymentId}` : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (reason.type === 'scheduled_job_rule') {
|
if (reason.type === 'scheduled_job_rule') {
|
||||||
|
|
@ -65,7 +65,7 @@ export function JobView({ projectId, jobId }: { projectId: string; jobId: string
|
||||||
'Rule ID': reason.ruleId,
|
'Rule ID': reason.ruleId,
|
||||||
},
|
},
|
||||||
payload: null,
|
payload: null,
|
||||||
link: `/projects/${projectId}/job-rules/scheduled/${reason.ruleId}`
|
link: `/projects/${projectId}/manage-triggers/scheduled/${reason.ruleId}`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (reason.type === 'recurring_job_rule') {
|
if (reason.type === 'recurring_job_rule') {
|
||||||
|
|
@ -75,7 +75,7 @@ export function JobView({ projectId, jobId }: { projectId: string; jobId: string
|
||||||
'Rule ID': reason.ruleId,
|
'Rule ID': reason.ruleId,
|
||||||
},
|
},
|
||||||
payload: null,
|
payload: null,
|
||||||
link: `/projects/${projectId}/job-rules/recurring/${reason.ruleId}`
|
link: `/projects/${projectId}/manage-triggers/recurring/${reason.ruleId}`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -99,21 +99,21 @@ export function JobsList({ projectId, filters, showTitle = true, customTitle }:
|
||||||
return {
|
return {
|
||||||
type: 'Composio Trigger',
|
type: 'Composio Trigger',
|
||||||
display: `Composio: ${reason.triggerTypeSlug}`,
|
display: `Composio: ${reason.triggerTypeSlug}`,
|
||||||
link: reason.triggerDeploymentId ? `/projects/${projectId}/job-rules/triggers/${reason.triggerDeploymentId}` : null
|
link: reason.triggerDeploymentId ? `/projects/${projectId}/manage-triggers/triggers/${reason.triggerDeploymentId}` : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (reason.type === 'scheduled_job_rule') {
|
if (reason.type === 'scheduled_job_rule') {
|
||||||
return {
|
return {
|
||||||
type: 'Scheduled Job Rule',
|
type: 'Scheduled Job Rule',
|
||||||
display: `Scheduled Rule`,
|
display: `Scheduled Rule`,
|
||||||
link: `/projects/${projectId}/job-rules/scheduled/${reason.ruleId}`
|
link: `/projects/${projectId}/manage-triggers/scheduled/${reason.ruleId}`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (reason.type === 'recurring_job_rule') {
|
if (reason.type === 'recurring_job_rule') {
|
||||||
return {
|
return {
|
||||||
type: 'Recurring Job Rule',
|
type: 'Recurring Job Rule',
|
||||||
display: `Recurring Rule`,
|
display: `Recurring Rule`,
|
||||||
link: `/projects/${projectId}/job-rules/recurring/${reason.ruleId}`
|
link: `/projects/${projectId}/manage-triggers/recurring/${reason.ruleId}`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export function ComposioTriggerDeploymentView({ projectId, deploymentId }: { pro
|
||||||
setDeleting(true);
|
setDeleting(true);
|
||||||
try {
|
try {
|
||||||
await deleteComposioTriggerDeployment({ projectId, deploymentId: deployment.id });
|
await deleteComposioTriggerDeployment({ projectId, deploymentId: deployment.id });
|
||||||
window.location.href = `/projects/${projectId}/job-rules?tab=triggers`;
|
window.location.href = `/projects/${projectId}/manage-triggers?tab=triggers`;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
alert('Failed to delete trigger');
|
alert('Failed to delete trigger');
|
||||||
|
|
@ -62,7 +62,7 @@ export function ComposioTriggerDeploymentView({ projectId, deploymentId }: { pro
|
||||||
<Panel
|
<Panel
|
||||||
title={
|
title={
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Link href={`/projects/${projectId}/job-rules?tab=triggers`}>
|
<Link href={`/projects/${projectId}/manage-triggers?tab=triggers`}>
|
||||||
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
||||||
Back
|
Back
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -89,7 +89,7 @@ export function CreateRecurringJobRuleForm({ projectId }: { projectId: string })
|
||||||
input: { messages: convertedMessages },
|
input: { messages: convertedMessages },
|
||||||
cron: cronExpression,
|
cron: cronExpression,
|
||||||
});
|
});
|
||||||
router.push(`/projects/${projectId}/job-rules?tab=recurring`);
|
router.push(`/projects/${projectId}/manage-triggers?tab=recurring`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Failed to create recurring job rule:", error);
|
console.error("Failed to create recurring job rule:", error);
|
||||||
alert("Failed to create recurring job rule");
|
alert("Failed to create recurring job rule");
|
||||||
|
|
@ -102,7 +102,7 @@ export function CreateRecurringJobRuleForm({ projectId }: { projectId: string })
|
||||||
<Panel
|
<Panel
|
||||||
title={
|
title={
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Link href={`/projects/${projectId}/job-rules?tab=recurring`}>
|
<Link href={`/projects/${projectId}/manage-triggers?tab=recurring`}>
|
||||||
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
||||||
Back
|
Back
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -65,7 +65,7 @@ export function RecurringJobRuleView({ projectId, ruleId }: { projectId: string;
|
||||||
ruleId: rule.id,
|
ruleId: rule.id,
|
||||||
});
|
});
|
||||||
// Redirect back to job rules list
|
// Redirect back to job rules list
|
||||||
router.push(`/projects/${projectId}/job-rules?tab=recurring`);
|
router.push(`/projects/${projectId}/manage-triggers?tab=recurring`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Failed to delete rule:", error);
|
console.error("Failed to delete rule:", error);
|
||||||
alert("Failed to delete rule");
|
alert("Failed to delete rule");
|
||||||
|
|
@ -118,7 +118,7 @@ export function RecurringJobRuleView({ projectId, ruleId }: { projectId: string;
|
||||||
<Panel title="Rule Not Found">
|
<Panel title="Rule Not Found">
|
||||||
<div className="text-center py-8">
|
<div className="text-center py-8">
|
||||||
<p className="text-gray-500 dark:text-gray-400">The requested rule could not be found.</p>
|
<p className="text-gray-500 dark:text-gray-400">The requested rule could not be found.</p>
|
||||||
<Link href={`/projects/${projectId}/job-rules`}>
|
<Link href={`/projects/${projectId}/manage-triggers`}>
|
||||||
<Button variant="secondary" className="mt-4">
|
<Button variant="secondary" className="mt-4">
|
||||||
Back to Job Rules
|
Back to Job Rules
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -133,7 +133,7 @@ export function RecurringJobRuleView({ projectId, ruleId }: { projectId: string;
|
||||||
<Panel
|
<Panel
|
||||||
title={
|
title={
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Link href={`/projects/${projectId}/job-rules?tab=recurring`}>
|
<Link href={`/projects/${projectId}/manage-triggers?tab=recurring`}>
|
||||||
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
||||||
Back
|
Back
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -134,7 +134,7 @@ export function RecurringJobRulesList({ projectId }: { projectId: string }) {
|
||||||
}
|
}
|
||||||
rightActions={
|
rightActions={
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Link href={`/projects/${projectId}/job-rules/recurring/new`}>
|
<Link href={`/projects/${projectId}/manage-triggers/recurring/new`}>
|
||||||
<Button size="sm" className="whitespace-nowrap" startContent={<PlusIcon className="w-4 h-4" />}>
|
<Button size="sm" className="whitespace-nowrap" startContent={<PlusIcon className="w-4 h-4" />}>
|
||||||
New Recurring Trigger
|
New Recurring Trigger
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -168,7 +168,7 @@ export function RecurringJobRulesList({ projectId }: { projectId: string }) {
|
||||||
<div className="flex items-start justify-between">
|
<div className="flex items-start justify-between">
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<Link
|
<Link
|
||||||
href={`/projects/${projectId}/job-rules/recurring/${item.id}`}
|
href={`/projects/${projectId}/manage-triggers/recurring/${item.id}`}
|
||||||
className="block"
|
className="block"
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-3 mb-2">
|
<div className="flex items-center gap-3 mb-2">
|
||||||
|
|
@ -183,7 +183,7 @@ export function TriggersTab({ projectId }: { projectId: string }) {
|
||||||
|
|
||||||
// Success! Go back to triggers list tab and reload
|
// Success! Go back to triggers list tab and reload
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
window.location.href = `/projects/${projectId}/job-rules?tab=triggers`;
|
window.location.href = `/projects/${projectId}/manage-triggers?tab=triggers`;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handleBackToList();
|
handleBackToList();
|
||||||
|
|
@ -328,7 +328,7 @@ export function TriggersTab({ projectId }: { projectId: string }) {
|
||||||
>
|
>
|
||||||
<div className="flex items-start justify-between">
|
<div className="flex items-start justify-between">
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<a href={`/projects/${projectId}/job-rules/triggers/${trigger.id}`} className="block">
|
<a href={`/projects/${projectId}/manage-triggers/triggers/${trigger.id}`} className="block">
|
||||||
<div className="flex items-center gap-3 mb-1">
|
<div className="flex items-center gap-3 mb-1">
|
||||||
{trigger.logo && (
|
{trigger.logo && (
|
||||||
<Image
|
<Image
|
||||||
|
|
@ -90,7 +90,7 @@ export function CreateScheduledJobRuleForm({ projectId }: { projectId: string })
|
||||||
input: { messages: convertedMessages },
|
input: { messages: convertedMessages },
|
||||||
scheduledTime: scheduledTimeString,
|
scheduledTime: scheduledTimeString,
|
||||||
});
|
});
|
||||||
router.push(`/projects/${projectId}/job-rules?tab=scheduled`);
|
router.push(`/projects/${projectId}/manage-triggers?tab=scheduled`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Failed to create scheduled job rule:", error);
|
console.error("Failed to create scheduled job rule:", error);
|
||||||
alert("Failed to create scheduled job rule");
|
alert("Failed to create scheduled job rule");
|
||||||
|
|
@ -105,7 +105,7 @@ export function CreateScheduledJobRuleForm({ projectId }: { projectId: string })
|
||||||
<Panel
|
<Panel
|
||||||
title={
|
title={
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Link href={`/projects/${projectId}/job-rules?tab=scheduled`}>
|
<Link href={`/projects/${projectId}/manage-triggers?tab=scheduled`}>
|
||||||
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
||||||
Back
|
Back
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -46,7 +46,7 @@ export function ScheduledJobRuleView({ projectId, ruleId }: { projectId: string;
|
||||||
ruleId: rule.id,
|
ruleId: rule.id,
|
||||||
});
|
});
|
||||||
// Redirect back to job rules list
|
// Redirect back to job rules list
|
||||||
router.push(`/projects/${projectId}/job-rules?tab=scheduled`);
|
router.push(`/projects/${projectId}/manage-triggers?tab=scheduled`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Failed to delete rule:", error);
|
console.error("Failed to delete rule:", error);
|
||||||
alert("Failed to delete rule");
|
alert("Failed to delete rule");
|
||||||
|
|
@ -80,7 +80,7 @@ export function ScheduledJobRuleView({ projectId, ruleId }: { projectId: string;
|
||||||
<Panel
|
<Panel
|
||||||
title={
|
title={
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Link href={`/projects/${projectId}/job-rules?tab=scheduled`}>
|
<Link href={`/projects/${projectId}/manage-triggers?tab=scheduled`}>
|
||||||
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
<Button variant="secondary" size="sm" startContent={<ArrowLeftIcon className="w-4 h-4" />} className="whitespace-nowrap">
|
||||||
Back
|
Back
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -112,7 +112,7 @@ export function ScheduledJobRulesList({ projectId }: { projectId: string }) {
|
||||||
}
|
}
|
||||||
rightActions={
|
rightActions={
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<Link href={`/projects/${projectId}/job-rules/scheduled/new`}>
|
<Link href={`/projects/${projectId}/manage-triggers/scheduled/new`}>
|
||||||
<Button size="sm" className="whitespace-nowrap" startContent={<PlusIcon className="w-4 h-4" />}>
|
<Button size="sm" className="whitespace-nowrap" startContent={<PlusIcon className="w-4 h-4" />}>
|
||||||
New One-time Trigger
|
New One-time Trigger
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -146,7 +146,7 @@ export function ScheduledJobRulesList({ projectId }: { projectId: string }) {
|
||||||
<div className="flex items-start justify-between">
|
<div className="flex items-start justify-between">
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<Link
|
<Link
|
||||||
href={`/projects/${projectId}/job-rules/scheduled/${item.id}`}
|
href={`/projects/${projectId}/manage-triggers/scheduled/${item.id}`}
|
||||||
className="block"
|
className="block"
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-3 mb-2">
|
<div className="flex items-center gap-3 mb-2">
|
||||||
|
|
@ -166,7 +166,7 @@ export function TopBar({
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
key="manage-triggers"
|
key="manage-triggers"
|
||||||
startContent={<ZapIcon size={16} />}
|
startContent={<ZapIcon size={16} />}
|
||||||
onPress={() => { if (projectId) { router.push(`/projects/${projectId}/job-rules`); } }}
|
onPress={() => { if (projectId) { router.push(`/projects/${projectId}/manage-triggers`); } }}
|
||||||
>
|
>
|
||||||
Manage triggers
|
Manage triggers
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ export default function Sidebar({ projectId, useAuth, collapsed = false, onToggl
|
||||||
icon: WorkflowIcon,
|
icon: WorkflowIcon,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: 'job-rules',
|
href: 'manage-triggers',
|
||||||
label: 'Triggers',
|
label: 'Triggers',
|
||||||
icon: ZapIcon,
|
icon: ZapIcon,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue