@devtron-labs/devtron-fe-common-lib 0.0.28-beta-1 → 0.0.28-beta-2

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.
@@ -192,11 +192,6 @@ export interface UserApprovalMetadataType {
192
192
  approvedUsersData: ApprovalUserDataType[];
193
193
  requestedUserData: ApprovalUserDataType;
194
194
  }
195
- export declare enum FilterStates {
196
- BLOCKED = 0,
197
- ALLOWED = 1,
198
- ERROR = 2
199
- }
200
195
  export interface CDMaterialType {
201
196
  index: number;
202
197
  id: string;
@@ -222,7 +217,6 @@ export interface CDMaterialType {
222
217
  imageComment?: ImageComment;
223
218
  imageReleaseTags?: ReleaseTag[];
224
219
  artifactStatus?: string;
225
- filterState: FilterStates;
226
220
  }
227
221
  export interface CommonNodeAttr {
228
222
  connectingCiPipelineId?: number;
@@ -248,6 +242,7 @@ export interface CommonNodeAttr {
248
242
  colorCode?: string;
249
243
  isExternalCI?: boolean;
250
244
  isLinkedCI?: boolean;
245
+ isJobCI?: boolean;
251
246
  environmentName?: string;
252
247
  environmentId?: number;
253
248
  inputMaterialList?: any[];
package/dist/index.js CHANGED
@@ -424,12 +424,6 @@ exports.DeploymentNodeType = void 0;
424
424
  DeploymentNodeType["POSTCD"] = "POSTCD";
425
425
  DeploymentNodeType["APPROVAL"] = "APPROVAL";
426
426
  })(exports.DeploymentNodeType || (exports.DeploymentNodeType = {}));
427
- exports.FilterStates = void 0;
428
- (function (FilterStates) {
429
- FilterStates[FilterStates["BLOCKED"] = 0] = "BLOCKED";
430
- FilterStates[FilterStates["ALLOWED"] = 1] = "ALLOWED";
431
- FilterStates[FilterStates["ERROR"] = 2] = "ERROR";
432
- })(exports.FilterStates || (exports.FilterStates = {}));
433
427
  exports.DeploymentAppTypes = void 0;
434
428
  (function (DeploymentAppTypes) {
435
429
  DeploymentAppTypes["HELM"] = "helm";
@@ -22573,7 +22567,6 @@ function getUserRole(appName) {
22573
22567
  function setImageTags(request, pipelineId, artifactId) {
22574
22568
  return post("".concat(ROUTES.IMAGE_TAGGING, "/").concat(pipelineId, "/").concat(artifactId), request);
22575
22569
  }
22576
- // TODO: Add enum for filterState as well
22577
22570
  var getCDMaterials = function (cdMaterialId, stageType, abortSignal, isApprovalNode, imageTag) {
22578
22571
  var URL = (!imageTag) ? "app/cd-pipeline/".concat(cdMaterialId, "/material?stage=").concat(stageMap[stageType]) : "app/cd-pipeline/".concat(cdMaterialId, "/material?stage=").concat(stageMap[stageType], "&search=").concat(imageTag);
22579
22572
  return get(URL, {
@@ -22588,9 +22581,7 @@ var getCDMaterials = function (cdMaterialId, stageType, abortSignal, isApprovalN
22588
22581
  }
22589
22582
  else {
22590
22583
  var materials = artifacts.map(function (material, index) {
22591
- var _a;
22592
22584
  var artifactStatusValue = '';
22593
- var filterState = (_a = material.filterState) !== null && _a !== void 0 ? _a : exports.FilterStates.ALLOWED;
22594
22585
  return {
22595
22586
  index: index,
22596
22587
  id: material.id,
@@ -22610,7 +22601,7 @@ var getCDMaterials = function (cdMaterialId, stageType, abortSignal, isApprovalN
22610
22601
  vulnerabilitiesLoading: true,
22611
22602
  scanned: material.scanned,
22612
22603
  scanEnabled: material.scanEnabled,
22613
- isSelected: !material.vulnerable && filterState === exports.FilterStates.ALLOWED && index === 0,
22604
+ isSelected: !material.vulnerable && index === 0,
22614
22605
  vulnerable: material.vulnerable,
22615
22606
  runningOnParentCd: material.runningOnParentCd,
22616
22607
  artifactStatus: artifactStatusValue,
@@ -22637,7 +22628,6 @@ var getCDMaterials = function (cdMaterialId, stageType, abortSignal, isApprovalN
22637
22628
  };
22638
22629
  })
22639
22630
  : [],
22640
- filterState: filterState,
22641
22631
  };
22642
22632
  });
22643
22633
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.28-beta-1",
3
+ "version": "0.0.28-beta-2",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -2,7 +2,7 @@ import moment from 'moment';
2
2
  import {get, post} from './Api';
3
3
  import { ROUTES } from './Constants'
4
4
  import { sortCallback } from './Helper';
5
- import { TeamList ,ResponseType, DeploymentNodeType, CDModalTab, FilterStates } from './Types';
5
+ import { TeamList ,ResponseType, DeploymentNodeType, CDModalTab } from './Types';
6
6
 
7
7
  export const getTeamListMin = (): Promise<TeamList> => {
8
8
  // ignore active field
@@ -51,7 +51,6 @@ export function setImageTags(request, pipelineId: number, artifactId: number){
51
51
  return post(`${ROUTES.IMAGE_TAGGING}/${pipelineId}/${artifactId}`,request )
52
52
  }
53
53
 
54
- // TODO: Add enum for filterState as well
55
54
  export const getCDMaterials = (
56
55
  cdMaterialId,
57
56
  stageType: DeploymentNodeType,
@@ -72,8 +71,6 @@ export const getCDMaterials = (
72
71
  else {
73
72
  const materials = artifacts.map((material, index) => {
74
73
  let artifactStatusValue = ''
75
- const filterState = material.filterState ?? FilterStates.ALLOWED
76
-
77
74
  return {
78
75
  index,
79
76
  id: material.id,
@@ -93,7 +90,7 @@ export const getCDMaterials = (
93
90
  vulnerabilitiesLoading: true,
94
91
  scanned: material.scanned,
95
92
  scanEnabled: material.scanEnabled,
96
- isSelected: !material.vulnerable && filterState === FilterStates.ALLOWED && index === 0,
93
+ isSelected: !material.vulnerable && index === 0,
97
94
  vulnerable: material.vulnerable,
98
95
  runningOnParentCd: material.runningOnParentCd,
99
96
  artifactStatus: artifactStatusValue,
@@ -121,7 +118,6 @@ export const getCDMaterials = (
121
118
  }
122
119
  })
123
120
  : [],
124
- filterState,
125
121
  }
126
122
  })
127
123
  return {
@@ -215,11 +215,6 @@ export interface UserApprovalMetadataType {
215
215
  requestedUserData: ApprovalUserDataType
216
216
  }
217
217
 
218
- export enum FilterStates {
219
- BLOCKED = 0,
220
- ALLOWED = 1,
221
- ERROR = 2
222
- }
223
218
 
224
219
  export interface CDMaterialType {
225
220
  index: number
@@ -246,7 +241,6 @@ export interface CDMaterialType {
246
241
  imageComment?: ImageComment
247
242
  imageReleaseTags?: ReleaseTag[]
248
243
  artifactStatus?: string
249
- filterState: FilterStates;
250
244
  }
251
245
 
252
246
  export interface CommonNodeAttr {
@@ -273,6 +267,7 @@ export interface CommonNodeAttr {
273
267
  colorCode?: string
274
268
  isExternalCI?: boolean
275
269
  isLinkedCI?: boolean
270
+ isJobCI?: boolean // used for Job type CI in Devtron Apps
276
271
  environmentName?: string //used for CDs
277
272
  environmentId?: number
278
273
  inputMaterialList?: any[]