You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2024/03/15 14:57:53 UTC
(camel-karavan) branch main updated: trace issue
This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
The following commit(s) were added to refs/heads/main by this push:
new 0bc9c920 trace issue
0bc9c920 is described below
commit 0bc9c9203ae9ba39d4d1fb98da09d36d79580958
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Fri Mar 15 10:57:46 2024 -0400
trace issue
---
.../src/project/trace/RunnerInfoTraceMessage.tsx | 42 ++++++----------------
.../src/main/webui/src/project/trace/trace.css | 1 +
2 files changed, 11 insertions(+), 32 deletions(-)
diff --git a/karavan-app/src/main/webui/src/project/trace/RunnerInfoTraceMessage.tsx b/karavan-app/src/main/webui/src/project/trace/RunnerInfoTraceMessage.tsx
index 1ddabfdc..1e699374 100644
--- a/karavan-app/src/main/webui/src/project/trace/RunnerInfoTraceMessage.tsx
+++ b/karavan-app/src/main/webui/src/project/trace/RunnerInfoTraceMessage.tsx
@@ -46,11 +46,12 @@ export function RunnerInfoTraceMessage (props: Props) {
const [tab, setTab] = useState<string | number>('variables');
const [variableName, setVariableName] = useState<string | number>();
- const type = props.trace?.message?.body?.type;
- const headers: any[] = [...props.trace?.message?.headers];
- const properties: any[] = [...props.trace?.message?.exchangeProperties];
- const variables: any[] = props.trace?.message?.exchangeVariables ? [...props.trace?.message?.exchangeVariables] : [];
- const body = props.trace?.message?.body?.value;
+ const message = props.trace?.message;
+ const type = message?.body?.type;
+ const headers: any[] = message?.headers ? [...message?.headers] : [];
+ const properties: any[] = message?.exchangeProperties ? [...message?.exchangeProperties] : [];
+ const variables: any[] = message?.exchangeVariables ? [...message?.exchangeVariables] : [];
+ const body = message?.body?.value;
const variable = variables.filter(v => v.key === variableName)?.at(0);
function getBody() {
@@ -146,10 +147,10 @@ export function RunnerInfoTraceMessage (props: Props) {
</Tabs>
{tab === 'variables' && variables.length > 0 &&
<>
- <Tabs key={variableName} activeKey={variableName} onSelect={(event, eventKey) => setVariableName(eventKey)}>
- {variables.map(v => (<Tab eventKey={v.key} title={<TabTitleText>{v.key}</TabTitleText>}/>))}
- </Tabs>
- {getVariableType()}
+ <Tabs key={variableName} activeKey={variableName} onSelect={(event, eventKey) => setVariableName(eventKey)}>
+ {variables.map(v => (<Tab eventKey={v.key} title={<TabTitleText>{v.key}</TabTitleText>}/>))}
+ </Tabs>
+ {getVariableType()}
</>
}
<div className="scrollable">
@@ -159,28 +160,5 @@ export function RunnerInfoTraceMessage (props: Props) {
{tab === 'properties' && getProperties()}
</div>
</div>
- // <Panel isScrollable>
- // <PanelMain tabIndex={0}>
- // <PanelHeader>
- // <DescriptionList isHorizontal>
- // <DescriptionListGroup>
- // <DescriptionListTerm>Headers</DescriptionListTerm>
- // </DescriptionListGroup>
-
- // <DescriptionListGroup>
- // <DescriptionListTerm>Body</DescriptionListTerm>
- // <DescriptionListDescription>
- // {type}
- // </DescriptionListDescription>
- // </DescriptionListGroup>
- // </DescriptionList>
- // </PanelHeader>
- // <PanelMainBody style={{padding: "0"}}>
- // <CodeBlock title="Body">
- // <CodeBlockCode id="code-content">{body}</CodeBlockCode>
- // </CodeBlock>
- // </PanelMainBody>
- // </PanelMain>
- // </Panel>
);
}
diff --git a/karavan-app/src/main/webui/src/project/trace/trace.css b/karavan-app/src/main/webui/src/project/trace/trace.css
index 401585ee..00ab2295 100644
--- a/karavan-app/src/main/webui/src/project/trace/trace.css
+++ b/karavan-app/src/main/webui/src/project/trace/trace.css
@@ -16,6 +16,7 @@
.trace-modal .container {
display: flex;
+ flex-direction: row;
padding: 0;
flex: 1;
}