mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-30 19:06:23 +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,
|
||||
},
|
||||
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') {
|
||||
|
|
@ -65,7 +65,7 @@ export function JobView({ projectId, jobId }: { projectId: string; jobId: string
|
|||
'Rule ID': reason.ruleId,
|
||||
},
|
||||
payload: null,
|
||||
link: `/projects/${projectId}/job-rules/scheduled/${reason.ruleId}`
|
||||
link: `/projects/${projectId}/manage-triggers/scheduled/${reason.ruleId}`
|
||||
};
|
||||
}
|
||||
if (reason.type === 'recurring_job_rule') {
|
||||
|
|
@ -75,7 +75,7 @@ export function JobView({ projectId, jobId }: { projectId: string; jobId: string
|
|||
'Rule ID': reason.ruleId,
|
||||
},
|
||||
payload: null,
|
||||
link: `/projects/${projectId}/job-rules/recurring/${reason.ruleId}`
|
||||
link: `/projects/${projectId}/manage-triggers/recurring/${reason.ruleId}`
|
||||
};
|
||||
}
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -99,21 +99,21 @@ export function JobsList({ projectId, filters, showTitle = true, customTitle }:
|
|||
return {
|
||||
type: 'Composio Trigger',
|
||||
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') {
|
||||
return {
|
||||
type: 'Scheduled Job 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') {
|
||||
return {
|
||||
type: 'Recurring Job Rule',
|
||||
display: `Recurring Rule`,
|
||||
link: `/projects/${projectId}/job-rules/recurring/${reason.ruleId}`
|
||||
link: `/projects/${projectId}/manage-triggers/recurring/${reason.ruleId}`
|
||||
};
|
||||
}
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export function ComposioTriggerDeploymentView({ projectId, deploymentId }: { pro
|
|||
setDeleting(true);
|
||||
try {
|
||||
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) {
|
||||
console.error(e);
|
||||
alert('Failed to delete trigger');
|
||||
|
|
@ -62,7 +62,7 @@ export function ComposioTriggerDeploymentView({ projectId, deploymentId }: { pro
|
|||
<Panel
|
||||
title={
|
||||
<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">
|
||||
Back
|
||||
</Button>
|
||||
|
|
@ -89,7 +89,7 @@ export function CreateRecurringJobRuleForm({ projectId }: { projectId: string })
|
|||
input: { messages: convertedMessages },
|
||||
cron: cronExpression,
|
||||
});
|
||||
router.push(`/projects/${projectId}/job-rules?tab=recurring`);
|
||||
router.push(`/projects/${projectId}/manage-triggers?tab=recurring`);
|
||||
} catch (error) {
|
||||
console.error("Failed to create recurring job rule:", error);
|
||||
alert("Failed to create recurring job rule");
|
||||
|
|
@ -102,7 +102,7 @@ export function CreateRecurringJobRuleForm({ projectId }: { projectId: string })
|
|||
<Panel
|
||||
title={
|
||||
<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">
|
||||
Back
|
||||
</Button>
|
||||
|
|
@ -65,7 +65,7 @@ export function RecurringJobRuleView({ projectId, ruleId }: { projectId: string;
|
|||
ruleId: rule.id,
|
||||
});
|
||||
// Redirect back to job rules list
|
||||
router.push(`/projects/${projectId}/job-rules?tab=recurring`);
|
||||
router.push(`/projects/${projectId}/manage-triggers?tab=recurring`);
|
||||
} catch (error) {
|
||||
console.error("Failed to delete rule:", error);
|
||||
alert("Failed to delete rule");
|
||||
|
|
@ -118,7 +118,7 @@ export function RecurringJobRuleView({ projectId, ruleId }: { projectId: string;
|
|||
<Panel title="Rule Not Found">
|
||||
<div className="text-center py-8">
|
||||
<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">
|
||||
Back to Job Rules
|
||||
</Button>
|
||||
|
|
@ -133,7 +133,7 @@ export function RecurringJobRuleView({ projectId, ruleId }: { projectId: string;
|
|||
<Panel
|
||||
title={
|
||||
<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">
|
||||
Back
|
||||
</Button>
|
||||
|
|
@ -134,7 +134,7 @@ export function RecurringJobRulesList({ projectId }: { projectId: string }) {
|
|||
}
|
||||
rightActions={
|
||||
<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" />}>
|
||||
New Recurring Trigger
|
||||
</Button>
|
||||
|
|
@ -168,7 +168,7 @@ export function RecurringJobRulesList({ projectId }: { projectId: string }) {
|
|||
<div className="flex items-start justify-between">
|
||||
<div className="flex-1">
|
||||
<Link
|
||||
href={`/projects/${projectId}/job-rules/recurring/${item.id}`}
|
||||
href={`/projects/${projectId}/manage-triggers/recurring/${item.id}`}
|
||||
className="block"
|
||||
>
|
||||
<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
|
||||
if (typeof window !== 'undefined') {
|
||||
window.location.href = `/projects/${projectId}/job-rules?tab=triggers`;
|
||||
window.location.href = `/projects/${projectId}/manage-triggers?tab=triggers`;
|
||||
return;
|
||||
}
|
||||
handleBackToList();
|
||||
|
|
@ -328,7 +328,7 @@ export function TriggersTab({ projectId }: { projectId: string }) {
|
|||
>
|
||||
<div className="flex items-start justify-between">
|
||||
<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">
|
||||
{trigger.logo && (
|
||||
<Image
|
||||
|
|
@ -90,7 +90,7 @@ export function CreateScheduledJobRuleForm({ projectId }: { projectId: string })
|
|||
input: { messages: convertedMessages },
|
||||
scheduledTime: scheduledTimeString,
|
||||
});
|
||||
router.push(`/projects/${projectId}/job-rules?tab=scheduled`);
|
||||
router.push(`/projects/${projectId}/manage-triggers?tab=scheduled`);
|
||||
} catch (error) {
|
||||
console.error("Failed to create scheduled job rule:", error);
|
||||
alert("Failed to create scheduled job rule");
|
||||
|
|
@ -105,7 +105,7 @@ export function CreateScheduledJobRuleForm({ projectId }: { projectId: string })
|
|||
<Panel
|
||||
title={
|
||||
<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">
|
||||
Back
|
||||
</Button>
|
||||
|
|
@ -46,7 +46,7 @@ export function ScheduledJobRuleView({ projectId, ruleId }: { projectId: string;
|
|||
ruleId: rule.id,
|
||||
});
|
||||
// Redirect back to job rules list
|
||||
router.push(`/projects/${projectId}/job-rules?tab=scheduled`);
|
||||
router.push(`/projects/${projectId}/manage-triggers?tab=scheduled`);
|
||||
} catch (error) {
|
||||
console.error("Failed to delete rule:", error);
|
||||
alert("Failed to delete rule");
|
||||
|
|
@ -80,7 +80,7 @@ export function ScheduledJobRuleView({ projectId, ruleId }: { projectId: string;
|
|||
<Panel
|
||||
title={
|
||||
<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">
|
||||
Back
|
||||
</Button>
|
||||
|
|
@ -112,7 +112,7 @@ export function ScheduledJobRulesList({ projectId }: { projectId: string }) {
|
|||
}
|
||||
rightActions={
|
||||
<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" />}>
|
||||
New One-time Trigger
|
||||
</Button>
|
||||
|
|
@ -146,7 +146,7 @@ export function ScheduledJobRulesList({ projectId }: { projectId: string }) {
|
|||
<div className="flex items-start justify-between">
|
||||
<div className="flex-1">
|
||||
<Link
|
||||
href={`/projects/${projectId}/job-rules/scheduled/${item.id}`}
|
||||
href={`/projects/${projectId}/manage-triggers/scheduled/${item.id}`}
|
||||
className="block"
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-2">
|
||||
|
|
@ -166,7 +166,7 @@ export function TopBar({
|
|||
<DropdownItem
|
||||
key="manage-triggers"
|
||||
startContent={<ZapIcon size={16} />}
|
||||
onPress={() => { if (projectId) { router.push(`/projects/${projectId}/job-rules`); } }}
|
||||
onPress={() => { if (projectId) { router.push(`/projects/${projectId}/manage-triggers`); } }}
|
||||
>
|
||||
Manage triggers
|
||||
</DropdownItem>
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ export default function Sidebar({ projectId, useAuth, collapsed = false, onToggl
|
|||
icon: WorkflowIcon,
|
||||
},
|
||||
{
|
||||
href: 'job-rules',
|
||||
href: 'manage-triggers',
|
||||
label: 'Triggers',
|
||||
icon: ZapIcon,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue