Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic/workflow dashboard #2529

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d5edbf3
initial
chesterkmr Jul 15, 2024
b329db4
feat: implemented wf definitions table & pagination & initial layout …
chesterkmr Jul 15, 2024
94089ef
feat: reworked wf definition endpoints
chesterkmr Jul 16, 2024
95d5738
feat: implemented wf definition metrics by variant
chesterkmr Jul 16, 2024
c50fb96
feat: initial workflow definition page setup
chesterkmr Jul 16, 2024
6d4401f
feat: default context schema update, new endpoints in workflowDefinit…
tomer-shvadron Jul 16, 2024
911e1b8
feat: implemented json editor component & added json viewers to wf de…
chesterkmr Jul 17, 2024
4e36df7
feat: bal-2444
tomer-shvadron Jul 17, 2024
00bf15a
chore(code-update): merged with dev
alonp99 Jul 17, 2024
bf276af
feat: fixes
tomer-shvadron Jul 18, 2024
bbc44b7
feat: implemented generic filters provider
chesterkmr Jul 18, 2024
bd22c0e
feat: refactored filters on workflows page & deleted boilerplate
chesterkmr Jul 18, 2024
10c5328
feat: fixes for types and swagger
tomer-shvadron Jul 18, 2024
67e63af
feat: implemented filters page & added pagination to filters controller
chesterkmr Jul 18, 2024
f63527c
chore: cleanup
chesterkmr Jul 18, 2024
0d0ac46
feat: implemented ui definitions page & added external controller
chesterkmr Jul 18, 2024
474800b
feat: implemented alert definitions page
chesterkmr Jul 19, 2024
6a45702
feat: implemented dynamic update of xstate visualizer on definition u…
chesterkmr Jul 19, 2024
3a90de7
chore(code-update): merged with dev
alonp99 Jul 19, 2024
edf6610
chore(bump): version release
alonp99 Jul 19, 2024
e5bf266
chore(bump): version release
alonp99 Jul 19, 2024
eaee867
chore(code-update): merged with dev
alonp99 Jul 19, 2024
f339b07
chore(code-update): merged with dev
alonp99 Jul 19, 2024
8254964
feat(wf-def): api and dashboard ui
alonp99 Jul 20, 2024
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
26 changes: 26 additions & 0 deletions apps/backoffice-v2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# @ballerine/backoffice-v2

## 0.7.21

### Patch Changes

- bump
- Updated dependencies
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]

## 0.7.20

### Patch Changes

- Bump
- Updated dependencies
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]

## 0.7.19

### Patch Changes
Expand Down
18 changes: 9 additions & 9 deletions apps/backoffice-v2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ballerine/backoffice-v2",
"version": "0.7.19",
"version": "0.7.21",
"description": "Ballerine - Backoffice",
"homepage": "https://github.com/ballerine-io/ballerine",
"repository": {
Expand Down Expand Up @@ -50,12 +50,12 @@
"preview": "vite preview"
},
"dependencies": {
"@ballerine/blocks": "0.2.6",
"@ballerine/common": "0.9.12",
"@ballerine/react-pdf-toolkit": "^1.2.6",
"@ballerine/ui": "^0.5.6",
"@ballerine/workflow-browser-sdk": "0.6.20",
"@ballerine/workflow-node-sdk": "0.6.20",
"@ballerine/blocks": "0.2.8",
"@ballerine/common": "0.9.14",
"@ballerine/react-pdf-toolkit": "^1.2.8",
"@ballerine/ui": "^0.5.8",
"@ballerine/workflow-browser-sdk": "0.6.22",
"@ballerine/workflow-node-sdk": "0.6.22",
"@fontsource/inter": "^4.5.15",
"@formkit/auto-animate": "1.0.0-beta.5",
"@hookform/resolvers": "^3.1.0",
Expand Down Expand Up @@ -121,8 +121,8 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@ballerine/config": "^1.1.5",
"@ballerine/eslint-config-react": "^2.0.5",
"@ballerine/config": "^1.1.7",
"@ballerine/eslint-config-react": "^2.0.7",
"@cspell/cspell-types": "^6.31.1",
"@faker-js/faker": "^7.6.0",
"@playwright/test": "^1.32.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export const useDocumentBlocks = ({
const entityNameOrNA = valueOrNA(toTitleCase(workflow?.entity?.name ?? ''));
const categoryOrNA = valueOrNA(toTitleCase(category ?? ''));
const documentTypeOrNA = valueOrNA(toTitleCase(docType ?? ''));
const documentNameOrNA = `${categoryOrNA} ${
const documentNameOrNA = `${categoryOrNA} - ${
withEntityNameInHeader ? '' : ` ${documentTypeOrNA}`
}`;
const headerCell = createBlocksTyped()
Expand Down
22 changes: 22 additions & 0 deletions apps/kyb-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# kyb-app

## 0.3.22

### Patch Changes

- bump
- Updated dependencies
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]

## 0.3.21

### Patch Changes

- Bump
- Updated dependencies
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]
- @ballerine/[email protected]

## 0.3.20

### Patch Changes
Expand Down
14 changes: 7 additions & 7 deletions apps/kyb-app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/kyb-app",
"private": true,
"version": "0.3.20",
"version": "0.3.22",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -14,10 +14,10 @@
"test:dev": "vitest"
},
"dependencies": {
"@ballerine/common": "^0.9.12",
"@ballerine/blocks": "0.2.6",
"@ballerine/ui": "0.5.6",
"@ballerine/workflow-browser-sdk": "0.6.20",
"@ballerine/common": "^0.9.14",
"@ballerine/blocks": "0.2.8",
"@ballerine/ui": "0.5.8",
"@ballerine/workflow-browser-sdk": "0.6.22",
"@lukemorales/query-key-factory": "^1.0.3",
"@radix-ui/react-icons": "^1.3.0",
"@rjsf/core": "^5.9.0",
Expand Down Expand Up @@ -58,8 +58,8 @@
"zod": "^3.21.4"
},
"devDependencies": {
"@ballerine/config": "^1.1.5",
"@ballerine/eslint-config-react": "^2.0.5",
"@ballerine/config": "^1.1.7",
"@ballerine/eslint-config-react": "^2.0.7",
"@jest/globals": "^29.7.0",
"@sentry/vite-plugin": "^2.9.0",
"@testing-library/jest-dom": "^6.1.4",
Expand Down
14 changes: 14 additions & 0 deletions apps/workflows-dashboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @ballerine/workflows-dashboard

## 0.2.7

### Patch Changes

- bump
- Updated dependencies
- @ballerine/[email protected]

## 0.2.6

### Patch Changes

- Bump

## 0.2.5

### Patch Changes
Expand Down
10 changes: 7 additions & 3 deletions apps/workflows-dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/workflows-dashboard",
"private": false,
"version": "0.2.5",
"version": "0.2.7",
"type": "module",
"scripts": {
"spellcheck": "cspell \"*\"",
Expand All @@ -14,6 +14,7 @@
"test": "NODE_ENV=test jest"
},
"dependencies": {
"@ballerine/common": "^0.9.14",
"@lukemorales/query-key-factory": "^1.0.3",
"@radix-ui/react-avatar": "^1.0.3",
"@radix-ui/react-dialog": "1.0.4",
Expand All @@ -36,6 +37,7 @@
"cmdk": "^0.2.0",
"dayjs": "^1.11.6",
"install": "^0.13.0",
"jsoneditor": "^10.1.0",
"lodash": "^4.17.21",
"lucide-react": "^0.144.0",
"react": "^18.2.0",
Expand All @@ -45,6 +47,7 @@
"react-json-view": "^1.21.3",
"react-router-dom": "^6.11.2",
"recharts": "^2.7.2",
"string-ts": "^1.2.0",
"tailwind-merge": "^1.13.2",
"tailwindcss-animate": "^1.0.5",
"use-query-params": "^2.2.1",
Expand All @@ -53,12 +56,13 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@ballerine/config": "^1.1.5",
"@ballerine/eslint-config-react": "^2.0.5",
"@ballerine/config": "^1.1.7",
"@ballerine/eslint-config-react": "^2.0.7",
"@cspell/cspell-types": "^6.31.1",
"@types/axios": "^0.14.0",
"@types/classnames": "^2.3.1",
"@types/jest": "^26.0.19",
"@types/jsoneditor": "^9.9.5",
"@types/lodash": "^4.14.191",
"@types/moment": "^2.13.0",
"@types/node": "^20.3.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { workflowDefinitionsQueryKeys } from '@/domains/workflow-definitions';
import { useQuery } from '@tanstack/react-query';

export const useWorkflowDefinitionQuery = (workflowId?: string) => {
console.log('keys', workflowDefinitionsQueryKeys.get({ workflowDefinitionId: workflowId! }));

const { data, isLoading, error } = useQuery({
...workflowDefinitionsQueryKeys.get({ workflowDefinitionId: workflowId! }),
// @ts-ignore
enabled: Boolean(workflowId),
retry: false,
});

return {
data,
isLoading,
error,
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Button } from '@/components/atoms/Button';
import { Dialog, DialogContent, DialogTrigger } from '@/components/atoms/Dialog';
import { JSONEditorComponent } from '@/components/organisms/JsonEditor';
import { CodeIcon } from 'lucide-react';
import Scrollbars from 'react-custom-scrollbars';

interface Props {
json: string;
trigger?: JSX.Element;
}

export const JSONViewButton = ({
json,
trigger = (
<Button className="flex items-center gap-2">
<CodeIcon size="16" />
View context
</Button>
),
}: Props) => {
return (
<Dialog>
<DialogTrigger asChild>{trigger}</DialogTrigger>
<DialogContent className="h-[80vh] min-w-[80%]">
<div className="pr-4">
<Scrollbars>
<JSONEditorComponent readOnly value={json ? JSON.parse(json) : {}} />
</Scrollbars>
</div>
</DialogContent>
</Dialog>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './JSONViewButton';
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { CreditCard, LogOut, PlusCircle, Settings, User } from 'lucide-react';
import { LogOut } from 'lucide-react';

import { Avatar, AvatarFallback, AvatarImage } from '@/components/atoms/Avatar';
import { Button } from '@/components/atoms/Button';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuTrigger,
} from '@/components/atoms/Dropdown';
import { Button } from '@/components/atoms/Button';
import { Avatar, AvatarFallback, AvatarImage } from '@/components/atoms/Avatar';

interface Props {
onLogout: () => void;
Expand All @@ -36,28 +35,6 @@ export function UserNavigation({ onLogout }: Props) {
</div>
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem>
<User className="mr-2 h-4 w-4" />
<span>Profile</span>
<DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
<CreditCard className="mr-2 h-4 w-4" />
<span>Billing</span>
<DropdownMenuShortcut>⌘B</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
<Settings className="mr-2 h-4 w-4" />
<span>Settings</span>
<DropdownMenuShortcut>⌘S</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
<PlusCircle className="mr-2 h-4 w-4" />
<span>New Team</span>
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuItem onSelect={onLogout}>
<LogOut className="mr-2 h-4 w-4" />
<span>Log out</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { HealthIndicator } from '@/components/atoms/HealthIndicator';
import { ContextViewColumn } from '@/components/molecules/WorkflowsTable/components/ContextViewColumn';
import { JSONViewButton } from '@/components/molecules/JSONViewButton';
import { DataTableColumnHeader } from '@/components/molecules/WorkflowsTable/components/DataTableColumnHeader';
import { WorkflowTableColumnDef } from '@/components/molecules/WorkflowsTable/types';
import { formatDate } from '@/components/molecules/WorkflowsTable/utils/format-date';
import { IWorkflow } from '@/domains/workflows/api/workflow';
import { formatDate } from '@/utils/format-date';
import { getWorkflowHealthStatus } from '@/utils/get-workflow-health-status';

export const defaultColumns: WorkflowTableColumnDef<IWorkflow>[] = [
Expand Down Expand Up @@ -43,7 +43,7 @@ export const defaultColumns: WorkflowTableColumnDef<IWorkflow>[] = [
{
accessorKey: 'context',
accessorFn: row => JSON.stringify(row.context),
cell: info => <ContextViewColumn context={info.getValue<string>()} />,
cell: info => <JSONViewButton json={info.getValue<string>()} />,
header: () => 'Context',
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const Header = () => {
const { logout } = useLogoutMutation();

return (
<div className="border-b">
<div className="sticky top-0 border-b bg-white">
<div className="flex h-16 flex-nowrap items-center justify-between px-4">
<div className="flex flex-1 gap-4">
<UserNavigation onLogout={logout} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,20 @@ export const headerNavigationLinks: NavigationLink[] = [
path: '/workflows',
label: 'Workflows',
},
{
path: '/workflow-definitions',
label: 'Workflow Definitions',
},
{
path: '/filters',
label: 'Filters',
},
{
path: '/ui-definitions',
label: 'UI Definitions',
},
{
path: '/alert-definitions',
label: 'Alerts Definitions',
},
];
Loading
Loading