Skip to content

Commit 4a3e92c

Browse files
Merge pull request #2914 from devtron-labs/feat/refactor-material-view
feat: refactor material view
2 parents 1a658cb + 13b0d5d commit 4a3e92c

File tree

14 files changed

+557
-878
lines changed

14 files changed

+557
-878
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,7 @@ src/components/globalConfigurations/GlobalConfiguration.tsx
253253
src/components/globalConfigurations/GlobalConfigurationProvider.tsx
254254
src/components/hostURL/HostURL.tsx
255255
src/components/hyperion/EnvironmentSelect.tsx
256-
src/components/material/CreateMaterial.tsx
257-
src/components/material/MaterialList.tsx
258256
src/components/material/MaterialView.tsx
259-
src/components/material/UpdateMaterial.tsx
260257
src/components/notifications/AddNotification.tsx
261258
src/components/notifications/ModifyRecipientsModal.tsx
262259
src/components/notifications/NotificationTab.tsx

src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ export interface AppConfigurationContextType
165165
isJobView: boolean
166166
envIdToEnvApprovalConfigurationMap: ResourceIdToResourceApprovalPolicyConfigMapType
167167
lastUnlockedStage: string
168-
isWorkflowEditorUnlocked: boolean
169168
getRepo: string
170169
envConfig: EnvConfigurationState
171170
}

src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfiguration.provider.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export const AppConfigurationProvider = (props: AppConfigurationProviderProps) =
5454
deleteApp,
5555
canShowExternalLinks,
5656
showCannotDeleteTooltip,
57-
isWorkflowEditorUnlocked: state.isUnlocked.workflowEditor,
5857
toggleRepoSelectionTippy,
5958
getRepo: showRepoOnDelete,
6059
isJobView: resourceKind === ResourceKindType.job,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ const AppComposeRouter = () => {
108108
<div className="flex-grow-1 dc__overflow-auto">
109109
<MaterialList
110110
respondOnSuccess={respondOnSuccess}
111-
isWorkflowEditorUnlocked={isUnlocked.workflowEditor}
112111
toggleRepoSelectionTippy={toggleRepoSelectionTippy}
113112
setRepo={setRepoState}
114113
isJobView={isJobView}
@@ -201,7 +200,6 @@ const AppComposeRouter = () => {
201200
<div className="flex-grow-1 dc__overflow-auto">
202201
<MaterialList
203202
respondOnSuccess={respondOnSuccess}
204-
isWorkflowEditorUnlocked={isUnlocked.workflowEditor}
205203
toggleRepoSelectionTippy={toggleRepoSelectionTippy}
206204
setRepo={setRepoState}
207205
isTemplateView={isTemplateView}

src/components/ciConfig/CIConfig.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { getGitProviderIcon, sortObjectArrayAlphabetically } from '../common'
2020
import { getDockerRegistryMinAuth } from './service'
2121
import { getSourceConfig, getCIConfig } from '../../services/service'
2222
import { ComponentStates } from '@Components/CIPipelineN/types'
23-
import { CIConfigProps, MaterialOptionType } from './types'
23+
import { CIConfigProps } from './types'
2424
import './CIConfig.scss'
2525
import CIConfigForm from './CIConfigForm'
2626

@@ -69,7 +69,7 @@ export default function CIConfig({
6969
Array.isArray(sourceConfig.material) &&
7070
sortObjectArrayAlphabetically(sourceConfig.material, 'name')
7171
const _sourceConfig = { ...sourceConfig }
72-
const sourceConfigMaterial = sourceConfig.material?.map((material: MaterialOptionType) => {
72+
const sourceConfigMaterial = sourceConfig.material?.map((material) => {
7373
return {
7474
...material,
7575
label: material?.name || '',

src/components/ciPipeline/ciPipeline.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function getPipelineBaseMetaConfiguration(
135135
isTemplateView: AppConfigProps['isTemplateView'],
136136
): Promise<any> {
137137
return getSourceConfig(appId, queryParams, isTemplateView).then((response) => {
138-
const materials: MaterialType[] = response?.result?.material?.map((mat: MaterialType) => {
138+
const materials: MaterialType[] = response?.result?.material?.map((mat) => {
139139
return {
140140
id: 0,
141141
gitMaterialId: mat.id,
@@ -147,6 +147,7 @@ function getPipelineBaseMetaConfiguration(
147147
gitProviderId: mat.gitProviderId,
148148
gitHostId: 0,
149149
url: mat.url,
150+
isRegex: undefined,
150151
}
151152
})
152153
const _baseCiPipelineSourceTypeOptions = CiPipelineSourceTypeBaseOptions.map((obj) => ({ ...obj }))

src/components/material/CreateMaterial.tsx

Lines changed: 0 additions & 294 deletions
This file was deleted.

0 commit comments

Comments
 (0)