Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e5e0be3
chore: git repo url handling
shivani170 Aug 12, 2025
d7a949f
Merge branch 'develop' into feat/git-icon-replacement
shivani170 Aug 12, 2025
55cf9b5
chore: code refactoring
shivani170 Aug 13, 2025
eece861
feat: add support for freemium license
arunjaindev Aug 13, 2025
52ddf77
chore: version bump
arunjaindev Aug 13, 2025
70e544d
chore: type modified
shivani170 Aug 13, 2025
27ecf02
chore: add gradient
arunjaindev Aug 13, 2025
705d2e7
feat: add module limits in freemium
arunjaindev Aug 14, 2025
2f2fc0f
chore: version bump
arunjaindev Aug 14, 2025
5489a64
chore: add check for license data
arunjaindev Aug 14, 2025
ddd2c23
fix: use all clusters for count
arunjaindev Aug 14, 2025
b849663
chore: version bump
arunjaindev Aug 14, 2025
dcbbbf6
Merge branch 'develop' into feat/git-icon-replacement
shivani170 Aug 18, 2025
d258e21
chore: version bump
shivani170 Aug 18, 2025
048b271
chore: console removed
shivani170 Aug 18, 2025
cc854a4
feat: use icon from icon component
arunjaindev Aug 19, 2025
b00ed98
chore: version bump
arunjaindev Aug 19, 2025
5955bd5
chore: update url for upgrade contact
arunjaindev Aug 19, 2025
bdc7d8c
Merge pull request #2882 from devtron-labs/feat/freemium
arunjaindev Aug 19, 2025
f0f0241
feat: update messaging for 2 cluster in freemium
arunjaindev Aug 20, 2025
cbd919c
chore: version bump
arunjaindev Aug 20, 2025
ff043cc
Merge pull request #2886 from devtron-labs/feat/freemium-messaging
arunjaindev Aug 20, 2025
d7c1b1f
chore: code feedback fixes
shivani170 Aug 21, 2025
de1a3c9
chore: unnecessary code removed
shivani170 Aug 21, 2025
f3a9e94
Merge branch main into feat/git-icon-replacement
shivani170 Aug 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<InfoBlock variant="success" description="Build pipeline is created" size={ComponentSizeType.medium} />
)}
{materials.map((material, index) => {
const { id, name, type, isRegex, value, regex, gitMaterialId } = material
const { id, name, type, isRegex, value, regex, gitMaterialId, url } = material

Check failure on line 165 in src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/CIStepperContent.tsx

View workflow job for this annotation

GitHub Actions / ci

Property 'url' does not exist on type 'MaterialType'.

const isBranchRegex = type === SourceTypeMap.BranchRegex || isRegex
const isBranchFixed = type === SourceTypeMap.BranchFixed && !isRegex
Expand All @@ -183,6 +183,7 @@
<Fragment key={id}>
<SourceMaterialsSelector
repoName={name}
gitURL={url}
sourceTypePickerProps={{
inputId: 'ci-pipeline-sourceType',
label: 'Source Type',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@
* limitations under the License.
*/

import { ComponentSizeType, CustomInput, Icon, SelectPicker } from '@devtron-labs/devtron-fe-common-lib'
import { ComponentSizeType, CustomInput, GitProviderIcon, SelectPicker } from '@devtron-labs/devtron-fe-common-lib'

import { SourceMaterialsSelectorProps } from './types'

export const SourceMaterialsSelector = ({
repoName,
sourceTypePickerProps,
branchInputProps,
gitURL,
}: SourceMaterialsSelectorProps) => (
<div className="flexbox-col dc__gap-8">
{repoName && (
<div className="flex left dc__gap-8">
<Icon name="ic-git" color={null} size={24} />
<GitProviderIcon gitRepoUrl={gitURL} size={24} />
<p className="m-0 fs-13 lh-20 fw-6 cn-9 dc__truncate">{repoName}</p>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
* limitations under the License.
*/

import { CustomInputProps, SelectPickerProps } from '@devtron-labs/devtron-fe-common-lib'
import { CustomInputProps, MaterialType, SelectPickerProps } from '@devtron-labs/devtron-fe-common-lib'

export interface SourceMaterialsSelectorProps {
repoName?: string
type CommonSourceTypeProps = {
sourceTypePickerProps: Omit<
SelectPickerProps<string | number, false>,
'required' | 'isClearable' | 'closeMenuOnSelect' | 'size'
Expand All @@ -26,3 +25,13 @@
hideInput?: boolean
}
}

export type SourceMaterialsSelectorProps =
| (CommonSourceTypeProps & {
repoName: string
gitURL: MaterialType['url']

Check failure on line 32 in src/Pages/App/Configurations/WorkflowEditor/SourceMaterialsSelector/types.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'url' does not exist on type 'MaterialType'.
})
| (CommonSourceTypeProps & {
repoName?: never
gitURL?: never
})
2 changes: 2 additions & 0 deletions src/components/CIPipelineN/Build.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@
...mat,
value: '',
regex: event.target.value,
gitURL: mat?.url,

Check failure on line 58 in src/components/CIPipelineN/Build.tsx

View workflow job for this annotation

GitHub Actions / ci

Property 'url' does not exist on type 'MaterialType'.
}
}
return {
...mat,
regex: '',
value: event.target.value,
gitURL: mat?.url,

Check failure on line 65 in src/components/CIPipelineN/Build.tsx

View workflow job for this annotation

GitHub Actions / ci

Property 'url' does not exist on type 'MaterialType'.
}
}
return mat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
getCITriggerInfo,
getParsedCIMaterialInfo,
GitProviderIcon,
GitProviderType,
Icon,
LoadingCard,
useQuery,
Expand Down Expand Up @@ -77,9 +76,8 @@ const DeployedCommitCard = ({ cardLoading, showCommitInfoDrawer, envId, ciArtifa
</div>
</div>
</div>
<GitProviderIcon gitProvider={GitProviderType.GIT} size={24} />
<GitProviderIcon gitRepoUrl={lastCommit?.commitURL} size={24} />
{/* @TODO: This should be dynamic, dependent on the source */}
{/* <GitHub className="github-icon" /> */}
</div>
<div className="app-details-info-card__bottom-container dc__content-space">
<span className="app-details-info-card__bottom-container__message fs-12 fw-4">
Expand Down
1 change: 1 addition & 0 deletions src/components/ciPipeline/SourceMaterials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
).message,
autoFocus: index === 0,
}}
gitURL={mat?.url}

Check failure on line 144 in src/components/ciPipeline/SourceMaterials.tsx

View workflow job for this annotation

GitHub Actions / ci

Property 'url' does not exist on type 'MaterialType'.
/>
{isBranchRegex && (
<InfoBlock description="Branch Regex allows you to easily switch between branches matching the configured regex before triggering the build pipeline." />
Expand Down
9 changes: 5 additions & 4 deletions src/components/ciPipeline/ciPipeline.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
isTemplateView: AppConfigProps['isTemplateView'],
): Promise<any> {
return getSourceConfig(appId, queryParams, isTemplateView).then((response) => {
const materials = response?.result?.material?.map((mat) => {
const materials: MaterialType[] = response?.result?.material?.map((mat: MaterialType) => {
return {
id: 0,
gitMaterialId: mat.id,
Expand All @@ -146,6 +146,7 @@
gitMaterialName: mat.name,
gitProviderId: mat.gitProviderId,
gitHostId: 0,
url: mat.url,

Check failure on line 149 in src/components/ciPipeline/ciPipeline.service.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'url' does not exist on type 'MaterialType'.
}
})
const _baseCiPipelineSourceTypeOptions = CiPipelineSourceTypeBaseOptions.map((obj) => ({ ...obj }))
Expand Down Expand Up @@ -348,8 +349,6 @@
gitMaterials,
appId: number,
workflowId: number,
isExternalCI: boolean,
webhookConditionList,
isTemplateView: AppConfigProps['isTemplateView'],
) {
const updatedCI = {
Expand Down Expand Up @@ -456,6 +455,7 @@
gitHostId: gitHost ? gitHost.id : 0,
regex: mat.source.regex,
isRegex: mat.isRegex,
url: mat.url || gitMaterials?.[0].url, // Required BE support till then will be getting url from another api

Check failure on line 458 in src/components/ciPipeline/ciPipeline.service.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'url' does not exist on type 'MaterialType'.
}
}) || []
}
Expand All @@ -477,6 +477,7 @@
gitHostId: mat.gitHostId,
gitProviderId: mat.gitProviderId,
isRegex: mat.isRegex,
url: mat.url,

Check failure on line 480 in src/components/ciPipeline/ciPipeline.service.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'url' does not exist on type 'MaterialType'.

Check failure on line 480 in src/components/ciPipeline/ciPipeline.service.ts

View workflow job for this annotation

GitHub Actions / ci

Object literal may only specify known properties, and 'url' does not exist in type 'MaterialType'.
})
}
}
Expand Down Expand Up @@ -563,7 +564,7 @@
function parseCIResponse(
responseCode: number,
ciPipeline,
gitMaterials,
gitMaterials: MaterialType[],
gitHost,
webhookEvents,
ciPipelineSourceTypeOptions,
Expand Down
59 changes: 4 additions & 55 deletions src/components/workflowEditor/Workflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { Component } from 'react'
import { RouteComponentProps, Link, generatePath } from 'react-router-dom'
import { Link, generatePath } from 'react-router-dom'
import Tippy from '@tippyjs/react'
import { CINode } from './nodes/CINode'
import { CDNode } from './nodes/CDNode'
Expand All @@ -40,19 +40,15 @@ import {
noop,
WorkflowNodeType,
PipelineType,
AddPipelineType,
SelectedNode,
ConditionalWrap,
ChangeCIPayloadType,
CIPipelineNodeType,
URLS as CommonURLS,
AppConfigProps,
} from '@devtron-labs/devtron-fe-common-lib'
import { ReactComponent as ICInput } from '../../assets/icons/ic-input.svg'
import { ReactComponent as ICMoreOption } from '../../assets/icons/ic-more-option.svg'
import { ReactComponent as ICDelete } from '../../assets/icons/ic-delete-interactive.svg'
import { ReactComponent as ICEdit } from '../../assets/icons/ic-pencil.svg'
import { WorkflowPositionState } from './types'
import { WorkflowProps, WorkflowState } from './types'
import { CHANGE_CI_TOOLTIP } from './constants'

const ApprovalNodeEdge = importComponentFromFELibrary('ApprovalNodeEdge')
Expand All @@ -63,55 +59,6 @@ const getParsedPluginPolicyConsequenceData = importComponentFromFELibrary(
'function',
)

export interface WorkflowProps
extends RouteComponentProps<{ appId: string; workflowId?: string; ciPipelineId?: string; cdPipelineId?: string }>,
Required<Pick<AppConfigProps, 'isTemplateView'>> {
nodes: CommonNodeAttr[]
id: number
name: string
startX: number
startY: number
width: number | string
height: number | string
showDeleteDialog: (workflowId: number) => void
handleCDSelect: (
workflowId: number | string,
ciPipelineId: number | string,
parentPipelineType: string,
parentPipelineId: number | string,
isWebhookCD?: boolean,
childPipelineId?: number | string,
addType?: AddPipelineType,
) => void
openEditWorkflow: (event, workflowId: number) => string
handleCISelect: (workflowId: string | number, type: CIPipelineNodeType) => void
addCIPipeline: (type: CIPipelineNodeType) => void
addWebhookCD: (workflowId?: number | string) => void
cdWorkflowList?: any[]
showWebhookTippy?: boolean
hideWebhookTippy?: () => void
isJobView?: boolean
envList?: any[]
filteredCIPipelines?: any[]
addNewPipelineBlocked?: boolean
handleChangeCI?: (changeCIPayload: ChangeCIPayloadType) => void
selectedNode?: SelectedNode
handleSelectedNodeChange?: (selectedNode: SelectedNode) => void
appName?: string
getWorkflows?: () => void
refreshParentWorkflows?: () => void
reloadEnvironments?: () => void
workflowPositionState?: WorkflowPositionState
handleDisplayLoader?: () => void
isOffendingPipelineView?: boolean
}

interface WorkflowState {
top: number
left: number
showCIMenu: boolean
}

export class Workflow extends Component<WorkflowProps, WorkflowState> {
constructor(props) {
super(props)
Expand Down Expand Up @@ -931,6 +878,8 @@ export class Workflow extends Component<WorkflowProps, WorkflowState> {
}

render() {
{ console.log('props', this.props)}

return <>{this.renderWorkflow()}</>
}
}
39 changes: 2 additions & 37 deletions src/components/workflowEditor/nodes/CINode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,19 @@
import { Component, ReactElement } from 'react'
import {
WorkflowNodeType,
SelectedNode,
CommonNodeAttr,
ConditionalWrap,
Icon,
} from '@devtron-labs/devtron-fe-common-lib'
import Tippy from '@tippyjs/react'
import { Link, RouteComponentProps } from 'react-router-dom'
import { Link } from 'react-router-dom'
import ToggleCDSelectButton from '../ToggleCDSelectButton'
import { ReactComponent as Warning } from '../../../assets/icons/ic-warning.svg'
import { ReactComponent as ICLinkedCINode } from '../../../assets/icons/ic-node-build-linked.svg'
import { ReactComponent as IcLink } from '../../../assets/icons/ic-link.svg'
import { DEFAULT_ENV } from '../../app/details/triggerView/Constants'
import { URLS } from '../../../config'
import { getLinkedCITippyContent } from '../../../Pages/Shared/LinkedCIDetailsModal/utils'
import { WorkflowProps } from '../Workflow'

export interface CINodeProps extends RouteComponentProps<{}>, Pick<WorkflowProps, 'isOffendingPipelineView' | 'isTemplateView'> {
x: number
y: number
width: number
height: number
id: number
title: string
type: string
description: string
workflowId: number
triggerType: string
isLinkedCI: boolean
isExternalCI: boolean
isJobCI: boolean
isTrigger: boolean
linkedCount: number
downstreams: CommonNodeAttr[]
to: string
toggleCDMenu: () => void
configDiffView?: boolean
hideWebhookTippy?: () => void
isJobView?: boolean
showPluginWarning?: boolean
envList?: any[]
filteredCIPipelines?: any[]
addNewPipelineBlocked?: boolean
handleSelectedNodeChange?: (selectedNode: SelectedNode) => void
selectedNode?: SelectedNode
isLastNode?: boolean
appId: string
getWorkflows: () => void
}
import { CINodeProps } from './types'

export class CINode extends Component<CINodeProps> {
handleLinkedCIWorkflowChipClick = (e) => {
Expand Down
24 changes: 4 additions & 20 deletions src/components/workflowEditor/nodes/StaticNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,14 @@
* limitations under the License.
*/

import React, { Component } from 'react'
import { Component } from 'react'
import { GIT_BRANCH_NOT_CONFIGURED } from '../../../config'
import { CiPipelineSourceConfig, GitProviderIcon, GitProviderType } from '@devtron-labs/devtron-fe-common-lib'

export interface StaticNodeProps {
x: number
y: number
branch: string
icon: string
id: string
url: string
title: string
height: number
width: number
downstreams: any[]
sourceType: string
regex?: string
primaryBranchAfterRegex?: string
to?: string
handleGoToWorkFlowEditor?: (e?: any) => void
}

import { StaticNodeProps } from './types'
export class StaticNode extends Component<StaticNodeProps> {
renderCardContent() {
console.log('props',this.props.url)

return (
<div
className={`workflow-node workflow-node--static ${
Expand Down
Loading
Loading