diff --git a/package-lock.json b/package-lock.json index 297fadd1c..4c5ea27c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.14.0", + "version": "1.14.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.14.0", + "version": "1.14.1", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 198fe2859..89ae92f13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.14.0", + "version": "1.14.1", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", diff --git a/src/Shared/Components/ActionMenu/ActionMenuItem.tsx b/src/Shared/Components/ActionMenu/ActionMenuItem.tsx index 636e3d464..96300da47 100644 --- a/src/Shared/Components/ActionMenu/ActionMenuItem.tsx +++ b/src/Shared/Components/ActionMenu/ActionMenuItem.tsx @@ -7,6 +7,8 @@ import { Icon } from '../Icon' import { getTooltipProps } from '../SelectPicker/common' import { ActionMenuItemProps } from './types' +const COMMON_ACTION_MENU_ITEM_CLASS = 'flex-grow-1 flex left top dc__gap-8 py-6 px-8' + export const ActionMenuItem = ({ item, itemRef, @@ -52,19 +54,25 @@ export const ActionMenuItem = ({ const renderContent = () => ( <> - - {label} - - {description && - (typeof description === 'string' ? ( - - {description} + {renderIcon(startIcon)} + + + + {label} - ) : ( - description - ))} + + {description && + (typeof description === 'string' ? ( + + {description} + + ) : ( + description + ))} + + {renderIcon(endIcon)} ) @@ -74,7 +82,7 @@ export const ActionMenuItem = ({ return ( } - className="flex-grow-1" + className={COMMON_ACTION_MENU_ITEM_CLASS} href={item.href} target="_blank" rel="noreferrer" @@ -84,7 +92,11 @@ export const ActionMenuItem = ({ ) case 'link': return ( - } className="flex-grow-1" to={item.to}> + } + className={COMMON_ACTION_MENU_ITEM_CLASS} + to={item.to} + > {renderContent()} ) @@ -94,7 +106,7 @@ export const ActionMenuItem = ({ @@ -111,13 +123,11 @@ export const ActionMenuItem = ({ onMouseEnter={onMouseEnter} tabIndex={-1} // Intentionally added margin to the left and right to have the gap on the edges of the options - className={`action-menu__option br-4 flex left top dc__gap-8 mr-4 ml-4 py-6 px-8 ${isDisabled ? 'dc__disabled' : 'cursor'} ${isNegativeType ? 'dc__hover-r50' : 'dc__hover-n50'} ${isFocused ? `action-menu__option--focused${isNegativeType ? '-negative' : ''}` : ''}`} + className={`action-menu__option br-4 mr-4 ml-4 ${isDisabled ? 'dc__disabled' : 'cursor'} ${isNegativeType ? 'dc__hover-r50' : 'dc__hover-n50'} ${isFocused ? `action-menu__option--focused${isNegativeType ? '-negative' : ''}` : ''}`} onClick={!isDisabled ? handleClick : undefined} aria-disabled={isDisabled} > - {renderIcon(startIcon)} {renderComponent()} - {renderIcon(endIcon)} ) diff --git a/src/Shared/Components/AppStatusModal/AppStatusBody.tsx b/src/Shared/Components/AppStatusModal/AppStatusBody.tsx index 7c8c2e2dd..b50a568b4 100644 --- a/src/Shared/Components/AppStatusModal/AppStatusBody.tsx +++ b/src/Shared/Components/AppStatusModal/AppStatusBody.tsx @@ -19,7 +19,7 @@ import { getAppStatusMessageFromAppDetails } from './utils' const InfoCardItem = ({ heading, value, isLast = false, alignCenter = false }: InfoCardItemProps) => (

{heading}

diff --git a/src/Shared/Components/DeploymentStatusBreakdown/constants.ts b/src/Shared/Components/DeploymentStatusBreakdown/constants.ts index 3b961cb7c..9ced31e1f 100644 --- a/src/Shared/Components/DeploymentStatusBreakdown/constants.ts +++ b/src/Shared/Components/DeploymentStatusBreakdown/constants.ts @@ -39,8 +39,12 @@ export const WFR_STATUS_DTO_TO_DEPLOYMENT_STATUS_MAP: Readonly< [WorkflowRunnerStatusDTO.INITIATING]: DEPLOYMENT_STATUS.INITIATING, [WorkflowRunnerStatusDTO.STARTING]: DEPLOYMENT_STATUS.STARTING, [WorkflowRunnerStatusDTO.PROGRESSING]: DEPLOYMENT_STATUS.INPROGRESS, + [WorkflowRunnerStatusDTO.SUSPENDED]: DEPLOYMENT_STATUS.INPROGRESS, [WorkflowRunnerStatusDTO.QUEUED]: DEPLOYMENT_STATUS.QUEUED, + + [WorkflowRunnerStatusDTO.UNKNOWN]: DEPLOYMENT_STATUS.UNABLE_TO_FETCH, + [WorkflowRunnerStatusDTO.MISSING]: DEPLOYMENT_STATUS.UNABLE_TO_FETCH, } export const PROGRESSING_DEPLOYMENT_STATUS: Readonly<(typeof DEPLOYMENT_STATUS)[keyof typeof DEPLOYMENT_STATUS][]> = [ diff --git a/src/Shared/Components/DeploymentStatusBreakdown/types.ts b/src/Shared/Components/DeploymentStatusBreakdown/types.ts index 6c0cc185e..3ff56bf80 100644 --- a/src/Shared/Components/DeploymentStatusBreakdown/types.ts +++ b/src/Shared/Components/DeploymentStatusBreakdown/types.ts @@ -15,9 +15,12 @@ export enum WorkflowRunnerStatusDTO { STARTING = 'Starting', QUEUED = 'Queued', INITIATING = 'Initiating', - // Not found on BE but added for Backward compatibility + // Coming in specific cases of helm apps HEALTHY = 'Healthy', DEGRADED = 'Degraded', + MISSING = 'Missing', + UNKNOWN = 'Unknown', + SUSPENDED = 'Suspended', } export interface ProcessUnableToFetchOrTimedOutStatusType {