Skip to content

Commit

Permalink
refactor: show the used kubectl command with the logs
Browse files Browse the repository at this point in the history
  • Loading branch information
monojack committed Feb 22, 2024
1 parent e098543 commit 1890b14
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ export function DebugClusterDrawer({contextId, open, onClose}: Props) {
<div />

<div style={{paddingBottom: 8}}>
{Boolean(data?.cmd) && (
<CodeBlock>
<pre>{data?.cmd}</pre>
</CodeBlock>
)}
{logs.map(l => (
<LogEntry key={l.timestamp}>
<LogMeta>
Expand Down Expand Up @@ -136,3 +141,17 @@ const ButtonBox = styled.div<{$wrap: boolean}>`
color: ${Colors.lightSeaGreen};
}
`;

const CodeBlock = styled.code`
> pre {
width: min-content;
max-width: 100%;
overflow: auto;
display: block;
white-space: no-wrap;
padding: 8px;
border-radius: 4px;
background: ${Colors.grey3b};
color: ${Colors.grey8};
}
`;

0 comments on commit 1890b14

Please sign in to comment.