diff --git a/package-lock.json b/package-lock.json index 386347e6d..b3f206a49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.12.0-pre-3", + "version": "1.12.0-pre-4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.12.0-pre-3", + "version": "1.12.0-pre-4", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 77e914d22..a6af9db1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.12.0-pre-3", + "version": "1.12.0-pre-4", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", diff --git a/src/Assets/IconV2/ic-checks.svg b/src/Assets/IconV2/ic-checks.svg new file mode 100644 index 000000000..1a48f93b4 --- /dev/null +++ b/src/Assets/IconV2/ic-checks.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-key.svg b/src/Assets/IconV2/ic-key.svg new file mode 100644 index 000000000..fc4da3ebc --- /dev/null +++ b/src/Assets/IconV2/ic-key.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Assets/IconV2/ic-timeout-two-dash.svg b/src/Assets/IconV2/ic-selected.svg similarity index 62% rename from src/Assets/IconV2/ic-timeout-two-dash.svg rename to src/Assets/IconV2/ic-selected.svg index 85b6d9893..e42627f7e 100644 --- a/src/Assets/IconV2/ic-timeout-two-dash.svg +++ b/src/Assets/IconV2/ic-selected.svg @@ -15,7 +15,6 @@ --> - - - + + diff --git a/src/Assets/IconV2/ic-timeout-dash.svg b/src/Assets/IconV2/ic-timeout-dash.svg new file mode 100644 index 000000000..08932efac --- /dev/null +++ b/src/Assets/IconV2/ic-timeout-dash.svg @@ -0,0 +1,21 @@ + + + + + + + diff --git a/src/Common/Types.ts b/src/Common/Types.ts index e0dae3ba1..438ac8947 100644 --- a/src/Common/Types.ts +++ b/src/Common/Types.ts @@ -231,25 +231,27 @@ interface InfoColourBarTextConfigType { actionButtonConfig?: ButtonProps } -type InfoColourBarMessageProp = { - message: ReactNode - linkText?: ReactNode - redirectLink?: string - linkOnClick?: () => void - linkClass?: string - internalLink?: boolean - - textConfig?: never -} | { - textConfig: InfoColourBarTextConfigType - - message?: never - linkText?: never - redirectLink?: never - linkOnClick?: () => never - linkClass?: never - internalLink?: never -} +type InfoColourBarMessageProp = + | { + message: ReactNode + linkText?: ReactNode + redirectLink?: string + linkOnClick?: () => void + linkClass?: string + internalLink?: boolean + + textConfig?: never + } + | { + textConfig: InfoColourBarTextConfigType + + message?: never + linkText?: never + redirectLink?: never + linkOnClick?: () => never + linkClass?: never + internalLink?: never + } export type InfoColourBarType = InfoColourBarMessageProp & { classname: string @@ -848,7 +850,7 @@ export interface Strategy { default?: boolean } -export interface CDStage extends Partial> { +export interface CDStage extends Partial> { status: string name: string triggerType: 'AUTOMATIC' | 'MANUAL' @@ -860,7 +862,9 @@ export interface CDStageConfigMapSecretNames { secrets: any[] } -export interface PrePostDeployStageType extends MandatoryPluginBaseStateType, Partial> { +export interface PrePostDeployStageType + extends MandatoryPluginBaseStateType, + Partial> { isValid: boolean steps: TaskErrorObj[] triggerType: string diff --git a/src/Shared/Components/AnimatedDeployButton/AnimatedDeployButton.tsx b/src/Shared/Components/AnimatedDeployButton/AnimatedDeployButton.tsx index 7294f625e..257f5d907 100644 --- a/src/Shared/Components/AnimatedDeployButton/AnimatedDeployButton.tsx +++ b/src/Shared/Components/AnimatedDeployButton/AnimatedDeployButton.tsx @@ -20,13 +20,19 @@ import { motion } from 'framer-motion' import DeployAudio from '@Sounds/DeployAudio.mp3' import { ComponentSizeType } from '@Shared/constants' -import { Button } from '../Button' +import { Button, ButtonStyleType } from '../Button' import { Icon } from '../Icon' import { AnimatedDeployButtonProps } from './types' import './animatedDeployButton.scss' -const AnimatedDeployButton = ({ isVirtualEnvironment, onButtonClick }: AnimatedDeployButtonProps) => { +const AnimatedDeployButton = ({ + isLoading, + isVirtualEnvironment, + onButtonClick, + exceptionUserConfig, + isBulkCDTrigger, +}: AnimatedDeployButtonProps) => { const audioRef = useRef(null) const timeoutRef = useRef>(null) const isAudioEnabled: boolean = window._env_.FEATURE_ACTION_AUDIOS_ENABLE @@ -36,6 +42,7 @@ const AnimatedDeployButton = ({ isVirtualEnvironment, onButtonClick }: AnimatedD rotate: 45, }, } + const isExceptionUser = exceptionUserConfig?.canDeploy || exceptionUserConfig?.isImageApprover const handleButtonClick = async (e: SyntheticEvent) => { if (clicked) { @@ -66,7 +73,12 @@ const AnimatedDeployButton = ({ isVirtualEnvironment, onButtonClick }: AnimatedD