Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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
5 changes: 3 additions & 2 deletions src/Shared/Helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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 @@ -63,6 +63,7 @@ import {
IntersectionOptions,
Node,
Nodes,
PodMetaData,
TargetPlatformItemDTO,
TargetPlatformsDTO,
WebhookEventNameType,
Expand Down Expand Up @@ -296,7 +297,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