Skip to content

Commit

Permalink
kie-issues#1281: The Timeline goes to the bottom with long endpoints …
Browse files Browse the repository at this point in the history
…in WorkflowInstance page (#2563)
  • Loading branch information
kumaradityaraj authored Oct 11, 2024
1 parent 8756ef6 commit b905936
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import React from "react";
import { Button } from "@patternfly/react-core/dist/js/components/Button";
import { ExternalLinkAltIcon } from "@patternfly/react-icons/dist/js/icons/external-link-alt-icon";
import { componentOuiaProps, OUIAProps } from "../../ouiaTools";
import { Truncate } from "@patternfly/react-core/dist/js/components/Truncate";

interface IOwnProps {
serviceUrl?: string;
Expand All @@ -45,7 +46,10 @@ export const EndpointLink: React.FC<IOwnProps & OUIAProps> = ({
isInline={true}
{...componentOuiaProps(ouiaId, "endpoint-link", ouiaSafe)}
>
{isLinkShown ? serviceUrl : linkLabel || "Endpoint"}
<Truncate
content={isLinkShown ? serviceUrl : linkLabel || "Endpoint"}
style={{ maxWidth: "90%", minWidth: "0" }}
/>
{<ExternalLinkAltIcon className="pf-u-ml-xs" />}
</Button>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ import WorkflowDetailsTimelinePanel from "../WorkflowDetailsTimelinePanel/Workfl
import SwfCombinedEditor from "../SwfCombinedEditor/SwfCombinedEditor";
import { Job, WorkflowInstance, WorkflowInstanceState } from "@kie-tools/runtime-tools-swf-gateway-api/dist/types";

const SWFCOMBINEDEDITOR_WIDTH = 1000;

interface WorkflowDetailsProps {
isEnvelopeConnectedToChannel: boolean;
driver: WorkflowDetailsDriver;
Expand Down Expand Up @@ -218,7 +220,7 @@ const WorkflowDetails: React.FC<WorkflowDetailsProps> = ({ isEnvelopeConnectedTo
return (
<Flex>
<FlexItem>
<SwfCombinedEditor height={1000} width={1000} workflowInstance={data} />
<SwfCombinedEditor height={1000} width={SWFCOMBINEDEDITOR_WIDTH} workflowInstance={data} />
</FlexItem>
</Flex>
);
Expand Down Expand Up @@ -270,7 +272,7 @@ const WorkflowDetails: React.FC<WorkflowDetailsProps> = ({ isEnvelopeConnectedTo
return (
<Flex direction={{ default: "column" }}>
{renderSwfDiagram()}
<Flex>
<Flex style={{ width: `${SWFCOMBINEDEDITOR_WIDTH}px` }}>
{renderWorkflowDetails()}
{renderWorkflowVariables()}
</Flex>
Expand Down

0 comments on commit b905936

Please sign in to comment.