Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"homepage": "/dashboard",
"dependencies": {
"@devtron-labs/devtron-fe-common-lib": "1.1.7",
"@devtron-labs/devtron-fe-common-lib": "1.1.8",
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
"@rjsf/core": "^5.13.3",
"@rjsf/utils": "^5.13.3",
Expand Down
1 change: 1 addition & 0 deletions src/components/ApplicationGroup/AppGroup.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export interface BulkCITriggerType extends BulkRuntimeParamsType {
onClickTriggerBulkCI: (appIgnoreCache: Record<number, boolean>, appsToRetry?: Record<string, boolean>) => void
getWebhookPayload: (id, webhookTimeStampOrder: typeof TIME_STAMP_ORDER) => void
webhookPayloads: WebhookPayloadType
setWebhookPayloads: React.Dispatch<React.SetStateAction<WebhookPayloadType>>
isWebhookPayloadLoading: boolean
isShowRegexModal: (_appId: number, ciNodeId: number, inputMaterialList: any[]) => boolean
responseList: ResponseRowType[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const BulkCITrigger = ({
setRuntimeParamsErrorState,
setPageViewType,
webhookPayloads,
setWebhookPayloads,
isWebhookPayloadLoading,
}: BulkCITriggerType) => {
const [showRegexModal, setShowRegexModal] = useState(false)
Expand Down Expand Up @@ -299,7 +300,10 @@ const BulkCITrigger = ({
}
}

const onCloseWebhookModal = () => setIsWebhookBulkCI(false)
const onCloseWebhookModal = () => {
setIsWebhookBulkCI(false)
setWebhookPayloads(null)
}

const renderHeaderSection = (): JSX.Element | null => {
if (showWebhookModal) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ export default function EnvTriggerView({ filteredAppIds, isVirtualEnv }: AppGrou
setCILoading(true)
history.push(`${url}${URLS.BUILD}/${ciNodeId}`)
setMaterialType(MATERIAL_TYPE.inputMaterialList)
setWebhookPayloads(null)
ReactGA.event(ENV_TRIGGER_VIEW_GA_EVENTS.MaterialClicked)
abortControllerRef.current.abort()
abortControllerRef.current = new AbortController()
Expand Down Expand Up @@ -1359,7 +1360,7 @@ export default function EnvTriggerView({ filteredAppIds, isVirtualEnv }: AppGrou

const onShowBulkCIModal = () => {
setCILoading(true)
// setShowBulkCIModal(true)
setWebhookPayloads(null)
setTimeout(() => {
setShowBulkCIModal(true)
}, 100)
Expand Down Expand Up @@ -2081,6 +2082,7 @@ export default function EnvTriggerView({ filteredAppIds, isVirtualEnv }: AppGrou
onClickTriggerBulkCI={onClickTriggerBulkCI}
getWebhookPayload={getWebhookPayload}
webhookPayloads={webhookPayloads}
setWebhookPayloads={setWebhookPayloads}
isWebhookPayloadLoading={isWebhookPayloadLoading}
isShowRegexModal={isShowRegexModal}
responseList={responseList}
Expand Down
4 changes: 3 additions & 1 deletion src/components/CIPipelineN/CIPipeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ export default function CIPipeline({
let branchName = ''
if (_formData?.materials?.length) {
for (const material of _formData.materials) {
if (!material.isRegex || material.value) {
const canApplyPluginOnBranch =
material.type !== SourceTypeMap.WEBHOOK && (!material.isRegex || material.value)
if (canApplyPluginOnBranch) {
branchName += `${branchName ? ',' : ''}${getParsedBranchValuesForPlugin(material.value)}`
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/app/details/triggerView/TriggerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ class TriggerView extends Component<TriggerViewProps, TriggerViewState> {
}

onClickCIMaterial(ciNodeId: string, ciPipelineName: string, preserveMaterialSelection: boolean) {
this.setState({ loader: true, materialType: 'inputMaterialList' })
this.setState({ loader: true, materialType: 'inputMaterialList', webhookPayloads: null })
ReactGA.event(TRIGGER_VIEW_GA_EVENTS.MaterialClicked)
this.abortController.abort()
this.abortController = new AbortController()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ export const WebhookReceivedPayloadModal = ({
.pop()

useEffect(() => {
if (workflowId) {
getWebhookPayload(workflowId)
// Sometime the workflow id and material's actual id differs
if (material[0]?.id) {
getWebhookPayload(material[0]?.id)
}
}, [workflowId])
}, [JSON.stringify(material)])

const onClickCloseButton = (): void => {
triggerViewContext.closeCIModal()
Expand Down
4 changes: 2 additions & 2 deletions src/components/cdPipeline/DeleteCDNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const DeleteCDNode = ({
handleDeletePipeline(DELETE_ACTION.FORCE_DELETE, deleteCD, deploymentAppType)
}

if (deleteDialog === DeleteDialogType.showForceDeleteDialog) {
if (deleteDialog === DeleteDialogType.showForceDeleteDialog && showDeleteDialog) {
return (
<ForceDeleteDialog
forceDeleteDialogTitle={forceDeleteData.forceDeleteDialogTitle}
Expand All @@ -62,7 +62,7 @@ const DeleteCDNode = ({
)
}

if (deleteDialog === DeleteDialogType.showNonCascadeDeleteDialog) {
if (deleteDialog === DeleteDialogType.showNonCascadeDeleteDialog && showDeleteDialog) {
return (
<ClusterNotReachableDailog
clusterName={clusterName}
Expand Down
8 changes: 8 additions & 0 deletions src/components/common/helpers/Helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,14 @@ export const getAndSetAppGroupFilters = ({
)
const filteredLocalStorageGroupList = localStorageGroupList.filter(({ value }) => groupFilterOptionsMap[value])

// this means last selected group filter has been deleted
if (!!localStorageGroupList.length && !filteredLocalStorageGroupList.length) {
setSelectedAppList([])
setSelectedGroupFilter([])
setAppGroupFilterInLocalStorage({ filterParentType, resourceId, resourceList: [], groupList: [] })
return
}

setSelectedAppList(filteredLocalStorageResourceList)
setSelectedGroupFilter(filteredLocalStorageGroupList)
} catch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ const ManifestComponent = ({
})
.finally(resolve)
})

const uneditedManifest = useMemo(() => {
try {
const object = YAML.parse(manifest)
Expand All @@ -467,7 +467,6 @@ const ManifestComponent = ({
}
}, [manifest, hideManagedFields])


const handleApplyChanges = async () => {
setLoading(true)
setLoadingMsg('Applying changes')
Expand Down Expand Up @@ -681,6 +680,7 @@ const ManifestComponent = ({
{renderEditorInfo()}
{renderErrorBar()}
<ManifestGUIView
manifestGUIFormRef={manifestGUIFormRef}
guiSchema={guiSchema}
handleChange={handleGUIViewValueChange}
// For uniformity have called method but as of now in this case it will always be trimedManifestEditorData
Expand Down Expand Up @@ -768,9 +768,11 @@ const ManifestComponent = ({
/>
)}
{!error && (
<div className={`${
manifestFormConfigurationType === ConfigurationType.GUI ? 'bcn-0' : ''
} flexbox-col flex-grow-1 dc__overflow-scroll h-100`}>
<div
className={`${
manifestFormConfigurationType === ConfigurationType.GUI ? 'bcn-0' : ''
} flexbox-col flex-grow-1 dc__overflow-scroll h-100`}
>
{isResourceMissing && !loading && !showManifestCompareView ? (
<MessageUI
msg="Manifest not available"
Expand Down
Loading
Loading