-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Render dependency versions as links (#1540)
Resolves: #1340 On the Dependencies page, detail drawer, applications table: render the version text as a link to the maven central repository. The link uses the dependency's sha as the key in the maven central search. Add component `ExternalLink` to standardize rendering links outside of the app opening in a new tab. Note: The resolution to #1338 will require a change to the application table's query filter and response object. This will be done in PR #1536. See konveyor/tackle2-hub#557 for the response object change. Screenshot: ![image](https://github.com/konveyor/tackle2-ui/assets/3985964/50f0c144-b4fe-4ba2-a625-3c8e6ae3be6c) --------- Signed-off-by: Scott J Dickerson <sdickers@redhat.com> Co-authored-by: Ian Bolton <ibolton@redhat.com>
- Loading branch information
1 parent
64337c1
commit 2500fbc
Showing
4 changed files
with
117 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as React from "react"; | ||
import { Flex, FlexItem, Icon, Text } from "@patternfly/react-core"; | ||
import ExternalLinkAltIcon from "@patternfly/react-icons/dist/esm/icons/external-link-alt-icon"; | ||
|
||
/** | ||
* Render a link open an external href in another tab with appropriate styling. | ||
*/ | ||
export const ExternalLink: React.FC<{ | ||
href: string; | ||
children: React.ReactNode; | ||
}> = ({ href, children }) => ( | ||
<Flex spaceItems={{ default: "spaceItemsSm" }}> | ||
<FlexItem> | ||
<Text component="a" href={href} target="_blank"> | ||
{children} | ||
</Text> | ||
</FlexItem> | ||
<FlexItem> | ||
<Icon size="sm" status="info"> | ||
<ExternalLinkAltIcon /> | ||
</Icon> | ||
</FlexItem> | ||
</Flex> | ||
); | ||
|
||
export default ExternalLink; |
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