Skip to content

Commit e8ebd7c

Browse files
committed
fix: Remove invalid children prop from DocLink component
1 parent 9a5334f commit e8ebd7c

File tree

35 files changed

+91
-129
lines changed

35 files changed

+91
-129
lines changed

src/Pages/App/CreateAppModal/Sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { DOCUMENTATION, getDocumentationUrl, ModalSidebarPanel } from '@devtron-labs/devtron-fe-common-lib'
17+
import { getDocumentationUrl, ModalSidebarPanel } from '@devtron-labs/devtron-fe-common-lib'
1818

1919
import { CreationMethodType, SidebarProps } from './types'
2020

@@ -55,7 +55,7 @@ const Sidebar = ({
5555
<div className="divider__secondary--horizontal" />
5656
<ModalSidebarPanel
5757
heading={null}
58-
documentationLink={getDocumentationUrl(DOCUMENTATION.APP_CREATE)}
58+
documentationLink={getDocumentationUrl({ docLinkKey: 'APP_CREATE' })}
5959
rootClassName="w-100 dc__no-background-imp"
6060
>
6161
<div className="flexbox-col dc__gap-24">

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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
AppConfigProps,
2121
BASE_CONFIGURATION_ENV_ID,
2222
ConfigResourceType,
23-
DOCUMENTATION,
2423
getDocumentationUrl,
2524
ResourceKindType,
2625
stringComparatorBySortOrder,
@@ -139,7 +138,7 @@ export const getNavItems = ({
139138
href: `/job/${appId}/edit/materials`,
140139
stage: STAGE_NAME.GIT_MATERIAL,
141140
isLocked: !_isUnlocked.material,
142-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.JOB_SOURCE_CODE),
141+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'JOB_SOURCE_CODE' }),
143142
flowCompletionPercent: completedPercent,
144143
currentStep: completedSteps,
145144
required: true,
@@ -149,7 +148,7 @@ export const getNavItems = ({
149148
href: `/job/${appId}/edit/workflow`,
150149
stage: STAGE_NAME.WORKFLOW,
151150
isLocked: !_isUnlocked.workflowEditor,
152-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.JOB_WORKFLOW_EDITOR),
151+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'JOB_WORKFLOW_EDITOR' }),
153152
flowCompletionPercent: completedPercent,
154153
currentStep: completedSteps,
155154
required: true,
@@ -167,7 +166,7 @@ export const getNavItems = ({
167166
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.CONFIG_MAPS, true, isTemplateView),
168167
stage: STAGE_NAME.CONFIGMAP,
169168
isLocked: !_isUnlocked.configmap,
170-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.APP_CREATE_CONFIG_MAP),
169+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CONFIG_MAP' }),
171170
flowCompletionPercent: completedPercent,
172171
currentStep: completedSteps,
173172
isProtectionAllowed: true,
@@ -179,7 +178,7 @@ export const getNavItems = ({
179178
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.SECRETS, true, isTemplateView),
180179
stage: STAGE_NAME.SECRETS,
181180
isLocked: !_isUnlocked.secret,
182-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.APP_CREATE_SECRET),
181+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_SECRET' }),
183182
flowCompletionPercent: completedPercent,
184183
currentStep: completedSteps,
185184
isProtectionAllowed: true,
@@ -205,7 +204,7 @@ export const getNavItems = ({
205204
href: `${basePath}/edit/materials`,
206205
stage: STAGE_NAME.GIT_MATERIAL,
207206
isLocked: !_isUnlocked.material,
208-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.APP_CREATE_MATERIAL),
207+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_MATERIAL' }),
209208
flowCompletionPercent: completedPercent,
210209
currentStep: completedSteps,
211210
required: true,
@@ -215,7 +214,7 @@ export const getNavItems = ({
215214
href: `${basePath}/edit/docker-build-config`,
216215
stage: STAGE_NAME.CI_CONFIG,
217216
isLocked: !_isUnlocked.dockerBuildConfig,
218-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.APP_CREATE_CI_CONFIG),
217+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CI_CONFIG' }),
219218
flowCompletionPercent: completedPercent,
220219
currentStep: completedSteps,
221220
required: true,
@@ -234,7 +233,7 @@ export const getNavItems = ({
234233
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.DEPLOYMENT_TEMPLATE, null, isTemplateView),
235234
stage: STAGE_NAME.DEPLOYMENT_TEMPLATE,
236235
isLocked: !_isUnlocked.deploymentTemplate,
237-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.APP_DEPLOYMENT_TEMPLATE),
236+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_DEPLOYMENT_TEMPLATE' }),
238237
flowCompletionPercent: completedPercent,
239238
currentStep: completedSteps,
240239
isProtectionAllowed: true,
@@ -266,7 +265,7 @@ export const getNavItems = ({
266265
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.CONFIG_MAPS, null, isTemplateView),
267266
stage: STAGE_NAME.CONFIGMAP,
268267
isLocked: !_isUnlocked.configmap,
269-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.APP_CREATE_CONFIG_MAP),
268+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CONFIG_MAP' }),
270269
flowCompletionPercent: completedPercent,
271270
currentStep: completedSteps,
272271
isProtectionAllowed: true,
@@ -278,7 +277,7 @@ export const getNavItems = ({
278277
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.SECRETS, null, isTemplateView),
279278
stage: STAGE_NAME.SECRETS,
280279
isLocked: !_isUnlocked.secret,
281-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.APP_CREATE_SECRET),
280+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_SECRET' }),
282281
flowCompletionPercent: completedPercent,
283282
currentStep: completedSteps,
284283
isProtectionAllowed: true,
@@ -293,7 +292,7 @@ export const getNavItems = ({
293292
href: `${basePath}/edit/external-links`,
294293
stage: STAGE_NAME.EXTERNAL_LINKS,
295294
isLocked: false,
296-
supportDocumentURL: getDocumentationUrl(DOCUMENTATION.EXTERNAL_LINKS),
295+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'EXTERNAL_LINKS' }),
297296
flowCompletionPercent: completedPercent,
298297
currentStep: completedSteps,
299298
},

src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DTChartSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ const ChartSelectorDropdown = ({
183183
&nbsp;
184184
{CHART_DOCUMENTATION_LINK[chart.name] && (
185185
<DocLink
186-
docLink={CHART_DOCUMENTATION_LINK[chart.name]}
186+
docLinkKey={CHART_DOCUMENTATION_LINK[chart.name]}
187187
dataTestId="chart-doc-link"
188188
/>
189189
)}

src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/constants.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { DOCUMENTATION, SelectPickerOptionType } from '@devtron-labs/devtron-fe-common-lib'
17+
import { SelectPickerOptionType } from '@devtron-labs/devtron-fe-common-lib'
1818

1919
export const PROTECT_BASE_DEPLOYMENT_TEMPLATE_IDENTIFIER_DTO = 'BaseDeploymentTemplate' as const
2020

2121
export const CHART_TYPE_TAB_KEYS = { DEVTRON_CHART: 'devtronChart', CUSTOM_CHARTS: 'customCharts' }
2222
export const CHART_TYPE_TAB = { devtronChart: 'Charts by Devtron', customCharts: 'Custom charts' }
2323

2424
export const CHART_DOCUMENTATION_LINK = {
25-
'Job & CronJob': DOCUMENTATION.JOB_CRONJOB,
26-
'Rollout Deployment': DOCUMENTATION.ROLLOUT,
27-
Deployment: DOCUMENTATION.DEPLOYMENT,
25+
'Job & CronJob': 'JOB_CRONJOB',
26+
'Rollout Deployment': 'ROLLOUT',
27+
Deployment: 'DEPLOYMENT',
2828
}
2929

3030
export const GUI_VIEW_TEXTS = {

src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvironmentOverrideRouter.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
ConfirmationDialog,
2222
DeleteConfirmationModal,
2323
DocLink,
24-
DOCUMENTATION,
2524
EnvResourceType,
2625
getEnvironmentListMinPublic,
2726
InfoBlock,
@@ -51,7 +50,7 @@ const EnvOverridesHelpNote = () => (
5150
<div className="fs-12 fw-4 lh-18">
5251
Environment overrides allow you to manage environment specific configurations after you’ve created deployment
5352
pipelines. &nbsp;
54-
<DocLink docLink={DOCUMENTATION.APP_CREATE_ENVIRONMENT_OVERRIDE} dataTestId="env-overrides-learn-more" />
53+
<DocLink docLinkKey="APP_CREATE_ENVIRONMENT_OVERRIDE" dataTestId="env-overrides-learn-more" />
5554
</div>
5655
)
5756

src/Pages/GlobalConfigurations/DeploymentCharts/List/DeploymentChartsList.component.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import DOMPurify from 'dompurify'
2020
import {
2121
APIResponseHandler,
2222
DocLink,
23-
DOCUMENTATION,
2423
EMPTY_STATE_STATUS,
2524
GenericEmptyState,
2625
GenericFilterEmptyState,
@@ -89,10 +88,7 @@ const DeploymentChartsList = () => {
8988
subTitle={
9089
<>
9190
Import custom charts to use them in apps instead of the default system template. &nbsp;
92-
<DocLink
93-
docLink={DOCUMENTATION.DEPLOYMENT_TEMPLATE}
94-
dataTestId="deployment-charts-list-learn-more"
95-
/>
91+
<DocLink docLinkKey="DEPLOYMENT_TEMPLATE" dataTestId="deployment-charts-list-learn-more" />
9692
</>
9793
}
9894
isButtonAvailable

src/Pages/GlobalConfigurations/DeploymentCharts/List/UploadChartModal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { useRef, useState } from 'react'
1919
import {
2020
ButtonWithLoader,
2121
CustomInput,
22-
DOCUMENTATION,
2322
getDocumentationUrl,
2423
noop,
2524
showError,
@@ -205,7 +204,7 @@ const UploadChartModal = ({ closeUploadPopup }: UploadChartModalType) => {
205204
📙 Need help?&nbsp;
206205
<a
207206
className="dc__link fw-6"
208-
href={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_CUSTOM_CHART_PRE_REQUISITES)}
207+
href={getDocumentationUrl({ docLinkKey: 'GLOBAL_CONFIG_CUSTOM_CHART_PRE_REQUISITES' })}
209208
target="_blank"
210209
rel="noreferrer noopener"
211210
>

src/Pages/Shared/ConfigMapSecret/helpers.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
CMSecretComponentType,
2121
CMSecretExternalType,
2222
DocLink,
23-
DOCUMENTATION,
2423
Icon,
2524
InfoBlock,
2625
InfoColourBar,
@@ -44,7 +43,7 @@ export const renderESOInfo = (isESO: boolean) =>
4443
External Secrets Operator
4544
</Link>
4645
&nbsp;<span>should be installed in the target cluster.</span>&nbsp;
47-
<DocLink docLink={DOCUMENTATION.EXTERNAL_SECRET} dataTestId="learn-more-about-external-secrets" />
46+
<DocLink docLinkKey="EXTERNAL_SECRET" dataTestId="learn-more-about-external-secrets" />
4847
</p>
4948
}
5049
/>
@@ -76,8 +75,8 @@ export const renderChartVersionBelow3090NotSupportedText = () => (
7675
<span className="cr-5">Supported for Chart Versions 3.10 and above.</span>&nbsp;
7776
<span className="cn-7">Learn more about</span>&nbsp;
7877
<DocLink
79-
docLink={DOCUMENTATION.APP_ROLLOUT_DEPLOYMENT_TEMPLATE}
80-
docLinkText="Deployment Template &gt; Chart Version"
78+
docLinkKey="APP_ROLLOUT_DEPLOYMENT_TEMPLATE"
79+
text="Deployment Template &gt; Chart Version"
8180
dataTestId="chart-version-learn-more"
8281
/>
8382
</span>

src/Pages/Shared/EnvironmentOverride/EnvironmentOverrides.types.ts

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

1717
import React from 'react'
1818

19-
import { AppConfigProps, DOCUMENTATION, getDocumentationUrl } from '@devtron-labs/devtron-fe-common-lib'
19+
import { AppConfigProps, getDocumentationUrl } from '@devtron-labs/devtron-fe-common-lib'
2020

2121
import {
2222
AppConfigState,
@@ -45,12 +45,12 @@ export const SECTION_HEADING_INFO: Record<string, SectionHeadingType> = {
4545
title: 'ConfigMaps',
4646
subtitle:
4747
'ConfigMap is used to store common configuration variables, allowing users to unify environment variables for different modules in a distributed system into one object.',
48-
learnMoreLink: getDocumentationUrl(DOCUMENTATION.APP_CREATE_CONFIG_MAP),
48+
learnMoreLink: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CONFIG_MAP' }),
4949
},
5050
[URLS.APP_CS_CONFIG]: {
5151
title: 'Secrets',
5252
subtitle: 'A Secret is an object that contains sensitive data such as passwords, OAuth tokens, and SSH keys.',
53-
learnMoreLink: getDocumentationUrl(DOCUMENTATION.APP_CREATE_SECRET),
53+
learnMoreLink: getDocumentationUrl({ docLinkKey: 'APP_CREATE_SECRET' }),
5454
},
5555
}
5656

src/components/ApplicationGroup/Details/TriggerView/BulkCITrigger.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ import {
4242
uploadCIPipelineFile,
4343
UploadFileProps,
4444
savePipeline,
45-
DOCUMENTATION,
46-
getDocumentationUrl
45+
getDocumentationUrl,
4746
} from '@devtron-labs/devtron-fe-common-lib'
4847
import Tippy from '@tippyjs/react'
4948
import { getCIPipelineURL, getParsedBranchValuesForPlugin, importComponentFromFELibrary } from '../../../common'
@@ -784,7 +783,7 @@ const BulkCITrigger = ({
784783
<span>{IGNORE_CACHE_INFO.BlobStorageNotConfigured.infoText}</span>
785784
<a
786785
className="fs-12 fw-6 cb-5 dc__no-decor ml-4"
787-
href={getDocumentationUrl(DOCUMENTATION.BLOB_STORAGE)}
786+
href={getDocumentationUrl({ docLinkKey: 'BLOB_STORAGE' })}
788787
target="_blank"
789788
rel="noreferrer"
790789
>

0 commit comments

Comments
 (0)