Skip to content

Commit ac6d487

Browse files
committed
Merge branch 'main' into bug-linked-ci
2 parents 8163df0 + 695589e commit ac6d487

File tree

7 files changed

+41
-33
lines changed

7 files changed

+41
-33
lines changed

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ SIDEBAR_DT_LOGO=
4444
USE_V2=
4545
ENABLE_EXTERNAL_ARGO_CD=false
4646
API_BATCH_SIZE=20
47-
SERVICE_WORKER_TIMEOUT='1'
47+
SERVICE_WORKER_TIMEOUT='1'
48+
FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE=false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "0.0.75",
7+
"@devtron-labs/devtron-fe-common-lib": "0.0.76",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/components/gitOps/GitOpsConfiguration.tsx

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -788,36 +788,38 @@ class GitOpsConfiguration extends Component<GitOpsProps, GitOpsState> {
788788
</div>
789789
</div>
790790
<hr />
791-
<div>
792-
<div className="form__row flex left">
793-
<div className="fw-6 cn-9 fs-14 mb-16">Directory Managment in Git</div>
794-
<RadioGroup
795-
className="radio-group-no-border"
796-
name="trigger-type"
797-
value={this.state.selectedRepoType}
798-
onChange={this.repoTypeChange}
799-
>
800-
<div>
801-
<RadioGroupItem value={repoType.DEFAULT}>
802-
Use default git repository structure
803-
</RadioGroupItem>
804-
<div className="ml-26 cn-7">
805-
Repository will be created automatically with application name. Users can't
806-
change default repository
791+
{window._env_.FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE && (
792+
<div>
793+
<div className="form__row flex left">
794+
<div className="fw-6 cn-9 fs-14 mb-16">Directory Managment in Git</div>
795+
<RadioGroup
796+
className="radio-group-no-border"
797+
name="trigger-type"
798+
value={this.state.selectedRepoType}
799+
onChange={this.repoTypeChange}
800+
>
801+
<div>
802+
<RadioGroupItem value={repoType.DEFAULT}>
803+
Use default git repository structure
804+
</RadioGroupItem>
805+
<div className="ml-26 cn-7">
806+
Repository will be created automatically with application name. Users can't
807+
change default repository
808+
</div>
807809
</div>
808-
</div>
809-
<div className="mt-10">
810-
<RadioGroupItem value={repoType.CONFIGURE}>
811-
Allow changing git repository for application
812-
</RadioGroupItem>
813-
<div className="ml-26 cn-7">
814-
Application admins can provide desired git repository
810+
<div className="mt-10">
811+
<RadioGroupItem value={repoType.CONFIGURE}>
812+
Allow changing git repository for application
813+
</RadioGroupItem>
814+
<div className="ml-26 cn-7">
815+
Application admins can provide desired git repository
816+
</div>
815817
</div>
816-
</div>
817-
</RadioGroup>
818+
</RadioGroup>
819+
</div>
820+
<hr />
818821
</div>
819-
<hr />
820-
</div>
822+
)}
821823
<div className="form__buttons flex left">
822824
<button
823825
type="submit"

src/components/v2/values/chartValuesDiff/ChartValuesView.component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export const DeploymentAppSelector = ({
165165
isDeployChartView,
166166
allowedDeploymentTypes,
167167
gitRepoURL,
168+
allowedCustomBool
168169
}: DeploymentAppSelectorType): JSX.Element => {
169170
return !isDeployChartView ? (
170171
<div className="chart-values__deployment-type">
@@ -185,7 +186,7 @@ export const DeploymentAppSelector = ({
185186
)}
186187
</span>
187188
</div>
188-
{gitRepoURL && (
189+
{gitRepoURL && allowedCustomBool && (
189190
<div className="pt-12">
190191
<div className="fs-14">
191192
Manifests are committed to
@@ -198,13 +199,12 @@ export const DeploymentAppSelector = ({
198199
animation="shift-toward-subtle"
199200
content={gitRepoURL}
200201
>
201-
<a className="dc__block dc__ellipsis-left cursor" href={gitRepoURL}>
202+
<a className="dc__block dc__ellipsis-left cursor" href={gitRepoURL} target="_blank">
202203
{gitRepoURL}
203204
</a>
204205
</Tippy>
205206
</div>
206207
</div>
207-
<hr />
208208
</div>
209209
)}
210210
</div>

src/components/v2/values/chartValuesDiff/ChartValuesView.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,10 @@ const ChartValuesView = ({
197197
}
198198

199199
useEffect(() => {
200-
if (isDeployChartView || isCreateValueView) {
200+
if(!isExternalApp){
201201
checkGitOpsConfiguration()
202+
}
203+
if (isDeployChartView || isCreateValueView) {
202204
fetchProjectsAndEnvironments(serverMode, dispatch)
203205
getAndUpdateSchemaValue(
204206
commonState.installedConfig.rawValues,
@@ -1605,6 +1607,7 @@ const ChartValuesView = ({
16051607
isDeployChartView={isDeployChartView}
16061608
allowedDeploymentTypes={allowedDeploymentTypes}
16071609
gitRepoURL={installedConfigFromParent['gitRepoURL']}
1610+
allowedCustomBool={allowedCustomBool}
16081611
/>
16091612
)}
16101613
{allowedCustomBool && showDeploymentTools && (

src/components/v2/values/chartValuesDiff/ChartValuesView.type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export interface DeploymentAppSelectorType {
9191
isDeployChartView: boolean
9292
allowedDeploymentTypes?: DeploymentAppTypes[]
9393
gitRepoURL: string
94+
allowedCustomBool: boolean
9495
}
9596

9697
export interface DeploymentAppRadioGroupType {

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ if (!window || !window._env_) {
124124
ENABLE_EXTERNAL_ARGO_CD: false,
125125
API_BATCH_SIZE: 20,
126126
SERVICE_WORKER_TIMEOUT: '1',
127+
FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE: false,
127128
}
128129
}
129130

0 commit comments

Comments
 (0)