Skip to content

Commit

Permalink
truncated url returned from endpointLink
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaradityaraj committed Sep 6, 2024
1 parent 046dd3c commit d137a5b
Showing 1 changed file with 2 additions and 1 deletion.
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,7 @@ 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: "70vw" }} />
{<ExternalLinkAltIcon className="pf-u-ml-xs" />}
</Button>
);
Expand Down

0 comments on commit d137a5b

Please sign in to comment.