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

Add NodeExecutionURL #822

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,37 @@
nodeExecutionId: Core.NodeExecutionIdentifier;
suffix: string;
}> = ({ nodeExecutionId, suffix }) => {
const project = nodeExecutionId.executionId?.project;
const domain = nodeExecutionId.executionId?.domain;
const executionName = nodeExecutionId.executionId?.name;
const nodeId = nodeExecutionId.nodeId;
const url = `flyte://v1/${project}/${domain}/${executionName}/${nodeId}/${suffix}`;
const code = `from flytekit.remote.remote import FlyteRemote

Check warning on line 17 in packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx#L12-L17

Added lines #L12 - L17 were not covered by tests
from flytekit.configuration import Config
rr = FlyteRemote(
Config.auto(),
remote = FlyteRemote(
Config.for_endpoint(endpoint="localhost:30080"),
Copy link
Contributor

@eapolinario eapolinario Oct 18, 2023

Choose a reason for hiding this comment

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

Can we get that address from the app itself? This should be the endpoint it uses to talk to admin, right?

default_project="${project}",
default_domain="${domain}",
default_domain="${domain}"
)
rr.get("${url}")`;
remote.get("${url}")`;
const handleClick = event => {
if (event.shiftKey) {
navigator.clipboard.writeText(code);
} else {
navigator.clipboard.writeText(url);

Check warning on line 29 in packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx#L25-L29

Added lines #L25 - L29 were not covered by tests
}
};

const logoStyle = {

Check warning on line 33 in packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx#L33

Added line #L33 was not covered by tests
width: '20px',
height: '20px',
};

const codeStyle = {

Check warning on line 38 in packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx#L38

Added line #L38 was not covered by tests
fontSize: '10px', // Adjust the font size as desired
};

return (

Check warning on line 42 in packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx#L42

Added line #L42 was not covered by tests
<>
<Button>
<img
Expand All @@ -54,7 +54,7 @@
language="python"
style={darcula}
customStyle={codeStyle}
onClick={() => navigator.clipboard.writeText(code)}

Check warning on line 57 in packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx

View check run for this annotation

Codecov / codecov/patch

packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeURL.tsx#L57

Added line #L57 was not covered by tests
>
{code}
</SyntaxHighlighter>
Expand Down
Loading