File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed
src/Pages/Applications/DevtronApps/Details/AppConfigurations Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -18,5 +18,5 @@ export * from './DeploymentTemplate'
18
18
export * from './types'
19
19
export * from './constants'
20
20
export { default as OverrideStrategyTippyContent } from './OverrideStrategyTippyContent'
21
- export { getDeploymentStageTitle , getTemplateAPIRoute } from './utils'
21
+ export { getDeploymentStageTitle } from './utils'
22
22
export * from './ConfigMapSecret'
Original file line number Diff line number Diff line change @@ -63,7 +63,19 @@ export interface AppConfigProps {
63
63
isTemplateView ?: boolean
64
64
}
65
65
66
+ export enum GetTemplateAPIRouteType {
67
+ GIT_MATERIAL = 'git-material' ,
68
+ CI_BUILD_CONFIG = 'ci-build-config' ,
69
+ STAGE_STATUS = 'stage-status' ,
70
+ CD_DEPLOY_CONFIG = 'cd-deploy-config' ,
71
+ CD_ENV_LIST = 'cd-env-list' ,
72
+ CONFIG_DEPLOYMENT_TEMPLATE = 'config/deployment-template' ,
73
+ CONFIG_MAP_CREATE = 'config/config-map' ,
74
+ CONFIG_SECRET_CREATE = 'config/secret' ,
75
+ WORKFLOW_LIST = 'workflow/list' ,
76
+ }
77
+
66
78
export interface GetTemplateAPIRouteProps {
67
- type : 'git-material'
68
- queryParams : { id : string } & Record < string , string >
79
+ type : GetTemplateAPIRouteType
80
+ queryParams : { id : string } & Record < string , any >
69
81
}
Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
import { DeploymentStageType } from '@Shared/constants'
18
- import { getUrlWithSearchParams } from '@Common/Helper'
19
- import { GetTemplateAPIRouteProps } from './types'
20
18
21
19
export const getDeploymentStageTitle = ( stage : DeploymentStageType ) => {
22
20
switch ( stage ) {
@@ -30,8 +28,3 @@ export const getDeploymentStageTitle = (stage: DeploymentStageType) => {
30
28
return '-'
31
29
}
32
30
}
33
-
34
- const TEMPLATE_API_ROUTE_PREFIX = '/resource/template/devtron-application/alpha1'
35
-
36
- export const getTemplateAPIRoute = ( { type, queryParams } : GetTemplateAPIRouteProps ) =>
37
- getUrlWithSearchParams ( `${ TEMPLATE_API_ROUTE_PREFIX } /${ type } ` , { templateId : queryParams . id , ...queryParams } )
You can’t perform that action at this time.
0 commit comments