Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/Common/SegmentedBarChart/SegmentedBarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const SegmentedBarChart: React.FC<SegmentedBarChartProps> = ({
<div className="shimmer w-64 lh-1-5 h-24" />
) : (
<span className={countClassName} data-testid={`segmented-bar-chart-${label}-value`}>
{isProportional && !hideTotal ? `${value}/${total}` : value}
{isProportional && !hideTotal
? `${value.toLocaleString()}/${total.toLocaleString()}`
: value.toLocaleString()}
</span>
)

Expand Down
7 changes: 0 additions & 7 deletions src/Shared/Components/CICDHistory/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/Shared/Components/LoadingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ interface LoadingCardType {

const LoadingCard = ({ wider }: LoadingCardType) => (
<div
// TODO: Remove margin and use gap
className={`flexbox-col ${wider ? 'w-250' : 'w-200'} bg__primary border__secondary-translucent br-8 mr-12 shadow__card--10`}
className={`flexbox-col ${wider ? 'w-250' : 'w-200'} bg__primary border__secondary-translucent br-8 shadow__card--10`}
>
<div className="flexbox-col dc__gap-8 px-12 pt-12 pb-8">
<span className="w-60 h-14 shimmer" />
Expand Down
5 changes: 3 additions & 2 deletions src/Shared/Helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -65,6 +65,7 @@ import {
IntersectionOptions,
Node,
Nodes,
PodMetaData,
TargetPlatformItemDTO,
TargetPlatformsDTO,
WebhookEventNameType,
Expand Down Expand Up @@ -298,7 +299,7 @@ export const renderValidInputButtonTippy = (children: ReactElement) => (
</Tippy>
)

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) => {
Expand Down
31 changes: 21 additions & 10 deletions src/Shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Node>
podMetadata: Array<PodMetaData>
status: string
podMetadata: PodMetaData[]
conditions?: any
releaseStatus?: HelmReleaseStatus
resourcesSyncResult?: Record<string, string>
hasDrift?: boolean
// lastSnapshotTime and wfrId are only available for isolated
lastSnapshotTime?: string
wfrId?: number
}

Expand All @@ -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
Expand All @@ -222,7 +227,7 @@ export interface AppDetails {
appStoreChartName?: string
appStoreInstalledAppVersionId?: number
ciArtifactId?: number
deprecated?: false
deprecated?: boolean
environmentId?: number
environmentName: string
installedAppId?: number
Expand Down Expand Up @@ -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<Pick<AppDetails, 'appId'>> {
Expand Down
Loading