-
Generated Alert
- Keep alert specification ready to use
+ Generated Workflow YAML
+ Keep workflow specification ready to use
{!hideCloseButton && (
diff --git a/keep-ui/app/(keep)/workflows/builder/builder-store.tsx b/keep-ui/app/(keep)/workflows/builder/builder-store.tsx
index fd690b6fa..2bfccd9e7 100644
--- a/keep-ui/app/(keep)/workflows/builder/builder-store.tsx
+++ b/keep-ui/app/(keep)/workflows/builder/builder-store.tsx
@@ -67,32 +67,6 @@ export type FlowNode = Node & {
isNested: boolean;
};
-const initialNodes: Partial
[] = [
- {
- id: "a",
- position: { x: 0, y: 0 },
- data: { label: "Node A", type: "custom" },
- type: "custom",
- },
- {
- id: "b",
- position: { x: 0, y: 100 },
- data: { label: "Node B", type: "custom" },
- type: "custom",
- },
- {
- id: "c",
- position: { x: 0, y: 200 },
- data: { label: "Node C", type: "custom" },
- type: "custom",
- },
-];
-
-const initialEdges: Edge[] = [
- { id: "a->b", type: "custom-edge", source: "a", target: "b" },
- { id: "b->c", type: "custom-edge", source: "b", target: "c" },
-];
-
export type FlowState = {
nodes: FlowNode[];
edges: Edge[];
diff --git a/keep-ui/app/(keep)/workflows/builder/builder-workflow-testrun-modal.tsx b/keep-ui/app/(keep)/workflows/builder/builder-workflow-testrun-modal.tsx
index 94e0ae849..ca7c5d57e 100644
--- a/keep-ui/app/(keep)/workflows/builder/builder-workflow-testrun-modal.tsx
+++ b/keep-ui/app/(keep)/workflows/builder/builder-workflow-testrun-modal.tsx
@@ -1,5 +1,5 @@
import { XMarkIcon } from "@heroicons/react/24/outline";
-import { Button, Card, Subtitle, Title } from "@tremor/react";
+import { Button, Card, Title } from "@tremor/react";
import ReactLoading from "react-loading";
import { ExecutionResults } from "./workflow-execution-results";
import { WorkflowExecution, WorkflowExecutionFailure } from "./types";
diff --git a/keep-ui/app/(keep)/workflows/builder/builder.tsx b/keep-ui/app/(keep)/workflows/builder/builder.tsx
index 7402bc60b..53649826e 100644
--- a/keep-ui/app/(keep)/workflows/builder/builder.tsx
+++ b/keep-ui/app/(keep)/workflows/builder/builder.tsx
@@ -14,7 +14,7 @@ import {
} from "@heroicons/react/20/solid";
import { globalValidatorV2, stepValidatorV2 } from "./builder-validators";
import Modal from "react-modal";
-import { Alert } from "./alert";
+import { Alert } from "./legacy-workflow.types";
import BuilderModalContent from "./builder-modal";
import Loader from "./loader";
import { stringify } from "yaml";
@@ -34,9 +34,9 @@ import useStore from "./builder-store";
import { toast } from "react-toastify";
import { useApi } from "@/shared/lib/hooks/useApi";
import { KeepApiError } from "@/shared/api";
-import { showErrorToast } from "@/shared/ui/utils/showErrorToast";
-import "./page.css";
+import { showErrorToast } from "@/shared/ui";
import { YAMLException } from "js-yaml";
+import WorkflowDefinitionYAML from "../workflow-definition-yaml";
interface Props {
loadedAlertFile: string | null;
@@ -58,6 +58,15 @@ const INITIAL_DEFINITION = wrapDefinitionV2({
isValid: false,
});
+const YAMLSidebar = ({ yaml }: { yaml?: string }) => {
+ return (
+
+
YAML
+ {yaml && }
+
+ );
+};
+
function Builder({
loadedAlertFile,
fileName,
@@ -366,29 +375,31 @@ function Builder({
{generateModalIsOpen || testRunModalOpen ? null : (
<>
{getworkflowStatus()}
-
-
- {
- setDefinition({
- value: {
- sequence: def?.sequence || [],
- properties: def?.properties || {},
- },
- isValid: def?.isValid || false,
- });
- }}
- toolboxConfiguration={getToolboxConfiguration(
- providers,
- installedProviders || []
- )}
- />
-
-
+
+
+
+
+ {
+ setDefinition({
+ value: {
+ sequence: def?.sequence || [],
+ properties: def?.properties || {},
+ },
+ isValid: def?.isValid || false,
+ });
+ }}
+ toolboxConfiguration={getToolboxConfiguration(providers)}
+ />
+
+
+ {/* TODO: Add AI chat sidebar */}
+
+
>
)}
diff --git a/keep-ui/app/(keep)/workflows/builder/alert.tsx b/keep-ui/app/(keep)/workflows/builder/legacy-workflow.types.ts
similarity index 91%
rename from keep-ui/app/(keep)/workflows/builder/alert.tsx
rename to keep-ui/app/(keep)/workflows/builder/legacy-workflow.types.ts
index 47447bce9..4fa28c200 100644
--- a/keep-ui/app/(keep)/workflows/builder/alert.tsx
+++ b/keep-ui/app/(keep)/workflows/builder/legacy-workflow.types.ts
@@ -1,5 +1,3 @@
-import { V2Step } from "@/app/(keep)/workflows/builder/types";
-
interface Provider {
type: string;
config: string;
diff --git a/keep-ui/app/(keep)/workflows/builder/loader.tsx b/keep-ui/app/(keep)/workflows/builder/loader.tsx
index 3775c32bb..48a485c4e 100644
--- a/keep-ui/app/(keep)/workflows/builder/loader.tsx
+++ b/keep-ui/app/(keep)/workflows/builder/loader.tsx
@@ -3,8 +3,10 @@ import { Title, Text } from "@tremor/react";
export default function Loader() {
return (
-
Please start by loading or creating a new alert
- You can use the `Load` or `+` button from the top right menu
+ Please start by loading or creating a new workflow
+
+ Load YAML or use the "New " button from the top right menu
+
);
}
diff --git a/keep-ui/app/(keep)/workflows/builder/page.client.tsx b/keep-ui/app/(keep)/workflows/builder/page.client.tsx
index dd77adfcd..24fcde10b 100644
--- a/keep-ui/app/(keep)/workflows/builder/page.client.tsx
+++ b/keep-ui/app/(keep)/workflows/builder/page.client.tsx
@@ -1,17 +1,16 @@
"use client";
-import { Title, Button, Subtitle, Badge } from "@tremor/react";
+import { Title, Button } from "@tremor/react";
import { useEffect, useRef, useState } from "react";
import {
PlusIcon,
- ArrowDownOnSquareIcon,
BoltIcon,
ArrowUpOnSquareIcon,
PlayIcon,
} from "@heroicons/react/20/solid";
import { BuilderCard } from "./builder-card";
import { loadWorkflowYAML } from "./utils";
-import { showErrorToast } from "@/shared/ui/utils/showErrorToast";
+import { showErrorToast } from "@/shared/ui";
import { YAMLException } from "js-yaml";
export default function PageClient({
@@ -37,13 +36,17 @@ export default function PageClient({
setFileName("");
}, []);
- function loadAlert() {
- document.getElementById("alertFile")?.click();
+ function loadWorkflow() {
+ document.getElementById("workflowFile")?.click();
}
- function newAlert() {
- const confirmed = confirm("Are you sure you want to create a new alert?");
- if (confirmed) window.location.reload();
+ function createNewWorkflow() {
+ const confirmed = confirm(
+ "Are you sure you want to create a new workflow?"
+ );
+ if (confirmed) {
+ window.location.reload();
+ }
}
const enableButtons = () => setButtonsEnabled(true);
@@ -87,7 +90,7 @@ export default function PageClient({
setTriggerGenerate(incrementState)}
>
- Generate
+ Get YAML
)}
diff --git a/keep-ui/app/(keep)/workflows/builder/page.css b/keep-ui/app/(keep)/workflows/builder/page.css
deleted file mode 100644
index 8d1c3cd58..000000000
--- a/keep-ui/app/(keep)/workflows/builder/page.css
+++ /dev/null
@@ -1,27 +0,0 @@
-.sqd-designer-react {
- height: inherit;
- border-radius: 10px;
-}
-
-.sqd-designer {
- height: 100%;
-}
-
-.sqd-root-start-stop-circle,
-.sqd-label-rect {
- fill: rgb(255, 132, 16) !important;
-}
-
-.sqd-smart-editor {
- overflow: scroll;
-}
-
-.sqd-toolbox-item-text {
- text-transform: capitalize;
-}
-
-.tooltip {
- position: relative;
- display: inline-block;
- border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
-}
diff --git a/keep-ui/app/(keep)/workflows/builder/page.tsx b/keep-ui/app/(keep)/workflows/builder/page.tsx
index 25ca84cde..cd81fc373 100644
--- a/keep-ui/app/(keep)/workflows/builder/page.tsx
+++ b/keep-ui/app/(keep)/workflows/builder/page.tsx
@@ -1,6 +1,7 @@
import PageClient from "./page.client";
import { Suspense } from "react";
import Loading from "@/app/(keep)/loading";
+import { Metadata } from "next";
type PageProps = {
params: { workflow: string; workflowId: string };
@@ -15,7 +16,7 @@ export default function Page({ params, searchParams }: PageProps) {
);
}
-export const metadata = {
- title: "Keep - Builder",
- description: "Build alerts with a visual workflow designer.",
+export const metadata: Metadata = {
+ title: "Keep - Workflow Builder",
+ description: "Build workflows with a UI builder.",
};
diff --git a/keep-ui/app/(keep)/workflows/builder/utils.tsx b/keep-ui/app/(keep)/workflows/builder/utils.tsx
index e60bc6817..c04f26c37 100644
--- a/keep-ui/app/(keep)/workflows/builder/utils.tsx
+++ b/keep-ui/app/(keep)/workflows/builder/utils.tsx
@@ -1,7 +1,6 @@
import { load, JSON_SCHEMA } from "js-yaml";
import { Provider } from "../../providers/providers";
-import { Action, Alert } from "./alert";
-import { stringify } from "yaml";
+import { Action, Alert } from "./legacy-workflow.types";
import { v4 as uuidv4 } from "uuid";
import { z, ZodObject } from "zod";
import {
diff --git a/keep-ui/app/(keep)/workflows/manual-run-workflow-modal.tsx b/keep-ui/app/(keep)/workflows/manual-run-workflow-modal.tsx
index eb32c7e6e..84ecc958b 100644
--- a/keep-ui/app/(keep)/workflows/manual-run-workflow-modal.tsx
+++ b/keep-ui/app/(keep)/workflows/manual-run-workflow-modal.tsx
@@ -6,9 +6,9 @@ import { useState } from "react";
import { toast } from "react-toastify";
import { useRouter } from "next/navigation";
import { IncidentDto } from "@/entities/incidents/model";
-import { AlertDto } from "@/app/(keep)/alerts/models";
+import { AlertDto } from "@/entities/alerts/model";
import { useApi } from "@/shared/lib/hooks/useApi";
-import { showErrorToast } from "@/shared/ui/utils/showErrorToast";
+import { showErrorToast } from "@/shared/ui";
interface Props {
alert?: AlertDto | null | undefined;
diff --git a/keep-ui/app/(keep)/workflows/workflow-menu.tsx b/keep-ui/app/(keep)/workflows/workflow-menu.tsx
index ee89eb84d..f3438bdb4 100644
--- a/keep-ui/app/(keep)/workflows/workflow-menu.tsx
+++ b/keep-ui/app/(keep)/workflows/workflow-menu.tsx
@@ -4,16 +4,11 @@ import { EllipsisHorizontalIcon } from "@heroicons/react/20/solid";
import { Icon } from "@tremor/react";
import {
EyeIcon,
- PencilIcon,
PlayIcon,
TrashIcon,
WrenchIcon,
} from "@heroicons/react/24/outline";
-import {
- DownloadIcon,
- LockClosedIcon,
- LockOpen1Icon,
-} from "@radix-ui/react-icons";
+import { DownloadIcon } from "@radix-ui/react-icons";
import React from "react";
interface WorkflowMenuProps {
diff --git a/keep-ui/app/(keep)/workflows/workflows.client.tsx b/keep-ui/app/(keep)/workflows/workflows.client.tsx
index 43337c403..1e4b2d0d1 100644
--- a/keep-ui/app/(keep)/workflows/workflows.client.tsx
+++ b/keep-ui/app/(keep)/workflows/workflows.client.tsx
@@ -2,7 +2,7 @@
import { useRef, useState } from "react";
import useSWR from "swr";
-import { Callout, Subtitle, Switch } from "@tremor/react";
+import { Callout, Subtitle } from "@tremor/react";
import {
ArrowUpOnSquareStackIcon,
ExclamationCircleIcon,
@@ -20,8 +20,7 @@ import Modal from "@/components/ui/Modal";
import MockWorkflowCardSection from "./mockworkflows";
import { useApi } from "@/shared/lib/hooks/useApi";
import { KeepApiError } from "@/shared/api";
-import { showErrorToast } from "@/shared/ui/utils/showErrorToast";
-import { Input } from "@/shared/ui/Input";
+import { showErrorToast, Input } from "@/shared/ui";
export default function WorkflowsPage() {
const api = useApi();
diff --git a/keep-ui/app/(signin)/layout.tsx b/keep-ui/app/(signin)/layout.tsx
index c535b8c48..75a3a11ce 100644
--- a/keep-ui/app/(signin)/layout.tsx
+++ b/keep-ui/app/(signin)/layout.tsx
@@ -1,3 +1,6 @@
+import { Card, Text } from "@tremor/react";
+import Image from "next/image";
+
export const metadata = {
title: "Keep",
description: "The open-source alert management and AIOps platform",
@@ -9,8 +12,33 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
-
- {children}
+
+
+