Skip to content

Commit 5ed4a0e

Browse files
authored
Merge pull request #824 from devtron-labs/fix/filter-chip
feat: bulk edit v1beta2 support
2 parents cb7b833 + 6e57532 commit 5ed4a0e

File tree

8 files changed

+77
-4
lines changed

8 files changed

+77
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.18.1-pre-3",
3+
"version": "1.18.1-pre-4",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
Lines changed: 9 additions & 0 deletions
Loading

src/Common/RJSF/widgets/Select.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const SelectWidget = (props: WidgetProps) => {
3333
onBlur,
3434
onFocus,
3535
placeholder,
36+
schema,
3637
} = props
3738
const { enumOptions: selectOptions = [] } = options
3839
const emptyValue = multiple ? [] : null
@@ -57,7 +58,7 @@ export const SelectWidget = (props: WidgetProps) => {
5758
options={selectOptions}
5859
onBlur={() => onBlur(id, value)}
5960
onFocus={() => onFocus(id, value)}
60-
placeholder={placeholder || PLACEHOLDERS.SELECT}
61+
placeholder={schema.placeholder || placeholder || PLACEHOLDERS.SELECT}
6162
isDisabled={disabled || readonly}
6263
menuPortalTarget={document.getElementById(RJSF_FORM_SELECT_PORTAL_TARGET_ID)}
6364
menuPosition='fixed'

src/Pages/BulkEdit/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './types'

src/Pages/BulkEdit/types.ts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
export interface BulkEditConfigV2Type {
2+
gvk: string
3+
readme: string
4+
schema: Record<string, any>
5+
}
6+
7+
export interface AppEnvDetail {
8+
appName: string
9+
envName?: string
10+
message: string
11+
}
12+
13+
export interface ObjectsWithAppEnvDetail extends AppEnvDetail {
14+
names: string[]
15+
}
16+
17+
export interface DeploymentTemplateResponse {
18+
message: string[]
19+
failure: AppEnvDetail[]
20+
successful: AppEnvDetail[]
21+
}
22+
23+
export interface CmCsResponse {
24+
message: string[]
25+
failure: ObjectsWithAppEnvDetail[]
26+
successful: ObjectsWithAppEnvDetail[]
27+
}
28+
29+
export interface BulkEditResponseType {
30+
deploymentTemplate?: DeploymentTemplateResponse
31+
configMap?: CmCsResponse
32+
secret?: CmCsResponse
33+
}
34+
35+
export interface ImpactedDeploymentTemplate {
36+
appId?: number
37+
envId?: number
38+
appName: string
39+
envName?: string
40+
}
41+
42+
export interface ImpactedCmCs {
43+
appId?: number
44+
envId?: number
45+
appName: string
46+
envName?: string
47+
names: string[]
48+
}
49+
50+
export interface ImpactedObjectsType {
51+
deploymentTemplate?: ImpactedDeploymentTemplate[]
52+
configMap?: ImpactedCmCs[]
53+
secret?: ImpactedCmCs[]
54+
}
55+
56+
export enum BulkEditVersion {
57+
v1 = 'batch/v1beta1',
58+
v2 = 'batch/v1beta2',
59+
}

src/Pages/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
*/
1616

1717
export * from './Applications'
18+
export * from './BulkEdit'
1819
export * from './GlobalConfigurations'
1920
export * from './ResourceBrowser'

src/Shared/Components/Icon/Icon.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ import { ReactComponent as ICPencil } from '@IconsV2/ic-pencil.svg'
170170
import { ReactComponent as ICPlayOutline } from '@IconsV2/ic-play-outline.svg'
171171
import { ReactComponent as ICQuay } from '@IconsV2/ic-quay.svg'
172172
import { ReactComponent as ICQuote } from '@IconsV2/ic-quote.svg'
173+
import { ReactComponent as ICResizeHandle } from '@IconsV2/ic-resize-handle.svg'
173174
import { ReactComponent as ICRocketGear } from '@IconsV2/ic-rocket-gear.svg'
174175
import { ReactComponent as ICRocketLaunch } from '@IconsV2/ic-rocket-launch.svg'
175176
import { ReactComponent as ICSelected } from '@IconsV2/ic-selected.svg'
@@ -395,6 +396,7 @@ export const iconMap = {
395396
'ic-play-outline': ICPlayOutline,
396397
'ic-quay': ICQuay,
397398
'ic-quote': ICQuote,
399+
'ic-resize-handle': ICResizeHandle,
398400
'ic-rocket-gear': ICRocketGear,
399401
'ic-rocket-launch': ICRocketLaunch,
400402
'ic-selected': ICSelected,

0 commit comments

Comments
 (0)