@devtron-labs/devtron-fe-common-lib 0.0.16-beta-2 → 0.0.16

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,3 +1,4 @@
1
+ import { RegistryTypeDetailType } from "./Types";
1
2
  export declare const RequestTimeout = 60000;
2
3
  export declare const Host: string;
3
4
  export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
@@ -55,3 +56,4 @@ export declare const BuildStageVariable: {
55
56
  Build: string;
56
57
  PostBuild: string;
57
58
  };
59
+ export declare const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType>;
@@ -1,21 +1,4 @@
1
1
  import React from 'react';
2
- export interface InputDetailType {
3
- label: string;
4
- defaultValue: string;
5
- placeholder: string;
6
- }
7
- export interface RegistryTypeDetailType {
8
- value: string;
9
- label: string;
10
- desiredFormat: string;
11
- placeholderText: string;
12
- gettingStartedLink: string;
13
- defaultRegistryURL: string;
14
- registryURL: InputDetailType;
15
- id: InputDetailType;
16
- password: InputDetailType;
17
- }
18
- export declare const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType>;
19
2
  export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
20
3
  interface ConditionalWrapper<T> {
21
4
  condition: boolean;
@@ -315,4 +315,20 @@ export interface CDMaterialResponseType {
315
315
  appReleaseTagNames: string[];
316
316
  hideImageTaggingHardDelete: boolean;
317
317
  }
318
+ export interface InputDetailType {
319
+ label: string;
320
+ defaultValue: string;
321
+ placeholder: string;
322
+ }
323
+ export interface RegistryTypeDetailType {
324
+ value: string;
325
+ label: string;
326
+ desiredFormat: string;
327
+ placeholderText: string;
328
+ gettingStartedLink: string;
329
+ defaultRegistryURL: string;
330
+ registryURL: InputDetailType;
331
+ id: InputDetailType;
332
+ password: InputDetailType;
333
+ }
318
334
  export {};
package/dist/index.js CHANGED
@@ -82,6 +82,169 @@ var BuildStageVariable = {
82
82
  PreBuild: 'preBuildStage',
83
83
  Build: 'buildStage',
84
84
  PostBuild: 'postBuildStage',
85
+ };
86
+ var REGISTRY_TYPE_MAP = {
87
+ ecr: {
88
+ value: 'ecr',
89
+ label: 'ECR',
90
+ desiredFormat: '(desired format: repo-name)',
91
+ placeholderText: 'Eg. repo_name',
92
+ gettingStartedLink: 'https://docs.aws.amazon.com/AmazonECR/latest/userguide/get-set-up-for-amazon-ecr.html',
93
+ defaultRegistryURL: '',
94
+ registryURL: {
95
+ label: 'Registry URL',
96
+ defaultValue: '',
97
+ placeholder: 'Eg. xxxxxxxxxxxx.dkr.ecr.region.amazonaws.com',
98
+ },
99
+ id: {
100
+ label: 'Access key ID',
101
+ defaultValue: '',
102
+ placeholder: '',
103
+ },
104
+ password: {
105
+ label: 'Secret access key',
106
+ defaultValue: '',
107
+ placeholder: '',
108
+ },
109
+ },
110
+ 'docker-hub': {
111
+ value: 'docker-hub',
112
+ label: 'Docker',
113
+ desiredFormat: '(desired format: username/repo-name)',
114
+ placeholderText: 'Eg. username/repo_name',
115
+ gettingStartedLink: 'https://docs.docker.com/docker-hub/',
116
+ defaultRegistryURL: 'docker.io',
117
+ registryURL: {
118
+ label: 'Registry URL',
119
+ defaultValue: 'docker.io',
120
+ placeholder: '',
121
+ },
122
+ id: {
123
+ label: 'Username',
124
+ defaultValue: '',
125
+ placeholder: '',
126
+ },
127
+ password: {
128
+ label: 'Password/Token (Recommended: Token)',
129
+ defaultValue: '',
130
+ placeholder: '',
131
+ },
132
+ },
133
+ acr: {
134
+ value: 'acr',
135
+ label: 'Azure',
136
+ desiredFormat: '(desired format: repo-name)',
137
+ placeholderText: 'Eg. repo_name',
138
+ gettingStartedLink: 'https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal',
139
+ defaultRegistryURL: '',
140
+ registryURL: {
141
+ label: 'Registry URL/Login Server',
142
+ defaultValue: '',
143
+ placeholder: 'Eg. xxx.azurecr.io',
144
+ },
145
+ id: {
146
+ label: 'Username/Registry Name',
147
+ defaultValue: '',
148
+ placeholder: '',
149
+ },
150
+ password: {
151
+ label: 'Password',
152
+ defaultValue: '',
153
+ placeholder: '',
154
+ },
155
+ },
156
+ 'artifact-registry': {
157
+ value: 'artifact-registry',
158
+ label: 'Artifact Registry (GCP)',
159
+ desiredFormat: '(desired format: project-id/artifacts-repo/repo-name)',
160
+ placeholderText: 'Eg. project-id/artifacts-repo/repo-name',
161
+ gettingStartedLink: 'https://cloud.google.com/artifact-registry/docs/manage-repos?hl=en_US',
162
+ defaultRegistryURL: '',
163
+ registryURL: {
164
+ label: 'Registry URL',
165
+ defaultValue: '',
166
+ placeholder: 'Eg. region-docker.pkg.dev',
167
+ },
168
+ id: {
169
+ label: 'Username',
170
+ defaultValue: '_json_key',
171
+ placeholder: '',
172
+ },
173
+ password: {
174
+ label: 'Service Account JSON File',
175
+ defaultValue: '',
176
+ placeholder: 'Paste json file content here',
177
+ },
178
+ },
179
+ gcr: {
180
+ value: 'gcr',
181
+ label: 'GCR',
182
+ desiredFormat: '(desired format: project-id/repo-name)',
183
+ placeholderText: 'Eg. project-id/repo_name',
184
+ gettingStartedLink: 'https://cloud.google.com/container-registry/docs/quickstart',
185
+ defaultRegistryURL: 'gcr.io',
186
+ registryURL: {
187
+ label: 'Registry URL',
188
+ defaultValue: 'gcr.io',
189
+ placeholder: '',
190
+ },
191
+ id: {
192
+ label: 'Username',
193
+ defaultValue: '_json_key',
194
+ placeholder: '',
195
+ },
196
+ password: {
197
+ label: 'Service Account JSON File',
198
+ defaultValue: '',
199
+ placeholder: 'Paste json file content here',
200
+ },
201
+ },
202
+ quay: {
203
+ value: 'quay',
204
+ label: 'Quay',
205
+ desiredFormat: '(desired format: username/repo-name)',
206
+ placeholderText: 'Eg. username/repo_name',
207
+ gettingStartedLink: '',
208
+ defaultRegistryURL: 'quay.io',
209
+ registryURL: {
210
+ label: 'Registry URL',
211
+ defaultValue: 'quay.io',
212
+ placeholder: '',
213
+ },
214
+ id: {
215
+ label: 'Username',
216
+ defaultValue: '',
217
+ placeholder: '',
218
+ },
219
+ password: {
220
+ label: 'Token',
221
+ defaultValue: '',
222
+ placeholder: '',
223
+ },
224
+ },
225
+ other: {
226
+ value: 'other',
227
+ label: 'Other',
228
+ desiredFormat: '',
229
+ placeholderText: '',
230
+ gettingStartedLink: '',
231
+ defaultRegistryURL: '',
232
+ registryURL: {
233
+ label: 'Registry URL',
234
+ defaultValue: '',
235
+ placeholder: '',
236
+ },
237
+ id: {
238
+ label: 'Username',
239
+ defaultValue: '',
240
+ placeholder: '',
241
+ },
242
+ password: {
243
+ label: 'Password/Token',
244
+ defaultValue: '',
245
+ placeholder: '',
246
+ },
247
+ },
85
248
  };
86
249
 
87
250
  /******************************************************************************
@@ -9666,169 +9829,6 @@ toast.configure({
9666
9829
  toastClassName: 'devtron-toast',
9667
9830
  bodyClassName: 'devtron-toast__body',
9668
9831
  });
9669
- var REGISTRY_TYPE_MAP = {
9670
- ecr: {
9671
- value: 'ecr',
9672
- label: 'ECR',
9673
- desiredFormat: '(desired format: repo-name)',
9674
- placeholderText: 'Eg. repo_name',
9675
- gettingStartedLink: 'https://docs.aws.amazon.com/AmazonECR/latest/userguide/get-set-up-for-amazon-ecr.html',
9676
- defaultRegistryURL: '',
9677
- registryURL: {
9678
- label: 'Registry URL',
9679
- defaultValue: '',
9680
- placeholder: 'Eg. xxxxxxxxxxxx.dkr.ecr.region.amazonaws.com',
9681
- },
9682
- id: {
9683
- label: 'Access key ID',
9684
- defaultValue: '',
9685
- placeholder: '',
9686
- },
9687
- password: {
9688
- label: 'Secret access key',
9689
- defaultValue: '',
9690
- placeholder: '',
9691
- },
9692
- },
9693
- 'docker-hub': {
9694
- value: 'docker-hub',
9695
- label: 'Docker',
9696
- desiredFormat: '(desired format: username/repo-name)',
9697
- placeholderText: 'Eg. username/repo_name',
9698
- gettingStartedLink: 'https://docs.docker.com/docker-hub/',
9699
- defaultRegistryURL: 'docker.io',
9700
- registryURL: {
9701
- label: 'Registry URL',
9702
- defaultValue: 'docker.io',
9703
- placeholder: '',
9704
- },
9705
- id: {
9706
- label: 'Username',
9707
- defaultValue: '',
9708
- placeholder: '',
9709
- },
9710
- password: {
9711
- label: 'Password/Token (Recommended: Token)',
9712
- defaultValue: '',
9713
- placeholder: '',
9714
- },
9715
- },
9716
- acr: {
9717
- value: 'acr',
9718
- label: 'Azure',
9719
- desiredFormat: '(desired format: repo-name)',
9720
- placeholderText: 'Eg. repo_name',
9721
- gettingStartedLink: 'https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal',
9722
- defaultRegistryURL: '',
9723
- registryURL: {
9724
- label: 'Registry URL/Login Server',
9725
- defaultValue: '',
9726
- placeholder: 'Eg. xxx.azurecr.io',
9727
- },
9728
- id: {
9729
- label: 'Username/Registry Name',
9730
- defaultValue: '',
9731
- placeholder: '',
9732
- },
9733
- password: {
9734
- label: 'Password',
9735
- defaultValue: '',
9736
- placeholder: '',
9737
- },
9738
- },
9739
- 'artifact-registry': {
9740
- value: 'artifact-registry',
9741
- label: 'Artifact Registry (GCP)',
9742
- desiredFormat: '(desired format: project-id/artifacts-repo/repo-name)',
9743
- placeholderText: 'Eg. project-id/artifacts-repo/repo-name',
9744
- gettingStartedLink: 'https://cloud.google.com/artifact-registry/docs/manage-repos?hl=en_US',
9745
- defaultRegistryURL: '',
9746
- registryURL: {
9747
- label: 'Registry URL',
9748
- defaultValue: '',
9749
- placeholder: 'Eg. region-docker.pkg.dev',
9750
- },
9751
- id: {
9752
- label: 'Username',
9753
- defaultValue: '_json_key',
9754
- placeholder: '',
9755
- },
9756
- password: {
9757
- label: 'Service Account JSON File',
9758
- defaultValue: '',
9759
- placeholder: 'Paste json file content here',
9760
- },
9761
- },
9762
- gcr: {
9763
- value: 'gcr',
9764
- label: 'GCR',
9765
- desiredFormat: '(desired format: project-id/repo-name)',
9766
- placeholderText: 'Eg. project-id/repo_name',
9767
- gettingStartedLink: 'https://cloud.google.com/container-registry/docs/quickstart',
9768
- defaultRegistryURL: 'gcr.io',
9769
- registryURL: {
9770
- label: 'Registry URL',
9771
- defaultValue: 'gcr.io',
9772
- placeholder: '',
9773
- },
9774
- id: {
9775
- label: 'Username',
9776
- defaultValue: '_json_key',
9777
- placeholder: '',
9778
- },
9779
- password: {
9780
- label: 'Service Account JSON File',
9781
- defaultValue: '',
9782
- placeholder: 'Paste json file content here',
9783
- },
9784
- },
9785
- quay: {
9786
- value: 'quay',
9787
- label: 'Quay',
9788
- desiredFormat: '(desired format: username/repo-name)',
9789
- placeholderText: 'Eg. username/repo_name',
9790
- gettingStartedLink: '',
9791
- defaultRegistryURL: 'quay.io',
9792
- registryURL: {
9793
- label: 'Registry URL',
9794
- defaultValue: 'quay.io',
9795
- placeholder: '',
9796
- },
9797
- id: {
9798
- label: 'Username',
9799
- defaultValue: '',
9800
- placeholder: '',
9801
- },
9802
- password: {
9803
- label: 'Token',
9804
- defaultValue: '',
9805
- placeholder: '',
9806
- },
9807
- },
9808
- other: {
9809
- value: 'other',
9810
- label: 'Other',
9811
- desiredFormat: '',
9812
- placeholderText: '',
9813
- gettingStartedLink: '',
9814
- defaultRegistryURL: '',
9815
- registryURL: {
9816
- label: 'Registry URL',
9817
- defaultValue: '',
9818
- placeholder: '',
9819
- },
9820
- id: {
9821
- label: 'Username',
9822
- defaultValue: '',
9823
- placeholder: '',
9824
- },
9825
- password: {
9826
- label: 'Password/Token',
9827
- defaultValue: '',
9828
- placeholder: '',
9829
- },
9830
- },
9831
- };
9832
9832
  function showError(serverError, showToastOnUnknownError, hideAccessError) {
9833
9833
  if (showToastOnUnknownError === void 0) { showToastOnUnknownError = true; }
9834
9834
  if (hideAccessError === void 0) { hideAccessError = false; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.16-beta-2",
3
+ "version": "0.0.16",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,3 +1,5 @@
1
+ import { RegistryTypeDetailType } from "./Types"
2
+
1
3
  export const RequestTimeout = 60000
2
4
  export const Host = process.env.REACT_APP_ORCHESTRATOR_ROOT
3
5
 
@@ -65,4 +67,169 @@ export const BuildStageVariable = {
65
67
  PreBuild: 'preBuildStage',
66
68
  Build: 'buildStage',
67
69
  PostBuild: 'postBuildStage',
70
+ }
71
+
72
+ export const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType> = {
73
+ ecr: {
74
+ value: 'ecr',
75
+ label: 'ECR',
76
+ desiredFormat: '(desired format: repo-name)',
77
+ placeholderText: 'Eg. repo_name',
78
+ gettingStartedLink: 'https://docs.aws.amazon.com/AmazonECR/latest/userguide/get-set-up-for-amazon-ecr.html',
79
+ defaultRegistryURL: '',
80
+ registryURL: {
81
+ label: 'Registry URL',
82
+ defaultValue: '',
83
+ placeholder: 'Eg. xxxxxxxxxxxx.dkr.ecr.region.amazonaws.com',
84
+ },
85
+ id: {
86
+ label: 'Access key ID',
87
+ defaultValue: '',
88
+ placeholder: '',
89
+ },
90
+ password: {
91
+ label: 'Secret access key',
92
+ defaultValue: '',
93
+ placeholder: '',
94
+ },
95
+ },
96
+ 'docker-hub': {
97
+ value: 'docker-hub',
98
+ label: 'Docker',
99
+ desiredFormat: '(desired format: username/repo-name)',
100
+ placeholderText: 'Eg. username/repo_name',
101
+ gettingStartedLink: 'https://docs.docker.com/docker-hub/',
102
+ defaultRegistryURL: 'docker.io',
103
+ registryURL: {
104
+ label: 'Registry URL',
105
+ defaultValue: 'docker.io',
106
+ placeholder: '',
107
+ },
108
+ id: {
109
+ label: 'Username',
110
+ defaultValue: '',
111
+ placeholder: '',
112
+ },
113
+ password: {
114
+ label: 'Password/Token (Recommended: Token)',
115
+ defaultValue: '',
116
+ placeholder: '',
117
+ },
118
+ },
119
+ acr: {
120
+ value: 'acr',
121
+ label: 'Azure',
122
+ desiredFormat: '(desired format: repo-name)',
123
+ placeholderText: 'Eg. repo_name',
124
+ gettingStartedLink:
125
+ 'https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal',
126
+ defaultRegistryURL: '',
127
+ registryURL: {
128
+ label: 'Registry URL/Login Server',
129
+ defaultValue: '',
130
+ placeholder: 'Eg. xxx.azurecr.io',
131
+ },
132
+ id: {
133
+ label: 'Username/Registry Name',
134
+ defaultValue: '',
135
+ placeholder: '',
136
+ },
137
+ password: {
138
+ label: 'Password',
139
+ defaultValue: '',
140
+ placeholder: '',
141
+ },
142
+ },
143
+ 'artifact-registry': {
144
+ value: 'artifact-registry',
145
+ label: 'Artifact Registry (GCP)',
146
+ desiredFormat: '(desired format: project-id/artifacts-repo/repo-name)',
147
+ placeholderText: 'Eg. project-id/artifacts-repo/repo-name',
148
+ gettingStartedLink: 'https://cloud.google.com/artifact-registry/docs/manage-repos?hl=en_US',
149
+ defaultRegistryURL: '',
150
+ registryURL: {
151
+ label: 'Registry URL',
152
+ defaultValue: '',
153
+ placeholder: 'Eg. region-docker.pkg.dev',
154
+ },
155
+ id: {
156
+ label: 'Username',
157
+ defaultValue: '_json_key',
158
+ placeholder: '',
159
+ },
160
+ password: {
161
+ label: 'Service Account JSON File',
162
+ defaultValue: '',
163
+ placeholder: 'Paste json file content here',
164
+ },
165
+ },
166
+ gcr: {
167
+ value: 'gcr',
168
+ label: 'GCR',
169
+ desiredFormat: '(desired format: project-id/repo-name)',
170
+ placeholderText: 'Eg. project-id/repo_name',
171
+ gettingStartedLink: 'https://cloud.google.com/container-registry/docs/quickstart',
172
+ defaultRegistryURL: 'gcr.io',
173
+ registryURL: {
174
+ label: 'Registry URL',
175
+ defaultValue: 'gcr.io',
176
+ placeholder: '',
177
+ },
178
+ id: {
179
+ label: 'Username',
180
+ defaultValue: '_json_key',
181
+ placeholder: '',
182
+ },
183
+ password: {
184
+ label: 'Service Account JSON File',
185
+ defaultValue: '',
186
+ placeholder: 'Paste json file content here',
187
+ },
188
+ },
189
+ quay: {
190
+ value: 'quay',
191
+ label: 'Quay',
192
+ desiredFormat: '(desired format: username/repo-name)',
193
+ placeholderText: 'Eg. username/repo_name',
194
+ gettingStartedLink: '',
195
+ defaultRegistryURL: 'quay.io',
196
+ registryURL: {
197
+ label: 'Registry URL',
198
+ defaultValue: 'quay.io',
199
+ placeholder: '',
200
+ },
201
+ id: {
202
+ label: 'Username',
203
+ defaultValue: '',
204
+ placeholder: '',
205
+ },
206
+ password: {
207
+ label: 'Token',
208
+ defaultValue: '',
209
+ placeholder: '',
210
+ },
211
+ },
212
+ other: {
213
+ value: 'other',
214
+ label: 'Other',
215
+ desiredFormat: '',
216
+ placeholderText: '',
217
+ gettingStartedLink: '',
218
+ defaultRegistryURL: '',
219
+ registryURL: {
220
+ label: 'Registry URL',
221
+ defaultValue: '',
222
+ placeholder: '',
223
+ },
224
+ id: {
225
+ label: 'Username',
226
+ defaultValue: '',
227
+ placeholder: '',
228
+ },
229
+ password: {
230
+ label: 'Password/Token',
231
+ defaultValue: '',
232
+ placeholder: '',
233
+ },
234
+ },
68
235
  }
@@ -18,189 +18,6 @@ toast.configure({
18
18
  bodyClassName: 'devtron-toast__body',
19
19
  })
20
20
 
21
- export interface InputDetailType {
22
- label: string
23
- defaultValue: string
24
- placeholder: string
25
- }
26
-
27
- export interface RegistryTypeDetailType {
28
- value: string
29
- label: string
30
- desiredFormat: string
31
- placeholderText: string
32
- gettingStartedLink: string
33
- defaultRegistryURL: string
34
- registryURL: InputDetailType
35
- id: InputDetailType
36
- password: InputDetailType
37
- }
38
-
39
- export const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType> = {
40
- ecr: {
41
- value: 'ecr',
42
- label: 'ECR',
43
- desiredFormat: '(desired format: repo-name)',
44
- placeholderText: 'Eg. repo_name',
45
- gettingStartedLink: 'https://docs.aws.amazon.com/AmazonECR/latest/userguide/get-set-up-for-amazon-ecr.html',
46
- defaultRegistryURL: '',
47
- registryURL: {
48
- label: 'Registry URL',
49
- defaultValue: '',
50
- placeholder: 'Eg. xxxxxxxxxxxx.dkr.ecr.region.amazonaws.com',
51
- },
52
- id: {
53
- label: 'Access key ID',
54
- defaultValue: '',
55
- placeholder: '',
56
- },
57
- password: {
58
- label: 'Secret access key',
59
- defaultValue: '',
60
- placeholder: '',
61
- },
62
- },
63
- 'docker-hub': {
64
- value: 'docker-hub',
65
- label: 'Docker',
66
- desiredFormat: '(desired format: username/repo-name)',
67
- placeholderText: 'Eg. username/repo_name',
68
- gettingStartedLink: 'https://docs.docker.com/docker-hub/',
69
- defaultRegistryURL: 'docker.io',
70
- registryURL: {
71
- label: 'Registry URL',
72
- defaultValue: 'docker.io',
73
- placeholder: '',
74
- },
75
- id: {
76
- label: 'Username',
77
- defaultValue: '',
78
- placeholder: '',
79
- },
80
- password: {
81
- label: 'Password/Token (Recommended: Token)',
82
- defaultValue: '',
83
- placeholder: '',
84
- },
85
- },
86
- acr: {
87
- value: 'acr',
88
- label: 'Azure',
89
- desiredFormat: '(desired format: repo-name)',
90
- placeholderText: 'Eg. repo_name',
91
- gettingStartedLink:
92
- 'https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal',
93
- defaultRegistryURL: '',
94
- registryURL: {
95
- label: 'Registry URL/Login Server',
96
- defaultValue: '',
97
- placeholder: 'Eg. xxx.azurecr.io',
98
- },
99
- id: {
100
- label: 'Username/Registry Name',
101
- defaultValue: '',
102
- placeholder: '',
103
- },
104
- password: {
105
- label: 'Password',
106
- defaultValue: '',
107
- placeholder: '',
108
- },
109
- },
110
- 'artifact-registry': {
111
- value: 'artifact-registry',
112
- label: 'Artifact Registry (GCP)',
113
- desiredFormat: '(desired format: project-id/artifacts-repo/repo-name)',
114
- placeholderText: 'Eg. project-id/artifacts-repo/repo-name',
115
- gettingStartedLink: 'https://cloud.google.com/artifact-registry/docs/manage-repos?hl=en_US',
116
- defaultRegistryURL: '',
117
- registryURL: {
118
- label: 'Registry URL',
119
- defaultValue: '',
120
- placeholder: 'Eg. region-docker.pkg.dev',
121
- },
122
- id: {
123
- label: 'Username',
124
- defaultValue: '_json_key',
125
- placeholder: '',
126
- },
127
- password: {
128
- label: 'Service Account JSON File',
129
- defaultValue: '',
130
- placeholder: 'Paste json file content here',
131
- },
132
- },
133
- gcr: {
134
- value: 'gcr',
135
- label: 'GCR',
136
- desiredFormat: '(desired format: project-id/repo-name)',
137
- placeholderText: 'Eg. project-id/repo_name',
138
- gettingStartedLink: 'https://cloud.google.com/container-registry/docs/quickstart',
139
- defaultRegistryURL: 'gcr.io',
140
- registryURL: {
141
- label: 'Registry URL',
142
- defaultValue: 'gcr.io',
143
- placeholder: '',
144
- },
145
- id: {
146
- label: 'Username',
147
- defaultValue: '_json_key',
148
- placeholder: '',
149
- },
150
- password: {
151
- label: 'Service Account JSON File',
152
- defaultValue: '',
153
- placeholder: 'Paste json file content here',
154
- },
155
- },
156
- quay: {
157
- value: 'quay',
158
- label: 'Quay',
159
- desiredFormat: '(desired format: username/repo-name)',
160
- placeholderText: 'Eg. username/repo_name',
161
- gettingStartedLink: '',
162
- defaultRegistryURL: 'quay.io',
163
- registryURL: {
164
- label: 'Registry URL',
165
- defaultValue: 'quay.io',
166
- placeholder: '',
167
- },
168
- id: {
169
- label: 'Username',
170
- defaultValue: '',
171
- placeholder: '',
172
- },
173
- password: {
174
- label: 'Token',
175
- defaultValue: '',
176
- placeholder: '',
177
- },
178
- },
179
- other: {
180
- value: 'other',
181
- label: 'Other',
182
- desiredFormat: '',
183
- placeholderText: '',
184
- gettingStartedLink: '',
185
- defaultRegistryURL: '',
186
- registryURL: {
187
- label: 'Registry URL',
188
- defaultValue: '',
189
- placeholder: '',
190
- },
191
- id: {
192
- label: 'Username',
193
- defaultValue: '',
194
- placeholder: '',
195
- },
196
- password: {
197
- label: 'Password/Token',
198
- defaultValue: '',
199
- placeholder: '',
200
- },
201
- },
202
- }
203
-
204
21
  export function showError(serverError, showToastOnUnknownError = true, hideAccessError = false) {
205
22
  if (serverError instanceof ServerErrors && Array.isArray(serverError.errors)) {
206
23
  serverError.errors.map(({ userMessage, internalMessage }) => {
@@ -347,4 +347,20 @@ export interface CDMaterialResponseType {
347
347
  }
348
348
 
349
349
 
350
+ export interface InputDetailType {
351
+ label: string
352
+ defaultValue: string
353
+ placeholder: string
354
+ }
350
355
 
356
+ export interface RegistryTypeDetailType {
357
+ value: string
358
+ label: string
359
+ desiredFormat: string
360
+ placeholderText: string
361
+ gettingStartedLink: string
362
+ defaultRegistryURL: string
363
+ registryURL: InputDetailType
364
+ id: InputDetailType
365
+ password: InputDetailType
366
+ }