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

Draft: endpoint button #68

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Draft: endpoint button #68

wants to merge 2 commits into from

Conversation

plparent
Copy link
Member

Adding a button to return the endpoint associated to a deployed pipeline.

@plparent plparent requested review from jmagoon and FGRCL May 14, 2024 17:51
Comment on lines +51 to +64
<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>
Copy link
Member

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)
Copy link
Member

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) }}>
Copy link
Member

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">
Copy link
Member

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"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants