File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
src/Pages/Applications/DevtronApps/Details/AppConfigurations Expand file tree Collapse file tree 3 files changed +21
-1
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 } from './utils'
21
+ export { getDeploymentStageTitle , getTemplateAPIRoute } from './utils'
22
22
export * from './ConfigMapSecret'
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
+ import { ResourceKindType } from '@Shared/types'
17
18
import { ReactNode , SyntheticEvent } from 'react'
18
19
19
20
export enum ConfigHeaderTabType {
@@ -54,3 +55,15 @@ export interface OverrideStrategyTippyContentProps {
54
55
*/
55
56
children ?: ReactNode
56
57
}
58
+
59
+ export interface AppConfigProps {
60
+ appName : string
61
+ resourceKind : Extract < ResourceKindType , ResourceKindType . devtronApplication | ResourceKindType . job >
62
+ filteredEnvIds ?: string
63
+ isTemplateView ?: boolean
64
+ }
65
+
66
+ export interface GetTemplateAPIRouteProps {
67
+ type : 'git-material'
68
+ queryParams : { id : string } & Record < string , string >
69
+ }
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'
18
20
19
21
export const getDeploymentStageTitle = ( stage : DeploymentStageType ) => {
20
22
switch ( stage ) {
@@ -28,3 +30,8 @@ export const getDeploymentStageTitle = (stage: DeploymentStageType) => {
28
30
return '-'
29
31
}
30
32
}
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