-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 2655-implement-log-data-stream-selector-rebased
- Loading branch information
Showing
24 changed files
with
709 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
x-pack/plugins/profiling/public/components/stack_frame_summary.tsx
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
x-pack/plugins/profiling/public/components/stack_frame_summary/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiText } from '@elastic/eui'; | ||
import React from 'react'; | ||
import { getCalleeFunction, getCalleeSource, StackFrameMetadata } from '../../../common/profiling'; | ||
|
||
interface Props { | ||
frame: StackFrameMetadata; | ||
onFrameClick?: (functionName: string) => void; | ||
} | ||
|
||
function CalleeFunctionText({ calleeFunctionName }: { calleeFunctionName: string }) { | ||
return ( | ||
<EuiText size="s" style={{ fontWeight: 'bold', overflowWrap: 'anywhere' }}> | ||
{calleeFunctionName} | ||
</EuiText> | ||
); | ||
} | ||
|
||
export function StackFrameSummary({ frame, onFrameClick }: Props) { | ||
const calleeFunctionName = getCalleeFunction(frame); | ||
|
||
function handleOnClick() { | ||
if (onFrameClick) { | ||
onFrameClick(calleeFunctionName); | ||
} | ||
} | ||
|
||
return ( | ||
<EuiFlexGroup direction="column" gutterSize="xs"> | ||
<EuiFlexItem> | ||
<div> | ||
{onFrameClick ? ( | ||
<EuiLink onClick={handleOnClick}> | ||
<CalleeFunctionText calleeFunctionName={calleeFunctionName} /> | ||
</EuiLink> | ||
) : ( | ||
<CalleeFunctionText calleeFunctionName={calleeFunctionName} /> | ||
)} | ||
</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem style={{ overflowWrap: 'anywhere' }}> | ||
<EuiText size="s">{getCalleeSource(frame) || ''}</EuiText> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.