Skip to content

Commit e37a26e

Browse files
authored
Merge pull request #489 from devtron-labs/feat/bulk-trigger-deployment
feat: bulk trigger deployment in DA workflow
2 parents 97a18b6 + 7769b8f commit e37a26e

File tree

36 files changed

+937
-88
lines changed

36 files changed

+937
-88
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.4.5",
3+
"version": "1.4.6",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
Lines changed: 7 additions & 0 deletions
Loading

src/Common/Common.service.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import {
4141
GlobalVariableDTO,
4242
GlobalVariableOptionType,
4343
} from './Types'
44-
import { ApiResourceType } from '../Pages'
44+
import { ApiResourceType, STAGE_MAP } from '../Pages'
4545
import { RefVariableType, VariableTypeFormat } from './CIPipeline.Types'
4646

4747
export const getTeamListMin = (): Promise<TeamList> => {
@@ -68,13 +68,6 @@ interface UserRole extends ResponseType {
6868
}
6969
}
7070

71-
const stageMap = {
72-
PRECD: 'PRE',
73-
CD: 'DEPLOY',
74-
POSTCD: 'POST',
75-
APPROVAL: 'APPROVAL',
76-
}
77-
7871
export const SourceTypeMap = {
7972
BranchFixed: 'SOURCE_TYPE_BRANCH_FIXED',
8073
WEBHOOK: 'WEBHOOK',
@@ -396,7 +389,7 @@ export const genericCDMaterialsService = (
396389
default:
397390
URL = getUrlWithSearchParams(`${ROUTES.CD_MATERIAL_GET}/${cdMaterialID}/material`, {
398391
...manipulatedParams,
399-
stage: stageMap[stage],
392+
stage: STAGE_MAP[stage],
400393
})
401394
break
402395
}

src/Common/Constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ export const ROUTES = {
130130
FILE_UPLOAD: 'file/upload',
131131
PLUGIN_GLOBAL_VARIABLES: 'plugin/global/list/global-variable',
132132
CONFIG_COMPARE_SECRET: 'config/compare/secret',
133+
CD_TRIGGER_POST: 'app/cd-pipeline/trigger',
134+
DELETE_RESOURCE: 'k8s/resource/delete',
135+
NODE_CAPACITY: 'k8s/capacity/node',
133136
}
134137

135138
export enum KEY_VALUE {

src/Common/Drawer/Drawer.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@
5454
bottom: 0;
5555
}
5656
}
57+
58+
.drawer.disable-transition {
59+
&.left, &.right, &.top, &.bottom {
60+
transition: none;
61+
}
62+
}

src/Common/Drawer/Drawer.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { preventBodyScroll } from '../../Shared'
1919
import { VisibleModal } from '../Modals/VisibleModal'
2020
import './Drawer.scss'
2121

22-
interface drawerInterface {
22+
export interface DrawerProps {
2323
position: 'left' | 'right' | 'bottom' | 'top'
2424
children?: any
2525
backdrop?: boolean
@@ -30,6 +30,7 @@ interface drawerInterface {
3030
height?: string
3131
parentClassName?: string
3232
onEscape?: (e?: any) => void
33+
disableTransition?: boolean
3334
}
3435

3536
export const Drawer = ({
@@ -42,7 +43,8 @@ export const Drawer = ({
4243
parentClassName,
4344
onEscape,
4445
onClose,
45-
}: drawerInterface) => {
46+
disableTransition,
47+
}: DrawerProps) => {
4648
const drawerRef = useRef(null)
4749
useEffect(() => {
4850
setTimeout(() => drawerRef.current?.classList?.add('show'), 1)
@@ -63,7 +65,7 @@ export const Drawer = ({
6365
}
6466
return (
6567
<VisibleModal className="drawer--container" parentClassName={parentClassName || ''} onEscape={onEscape} close={onClose}>
66-
<aside style={style} ref={drawerRef} className={`drawer ${position}`}>
68+
<aside style={style} ref={drawerRef} className={`drawer ${disableTransition ? 'disable-transition' : ''} ${position}`}>
6769
{children}
6870
</aside>
6971
</VisibleModal>

src/Pages/App/AppConfiguration/DeploymentTemplate/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Pages/App/AppConfiguration/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Pages/App/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)