Skip to content

Commit 1642df5

Browse files
authored
Merge pull request #360 from devtron-labs/feat/release-app-configurations
feat: Release - Configurations Integration
2 parents ee1bbc1 + 48676aa commit 1642df5

15 files changed

+95
-46
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.5.4",
3+
"version": "0.5.5",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/CodeEditor/CodeEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ const CodeEditor: React.FC<CodeEditorInterface> & CodeEditorComposition = React.
348348
<CodeEditorPlaceholder customLoader={customLoader} />
349349
) : (
350350
<>
351-
{shebang && <div className="shebang">{shebang}</div>}
351+
{shebang && <div className="code-editor__shebang">{shebang}</div>}
352352
{state.diffMode ? (
353353
<MonacoDiffEditor
354354
original={

src/Common/CodeEditor/codeEditor.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,9 @@
159159
z-index: 9;
160160
}
161161
}
162+
163+
.code-editor__shebang {
164+
padding: 0 52px;
165+
color: #151515;
166+
opacity: 0.6;
167+
}

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiff.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export const DeploymentHistoryConfigDiff = ({
2929
wfrId,
3030
triggerHistory,
3131
setFullScreenView,
32-
runSource,
3332
resourceId,
3433
renderRunSource,
3534
}: DeploymentHistoryConfigDiffProps) => {
@@ -167,7 +166,7 @@ export const DeploymentHistoryConfigDiff = ({
167166
setFullScreenView={setFullScreenView}
168167
convertVariables={convertVariables}
169168
setConvertVariables={setConvertVariables}
170-
runSource={runSource}
169+
triggerHistory={triggerHistory}
171170
resourceId={resourceId}
172171
renderRunSource={renderRunSource}
173172
hideDiffState={hideDiffState}

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiffCompare.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const DeploymentHistoryConfigDiffCompare = ({
2626
previousWfrId,
2727
convertVariables,
2828
setConvertVariables,
29-
runSource,
29+
triggerHistory,
3030
renderRunSource,
3131
resourceId,
3232
isCompareDeploymentConfigNotAvailable,
@@ -60,7 +60,7 @@ export const DeploymentHistoryConfigDiffCompare = ({
6060
const { currentDeployment, pipelineDeploymentsOptions } = getPipelineDeploymentsOptions({
6161
pipelineDeployments,
6262
wfrId,
63-
runSource,
63+
triggerHistory,
6464
renderRunSource,
6565
resourceId,
6666
})

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { useParams } from 'react-router-dom'
18-
import { Fragment, useMemo, useState } from 'react'
18+
import { useMemo, useState } from 'react'
1919
import Tippy from '@tippyjs/react'
2020
import { yamlComparatorBySortOrder } from '@Shared/Helpers'
2121
import { MODES, Toggle, YAMLStringify } from '../../../../Common'
@@ -111,11 +111,11 @@ const DeploymentHistoryDiffView = ({
111111
singleValue: DeploymentHistorySingleValue,
112112
dataTestId: string,
113113
) => (
114-
<div className={parentClassName}>
115-
<div className="cn-6 pt-8 pl-16 pr-16 lh-16" data-testid={dataTestId}>
114+
<div className={`${parentClassName} px-16 py-8`}>
115+
<div className="cn-6 lh-16" data-testid={dataTestId}>
116116
{singleValue.displayName}
117117
</div>
118-
<div className="cn-9 fs-13 pb-8 pl-16 pr-16 lh-20 mh-28">{singleValue.value}</div>
118+
<div className="cn-9 fs-13 lh-20 dc__word-break">{singleValue.value}</div>
119119
</div>
120120
)
121121

@@ -150,7 +150,7 @@ const DeploymentHistoryDiffView = ({
150150
const changeBGColor = previousConfigAvailable && currentValue?.value !== baseValue?.value
151151
return (
152152
// eslint-disable-next-line react/no-array-index-key
153-
<Fragment key={`deployment-history-diff-view-${index}`}>
153+
<div key={`deployment-history-diff-view-${index}`} className="dc__contents">
154154
{!isUnpublished && currentValue?.value ? (
155155
renderDetailedValue(
156156
!isDeleteDraft && changeBGColor ? 'code-editor-red-diff' : '',
@@ -169,7 +169,7 @@ const DeploymentHistoryDiffView = ({
169169
) : (
170170
<div className={isDeleteDraft ? 'code-editor-red-diff' : ''} />
171171
)}
172-
</Fragment>
172+
</div>
173173
)
174174
},
175175
)}

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ export const renderPipelineDeploymentOptionDescription = ({
7676
renderRunSource,
7777
resourceId,
7878
runSource,
79-
}: Pick<History, 'triggeredBy' | 'triggeredByEmail' | 'artifact' | 'stage'> &
80-
Pick<DeploymentHistoryConfigDiffProps, 'renderRunSource' | 'resourceId' | 'runSource'>) => (
79+
}: Pick<History, 'triggeredBy' | 'triggeredByEmail' | 'artifact' | 'stage' | 'runSource'> &
80+
Pick<DeploymentHistoryConfigDiffProps, 'renderRunSource' | 'resourceId'>) => (
8181
<div className="flexbox-col dc__gap-4">
82-
<p className="m-0 fs-12 lh-20 cn-7 flex dc__gap-4">
82+
<p className="m-0 fs-12 lh-20 cn-7 flex left dc__gap-4">
8383
<span className="dc__capitalize">{stage}</span>
8484
<span className="dc__bullet dc__bullet--d2" />
8585
{artifact && (

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ import { Dispatch, SetStateAction } from 'react'
33
import { DeploymentConfigDiffProps } from '@Shared/Components/DeploymentConfigDiff'
44
import { EnvResourceType } from '@Shared/Services'
55

6-
import { History, HistoryLogsProps, RunSourceType } from '../types'
6+
import { History, HistoryLogsProps } from '../types'
77

88
export interface DeploymentHistoryConfigDiffProps
99
extends Required<Pick<HistoryLogsProps, 'renderRunSource' | 'resourceId'>> {
1010
appName: string
1111
envName: string
1212
pipelineId: number
1313
wfrId: number
14-
runSource: RunSourceType
1514
triggerHistory: Map<number, History>
1615
setFullScreenView: (fullscreen: boolean) => void
1716
}
@@ -23,7 +22,7 @@ export type DeploymentHistoryDiffDetailedProps = Pick<
2322
Required<
2423
Pick<
2524
DeploymentHistoryConfigDiffProps,
26-
'setFullScreenView' | 'wfrId' | 'envName' | 'renderRunSource' | 'resourceId' | 'runSource'
25+
'setFullScreenView' | 'wfrId' | 'envName' | 'renderRunSource' | 'resourceId' | 'triggerHistory'
2726
>
2827
> & {
2928
pipelineDeployments: History[]

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export const getPipelineDeploymentsOptions = ({
3131
wfrId,
3232
renderRunSource,
3333
resourceId,
34-
runSource,
35-
}: Required<Pick<DeploymentHistoryConfigDiffProps, 'renderRunSource' | 'runSource' | 'resourceId'>> & {
34+
triggerHistory,
35+
}: Required<Pick<DeploymentHistoryConfigDiffProps, 'renderRunSource' | 'resourceId' | 'triggerHistory'>> & {
3636
pipelineDeployments: History[]
3737
wfrId: number
3838
}) => {
@@ -50,7 +50,7 @@ export const getPipelineDeploymentsOptions = ({
5050
artifact,
5151
renderRunSource,
5252
resourceId,
53-
runSource,
53+
runSource: triggerHistory.get(id).runSource,
5454
}),
5555
startIcon: renderPipelineDeploymentStatusIcon(status),
5656
}),

0 commit comments

Comments
 (0)