diff --git a/package-lock.json b/package-lock.json index ca1a62b2a..ea736189f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.22.5", + "version": "1.22.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.22.5", + "version": "1.22.6", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 226c955a6..03267f878 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.22.5", + "version": "1.22.6", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", diff --git a/src/Common/SegmentedBarChart/SegmentedBarChart.tsx b/src/Common/SegmentedBarChart/SegmentedBarChart.tsx index 3d598fba0..24b5096c9 100644 --- a/src/Common/SegmentedBarChart/SegmentedBarChart.tsx +++ b/src/Common/SegmentedBarChart/SegmentedBarChart.tsx @@ -59,7 +59,9 @@ const SegmentedBarChart: React.FC = ({
) : ( - {isProportional && !hideTotal ? `${value}/${total}` : value} + {isProportional && !hideTotal + ? `${value.toLocaleString()}/${total.toLocaleString()}` + : value.toLocaleString()} ) diff --git a/src/Shared/Components/CICDHistory/types.tsx b/src/Shared/Components/CICDHistory/types.tsx index 58a299b95..a2ab75708 100644 --- a/src/Shared/Components/CICDHistory/types.tsx +++ b/src/Shared/Components/CICDHistory/types.tsx @@ -642,13 +642,6 @@ export interface AggregatedNodes { } } -export interface PodMetadatum { - name: string - uid: string - containers: string[] - isNew: boolean -} - export const STATUS_SORTING_ORDER = { [NodeStatus.Missing]: 1, [NodeStatus.Degraded]: 2, diff --git a/src/Shared/Components/LoadingCard.tsx b/src/Shared/Components/LoadingCard.tsx index 961f98d60..a2841bf6c 100644 --- a/src/Shared/Components/LoadingCard.tsx +++ b/src/Shared/Components/LoadingCard.tsx @@ -20,8 +20,7 @@ interface LoadingCardType { const LoadingCard = ({ wider }: LoadingCardType) => (
diff --git a/src/Shared/Helpers.tsx b/src/Shared/Helpers.tsx index 902bd8d9a..6f5a16c46 100644 --- a/src/Shared/Helpers.tsx +++ b/src/Shared/Helpers.tsx @@ -54,7 +54,7 @@ import { ZERO_TIME_STRING, } from '../Common' import { getAggregator, GVKType } from '../Pages' -import { AggregatedNodes, PodMetadatum } from './Components' +import { AggregatedNodes } from './Components' import { CUBIC_BEZIER_CURVE, UNSAVED_CHANGES_PROMPT_MESSAGE } from './constants' import { AggregationKeys, @@ -65,6 +65,7 @@ import { IntersectionOptions, Node, Nodes, + PodMetaData, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType, @@ -298,7 +299,7 @@ export const renderValidInputButtonTippy = (children: ReactElement) => ( ) -export function aggregateNodes(nodes: any[], podMetadata: PodMetadatum[]): AggregatedNodes { +export function aggregateNodes(nodes: any[], podMetadata: PodMetaData[]): AggregatedNodes { const podMetadataMap = mapByKey(podMetadata, 'name') // group nodes const nodesGroup = nodes.reduce((agg, curr) => { diff --git a/src/Shared/types.ts b/src/Shared/types.ts index dec0e3820..907a59b89 100644 --- a/src/Shared/types.ts +++ b/src/Shared/types.ts @@ -175,13 +175,24 @@ export interface iNode extends Node { status: string pNode?: iNode } + +export interface HelmReleaseStatus { + status: string + message: string + description: string +} + export interface ResourceTree { - conditions: any + nodes: Node[] newGenerationReplicaSet: string - nodes: Array - podMetadata: Array status: string + podMetadata: PodMetaData[] + conditions?: any + releaseStatus?: HelmReleaseStatus resourcesSyncResult?: Record + hasDrift?: boolean + // lastSnapshotTime and wfrId are only available for isolated + lastSnapshotTime?: string wfrId?: number } @@ -193,12 +204,6 @@ export enum AppType { EXTERNAL_FLUX_APP = 'external_flux_app', } -export interface HelmReleaseStatus { - status: string - message: string - description: string -} - interface MaterialInfo { author: string branch: string @@ -222,7 +227,7 @@ export interface AppDetails { appStoreChartName?: string appStoreInstalledAppVersionId?: number ciArtifactId?: number - deprecated?: false + deprecated?: boolean environmentId?: number environmentName: string installedAppId?: number @@ -258,6 +263,12 @@ export interface AppDetails { FluxAppStatusDetail?: FluxAppStatusDetail isPipelineTriggered?: boolean releaseMode?: ReleaseMode + cdPipelineId?: number + triggerType?: string + parentEnvironmentName?: string + ciPipelineId?: number + trafficSwitched?: boolean + pcoId?: number } export interface ConfigDriftModalProps extends Required> {