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

UI Changes - Dashboard topology #503

Open
wants to merge 1 commit into
base: r20.10
Choose a base branch
from
Open

Conversation

shashank-nx
Copy link
Contributor

Added UI changes in Dashboard topology.

await htmlToImage.toJpeg(document.getElementsByClassName('tree-graph').item(0), { quality: 0.95 })
.then(function (dataUrl) {
let link = document.createElement('a');
link.download = `dashboard-topology-snapshot-${count}.jpeg`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

if TreeGraph was used in different places, would the download link always be dashboard-topology-snapshot(count).jpeg? maybe the name should be a prop to this generic component

link.href = dataUrl;
link.click();
});
await new Promise(resolve => setTimeout(resolve, 2000));
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the need for a setTimeout?

@@ -577,11 +593,13 @@ const TreeGraph = (props) => {
} = props;

return (
<>
<Button onClick={downloadTreeGraph} id="button-treeGraph" width={'50px'}>Download</Button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

the text Download should come from translation

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

Successfully merging this pull request may close these issues.

2 participants