Skip to content
Draft
Changes from all commits
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
24 changes: 21 additions & 3 deletions console2/src/components/organisms/ProcessActivity/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,23 @@ const buildDefinitionLinkBase = (process?: ProcessEntry) => {
}
};

const getLogType = (process?: ProcessEntry): 'v1' | 'v2' | undefined => {
if (!process) {
return;
}

const logType = process.meta?._system?.uiLogType;
if (logType === 'v1' || logType === 'v2') {
return logType;
}

if (process.runtime === 'concord-v1') {
return 'v1';
} else {
return 'v2';
}
}

const ProcessActivity = (props: ExternalProps) => {
const stickyRef = useRef(null);

Expand Down Expand Up @@ -175,6 +192,8 @@ const ProcessActivity = (props: ExternalProps) => {

const baseUrl = `/process/${instanceId}`;

const logType = getLogType(process);

return (
<div ref={stickyRef}>
<ProcessToolbar
Expand Down Expand Up @@ -254,8 +273,7 @@ const ProcessActivity = (props: ExternalProps) => {
/>
</Route>
<Route path={`${baseUrl}/log`} exact={true}>
{process &&
(process.runtime === 'concord-v1') && (
{logType && logType === 'v1' && (
<ProcessLogActivity
instanceId={instanceId}
processStatus={process ? process.status : undefined}
Expand All @@ -264,7 +282,7 @@ const ProcessActivity = (props: ExternalProps) => {
dataFetchInterval={dataFetchInterval}
/>
)}
{process && (process.runtime === 'concord-v2' || process.runtime === undefined) && (
{logType && logType === 'v2' && (
<ProcessLogActivityV2
instanceId={instanceId}
processStatus={process ? process.status : undefined}
Expand Down