@devtron-labs/devtron-fe-common-lib 1.0.11 → 1.1.0-patch-1-beta-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.
Files changed (31) hide show
  1. package/dist/Common/Constants.d.ts +4 -0
  2. package/dist/Pages/ResourceBrowser/Helper.d.ts +11 -0
  3. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +44 -1
  4. package/dist/Pages/ResourceBrowser/constants.d.ts +4 -0
  5. package/dist/Pages/ResourceBrowser/index.d.ts +1 -0
  6. package/dist/Pages/ResourceBrowser/service.d.ts +2 -1
  7. package/dist/Shared/Components/BulkSelection/BulkSelection.d.ts +1 -1
  8. package/dist/Shared/Components/BulkSelection/types.d.ts +4 -0
  9. package/dist/Shared/Components/NumbersCount/NumbersCount.component.d.ts +3 -0
  10. package/dist/Shared/Components/NumbersCount/index.d.ts +1 -0
  11. package/dist/Shared/Components/NumbersCount/types.d.ts +13 -0
  12. package/dist/Shared/Components/index.d.ts +1 -0
  13. package/dist/{cssMode-D377I1wG.js → cssMode-wq7he3X0.js} +1 -1
  14. package/dist/{freemarker2-CRS-UYqe.js → freemarker2-0XllovSw.js} +1 -1
  15. package/dist/{handlebars-NzP2uR49.js → handlebars-70p5yuo3.js} +1 -1
  16. package/dist/{html-DB1mVxb-.js → html-D2SJaeWO.js} +1 -1
  17. package/dist/{htmlMode-SNasYE4z.js → htmlMode-Cjtp6vHA.js} +1 -1
  18. package/dist/{index-Y72wmNul.js → index-DaVaeiHs.js} +18115 -18094
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.js +611 -606
  21. package/dist/{javascript-Dwb4sZFi.js → javascript-9U19IEIL.js} +1 -1
  22. package/dist/{jsonMode-CCk0-ZN_.js → jsonMode-DrAoDU1z.js} +1 -1
  23. package/dist/{liquid-9jGwTnWc.js → liquid-RDTvQkn7.js} +1 -1
  24. package/dist/{mdx-ByXK0Ej3.js → mdx-DyyrZSAA.js} +1 -1
  25. package/dist/{python-CF0zSstS.js → python-BzA1tPNm.js} +1 -1
  26. package/dist/{razor-kKmZnFzU.js → razor-BllM7Vkg.js} +1 -1
  27. package/dist/{tsMode-CXH7Hlza.js → tsMode-DUzWpQw6.js} +1 -1
  28. package/dist/{typescript-c57zh6eL.js → typescript-Dys6G0CW.js} +1 -1
  29. package/dist/{xml-sO0NebH6.js → xml-DRQf4V_J.js} +1 -1
  30. package/dist/{yaml-Cu-yIVBN.js → yaml-DWBkuqkp.js} +1 -1
  31. package/package.json +1 -1
@@ -47,6 +47,7 @@ export declare const URLS: {
47
47
  NETWORK_STATUS_INTERFACE: string;
48
48
  CONFIG_DRIFT: string;
49
49
  RESOURCE_BROWSER: string;
50
+ COMPARE_CLUSTERS: string;
50
51
  };
51
52
  export declare const ROUTES: {
52
53
  APP: string;
@@ -55,6 +56,8 @@ export declare const ROUTES: {
55
56
  PROJECT_LIST_MIN: string;
56
57
  USER_CHECK_ROLE: string;
57
58
  IMAGE_TAGGING: string;
59
+ CREATE_RESOURCE: string;
60
+ K8S_RESOURCE_CREATE: string;
58
61
  CI_CONFIG_GET: string;
59
62
  CD_MATERIAL_GET: string;
60
63
  DEPLOYMENT_TEMPLATE_LIST: string;
@@ -93,6 +96,7 @@ export declare const ROUTES: {
93
96
  DEPLOYMENT_CHARTS_LIST: string;
94
97
  USER_LIST_MIN: string;
95
98
  CONFIG_DATA: string;
99
+ K8S_RESOURCE: string;
96
100
  K8S_RESOURCE_LIST: string;
97
101
  };
98
102
  export declare enum KEY_VALUE {
@@ -1,2 +1,13 @@
1
1
  import { AggregationKeys, NodeType } from '../../Shared';
2
+ import { ApiResourceGroupType, CreateResourceRequestBodyParamsType, CreateResourceRequestBodyType } from './ResourceBrowser.Types';
2
3
  export declare function getAggregator(nodeType: NodeType, defaultAsOtherResources?: boolean): AggregationKeys;
4
+ export declare const getK8sResourceListPayload: (clusterId: string, namespace: string, selectedResource: ApiResourceGroupType, filters: object) => {
5
+ clusterId: number;
6
+ k8sRequest: {
7
+ resourceIdentifier: {
8
+ namespace: string;
9
+ groupVersionKind: import('./ResourceBrowser.Types').GVKType;
10
+ };
11
+ };
12
+ };
13
+ export declare const createResourceRequestBody: ({ clusterId, group, version, kind, name, namespace, updatedManifest, }: CreateResourceRequestBodyParamsType) => CreateResourceRequestBodyType;
@@ -49,12 +49,25 @@ export interface BulkSelectionActionWidgetProps {
49
49
  parentRef: RefObject<HTMLDivElement>;
50
50
  showBulkRestartOption: boolean;
51
51
  }
52
+ interface BulkOperationAdditionalKeysType {
53
+ label: string;
54
+ value: string;
55
+ isSortable: boolean;
56
+ /**
57
+ * width to be given in gridTemplateColumns
58
+ */
59
+ width: string;
60
+ }
52
61
  export interface BulkOperation {
53
62
  name: string;
63
+ /**
64
+ * Would these keys beside the name
65
+ */
66
+ additionalKeys?: BulkOperationAdditionalKeysType[];
54
67
  operation: (signal: AbortSignal, data?: unknown) => Promise<void>;
55
68
  }
56
69
  export type BulkOperationModalProps = {
57
- operationType: 'restart' | 'delete';
70
+ operationType: 'restart' | 'delete' | 'creation';
58
71
  clusterName: string;
59
72
  operations: NonNullable<BulkOperation[]>;
60
73
  handleModalClose: () => void;
@@ -64,4 +77,34 @@ export type BulkOperationModalProps = {
64
77
  shouldAllowForceOperation?: true;
65
78
  };
66
79
  export type BulkOperationModalState = BulkOperationModalProps['operationType'] | 'closed';
80
+ export interface CreateResourceRequestBodyType {
81
+ appId: string;
82
+ clusterId: number;
83
+ k8sRequest: {
84
+ resourceIdentifier: Required<K8sRequestResourceIdentifierType>;
85
+ patch?: string;
86
+ };
87
+ }
88
+ export interface ResourceManifestDTO {
89
+ manifestResponse: {
90
+ manifest: Record<string, unknown>;
91
+ };
92
+ secretViewAccess: boolean;
93
+ }
94
+ export interface CreateResourceRequestBodyParamsType extends Pick<CreateResourceRequestBodyType, 'clusterId'>, Required<Pick<K8sRequestResourceIdentifierType, 'name' | 'namespace'>> {
95
+ updatedManifest?: string;
96
+ group: GVKType['Group'];
97
+ version: GVKType['Version'];
98
+ kind: GVKType['Kind'];
99
+ }
100
+ export interface CreateResourcePayload {
101
+ clusterId: number;
102
+ manifest: string;
103
+ }
104
+ export interface CreateResourceDTO {
105
+ kind: string;
106
+ name: string;
107
+ isUpdate: boolean;
108
+ error: string;
109
+ }
67
110
  export {};
@@ -0,0 +1,4 @@
1
+ export declare const ALL_NAMESPACE_OPTION: {
2
+ value: string;
3
+ label: string;
4
+ };
@@ -1,4 +1,5 @@
1
1
  export * from './ResourceBrowser.Types';
2
2
  export * from './Helper';
3
+ export * from './constants';
3
4
  export * from './types';
4
5
  export * from './service';
@@ -1,3 +1,4 @@
1
1
  import { ResponseType } from '../../Common/Types';
2
- import { K8sResourceDetailType, K8sResourceListPayloadType } from './ResourceBrowser.Types';
2
+ import { CreateResourceDTO, CreateResourcePayload, K8sResourceDetailType, K8sResourceListPayloadType } from './ResourceBrowser.Types';
3
3
  export declare const getK8sResourceList: (resourceListPayload: K8sResourceListPayloadType, signal?: AbortSignal) => Promise<ResponseType<K8sResourceDetailType>>;
4
+ export declare const createNewResource: (resourceListPayload: CreateResourcePayload) => Promise<ResponseType<CreateResourceDTO[]>>;
@@ -1,3 +1,3 @@
1
1
  import { BulkSelectionProps } from './types';
2
- declare const BulkSelection: <T>({ showPagination, disabled }: BulkSelectionProps) => JSX.Element;
2
+ declare const BulkSelection: <T>({ showPagination, disabled, showChevronDownIcon }: BulkSelectionProps) => JSX.Element;
3
3
  export default BulkSelection;
@@ -28,6 +28,10 @@ export interface UseBulkSelectionReturnType<T> extends GetBulkSelectionCheckboxV
28
28
  }
29
29
  export interface BulkSelectionProps {
30
30
  showPagination: boolean;
31
+ /**
32
+ * @default true
33
+ */
34
+ showChevronDownIcon?: boolean;
31
35
  disabled?: boolean;
32
36
  }
33
37
  export interface BulkSelectionDropdownItemsType {
@@ -0,0 +1,3 @@
1
+ import { NumbersCountProps } from './types';
2
+ declare const NumbersCount: ({ count, isApprox, isSelected }: NumbersCountProps) => JSX.Element;
3
+ export default NumbersCount;
@@ -0,0 +1 @@
1
+ export { default as NumbersCount } from './NumbersCount.component';
@@ -0,0 +1,13 @@
1
+ export interface NumbersCountProps {
2
+ count: number;
3
+ /**
4
+ * @default false
5
+ * @description If true, it will change the bgColor to var(--B500)
6
+ */
7
+ isSelected?: boolean;
8
+ /**
9
+ * @default false
10
+ * @description If true, it will show the count with tilde like ~number
11
+ */
12
+ isApprox?: boolean;
13
+ }
@@ -41,3 +41,4 @@ export * from './Collapse';
41
41
  export * from './Security';
42
42
  export * from './Button';
43
43
  export * from './InvalidYAMLTippy';
44
+ export * from './NumbersCount';
@@ -1,7 +1,7 @@
1
1
  var Fe = Object.defineProperty;
2
2
  var Le = (e, n, i) => n in e ? Fe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => Le(e, typeof n != "symbol" ? n + "" : n, i);
4
- import { m as je } from "./index-Y72wmNul.js";
4
+ import { m as je } from "./index-DaVaeiHs.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as f } from "./index-Y72wmNul.js";
1
+ import { m as f } from "./index-DaVaeiHs.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./index-Y72wmNul.js";
1
+ import { m as l } from "./index-DaVaeiHs.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as s } from "./index-Y72wmNul.js";
1
+ import { m as s } from "./index-DaVaeiHs.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,7 +1,7 @@
1
1
  var Be = Object.defineProperty;
2
2
  var $e = (e, n, i) => n in e ? Be(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => $e(e, typeof n != "symbol" ? n + "" : n, i);
4
- import { m as qe } from "./index-Y72wmNul.js";
4
+ import { m as qe } from "./index-DaVaeiHs.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)