@devtron-labs/devtron-fe-common-lib 1.21.0 → 1.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { j as n, au as T, aw as J, av as K } from "./@vendor-3ORIJA0h.js";
2
2
  import V, { useState as q, useEffect as Y, forwardRef as G, useMemo as E } from "react";
3
3
  import z, { getDefaultRegistry as Q } from "@rjsf/core";
4
- import { T as O, j as F, c as w, b as N, S as X, i as Z, g as ee, a as te, d as R, e as ne } from "./@code-editor-Br1iijm9.js";
4
+ import { T as O, j as F, c as w, b as N, S as X, i as Z, g as ee, a as te, d as R, e as ne } from "./@code-editor-C8nhIfoI.js";
5
5
  import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as re, ADDITIONAL_PROPERTY_FLAG as L, errorId as se, englishStringTranslator as ae, TranslatableString as oe, titleId as le, canExpand as ie, deepEquals as ce } from "@rjsf/utils";
6
6
  import { ReactComponent as de } from "./assets/ic-add.cfaa779b.svg";
7
7
  import { ReactComponent as ue } from "./assets/ic-warning.ecf7ff97.svg";
@@ -1,6 +1,6 @@
1
1
  import { QueryKey, UseMutationOptions, UseMutationResult, useQueryClient, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
2
  import { ServerErrors } from '../ServerError';
3
3
  import { ResponseType } from '../Types';
4
- export declare const useQuery: <TQueryFnData = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<ResponseType<TQueryFnData>, ServerErrors, TData, TQueryKey>) => UseQueryResult<TData, ServerErrors>;
4
+ export declare const useQuery: <TQueryFnData = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, WrapWithResponseType extends boolean = true>(options: UseQueryOptions<WrapWithResponseType extends true ? ResponseType<TQueryFnData> : TQueryFnData, ServerErrors, TData, TQueryKey>) => UseQueryResult<TData, ServerErrors>;
5
5
  export declare const useMutation: <TData = unknown, TVariables = void, TContext = unknown>(options: UseMutationOptions<ResponseType<TData>, ServerErrors, TVariables, TContext>) => UseMutationResult<ResponseType<TData>, ServerErrors, TVariables, TContext>;
6
6
  export { useQueryClient };
@@ -135,6 +135,7 @@ export declare const ROUTES: {
135
135
  readonly LICENSE_DATA: "license/data";
136
136
  readonly ENV: "env";
137
137
  readonly APP_METADATA: "app-metadata";
138
+ readonly RESOURCE_CONFLICTS_LIST: "app/:appId/cd-pipeline/:pipelineId/history/:wfrId/helm-ownership-conflicts";
138
139
  };
139
140
  export declare enum KEY_VALUE {
140
141
  KEY = "key",
@@ -0,0 +1,3 @@
1
+ import { ConflictedResourcesTableProps } from './types';
2
+ declare const ConflictedResourcesTable: ({ resourceConflictDetails }: ConflictedResourcesTableProps) => JSX.Element;
3
+ export default ConflictedResourcesTable;
@@ -0,0 +1,3 @@
1
+ import { ResourceConflictDeployDialogProps } from './types';
2
+ declare const ResourceConflictDeployDialog: ({ appName, environmentName, handleClose }: ResourceConflictDeployDialogProps) => JSX.Element;
3
+ export default ResourceConflictDeployDialog;
@@ -0,0 +1,3 @@
1
+ import { ResourceConflictDetailsModalProps } from './types';
2
+ declare const ResourceConflictDetailsModal: ({ appName, environmentName, handleClose }: ResourceConflictDetailsModalProps) => JSX.Element;
3
+ export default ResourceConflictDetailsModal;
@@ -1,3 +1,3 @@
1
1
  import { TriggerDetailsType } from './types';
2
- declare const TriggerDetails: import('react').MemoExoticComponent<({ status, startedOn, finishedOn, triggeredBy, triggeredByEmail, ciMaterials, gitTriggers, message, podStatus, type, stage, artifact, environmentName, isJobView, workerPodName, triggerMetadata, renderDeploymentHistoryTriggerMetaText, renderTargetConfigInfo, workflowExecutionStages, namespace, }: TriggerDetailsType) => JSX.Element>;
2
+ declare const TriggerDetails: import('react').MemoExoticComponent<({ status, startedOn, finishedOn, triggeredBy, triggeredByEmail, ciMaterials, gitTriggers, message, podStatus, type, stage, artifact, environmentName, isJobView, workerPodName, triggerMetadata, renderDeploymentHistoryTriggerMetaText, renderTargetConfigInfo, workflowExecutionStages, namespace, isLatest, appName, }: TriggerDetailsType) => JSX.Element>;
3
3
  export default TriggerDetails;
@@ -1,3 +1,3 @@
1
1
  import { WorkerStatusType } from './types';
2
- declare const WorkerStatus: import('react').MemoExoticComponent<({ message, podStatus, stage, workerPodName, finishedOn, clusterId, namespace, workerMessageContainerClassName, titleClassName, viewWorkerPodClassName, hideShowMoreMessageButton, }: WorkerStatusType) => JSX.Element | null>;
2
+ declare const WorkerStatus: import('react').MemoExoticComponent<({ message, podStatus, stage, workerPodName, finishedOn, clusterId, namespace, workerMessageContainerClassName, titleClassName, viewWorkerPodClassName, hideShowMoreMessageButton, children, }: WorkerStatusType) => JSX.Element | null>;
3
3
  export default WorkerStatus;
@@ -1,4 +1,5 @@
1
- import { WorkflowStageStatusType } from './types';
1
+ import { FiltersTypeEnum, TableProps } from '../Table';
2
+ import { ResourceConflictItemType, WorkflowStageStatusType } from './types';
2
3
  export declare const HISTORY_LABEL: {
3
4
  APPLICATION: string;
4
5
  ENVIRONMENT: string;
@@ -85,3 +86,5 @@ export declare const PROGRESSING_STATUS: {
85
86
  };
86
87
  export declare const FAILED_WORKFLOW_STAGE_STATUS_MAP: Record<Extract<WorkflowStageStatusType, WorkflowStageStatusType.ABORTED | WorkflowStageStatusType.FAILED | WorkflowStageStatusType.TIMEOUT>, true>;
87
88
  export declare const APP_HEALTH_DROP_DOWN_LIST: string[];
89
+ export declare const RESOURCE_CONFLICT_DEPLOY_ERROR = "cannot be imported into the current release: invalid ownership metadata;";
90
+ export declare const CONFLICTED_RESOURCES_COLUMNS: TableProps<ResourceConflictItemType, FiltersTypeEnum.STATE>['columns'];
@@ -1,5 +1,5 @@
1
1
  import { ResponseType } from '../../../Common';
2
- import { DeploymentHistoryDetail, DeploymentHistoryResult, DeploymentStatusDetailsResponse, ModuleConfigResponse, TriggerDetailsResponseType, TriggerHistoryParamsType } from './types';
2
+ import { DeploymentHistoryDetail, DeploymentHistoryResult, DeploymentStatusDetailsResponse, GetResourceConflictDetailsParamsType, ModuleConfigResponse, ResourceConflictItemType, ResourceConflictRedeployParamsType, TriggerDetailsResponseType, TriggerHistoryParamsType } from './types';
3
3
  export declare function getTriggerDetails({ appId, envId, pipelineId, triggerId, fetchIdData, }: {
4
4
  appId: any;
5
5
  envId: any;
@@ -21,3 +21,5 @@ export declare function getManualSync(params: {
21
21
  export declare const prepareHistoryData: (rawData: any, historyComponent: string, skipDecode?: boolean) => DeploymentHistoryDetail;
22
22
  export declare const getTriggerHistory: ({ appId, envId, pagination, releaseId, showCurrentReleaseDeployments, }: TriggerHistoryParamsType) => Promise<Pick<DeploymentHistoryResult, "result">>;
23
23
  export declare const getModuleConfigured: (moduleName: string) => Promise<ModuleConfigResponse>;
24
+ export declare const resourceConflictRedeploy: ({ pipelineId, triggerId, appId, }: ResourceConflictRedeployParamsType) => Promise<void>;
25
+ export declare const getResourceConflictDetails: ({ appId, pipelineId, triggerId, signal, }: GetResourceConflictDetailsParamsType) => Promise<ResourceConflictItemType[]>;
@@ -1,8 +1,9 @@
1
1
  import { CSSProperties, MutableRefObject, ReactElement, ReactNode } from 'react';
2
2
  import { SupportedKeyboardKeysType } from '../../../Common/Hooks/UseRegisterShortcut/types';
3
+ import { GVKType } from '../../../Pages/ResourceBrowser';
3
4
  import { DeploymentAppTypes, FilterConditionsListType, ImageComment, OptionType, PaginationProps, PromotionApprovalMetadataType, ReleaseTag, ResponseType, TooltipProps, UserApprovalMetadataType, useScrollable } from '../../../Common';
4
5
  import { DeploymentStageType } from '../../constants';
5
- import { AggregationKeys, AppDetails, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, DeploymentStatusTimelineType, DeploymentStrategyType, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType, TargetPlatformsDTO } from '../../types';
6
+ import { AggregationKeys, AppDetails, BaseURLParams, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, DeploymentStatusTimelineType, DeploymentStrategyType, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType, TargetPlatformsDTO } from '../../types';
6
7
  import { TargetPlatformBadgeListProps } from '../TargetPlatforms';
7
8
  export declare enum HistoryComponentType {
8
9
  CI = "CI",
@@ -257,6 +258,29 @@ export interface TriggerDetailsType extends Pick<StartDetailsType, 'renderTarget
257
258
  workerPodName?: string;
258
259
  triggerMetadata?: string;
259
260
  renderDeploymentHistoryTriggerMetaText: (triggerMetaData: string, onlyRenderIcon?: boolean) => JSX.Element;
261
+ /**
262
+ * Only present in case of CD trigger details as of now
263
+ */
264
+ isLatest?: boolean;
265
+ /**
266
+ * Only present in case of CD trigger details as of now
267
+ */
268
+ appName?: string;
269
+ }
270
+ export declare enum ResourceConflictModalType {
271
+ DEPLOY_DIALOG = "DEPLOY_DIALOG",
272
+ RESOURCE_DETAIL_MODAL = "RESOURCE_DETAIL_MODAL"
273
+ }
274
+ interface ResourceConflictDialogBaseProps extends Required<Pick<TriggerDetailsType, 'appName' | 'environmentName'>> {
275
+ handleClose: () => void;
276
+ }
277
+ export interface ResourceConflictDeployDialogProps extends ResourceConflictDialogBaseProps {
278
+ }
279
+ export interface ResourceConflictDetailsModalProps extends ResourceConflictDialogBaseProps {
280
+ }
281
+ export interface TriggerOutputURLParamsType extends Pick<BaseURLParams, 'appId' | 'envId'> {
282
+ triggerId: string;
283
+ pipelineId: string;
260
284
  }
261
285
  export type ProgressingStatusType = {
262
286
  stage: DeploymentStageType;
@@ -283,6 +307,7 @@ export interface WorkerStatusType extends Pick<ExecutionInfoType['workerDetails'
283
307
  * @default false
284
308
  */
285
309
  hideShowMoreMessageButton?: boolean;
310
+ children?: ReactNode;
286
311
  }
287
312
  export type FinishedType = {
288
313
  artifact: string;
@@ -703,4 +728,43 @@ export interface CIPipelineSourceConfigInterface {
703
728
  primaryBranchAfterRegex?: string;
704
729
  rootClassName?: string;
705
730
  }
731
+ export interface ResourceConflictItemType {
732
+ name: string;
733
+ namespace: string;
734
+ gvk: GVKType;
735
+ gvkTitle: string;
736
+ clusterId: number;
737
+ /**
738
+ * Generated at ui
739
+ */
740
+ id: string;
741
+ }
742
+ export interface ConflictedResourcesTableProps {
743
+ resourceConflictDetails: ResourceConflictItemType[];
744
+ }
745
+ export interface ResourceConflictDeployDialogURLParamsType extends Pick<TriggerOutputURLParamsType, 'appId' | 'envId' | 'pipelineId' | 'triggerId'> {
746
+ }
747
+ export interface ResourceConflictRedeployParamsType extends Pick<ResourceConflictDeployDialogURLParamsType, 'pipelineId' | 'triggerId' | 'appId'> {
748
+ }
749
+ export interface ResourceConflictRedeployPayloadType {
750
+ pipelineId: number;
751
+ appId: number;
752
+ wfrIdForDeploymentWithSpecificTrigger: number;
753
+ helmRedeploymentRequest: true;
754
+ }
755
+ export interface GetResourceConflictDetailsParamsType extends Pick<ResourceConflictDeployDialogURLParamsType, 'pipelineId' | 'triggerId' | 'appId'> {
756
+ signal: AbortSignal;
757
+ }
758
+ export interface ResourceConflictListItemDTO {
759
+ clusterId: number;
760
+ conflictingResources: {
761
+ name: string;
762
+ namespace: string;
763
+ groupVersionKind: {
764
+ Group: string;
765
+ Version: string;
766
+ Kind: NodeType;
767
+ };
768
+ }[];
769
+ }
706
770
  export {};
@@ -40,3 +40,4 @@ export declare const getTriggerStatusIcon: (status: string) => string;
40
40
  export declare const renderDeploymentTimelineIcon: (iconState: DeploymentStatusBreakdownItemType["icon"]) => JSX.Element;
41
41
  export declare const getDeploymentTimelineBGColorFromIcon: (icon: DeploymentStatusBreakdownItemType["icon"]) => string;
42
42
  export declare const getTriggerOutputTabs: (triggerDetails: History, deploymentAppType: DeploymentAppTypes) => TabGroupProps["tabs"];
43
+ export declare const getSortedTriggerHistory: (triggerHistory: Map<number, History>) => [number, History][];
@@ -4,6 +4,7 @@ import { StrictRJSFSchema } from '@rjsf/utils';
4
4
  import { Pair } from 'yaml';
5
5
  import { MaterialHistoryType } from './Services/app.types';
6
6
  import { ApprovalConfigDataType, MaterialInfo, SortingOrder, UserApprovalConfigType, UserApprovalInfo } from '../Common';
7
+ import { GVKType } from '../Pages';
7
8
  import { AggregatedNodes, PodMetadatum } from './Components';
8
9
  import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, Node, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
9
10
  interface HighlightSearchTextProps {
@@ -103,4 +104,5 @@ export declare const clearCookieOnLogout: () => void;
103
104
  export declare const getAppDetailsURL: (appId: number | string, envId?: number | string) => string;
104
105
  export declare const smoothScrollToTop: (scrollContainer: HTMLElement, targetPosition: number) => import('framer-motion').AnimationPlaybackControls;
105
106
  export declare const getGroupVersionFromApiVersion: (apiVersion: string) => Pick<Node, "group" | "version">;
107
+ export declare const getGVKTitle: (gvk: GVKType) => string;
106
108
  export {};