-
Notifications
You must be signed in to change notification settings - Fork 6
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
Draft: endpoint button #68
base: main
Are you sure you want to change the base?
Conversation
<ClosableModal | ||
modalHeading="The following error(s) occurred:" | ||
passiveModal={true} | ||
open={isOpen} | ||
onRequestClose={() => setIsOpen(false)} | ||
> | ||
<div className="flex flex-col gap-4 p-3"> | ||
{validationErrorMsg.map((error, i) => { | ||
return ( | ||
<p key={"error-msg-"+i}>{error}</p> | ||
) | ||
})} | ||
</div> | ||
</ClosableModal> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are going to keep this modal? If yes I think you can replace this with the plain Modal component from carbon
}) | ||
|
||
const endpoint = async (pipeline) => { | ||
const res = await mutation.mutateAsync(pipeline.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this function call can throw an error, so you might want to wrap it in a try-catch
|
||
return ( | ||
<> | ||
<Button style={styles} size="sm" onClick={() => { endpoint(pipeline) }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use tailwinds m-1
or m-[5px]
class instead here.
@@ -153,6 +154,9 @@ export default function Navbar({ children }) { | |||
<RunPipelineButton modalPopper={modalPopper} action="Run"> | |||
<Play size={20} style={svgOverride} /> | |||
</RunPipelineButton> | |||
<GetEndpointButton modalPopper={modalPopper} action="Something"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the action should be more specific, something like action="Deployment"
?
Adding a button to return the endpoint associated to a deployed pipeline.