Skip to content

Commit c5dfd7a

Browse files
authored
Merge pull request #2698 from devtron-labs/rc-merge/v0.35.0
chore: merge rc-v0.35.0
2 parents 2c45cf6 + 51f4427 commit c5dfd7a

File tree

206 files changed

+3150
-2997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+3150
-2997
lines changed

.env

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ FEATURE_CLUSTER_MAP_ENABLE=true
6161
FEATURE_DEFAULT_LANDING_RB_ENABLE=false
6262
FEATURE_ACTION_AUDIOS_ENABLE=true
6363
FEATURE_APPLICATION_TEMPLATES_ENABLE=true
64-
FEATURE_CODE_MIRROR_ENABLE=false
64+
FEATURE_CODE_MIRROR_ENABLE=true
6565
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE=false
6666
GATEKEEPER_URL=https://license.devtron.ai/dashboard
67+
FEATURE_AI_INTEGRATION_ENABLE=false
68+
LOGIN_PAGE_IMAGE=

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ src/components/ApplicationGroup/SearchBar.tsx
3636
src/components/CIPipelineN/AdvancedConfigOptions.tsx
3737
src/components/CIPipelineN/Build.tsx
3838
src/components/CIPipelineN/CIPipeline.tsx
39-
src/components/CIPipelineN/ConditionContainer.tsx
4039
src/components/CIPipelineN/CustomImageTags.tsx
4140
src/components/CIPipelineN/CustomInputOutputVariables.tsx
4241
src/components/CIPipelineN/CustomInputVariableSelect.tsx
@@ -384,7 +383,6 @@ src/components/v2/values/chartValuesDiff/ProjectUpdateModal.tsx
384383
src/components/v2/values/common/chartValues.api.ts
385384
src/components/workflowEditor/CDSuccessModal.tsx
386385
src/components/workflowEditor/CreateWorkflow.tsx
387-
src/components/workflowEditor/DeprecatedPipelineWarning.tsx
388386
src/components/workflowEditor/DeprecatedWarningModal.tsx
389387
src/components/workflowEditor/EmptyWorkflow.tsx
390388
src/components/workflowEditor/NoGitOpsConfiguredWarning.tsx

config.md

Lines changed: 50 additions & 49 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 2 additions & 9 deletions
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": "1.12.0",
7+
"@devtron-labs/devtron-fe-common-lib": "1.13.0",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",
@@ -23,8 +23,6 @@
2323
"flexsearch": "^0.6.32",
2424
"jsonpath-plus": "^10.3.0",
2525
"moment": "^2.29.4",
26-
"monaco-editor": "0.44.0",
27-
"monaco-yaml": "5.1.1",
2826
"query-string": "^7.1.1",
2927
"react": "^17.0.2",
3028
"react-csv": "^2.2.2",
@@ -33,7 +31,6 @@
3331
"react-ga4": "^1.4.1",
3432
"react-gtm-module": "^2.0.11",
3533
"react-mde": "^11.5.0",
36-
"react-monaco-editor": "^0.55.0",
3734
"react-router-dom": "^5.3.4",
3835
"react-select": "5.8.0",
3936
"react-virtualized": "^9.22.5",
@@ -147,11 +144,7 @@
147144
],
148145
"setupFilesAfterEnv": [
149146
"jest-extended"
150-
],
151-
"moduleNameMapper": {
152-
"monaco-editor": "<rootDir>/node_modules/react-monaco-editor",
153-
"monaco-yaml": "<rootDir>/node_modules/react-monaco-editor"
154-
}
147+
]
155148
},
156149
"resolutions": {
157150
"nanoid": "^3.3.8",

src/Pages/App/CreateAppModal/UpdateTemplateConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const UpdateTemplateConfig = ({
109109
return (
110110
<>
111111
<div className="divider__secondary--horizontal" />
112-
<div className="br-8 border__secondary bg__primary p-20 pb-0-imp flexbox-col dc__gap-16">
112+
<div className="br-8 border__secondary bg__primary p-20 flexbox-col dc__gap-16">
113113
<h4 className="fs-14 fw-6 lh-20 cn-9 m-0">Code Source</h4>
114114
<MaterialList
115115
isCreateAppView

src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetails.tsx

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { useEffect, useState } from 'react'
17+
import { useEffect, useRef, useState } from 'react'
1818
import { useParams } from 'react-router-dom'
1919

2020
import {
21+
abortPreviousRequests,
2122
AppType,
2223
DeploymentAppTypes,
2324
ERROR_STATUS_CODE,
2425
ErrorScreenManager,
26+
getIsRequestAborted,
2527
IndexStore,
2628
noop,
2729
ResponseType,
@@ -46,6 +48,15 @@ const ExternalFluxAppDetails = () => {
4648
const [isReloadResourceTreeInProgress, setIsReloadResourceTreeInProgress] = useState(true)
4749
const [appDetailsError, setAppDetailsError] = useState(null)
4850

51+
const abortControllerRef = useRef<AbortController>(new AbortController())
52+
53+
useEffect(
54+
() => () => {
55+
abortControllerRef.current.abort()
56+
},
57+
[],
58+
)
59+
4960
const handleUpdateIndexStoreWithDetails = (response: ResponseType<any>) => {
5061
const genericAppDetail: AppDetails = {
5162
...response.result,
@@ -63,13 +74,19 @@ const ExternalFluxAppDetails = () => {
6374
new Promise<void>((resolve) => {
6475
setIsReloadResourceTreeInProgress(true)
6576

66-
getExternalFluxCDAppDetails(clusterId, namespace, appName, isKustomization)
77+
abortPreviousRequests(
78+
() =>
79+
getExternalFluxCDAppDetails({ clusterId, namespace, appName, isKustomization, abortControllerRef }),
80+
abortControllerRef,
81+
)
6782
.then(handleUpdateIndexStoreWithDetails)
6883
.catch((error) => {
69-
if (!initialLoading) {
70-
showError(error)
71-
} else {
72-
setAppDetailsError(error)
84+
if (!getIsRequestAborted(error)) {
85+
if (!initialLoading) {
86+
showError(error)
87+
} else {
88+
setAppDetailsError(error)
89+
}
7390
}
7491
})
7592
.finally(() => {

src/Pages/App/Details/ExternalFlux/service.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,21 @@
1717
import { get, getUrlWithSearchParams } from '@devtron-labs/devtron-fe-common-lib'
1818

1919
import { Routes } from '../../../../config'
20+
import { GetExternalFluxCDAppDetailsParamsType } from './types'
2021

21-
export const getExternalFluxCDAppDetails = (clusterId, namespace, appName, isKustomization) => {
22+
export const getExternalFluxCDAppDetails = async ({
23+
clusterId,
24+
namespace,
25+
appName,
26+
isKustomization,
27+
abortControllerRef,
28+
}: GetExternalFluxCDAppDetailsParamsType) => {
2229
const appId = `${clusterId}|${namespace}|${appName}|${isKustomization}`
2330
const baseurl = `${Routes.FLUX_APPS}/${Routes.APP}`
2431
const params = {
2532
appId,
2633
}
34+
2735
const url = getUrlWithSearchParams(baseurl, params)
28-
return get(url)
36+
return get(url, { abortControllerRef })
2937
}

src/Pages/App/Details/ExternalFlux/types.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { APIOptions } from '@devtron-labs/devtron-fe-common-lib'
18+
1719
export interface ExternalFluxAppDetailParams {
1820
clusterId: string
1921
appName: string
@@ -25,3 +27,9 @@ export enum EXTERNAL_FLUX_APP_STATUS {
2527
READY = 'Ready',
2628
NOT_READY = 'Not Ready',
2729
}
30+
31+
export interface GetExternalFluxCDAppDetailsParamsType
32+
extends Pick<ExternalFluxAppDetailParams, 'clusterId' | 'namespace' | 'appName'>,
33+
Pick<APIOptions, 'abortControllerRef'> {
34+
isKustomization: boolean
35+
}

src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigDryRun.tsx

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,10 @@ const ConfigDryRun = ({
101101
mode={MODES.YAML}
102102
noParsing
103103
loading={isLoading}
104-
codeEditorProps={{
105-
value: editorTemplate,
106-
height: '100%',
107-
...(editorSchema && { validatorSchema: editorSchema }),
108-
...(selectedChartVersion && { chartVersion: selectedChartVersion?.replace(/\./g, '-') }),
109-
}}
110-
codeMirrorProps={{
111-
value: editorTemplate,
112-
height: 'fitToParent',
113-
...(editorSchema && { validatorSchema: editorSchema }),
114-
...(selectedChartVersion && { chartVersion: selectedChartVersion?.replace(/\./g, '-') }),
115-
}}
104+
value={editorTemplate}
105+
height="fitToParent"
106+
{...(editorSchema ? { validatorSchema: editorSchema } : {})}
107+
{...(selectedChartVersion ? { chartVersion: selectedChartVersion?.replace(/\./g, '-') } : {})}
116108
/>
117109
)
118110
}
@@ -168,14 +160,8 @@ const ConfigDryRun = ({
168160
mode={MODES.YAML}
169161
readOnly
170162
noParsing
171-
codeEditorProps={{
172-
value: manifestResponse?.result?.data || '',
173-
height: '100%',
174-
}}
175-
codeMirrorProps={{
176-
value: manifestResponse?.result?.data || '',
177-
height: 'fitToParent',
178-
}}
163+
value={manifestResponse?.result?.data || ''}
164+
height="fitToParent"
179165
/>
180166
</APIResponseHandler>
181167
</div>

src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateForm.tsx

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -255,26 +255,11 @@ const DeploymentTemplateForm = ({
255255
mode={MODES.YAML}
256256
readOnly={readOnly}
257257
noParsing
258-
codeEditorProps={{
259-
value: editedDocument,
260-
schemaURI: getEditorSchemaURIFromChartNameAndVersion(
261-
selectedChart?.name,
262-
selectedChart?.version,
263-
),
264-
onChange: readOnly ? noop : editorOnChange,
265-
validatorSchema: schema,
266-
height: '100%',
267-
}}
268-
codeMirrorProps={{
269-
value: editedDocument,
270-
schemaURI: getEditorSchemaURIFromChartNameAndVersion(
271-
selectedChart?.name,
272-
selectedChart?.version,
273-
),
274-
onChange: readOnly ? noop : editorOnChange,
275-
validatorSchema: schema,
276-
height: '100%',
277-
}}
258+
value={editedDocument}
259+
schemaURI={getEditorSchemaURIFromChartNameAndVersion(selectedChart?.name, selectedChart?.version)}
260+
onChange={readOnly ? noop : editorOnChange}
261+
validatorSchema={schema}
262+
height="100%"
278263
>
279264
{renderEditorHeader()}
280265
</CodeEditor>

0 commit comments

Comments
 (0)