-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add providers endpoint and enable muxing #253
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
76dce58
feat: get preferred model by workspace
peppescg 482d922
enable muxing
peppescg c5ca1c0
chore: update openapi
peppescg ea22f3e
chore: add @tanstack/react-query-devtools
peppescg 2ef4ab3
feat: providers endpoint crud
peppescg 48feb98
feat: update provider and auth
peppescg 25186f7
refactor: move add provider button on top
peppescg c350954
fix: msw handler
peppescg 5ba311a
feat: add providers menu item
peppescg eb12cdf
test: add settings menu and providers items
peppescg a4642e8
leftover
peppescg 450e494
feat: add query config on refetch for providers list endpoint
peppescg 7a808a6
fix: provider id type
peppescg 329d6e0
fix: spelling
peppescg e97cdc7
refadctor: providers table
peppescg 85e769b
fix: dialog content overflow
peppescg 76b92e9
refactor: remove modal state
peppescg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { OptionsSchema } from "@stacklok/ui-kit"; | ||
import { | ||
Download01, | ||
LayersThree01, | ||
ShieldTick, | ||
} from "@untitled-ui/icons-react"; | ||
|
||
export const SETTINGS_MENU_ITEMS = [ | ||
{ | ||
textValue: "Providers", | ||
id: "providers", | ||
items: [ | ||
{ | ||
icon: <LayersThree01 />, | ||
id: "providers", | ||
href: "/providers", | ||
textValue: "Providers", | ||
}, | ||
], | ||
}, | ||
{ | ||
textValue: "Certificates", | ||
id: "certificates", | ||
items: [ | ||
{ | ||
icon: <ShieldTick />, | ||
id: "about-certificate-security", | ||
href: "/certificates/security", | ||
textValue: "About certificate security", | ||
}, | ||
{ | ||
icon: <Download01 />, | ||
id: "download-certificates", | ||
href: "/certificates", | ||
textValue: "Download certificates", | ||
}, | ||
], | ||
}, | ||
] as const satisfies OptionsSchema<"menu">[]; |
17 changes: 17 additions & 0 deletions
17
src/features/providers/components/provider-dialog-footer.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Button, DialogFooter } from "@stacklok/ui-kit"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
export function ProviderDialogFooter() { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<DialogFooter className="justify-end"> | ||
<Button variant="secondary" onPress={() => navigate("/providers")}> | ||
Discard | ||
</Button> | ||
<Button type="submit" variant="primary"> | ||
Save | ||
</Button> | ||
</DialogFooter> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { | ||
DialogModalOverlay, | ||
DialogModal, | ||
Dialog, | ||
DialogHeader, | ||
DialogTitle, | ||
DialogCloseButton, | ||
} from "@stacklok/ui-kit"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
export function ProviderDialog({ | ||
title, | ||
children, | ||
}: { | ||
title: string; | ||
children: React.ReactNode; | ||
}) { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<DialogModalOverlay | ||
isDismissable={false} | ||
isOpen | ||
onOpenChange={() => { | ||
navigate("/providers"); | ||
}} | ||
> | ||
<DialogModal> | ||
<Dialog width="md" className=""> | ||
<DialogHeader> | ||
<DialogTitle>{title}</DialogTitle> | ||
<DialogCloseButton slot="close" /> | ||
</DialogHeader> | ||
{children} | ||
peppescg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</Dialog> | ||
</DialogModal> | ||
</DialogModalOverlay> | ||
); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.