-
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
- Loading branch information
Showing
6 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
packages/console/src/components/Executions/Tables/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
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