Skip to content

Commit

Permalink
feat: add support muxing rules v2 (#311)
Browse files Browse the repository at this point in the history
* chore: add dnd-kit, uuid and upgrade ui-kit

* feat: create SortableArea generic component

* feat: replacing zustand store with useFormState, rename filename

* feat: replace drag icon

* feat: add models dropdown

* feat: create a remove queries utility fn

* refactor: simplify logic for handling dirty and reset form state

* feat: update muxing rules

* feat: show remove button if multiple rules

* feat: add link to doc and manager providers link

* refactor: remove unneeded div wrapper

* feat: use form buttons

* leftover

* feat: change notfication message

* chore: update msw handlers

* fix: update rules and add tests case

* refactor: rename filename

* refactor: revert changes

* chore: update openapi

* fix: matcher_type for filename

* feat: set the default muxing rule as catch all

* fix: update workspace name and models

* test: update muxing model

* fix: type

* fix: drag sortable area

* fix: catch all rule spacing

* fix: fields alignment

* fix: models unique identifier

* fix: invalidate models

* test: update muxing logic

* prettier

* refactor: review
  • Loading branch information
peppescg authored Feb 14, 2025
1 parent 35ba1a4 commit 38f2ecc
Show file tree
Hide file tree
Showing 26 changed files with 1,171 additions and 391 deletions.
8 changes: 8 additions & 0 deletions icons/drag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"generate-icons": "npx @svgr/cli --typescript --no-dimensions --replace-attr-values '#2E323A=currentColor' --jsx-runtime automatic --out-dir ./src/components/icons/ -- icons"
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@hey-api/client-fetch": "^0.7.1",
"@jsonforms/core": "^3.5.1",
"@jsonforms/react": "^3.5.1",
Expand Down Expand Up @@ -52,6 +54,7 @@
"tailwind-variants": "^0.3.1",
"tailwindcss-animate": "^1.0.7",
"ts-pattern": "^5.6.2",
"uuid": "^11.0.5",
"zod": "^3.24.1"
},
"devDependencies": {
Expand Down
19 changes: 13 additions & 6 deletions src/api/generated/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export type Alert = {
| {
[key: string]: unknown
}
| null
trigger_type: string
trigger_category: string | null
timestamp: string
}
| null;
trigger_type: string;
trigger_category: AlertSeverity;
timestamp: string;
};

/**
* Represents an alert with it's respective conversation.
Expand All @@ -59,6 +59,11 @@ export type AlertConversation = {
timestamp: string
}

export enum AlertSeverity {
INFO = "info",
CRITICAL = "critical",
}

/**
* Represents a chat message.
*/
Expand Down Expand Up @@ -140,7 +145,9 @@ export type ModelByProvider = {
* Represents the different types of matchers we support.
*/
export enum MuxMatcherType {
CATCH_ALL = 'catch_all',
CATCH_ALL = "catch_all",
FILENAME_MATCH = "filename_match",
REQUEST_TYPE_MATCH = "request_type_match",
}

/**
Expand Down
Loading

0 comments on commit 38f2ecc

Please sign in to comment.