Skip to content

Commit 5515295

Browse files
authored
Merge pull request #2592 from devtron-labs/release-candidate-v0.32.0
release: Release candidate v0.32.0
2 parents 779abe8 + 1d39a0c commit 5515295

File tree

340 files changed

+8160
-7705
lines changed

Some content is hidden

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

340 files changed

+8160
-7705
lines changed

.env

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ FEATURE_SCOPED_VARIABLE_ENVIRONMENT_LIST_ENABLE=false
5151
HIDE_NETWORK_STATUS_INTERFACE=true
5252
SYSTEM_CONTROLLER_LISTING_TIMEOUT=300000
5353
FEATURE_IMAGE_PROMOTION_ENABLE=false
54-
FEATURE_CD_MANDATORY_PLUGINS_ENABLE=true
5554
FEATURE_HIDE_USER_DIRECT_PERMISSIONS_FOR_NON_SUPER_ADMINS=false
5655
FEATURE_CONFIG_DRIFT_ENABLE=false
5756
FEATURE_PROMO_EMBEDDED_BUTTON_TEXT=
@@ -64,7 +63,7 @@ FEATURE_DEFAULT_MERGE_STRATEGY=
6463
FEATURE_CLUSTER_MAP_ENABLE=true
6564
FEATURE_DEFAULT_LANDING_RB_ENABLE=false
6665
FEATURE_ACTION_AUDIOS_ENABLE=true
66+
FEATURE_APPLICATION_TEMPLATES_ENABLE=true
6767
FEATURE_CODE_MIRROR_ENABLE=false
6868
FEATURE_EXPERIMENTAL_THEMING_ENABLE=true
69-
FEATURE_EXPERIMENTAL_MODERN_LAYOUT_ENABLE=false
7069
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE=false

.eslintignore

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ vite.config.mts
88
# The following files have eslint errors/warnings
99
src/App.tsx
1010
src/Pages/GlobalConfigurations/Authorization/APITokens/__tests__/ApiTokens.test.tsx
11-
src/components/AppSelector/AppSelector.tsx
12-
src/components/AppSelector/AppSelectorUtil.tsx
1311
src/components/AppSelector/ChartSelector.tsx
1412
src/components/ApplicationGroup/AppGroup.service.ts
1513
src/components/ApplicationGroup/AppGroup.types.ts
@@ -33,11 +31,7 @@ src/components/ApplicationGroup/Details/EnvironmentOverview/HibernateStatusRow.t
3331
src/components/ApplicationGroup/Details/EnvironmentOverview/__test__/EnvironmentOverview.test.tsx
3432
src/components/ApplicationGroup/Details/TriggerView/BulkCDTrigger.tsx
3533
src/components/ApplicationGroup/Details/TriggerView/BulkCITrigger.tsx
36-
src/components/ApplicationGroup/Details/TriggerView/BulkSourceChange.tsx
3734
src/components/ApplicationGroup/Details/TriggerView/EnvTriggerView.tsx
38-
src/components/ApplicationGroup/Details/TriggerView/SourceUpdateResponseModal.tsx
39-
src/components/ApplicationGroup/Details/TriggerView/TriggerModalTableRow.tsx
40-
src/components/ApplicationGroup/Details/TriggerView/TriggerResponseModal.tsx
4135
src/components/ApplicationGroup/SearchBar.tsx
4236
src/components/CIPipelineN/AdvancedConfigOptions.tsx
4337
src/components/CIPipelineN/Build.tsx
@@ -93,7 +87,6 @@ src/components/app/create/validationRules.ts
9387
src/components/app/details/AboutAppInfoModal.tsx
9488
src/components/app/details/AboutTagEditModal.tsx
9589
src/components/app/details/AppHeader.tsx
96-
src/components/app/details/appDetails/AppDetails.tsx
9790
src/components/app/details/appDetails/AppMetrics.tsx
9891
src/components/app/details/appDetails/AppStatusCard.tsx
9992
src/components/app/details/appDetails/DeploymentStatusDetailModal.tsx
@@ -170,7 +163,6 @@ src/components/charts/charts.util.tsx
170163
src/components/charts/dialogs/ValuesYamlConfirmDialog.tsx
171164
src/components/charts/discoverChartDetail/About.tsx
172165
src/components/charts/discoverChartDetail/ChartDeploymentList.tsx
173-
src/components/charts/discoverChartDetail/ChartVersionSelectorModal.tsx
174166
src/components/charts/discoverChartDetail/DiscoverChartDetails.tsx
175167
src/components/charts/list/ChartGroup.tsx
176168
src/components/charts/list/ChartListPopUp.tsx
@@ -336,7 +328,6 @@ src/components/security/security.service.ts
336328
src/components/security/security.util.tsx
337329
src/components/terminal/TerminalWrapper.tsx
338330
src/components/util/KeyValueFileInput.tsx
339-
src/components/v2/appDetails/AppDetails.component.tsx
340331
src/components/v2/appDetails/ReleaseStatusEmptyState.tsx
341332
src/components/v2/appDetails/SyncError.component.tsx
342333
src/components/v2/appDetails/__tests__/index.store.test.ts
@@ -345,16 +336,8 @@ src/components/v2/appDetails/appDetails.type.ts
345336
src/components/v2/appDetails/ea/EAAppDetail.component.tsx
346337
src/components/v2/appDetails/k8Resource/FilterResource.tsx
347338
src/components/v2/appDetails/k8Resource/nodeDetail/EphemeralContainerDrawer.tsx
348-
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetail.component.tsx
349339
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/CustomLogsModal/CustomLogsModal.tsx
350-
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/Events.component.tsx
351-
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/EventsTable.tsx
352-
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/LogViewer.component.tsx
353-
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/Logs.component.tsx
354-
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/Manifest.component.tsx
355-
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/Summary.component.tsx
356340
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/Terminal.component.tsx
357-
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/Terminal.tsx
358341
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/TerminalWrapper.component.tsx
359342
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/__tests__/Terminal.component.test.tsx
360343
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/__tests__/TerminalWrapper.test.tsx
@@ -408,7 +391,6 @@ src/components/workflowEditor/EmptyWorkflow.tsx
408391
src/components/workflowEditor/NoGitOpsConfiguredWarning.tsx
409392
src/components/workflowEditor/NoGitOpsRepoConfiguredWarning.tsx
410393
src/components/workflowEditor/PipelineSelect.tsx
411-
src/components/workflowEditor/ToggleCDSelectButton.tsx
412394
src/components/workflowEditor/Workflow.tsx
413395
src/components/workflowEditor/nodes/CDNode.tsx
414396
src/components/workflowEditor/nodes/CINode.tsx

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "dashboard",
3-
"version": "1.9.0",
3+
"version": "1.10.0",
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "1.9.0-patch-4",
7+
"@devtron-labs/devtron-fe-common-lib": "1.10.0",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/App.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ export default function App() {
159159
}
160160

161161
useEffect(() => {
162-
if (window._env_.FEATURE_EXPERIMENTAL_MODERN_LAYOUT_ENABLE) {
163-
document.body.classList.add('modern-layout')
164-
}
165-
166162
if (typeof Storage !== 'undefined') {
167163
// TODO (Arun): Remove in next packet
168164
localStorage.removeItem('undefined')
@@ -333,7 +329,7 @@ export default function App() {
333329
<Reload />
334330
</div>
335331
) : (
336-
<ErrorBoundary shouldAddFullScreenBg={window._env_.FEATURE_EXPERIMENTAL_MODERN_LAYOUT_ENABLE}>
332+
<ErrorBoundary>
337333
<BreadcrumbStore>
338334
<Switch>
339335
{isDirectApprovalNotification && GenericDirectApprovalModal && (
@@ -350,7 +346,6 @@ export default function App() {
350346
to={window._env_.K8S_CLIENT ? '/' : `${URLS.LOGIN_SSO}${location.search}`}
351347
/>
352348
</Switch>
353-
<div id="full-screen-modal" />
354349
<div id="visible-modal" />
355350
<div id="visible-modal-2" />
356351
<div id="animated-dialog-backdrop" />
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import {
18+
AppSelectorNoOptionsMessage as appSelectorNoOptionsMessage,
19+
ComponentSizeType,
20+
InfoBlock,
21+
SelectPicker,
22+
SelectPickerProps,
23+
} from '@devtron-labs/devtron-fe-common-lib'
24+
import { appListOptions } from '@Components/AppSelector/AppSelectorUtil'
25+
import { useState } from 'react'
26+
import { AppToCloneSelectorProps } from './types'
27+
28+
const AppToCloneSelector = ({ isJobView, error, handleCloneIdChange }: AppToCloneSelectorProps) => {
29+
const [inputValue, setInputValue] = useState('')
30+
const [areOptionsLoading, setAreOptionsLoading] = useState(false)
31+
const [options, setOptions] = useState([])
32+
33+
const onInputChange: SelectPickerProps['onInputChange'] = async (val) => {
34+
setInputValue(val)
35+
setAreOptionsLoading(true)
36+
const fetchedOptions = await appListOptions(val, isJobView)
37+
setAreOptionsLoading(false)
38+
setOptions(fetchedOptions)
39+
}
40+
41+
const onChange = (selectedClonedApp) => {
42+
handleCloneIdChange(selectedClonedApp.value)
43+
}
44+
45+
const noOptionsMessage: SelectPickerProps['noOptionsMessage'] = () =>
46+
appSelectorNoOptionsMessage({
47+
inputValue,
48+
})
49+
50+
return (
51+
<>
52+
<SelectPicker
53+
label={`Select an ${isJobView ? 'job' : 'app'} to clone`}
54+
inputId={`${isJobView ? 'job' : 'app'}-name-for-clone`}
55+
options={options}
56+
onChange={onChange}
57+
placeholder={`Select ${isJobView ? 'job' : 'app'}`}
58+
inputValue={inputValue}
59+
onInputChange={onInputChange}
60+
isLoading={areOptionsLoading}
61+
noOptionsMessage={noOptionsMessage}
62+
error={error}
63+
size={ComponentSizeType.large}
64+
/>
65+
<InfoBlock
66+
heading="Important:"
67+
description={
68+
isJobView
69+
? 'Do not forget to modify git repositories and corresponding branches to be used for each Job Pipeline if required.'
70+
: 'Do not forget to modify git repositories, corresponding branches and container registries to be used for each CI Pipeline if required.'
71+
}
72+
/>
73+
</>
74+
)
75+
}
76+
77+
export default AppToCloneSelector
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import { CustomInput, TagsContainer, Textarea } from '@devtron-labs/devtron-fe-common-lib'
18+
import { ReactComponent as ICDevtronApp } from '@Icons/ic-devtron-app.svg'
19+
import { ReactComponent as ICCaretLeftSmall } from '@Icons/ic-caret-left-small.svg'
20+
import { ChangeEvent } from 'react'
21+
import { importComponentFromFELibrary } from '@Components/common'
22+
import { APP_TYPE } from '@Config/constants'
23+
import ProjectSelector from './ProjectSelector'
24+
import {
25+
ApplicationInfoFormProps,
26+
CreateAppFormStateActionType,
27+
CreateAppFormStateType,
28+
CreationMethodType,
29+
HandleFormStateChangeParamsType,
30+
ProjectSelectorProps,
31+
} from './types'
32+
import AppToCloneSelector from './AppToCloneSelector'
33+
34+
const MandatoryTagsContainer = importComponentFromFELibrary('MandatoryTagsContainer', null, 'function')
35+
36+
const ApplicationInfoForm = ({
37+
formState,
38+
handleFormStateChange,
39+
isJobView,
40+
formErrorState,
41+
handleTagErrorChange,
42+
selectedCreationMethod,
43+
isTagsAccordionExpanded,
44+
toggleIsTagsAccordionExpanded,
45+
}: ApplicationInfoFormProps) => {
46+
const handleInputChange =
47+
(
48+
action: Extract<
49+
HandleFormStateChangeParamsType['action'],
50+
CreateAppFormStateActionType.updateName | CreateAppFormStateActionType.updateDescription
51+
>,
52+
) =>
53+
(event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
54+
handleFormStateChange({ action, value: event.target.value })
55+
}
56+
57+
const handleProjectIdChange: ProjectSelectorProps['handleProjectIdChange'] = (projectId) => {
58+
handleFormStateChange({
59+
action: CreateAppFormStateActionType.updateProjectId,
60+
value: projectId,
61+
})
62+
}
63+
64+
const handleTagsUpdate = (tags: CreateAppFormStateType['tags']) => {
65+
handleFormStateChange({
66+
action: CreateAppFormStateActionType.updateTags,
67+
value: tags,
68+
})
69+
}
70+
71+
const handleCloneIdChange = (cloneId) => {
72+
handleFormStateChange({
73+
action: CreateAppFormStateActionType.updateCloneAppId,
74+
value: cloneId,
75+
})
76+
}
77+
78+
return (
79+
// key is required for ensuring autoFocus on name on creation method change
80+
<div className="flexbox-col dc__gap-16 p-20 br-8 border__secondary bg__primary" key={selectedCreationMethod}>
81+
<ICDevtronApp className="icon-dim-48 dc__no-shrink" />
82+
<div className="flexbox dc__gap-8">
83+
<ProjectSelector
84+
selectedProjectId={formState.projectId}
85+
handleProjectIdChange={handleProjectIdChange}
86+
error={formErrorState.projectId}
87+
/>
88+
<span className="pt-26 fs-20 lh-36 cn-7 dc__no-shrink">/</span>
89+
<CustomInput
90+
label={isJobView ? 'Job name' : 'Application name'}
91+
required
92+
name="name"
93+
onChange={handleInputChange(CreateAppFormStateActionType.updateName)}
94+
value={formState.name}
95+
placeholder="Enter name"
96+
error={formErrorState.name}
97+
helperText={
98+
!isJobView && 'Apps are NOT env specific and can be used to deploy to multiple environments.'
99+
}
100+
fullWidth
101+
autoFocus
102+
/>
103+
</div>
104+
<Textarea
105+
label="Description"
106+
name="description"
107+
value={formState.description}
108+
onChange={handleInputChange(CreateAppFormStateActionType.updateDescription)}
109+
placeholder={isJobView ? 'Describe this job' : 'Write a description for this application'}
110+
fullWidth
111+
error={formErrorState.description}
112+
/>
113+
<div className="flexbox-col dc__gap-16">
114+
<button
115+
className="dc__transparent p-0 flex left dc__gap-8 dc__w-fit-content"
116+
type="button"
117+
onClick={toggleIsTagsAccordionExpanded}
118+
>
119+
<ICCaretLeftSmall
120+
className={`scn-7 dc__no-shrink dc__transition--transform ${isTagsAccordionExpanded ? 'dc__flip-270' : 'dc__flip-180'}`}
121+
/>
122+
<span className="fs-13 fw-6 lh-20 cn-9">Add tags to {isJobView ? 'job' : 'application'}</span>
123+
</button>
124+
<div className={!isTagsAccordionExpanded ? 'dc__hide-section' : ''}>
125+
{MandatoryTagsContainer ? (
126+
<MandatoryTagsContainer
127+
isCreateApp
128+
appType={isJobView ? APP_TYPE.JOB : APP_TYPE.DEVTRON_APPS}
129+
projectId={formState.projectId}
130+
tags={formState.tags}
131+
setTags={handleTagsUpdate}
132+
tagsError={formErrorState.tags}
133+
setTagErrors={handleTagErrorChange}
134+
/>
135+
) : (
136+
<TagsContainer
137+
appType={isJobView ? APP_TYPE.JOB : APP_TYPE.DEVTRON_APPS}
138+
isCreateApp
139+
rows={formState.tags}
140+
setRows={handleTagsUpdate}
141+
tagsError={formErrorState.tags}
142+
setTagErrors={handleTagErrorChange}
143+
/>
144+
)}
145+
</div>
146+
</div>
147+
{selectedCreationMethod === CreationMethodType.clone && (
148+
<AppToCloneSelector
149+
error={formErrorState.cloneAppId}
150+
isJobView={isJobView}
151+
handleCloneIdChange={handleCloneIdChange}
152+
/>
153+
)}
154+
</div>
155+
)
156+
}
157+
158+
export default ApplicationInfoForm

0 commit comments

Comments
 (0)