Skip to content
Merged
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
32 changes: 32 additions & 0 deletions alembic/versions/022_add_severity_to_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Add severity field to registered_functions

Revision ID: 022
Revises: 021
Create Date: 2026-05-20

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

revision: str = "022"
down_revision: Union[str, None] = "021"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
op.add_column(
"registered_functions",
sa.Column(
"severity",
sa.String(16),
nullable=False,
server_default="read",
),
)


def downgrade() -> None:
op.drop_column("registered_functions", "severity")
1 change: 1 addition & 0 deletions dashboard/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ model RegisteredFunction {
availability Json @default("{}")
source String @default("app_inline") @db.VarChar(32)
packName String? @map("pack_name") @db.VarChar(255)
severity String @default("read") @db.VarChar(16)

app App @relation(fields: [appId], references: [id], onDelete: Cascade)
playbookFunctions PlaybookFunction[]
Expand Down
14 changes: 14 additions & 0 deletions dashboard/public/brand/app-icon-A.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dashboard/public/brand/app-icon-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dashboard/public/brand/app-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions dashboard/public/brand/avatar-accent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions dashboard/public/brand/avatar-brand.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions dashboard/public/brand/avatar-console.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions dashboard/public/brand/avatar-mono.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions dashboard/public/brand/favicon-16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dashboard/public/brand/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dashboard/public/brand/glyph-prompt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dashboard/public/brand/glyph-resolved.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dashboard/public/brand/glyph-trace.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions dashboard/public/brand/logo-horizontal-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions dashboard/public/brand/logo-horizontal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions dashboard/public/brand/logo-stacked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions dashboard/public/brand/mark-A-resolved-mono.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions dashboard/public/brand/mark-A-resolved.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions dashboard/public/brand/mark-B-ktrace.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions dashboard/public/brand/mark-C-pathcheck.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions dashboard/public/brand/social-cover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions dashboard/public/brand/wordmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions dashboard/src/app/error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"use client";

import { ErrorPage } from "@/components/ui/ErrorPage";

export default function GlobalError({ reset }: { error: Error & { digest?: string }; reset: () => void }) {
return (
<ErrorPage
variant="server-error"
action={
<button
onClick={reset}
className="inline-flex h-9 items-center gap-2 rounded-[10px] bg-accent px-4 text-[13px] font-semibold text-white shadow-[0_10px_24px_-16px_rgba(13,88,214,0.65)] transition-all hover:-translate-y-0.5 hover:bg-accent-hover"
>
Try again
</button>
}
/>
);
}
16 changes: 4 additions & 12 deletions dashboard/src/app/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions dashboard/src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Link from "next/link";
import { ErrorPage } from "@/components/ui/ErrorPage";

export default function NotFound() {
return (
<ErrorPage
variant="not-found"
action={
<Link
href="/apps"
className="inline-flex h-9 items-center gap-2 rounded-[10px] bg-accent px-4 text-[13px] font-semibold text-white shadow-[0_10px_24px_-16px_rgba(13,88,214,0.65)] transition-all hover:-translate-y-0.5 hover:bg-accent-hover"
>
Back to Apps
</Link>
}
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type FunctionUpdatePayload = {
availability?: Record<string, unknown>;
source?: "app_inline" | "playbook_pack";
pack_name?: string | null;
severity?: "read" | "write" | "destructive";
};

export async function PATCH(
Expand Down Expand Up @@ -56,6 +57,7 @@ export async function PATCH(
availability?: Prisma.InputJsonValue;
source?: "app_inline" | "playbook_pack";
packName?: string | null;
severity?: "read" | "write" | "destructive";
} = {};

if (typeof body.description === "string") data.description = body.description;
Expand All @@ -70,6 +72,7 @@ export async function PATCH(
}
if (body.source === "app_inline" || body.source === "playbook_pack") data.source = body.source;
if (Object.prototype.hasOwnProperty.call(body, "pack_name")) data.packName = body.pack_name ?? null;
if (body.severity === "read" || body.severity === "write" || body.severity === "destructive") data.severity = body.severity;

const updated = await prisma.registeredFunction.update({
where: { id: functionId },
Expand Down
Loading
Loading