-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: show launchplan in execution table (#738)
* feat: show launchplan in execution table Signed-off-by: Pradithya Aria Pura <[email protected]> * feat: show launch plan version Signed-off-by: Pradithya Aria Pura <[email protected]> * fix: fix unit test Signed-off-by: Pradithya Aria Pura <[email protected]> * fix: rename function Signed-off-by: Pradithya Aria Pura <[email protected]> * fix: move LaunchPlanLink to component/Launchplan Signed-off-by: Pradithya Aria Pura <[email protected]> * fix: handle overflow Signed-off-by: Pradithya Aria Pura <[email protected]> --------- Signed-off-by: Pradithya Aria Pura <[email protected]>
- Loading branch information
Showing
7 changed files
with
71 additions
and
4 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
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
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
27 changes: 27 additions & 0 deletions
27
packages/console/src/components/LaunchPlan/LaunchPlanLink.tsx
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,27 @@ | ||
import classnames from 'classnames'; | ||
import { useCommonStyles } from 'components/common/styles'; | ||
import { LaunchPlanId } from 'models/Launch/types'; | ||
import * as React from 'react'; | ||
import { Link as RouterLink } from 'react-router-dom'; | ||
import { Routes } from 'routes/routes'; | ||
|
||
/** A simple component to render a link to a specific LaunchPlan */ | ||
export const LaunchPlanLink: React.FC<{ | ||
className?: string; | ||
color?: 'primary' | 'disabled'; | ||
id: LaunchPlanId; | ||
}> = ({ className, color = 'primary', id }) => { | ||
const commonStyles = useCommonStyles(); | ||
const linkColor = | ||
color === 'disabled' | ||
? commonStyles.secondaryLink | ||
: commonStyles.primaryLink; | ||
return ( | ||
<RouterLink | ||
className={classnames(linkColor, className)} | ||
to={`${Routes.LaunchPlanDetails.makeUrl(id.project, id.domain, id.name)}`} | ||
> | ||
{id.name} | ||
</RouterLink> | ||
); | ||
}; |
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