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

[dagster-azure]: Frontend #26984

Closed
wants to merge 1 commit into from

Conversation

mlarose
Copy link
Contributor

@mlarose mlarose commented Jan 9, 2025

Summary & Motivation

How I Tested These Changes

Reviewer's note

Is the styling (code + result) adequate?

Screenshot

Screenshot 2025-01-10 at 10 17 30 AM

Copy link
Contributor Author

mlarose commented Jan 9, 2025

Copy link

github-actions bot commented Jan 9, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-3ogtbrtp3-elementl.vercel.app
https://mlarose-AD-721-frontend.core-storybook.dagster-docs.io

Built with commit 2e8dfb4.
This pull request is being automatically deployed with vercel-action


const copy = useCopyToClipboard();
const onClickFn = async (key: string, value: string | undefined) => {
if (!value) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the check is necessary because value could be undefined.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does it show if the value is undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually it's more dealing with the type checker here.
the function cannot be called because the blocks that would make it available would not be rendered

@mlarose mlarose force-pushed the mlarose/AD-721-frontend branch from 1b3dd1e to 2e8dfb4 Compare January 10, 2025 15:19
@mlarose mlarose marked this pull request as ready for review January 10, 2025 15:20
Comment on lines +49 to +62
try {
const metadata = JSON.parse(logCaptureInfo.logManagerMetadata);
switch (metadata.type) {
case 'AzureBlobComputeLogManager':
if (metadata.storage_account && metadata.container) {
return `az storage blob download --account-name ${metadata.storage_account} --container-name ${metadata.container} --name ${path}`;
}
}
} catch {
return undefined;
}
}
return undefined;
};
Copy link
Member

@alangenfeld alangenfeld Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X (target for deep link)

Copy link
Contributor

@dpeng817 dpeng817 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally lgtm; my only question; is the shell command copyable by clicking? It would be nice to enable that if it's not hard.

Will leave final review to @hellendag

Comment on lines +99 to +104
<Box flex={{direction: 'row', alignItems: 'center', gap: 8}}>
<a href={externalUrl} target="_blank" rel="noreferrer">
{externalUrl}
<Icon name="open_in_new" style={{display: 'inline-block'}} />
</a>
</Box>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest putting the Box inside the a, since the icon is currently a bit misaligned with the text.

<a href="...">
  <Box ...>
    <span>{externalUrl}</span>
    <Icon ... />
  </Box>
</a>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the review, should I keep the Box outside of it? ie:

<td>
  <Box>
    <a>
       <Box>
          <span />
          <icon />
       </Box>
    </a>
   </Box>
<td>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should need to. Rendering in table cells can do some unexpected things, but if it looks fine without the wrapper then no need to include one.

Copy link
Contributor Author

mlarose commented Jan 13, 2025

Yes, it's copiable by clicking. It's implemented with the <ClickToCopyButton> and the onClickFn

@mlarose mlarose closed this Jan 14, 2025
mlarose added a commit that referenced this pull request Jan 16, 2025
## Summary & Motivation

Added support for displaying shell commands in the captured logs panel. When logs are captured by supporting ComputeLogManagers (Azure for now), users can now view and copy these commands directly from the UI, making it easier to obtain logs.

## Notes to reviewers

Rework of #26984 with following changes:

- graphql data structure changed
- shell cmd is generated earlier
- removed the uri / path (not useful; less is more)
- stylng fixes (added the recommended Box)

## How I Tested These Changes

- See top stack PR
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.

4 participants