Skip to content

Commit caea1bf

Browse files
committed
chore: manifest info block
1 parent 57507dc commit caea1bf

File tree

5 files changed

+32
-36
lines changed

5 files changed

+32
-36
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ src/components/v2/values/chartValuesDiff/ProjectUpdateModal.tsx
384384
src/components/v2/values/common/chartValues.api.ts
385385
src/components/workflowEditor/CDSuccessModal.tsx
386386
src/components/workflowEditor/CreateWorkflow.tsx
387-
src/components/workflowEditor/DeprecatedPipelineWarning.tsx
388387
src/components/workflowEditor/DeprecatedWarningModal.tsx
389388
src/components/workflowEditor/EmptyWorkflow.tsx
390389
src/components/workflowEditor/NoGitOpsConfiguredWarning.tsx

src/Pages/Shared/ConfigMapSecret/helpers.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@
1616

1717
import { Link } from 'react-router-dom'
1818

19-
import { CMSecretComponentType, CMSecretExternalType, Icon, InfoColourBar } from '@devtron-labs/devtron-fe-common-lib'
19+
import {
20+
CMSecretComponentType,
21+
CMSecretExternalType,
22+
Icon,
23+
InfoBlock,
24+
InfoColourBar,
25+
} from '@devtron-labs/devtron-fe-common-lib'
2026

2127
import { ReactComponent as InfoIcon } from '@Icons/info-filled.svg'
2228
import { DOCUMENTATION } from '@Config/constants'
@@ -26,9 +32,8 @@ import { EXTERNAL_INFO_TEXT } from './constants'
2632

2733
export const renderESOInfo = (isESO: boolean) =>
2834
isESO ? (
29-
<InfoColourBar
30-
classname="info_bar"
31-
message={
35+
<InfoBlock
36+
description={
3237
<p className="m-0 cn-9 fs-13 fw-4 lh-20">
3338
<Link
3439
to={`${URLS.CHARTS_DISCOVER}?appStoreName=external-secret`}
@@ -48,8 +53,6 @@ export const renderESOInfo = (isESO: boolean) =>
4853
</a>
4954
</p>
5055
}
51-
Icon={InfoIcon}
52-
iconSize={20}
5356
/>
5457
) : null
5558

src/components/app/details/triggerView/cdMaterial.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
showError,
2323
Progressing,
2424
ConditionalWrap,
25-
InfoColourBar,
2625
noop,
2726
MaterialInfo,
2827
UserApprovalMetadataType,
@@ -88,6 +87,7 @@ import {
8887
DEPLOYMENT_CONFIG_DIFF_SORT_KEY,
8988
SortingOrder,
9089
SegmentedControlProps,
90+
InfoBlock,
9191
} from '@devtron-labs/devtron-fe-common-lib'
9292
import Tippy from '@tippyjs/react'
9393
import {
@@ -104,7 +104,6 @@ import close from '../../../../assets/icons/ic-close.svg'
104104
import { ReactComponent as Check } from '../../../../assets/icons/ic-check-circle.svg'
105105
import { ReactComponent as DeployIcon } from '../../../../assets/icons/ic-nav-rocket.svg'
106106
import { ReactComponent as BackIcon } from '../../../../assets/icons/ic-arrow-backward.svg'
107-
import { ReactComponent as InfoIcon } from '../../../../assets/icons/info-filled.svg'
108107
import { ReactComponent as InfoOutline } from '../../../../assets/icons/ic-info-outline.svg'
109108
import { ReactComponent as SearchIcon } from '../../../../assets/icons/ic-search.svg'
110109
import { ReactComponent as RefreshIcon } from '../../../../assets/icons/ic-arrows_clockwise.svg'
@@ -1839,11 +1838,10 @@ const CDMaterial = ({
18391838
{isApprovalConfigured &&
18401839
ApprovedImagesMessage &&
18411840
(state.isRollbackTrigger || material.length - Number(isConsumedImageAvailable) > 0) && (
1842-
<InfoColourBar
1843-
message={<ApprovedImagesMessage viewAllImages={viewAllImages} />}
1844-
classname="info_bar dc__no-border-radius dc__no-top-border"
1845-
Icon={InfoIcon}
1846-
iconClass="icon-dim-20"
1841+
<InfoBlock
1842+
borderConfig={{ top: false }}
1843+
borderRadiusConfig={{ top: false, bottom: false, left: false, right: false }}
1844+
description={<ApprovedImagesMessage viewAllImages={viewAllImages} />}
18471845
/>
18481846
)}
18491847
{!isFromBulkCD &&

src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/Manifest.component.tsx

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
DeploymentAppTypes,
3131
FormProps,
3232
getComponentSpecificThemeClass,
33-
InfoColourBar,
33+
InfoBlock,
3434
isCodeMirrorEnabled,
3535
logExceptionToSentry,
3636
noop,
@@ -45,8 +45,6 @@ import {
4545
} from '@devtron-labs/devtron-fe-common-lib'
4646

4747
import { ReactComponent as ICClose } from '@Icons/ic-close.svg'
48-
import { ReactComponent as ICErrorExclamation } from '@Icons/ic-error-exclamation.svg'
49-
import { ReactComponent as ICInfoFilled } from '@Icons/ic-info-filled.svg'
5048
import { DEFAULT_CLUSTER_ID } from '@Components/cluster/cluster.type'
5149
import { importComponentFromFELibrary } from '@Components/common'
5250

@@ -78,7 +76,7 @@ import {
7876
updateManifestResourceHelmApps,
7977
} from '../nodeDetail.api'
8078
import { NodeDetailTab } from '../nodeDetail.type'
81-
import { getDecodedEncodedSecretManifestData, getTrimmedManifestData } from '../nodeDetail.util'
79+
import { getDecodedEncodedSecretManifestData, getTrimmedManifestData, manifestBorderConfig } from '../nodeDetail.util'
8280

8381
const renderOutOfSyncWarning = importComponentFromFELibrary('renderOutOfSyncWarning', null, 'function')
8482
const getManifestGUISchema = importComponentFromFELibrary('getManifestGUISchema', null, 'function')
@@ -660,15 +658,7 @@ const ManifestComponent = ({
660658
)
661659
}
662660

663-
return (
664-
<InfoColourBar
665-
message={message}
666-
classname="w-100 m-0 fs-12 fw-4 lh-16 cn-9 py-8 px-16 bcb-1 dc__border-bottom dc__no-border-radius dc__no-top-border dc__no-left-border dc__no-right-border dc__word-break"
667-
Icon={ICInfoFilled}
668-
iconClass="icon-dim-16"
669-
linkClass="dc__truncate--clamp-6"
670-
/>
671-
)
661+
return <InfoBlock description={message} {...manifestBorderConfig} />
672662
}
673663

674664
const renderErrorBar = (isCodeEditorView: boolean = false) => {
@@ -680,15 +670,7 @@ const ManifestComponent = ({
680670
return <CodeEditor.ErrorBar text={errorText} />
681671
}
682672

683-
return (
684-
<InfoColourBar
685-
message={errorText}
686-
classname="w-100 m-0 fs-12 fw-4 lh-16 py-8 px-16 bco-1 co-5 dc__border-bottom dc__no-border-radius dc__no-top-border dc__no-left-border dc__no-right-border dc__word-break"
687-
Icon={ICErrorExclamation}
688-
iconClass="icon-dim-16"
689-
linkClass="dc__truncate--clamp-6"
690-
/>
691-
)
673+
return <InfoBlock variant="error" description={errorText} {...manifestBorderConfig} />
692674
}
693675

694676
const renderContent = () => {

src/components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.util.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,3 +411,17 @@ export const getDeploymentType = (deploymentAppType: DeploymentAppTypes): K8sRes
411411
}
412412
return K8sResourcePayloadDeploymentType.FLUXCD_INSTALLED
413413
}
414+
415+
export const manifestBorderConfig = {
416+
borderConfig: {
417+
top: false,
418+
left: false,
419+
right: false,
420+
},
421+
borderRadiusConfig: {
422+
top: false,
423+
left: false,
424+
right: false,
425+
bottom: false,
426+
},
427+
};

0 commit comments

Comments
 (0)