@devtron-labs/devtron-fe-common-lib 1.2.4-beta-2 → 1.2.4-beta-3

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.
@@ -2,7 +2,7 @@ import { j as n, J as A } from "./@vendor-RU8AW1bK.js";
2
2
  import E, { forwardRef as $ } from "react";
3
3
  import L, { getDefaultRegistry as k } from "@rjsf/core";
4
4
  import D from "@rjsf/validator-ajv8";
5
- import { T as y, c as H, a as J, d as w } from "./@code-editor-BV1AeIWi.js";
5
+ import { T as y, c as H, a as J, d as w } from "./@code-editor-DT9fzrvW.js";
6
6
  import M, { components as O } from "react-select";
7
7
  import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as U, ADDITIONAL_PROPERTY_FLAG as P, errorId as W, englishStringTranslator as V, TranslatableString as q, titleId as K, canExpand as Y, deepEquals as z } from "@rjsf/utils";
8
8
  import { ReactComponent as G } from "./assets/ic-chevron-down.fc70d7a7.svg";
@@ -1,6 +1,6 @@
1
1
  import { default as React, SyntheticEvent } from 'react';
2
2
  import { JSONPathOptions } from 'jsonpath-plus';
3
- import { AsyncOptions, UseSearchString } from './Types';
3
+ import { AsyncOptions, DeploymentNodeType, UseSearchString } from './Types';
4
4
  import { scrollableInterface } from '../Shared';
5
5
  export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
6
6
  interface ConditionalWrapper<T> {
@@ -133,4 +133,5 @@ export declare const getSanitizedIframe: (iframeString: string) => string;
133
133
  * This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
134
134
  */
135
135
  export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
136
+ export declare const getStageTitle: (stageType: DeploymentNodeType) => string;
136
137
  export {};
@@ -3,7 +3,7 @@ import { TippyProps } from '@tippyjs/react';
3
3
  import { Placement } from 'tippy.js';
4
4
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
5
5
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
6
- import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
6
+ import { MandatoryPluginBaseStateType, PolicyBlockInfo, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
7
7
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
8
8
  /**
9
9
  * Generic response type object with support for overriding the result type
@@ -432,6 +432,10 @@ export interface CDMaterialType {
432
432
  * Would currently only be received in case of release
433
433
  */
434
434
  appWorkflowId: number;
435
+ /**
436
+ * Denotes trigger blocking due to mandatory tags, (might be used for plugins and other features in future)
437
+ */
438
+ deploymentBlockedState?: PolicyBlockInfo;
435
439
  }
436
440
  export declare enum CDMaterialServiceEnum {
437
441
  ROLLBACK = "rollback",
@@ -468,6 +472,14 @@ export interface DownstreamNodesEnvironmentsType {
468
472
  environmentId: number;
469
473
  environmentName: string;
470
474
  }
475
+ export declare enum TriggerBlockType {
476
+ MANDATORY_TAG = "mandatory-tags",
477
+ MANDATORY_PLUGIN = "mandatory-plugins"
478
+ }
479
+ export interface TriggerBlockedInfo {
480
+ blockedBy: TriggerBlockType;
481
+ blockedReason?: string;
482
+ }
471
483
  export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTriggerBlocked' | 'pluginBlockState'> {
472
484
  connectingCiPipelineId?: number;
473
485
  parents: string | number[] | string[];
@@ -530,6 +542,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
530
542
  downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
531
543
  cipipelineId?: number;
532
544
  isDeploymentBlocked?: boolean;
545
+ triggerBlockedInfo?: TriggerBlockedInfo;
533
546
  }
534
547
  export declare enum DeploymentAppTypes {
535
548
  HELM = "helm",
@@ -593,6 +606,7 @@ export interface CDMaterialsMetaInfo {
593
606
  */
594
607
  requestedUserId: number;
595
608
  runtimeParams: RuntimeParamsListItemType[];
609
+ deploymentBlockedState?: PolicyBlockInfo;
596
610
  }
597
611
  export interface ImagePromotionMaterialInfo {
598
612
  isApprovalPendingForPromotion: boolean;
@@ -675,6 +689,7 @@ export interface CDStage {
675
689
  name: string;
676
690
  triggerType: 'AUTOMATIC' | 'MANUAL';
677
691
  config: string;
692
+ triggerBlockedInfo?: TriggerBlockedInfo;
678
693
  }
679
694
  export interface CDStageConfigMapSecretNames {
680
695
  configMaps: any[];
@@ -686,6 +701,7 @@ export interface PrePostDeployStageType extends MandatoryPluginBaseStateType {
686
701
  triggerType: string;
687
702
  name: string;
688
703
  status: string;
704
+ triggerBlockedInfo?: TriggerBlockedInfo;
689
705
  }
690
706
  export interface CdPipeline {
691
707
  id: number;
@@ -719,6 +735,8 @@ export interface CdPipeline {
719
735
  isProdEnv?: boolean;
720
736
  isGitOpsRepoNotConfigured?: boolean;
721
737
  isDeploymentBlocked?: boolean;
738
+ isTriggerBlocked?: boolean;
739
+ triggerBlockedInfo?: TriggerBlockedInfo;
722
740
  }
723
741
  export interface ExternalCiConfig {
724
742
  id: number;
@@ -1,5 +1,5 @@
1
1
  import { Dayjs } from 'dayjs';
2
- import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
2
+ import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType } from '../Common';
3
3
  import { KeyValueListType } from './Components';
4
4
  import { EnvironmentTypeEnum, PatchOperationType } from './constants';
5
5
  export declare enum EnvType {
@@ -739,4 +739,22 @@ export interface PreventOutsideFocusProps {
739
739
  identifier: string;
740
740
  preventFocus: boolean;
741
741
  }
742
+ export interface PolicyBlockInfo {
743
+ isBlocked: boolean;
744
+ blockedBy: TriggerBlockType;
745
+ reason: string;
746
+ }
747
+ export interface PipelineStageBlockInfo {
748
+ node: PolicyBlockInfo;
749
+ pre: PolicyBlockInfo;
750
+ post: PolicyBlockInfo;
751
+ }
752
+ export interface PolicyConsequencesDTO {
753
+ cd: PipelineStageBlockInfo;
754
+ ci: PipelineStageBlockInfo;
755
+ }
756
+ export interface GetPolicyConsequencesProps {
757
+ appId: number;
758
+ envId: number;
759
+ }
742
760
  export {};