Skip to content

Commit

Permalink
add code snippet
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Oct 18, 2023
1 parent 6de66de commit 1a1d357
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ export const ExecutionNodeURL: React.FC<{
const code = `from flytekit.remote.remote import FlyteRemote
from flytekit.configuration import Config
rr = FlyteRemote(
Config.auto(config_file="~/.flyte/config.yaml"),
Config.auto(),
default_project="${project}",
default_domain="${domain}",
)
url = "${url}"
rr.get(url)`;
rr.get("${url}")`;
const handleClick = event => {
if (event.shiftKey) {
navigator.clipboard.writeText(code);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ export const NodeExecutionInputs: React.FC<{
map={executionData.value.fullInputs}
mapTaskIndex={taskIndex}
/>
<ExecutionNodeURL
nodeExecutionId={execution.id}
suffix="i"
></ExecutionNodeURL>
{executionData.value.fullInputs && executionData.value.fullInputs.literals && (
<ExecutionNodeURL
nodeExecutionId={execution.id}
suffix="i"
></ExecutionNodeURL>
)}
</PanelSection>
</WaitForData>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ export const NodeExecutionOutputs: React.FC<{
map={executionData.value.fullOutputs}
mapTaskIndex={taskIndex}
/>
<ExecutionNodeURL
{executionData.value.fullOutputs && executionData.value.fullOutputs.literals && (
<ExecutionNodeURL
nodeExecutionId={execution.id}
suffix="o"
></ExecutionNodeURL>
></ExecutionNodeURL>)}
</PanelSection>
</WaitForData>
);
Expand Down
16 changes: 9 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20486,6 +20486,15 @@ __metadata:
languageName: node
linkType: hard

"redeyed@npm:~2.1.0":
version: 2.1.1
resolution: "redeyed@npm:2.1.1"
dependencies:
esprima: ~4.0.0
checksum: 39a1426e377727cfb47a0e24e95c1cf78d969fbc388dc1e0fa1e2ef8a8756450cefb8b0c2598f63b85f1a331986fca7604c0db798427a5775a1dbdb9c1291979
languageName: node
linkType: hard

"refractor@npm:^3.6.0":
version: 3.6.0
resolution: "refractor@npm:3.6.0"
Expand All @@ -20494,13 +20503,6 @@ __metadata:
parse-entities: ^2.0.0
prismjs: ~1.27.0
checksum: 39b01c4168c77c5c8486f9bf8907bbb05f257f15026057ba5728535815a2d90eed620468a4bfbb2b8ceefbb3ce3931a1be8b17152dbdbc8b0eef92450ff750a2

"redeyed@npm:~2.1.0":
version: 2.1.1
resolution: "redeyed@npm:2.1.1"
dependencies:
esprima: ~4.0.0
checksum: 39a1426e377727cfb47a0e24e95c1cf78d969fbc388dc1e0fa1e2ef8a8756450cefb8b0c2598f63b85f1a331986fca7604c0db798427a5775a1dbdb9c1291979
languageName: node
linkType: hard

Expand Down

0 comments on commit 1a1d357

Please sign in to comment.