Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docker-compose.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,15 @@ services:
DB_URL: jdbc:postgresql://db:5432/flowforge
DB_USERNAME: postgres
DB_PASSWORD: postgres
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
EUREKA_URL: http://discovery-service:8761/eureka/
JAEGER_ENDPOINT: http://jaeger:4318/v1/traces
SPRING_KAFKA_PRODUCER_PROPERTIES_SPRING_JSON_ADD_TYPE_HEADERS: "true"
SPRING_KAFKA_CONSUMER_PROPERTIES_SPRING_JSON_USE_TYPE_HEADERS: "true"
SPRING_KAFKA_CONSUMER_PROPERTIES_SPRING_JSON_TYPE_MAPPING: "com.flowforge.worker_service.adapter.out.kafka.TaskSucceededEvent:com.flowforge.workflowservice.application.execution.event.TaskSucceededEvent,com.flowforge.worker_service.adapter.out.kafka.TaskFailedEvent:com.flowforge.workflowservice.application.execution.event.TaskFailedEvent"
volumes:
- ./database:/app/database
- ./workflow-service/target/workflow-service-0.0z.1-SNAPSHOT.jar:/app/app.jar

worker-service:
image: aswinrj/worker-service
Expand All @@ -80,4 +87,5 @@ services:
SLACK_BOT_TOKEN: ${SLACK_BOT_TOKEN}
SPRING_PROFILES_ACTIVE: docker
volumes:
- ./database/migrations:/app/database/migrations
- ./database/migrations:/app/database/migrations
- ./worker-service/target/worker-service-0.0.1-SNAPSHOT.jar:/app/app.jar
Empty file added docker_logs.txt
Empty file.
116 changes: 5 additions & 111 deletions frontend/app/(app)/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,111 +1,5 @@
import {
Activity,
CheckCircle2,
CircleAlert,
Clock3,
Workflow,
} from "lucide-react";

import { getDashboardData } from "@/lib/api/dashboard";
import StatCard from "@/components/dashboard/StatCard";
import RunningExecutions from "../../../components/dashboard/RunningExecutions";
import QuickActions from "../../../components/dashboard/QuickActions";
import LiveActivity from "../../../components/dashboard/LiveActivity";
import SystemHealth from "../../../components/dashboard/SystemHealth";
import { getGreeting } from "@/lib/utils/get-greeting";
import { formatNumber } from "@/lib/utils/format-number";

export default async function Dashboard() {
const dashboard = await getDashboardData();
const greeting = getGreeting()

const { stats } = dashboard;

const statCards = [
{
title: "Total Workflows",
value: stats.totalWorkflows,
trend: stats.workflowGrowth,
description: "from last week",
icon: Workflow,
},
{
title: "Running Executions",
value: stats.runningExecutions,
description: "Currently active",
icon: Activity,
},
{
title: "Completed",
value: formatNumber(stats.completedExecutions),
description: `${stats.successRate}% success rate`,
icon: CheckCircle2,
},
{
title: "Failed (24h)",
value: stats.failedExecutions24h,
trend: stats.failureChange,
description: "from yesterday",
icon: CircleAlert,
},
{
title: "Pending Approvals",
value: stats.pendingApprovals,
description: "Requires attention",
icon: Clock3,
},
];

return (
<main className="min-h-screen bg-background p-6 lg:p-8">
<div className="mx-auto max-w-[1500px] space-y-6">

<header className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
<div>
<h1 className="text-2xl font-semibold tracking-tight">
{greeting}, Sahil 👋
</h1>

<p className="mt-1 text-sm text-muted-foreground">
Here&apos;s what&apos;s happening with your workflows.
</p>
</div>
</header>

<section className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5">
{statCards.map((card) => (
<StatCard
key={card.title}
title={card.title}
value={card.value}
description={card.description}
trend={card.trend}
icon={card.icon}
/>
))}
</section>

<div className="grid items-start gap-6 xl:grid-cols-[minmax(0,2fr)_minmax(320px,0.95fr)]">
<div className="space-y-6">
<RunningExecutions
executions={dashboard.runningExecutions}
/>

<LiveActivity
activities={dashboard.activities}
/>
</div>

<div className="space-y-6">
<QuickActions />

<SystemHealth
health={dashboard.systemHealth}
/>
</div>
</div>

</div>
</main>
);
}
import DashboardView from "@/components/dashboard/DashboardView";

export default function DashboardPage() {
return <DashboardView />;
}
17 changes: 1 addition & 16 deletions frontend/app/(app)/executions/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import { notFound } from "next/navigation";

import { getExecutionDetails } from "@/lib/api/execution-details";

import ExecutionDetailsView from "@/components/execution-details/ExecutionDetailsView";

interface ExecutionDetailsPageProps {
Expand All @@ -15,16 +11,5 @@ export default async function ExecutionDetailsPage({
}: ExecutionDetailsPageProps) {
const { id } = await params;

const execution =
await getExecutionDetails(id);

if (!execution) {
notFound();
}

return (
<ExecutionDetailsView
execution={execution}
/>
);
return <ExecutionDetailsView executionId={id} />;
}
7 changes: 2 additions & 5 deletions frontend/app/(app)/executions/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import ExecutionsView from "@/components/executions/ExecutionsView";
import { getExecutionsData } from "@/lib/api/executions";

export default async function ExecutionsPage() {
const data = await getExecutionsData();

export default function ExecutionsPage() {
return (
<main className="min-h-screen p-6 lg:p-8">
<div className="mx-auto max-w-[1600px] space-y-6">
Expand All @@ -17,7 +14,7 @@ export default async function ExecutionsPage() {
</p>
</header>

<ExecutionsView data={data} />
<ExecutionsView />
</div>
</main>
);
Expand Down
3 changes: 1 addition & 2 deletions frontend/app/(app)/workflows/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ export default function WorkflowPage() {
return;
}

const workflow = await workflowService.getById(
const workflow = await workflowService.loadWorkflow(
id as string
);

if (workflow) {
importWorkflow(workflow);
}
Expand Down
Loading