-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): ability to create Stage via UI wizard (#2474)
Signed-off-by: Remington Breeze <[email protected]>
- Loading branch information
Showing
27 changed files
with
1,311 additions
and
195 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import classNames from 'classnames'; | ||
|
||
export const SmallLabel = ({ | ||
children, | ||
className | ||
}: { | ||
children: React.ReactNode; | ||
className?: string; | ||
}) => <div className={classNames('text-xs text-gray-500 font-medium', className)}>{children}</div>; |
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,51 @@ | ||
import { Tooltip } from 'antd'; | ||
|
||
import { Stage } from '@ui/gen/v1alpha1/generated_pb'; | ||
|
||
import { StagePopover } from '../project/list/project-item/stage-popover'; | ||
import { ColorMap } from '../stage/utils'; | ||
|
||
import { HealthStatusIcon } from './health-status/health-status-icon'; | ||
import { PromotionStatusIcon } from './promotion-status/promotion-status-icon'; | ||
|
||
export const StageTag = ({ | ||
stage, | ||
projectName, | ||
stageColorMap | ||
}: { | ||
stage: Stage; | ||
projectName: string; | ||
stageColorMap: ColorMap; | ||
}) => { | ||
return ( | ||
<Tooltip | ||
key={stage.metadata?.name} | ||
placement='bottom' | ||
title={ | ||
stage?.status?.lastPromotion?.name && <StagePopover project={projectName} stage={stage} /> | ||
} | ||
> | ||
<div | ||
className='flex items-center mb-2 text-white rounded py-1 px-2 font-semibold bg-gray-600' | ||
style={{ backgroundColor: stageColorMap[stage.metadata?.name || ''] }} | ||
> | ||
{stage.status?.health && ( | ||
<div className='mr-2'> | ||
<HealthStatusIcon health={stage.status?.health} hideColor={true} /> | ||
</div> | ||
)} | ||
{!stage?.status?.currentPromotion && stage.status?.lastPromotion && ( | ||
<div className='mr-2'> | ||
<PromotionStatusIcon | ||
placement='top' | ||
status={stage.status?.lastPromotion?.status} | ||
color='white' | ||
size='1x' | ||
/> | ||
</div> | ||
)} | ||
{stage.metadata?.name} | ||
</div> | ||
</Tooltip> | ||
); | ||
}; |
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 was deleted.
Oops, something went wrong.
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
10 changes: 10 additions & 0 deletions
10
ui/src/features/project/pipelines/utils/promo-mechanism-example.ts
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,10 @@ | ||
export const promoMechanismExample = `gitRepoUpdates: | ||
- repoURL: https://github.com/akuity/kargo-demo.git | ||
writeBranch: main | ||
kustomize: | ||
images: | ||
- image: public.ecr.aws/nginx/nginx | ||
path: stages/prod | ||
argoCDAppUpdates: | ||
- appName: kargo-demo-prod | ||
appNamespace: argocd`; |
Oops, something went wrong.