Skip to content

Commit d752ed6

Browse files
committed
chore: replaced all global confoguration documentation
1 parent 8ed8096 commit d752ed6

File tree

27 files changed

+133
-152
lines changed

27 files changed

+133
-152
lines changed

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { useState } from 'react'
1919
import {
2020
ComponentSizeType,
2121
DeploymentChartVersionType,
22+
DocLink,
2223
InvalidYAMLTippyWrapper,
2324
PipelineMigratedFromType,
2425
PopupMenu,
@@ -181,15 +182,10 @@ const ChartSelectorDropdown = ({
181182
chart.description.substring(0, 250)}
182183
 
183184
{CHART_DOCUMENTATION_LINK[chart.name] && (
184-
<a
185-
className="dc__no-decor"
186-
href={CHART_DOCUMENTATION_LINK[chart.name]}
187-
target="_blank"
188-
rel="noreferrer noopener"
189-
onClick={stopPropagation}
190-
>
191-
Learn more
192-
</a>
185+
<DocLink
186+
docLink={CHART_DOCUMENTATION_LINK[chart.name]}
187+
dataTestId="chart-doc-link"
188+
/>
193189
)}
194190
</div>
195191
)}

src/Pages/GlobalConfigurations/Authorization/APITokens/CreateAPIToken.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { Moment } from 'moment'
2222

2323
import {
2424
CustomInput,
25+
getDocumentationUrl,
2526
InfoIconTippy,
2627
ServerErrors,
2728
showError,
@@ -57,7 +58,7 @@ export const renderQuestionwithTippy = () => (
5758
<InfoIconTippy
5859
heading={API_COMPONENTS.TITLE}
5960
infoText={API_COMPONENTS.QUESTION_ICON_INFO}
60-
documentationLink={DOCUMENTATION.GLOBAL_CONFIG_API_TOKEN}
61+
documentationLink={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_API_TOKEN)}
6162
documentationLinkText="View Documentation"
6263
iconClassName="icon-dim-20 fcn-9 ml-4"
6364
/>

src/Pages/GlobalConfigurations/Authorization/PermissionGroups/List/PermissionGroupListHeader.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
Button,
2121
ButtonComponentType,
2222
ComponentSizeType,
23+
getDocumentationUrl,
2324
InfoIconTippy,
2425
SearchBar,
2526
useMainContext,
@@ -50,7 +51,7 @@ const PermissionGroupListHeader = ({
5051
additionalContent={
5152
<div className="pl-12 pb-12">
5253
<a
53-
href={DOCUMENTATION.GLOBAL_CONFIG_GROUPS}
54+
href={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_GROUPS)}
5455
target="_blank"
5556
rel="noreferrer noreferrer"
5657
className="anchor flexbox flex-align-center fs-13 dc__gap-4"

src/Pages/GlobalConfigurations/Authorization/SSOLoginServices/SSOLogin.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import {
3939
DEFAULT_SECRET_PLACEHOLDER,
4040
ErrorScreenManager,
4141
FeatureTitleWithInfo,
42+
getDocumentationUrl,
4243
InfoBlock,
4344
MODES,
4445
noop,
@@ -833,7 +834,7 @@ class SSOLogin extends Component<SSOLoginProps, SSOLoginState> {
833834
<FeatureTitleWithInfo
834835
title={HEADER_TEXT.SSO_LOGIN.title}
835836
renderDescriptionContent={() => HEADER_TEXT.SSO_LOGIN.description}
836-
docLink={DOCUMENTATION.GLOBAL_CONFIG_SSO}
837+
docLink={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_SSO)}
837838
showInfoIconTippy
838839
dataTestId="sso-login-heading"
839840
/>

src/Pages/GlobalConfigurations/Authorization/UserPermissions/List/UserPermissionListHeader.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
Button,
2121
ButtonComponentType,
2222
ComponentSizeType,
23+
getDocumentationUrl,
2324
InfoIconTippy,
2425
SearchBar,
2526
useMainContext,
@@ -56,7 +57,7 @@ const UserPermissionListHeader = ({
5657
additionalContent={
5758
<div className="pl-12 pb-12">
5859
<a
59-
href={DOCUMENTATION.GLOBAL_CONFIG_USER}
60+
href={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_USER)}
6061
target="_blank"
6162
rel="noreferrer noreferrer"
6263
className="anchor flexbox flex-align-center fs-13 dc__gap-4"

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import DOMPurify from 'dompurify'
1919

2020
import {
2121
APIResponseHandler,
22+
DocLink,
2223
EMPTY_STATE_STATUS,
2324
GenericEmptyState,
2425
GenericFilterEmptyState,
@@ -87,15 +88,11 @@ const DeploymentChartsList = () => {
8788
title={EMPTY_STATE_STATUS.CUSTOM_CHART_LIST.TITLE}
8889
subTitle={
8990
<>
90-
Import custom charts to use them in apps instead of the default system template.
91-
<a
92-
className="dc__no-decor"
93-
href={DOCUMENTATION.DEPLOYMENT_TEMPLATE}
94-
target="_blank"
95-
rel="noreferrer noopener"
96-
>
97-
Learn more
98-
</a>
91+
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+
/>
9996
</>
10097
}
10198
isButtonAvailable

src/Pages/GlobalConfigurations/DeploymentCharts/List/DeploymentChartsListHeader.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 { InfoIconTippy, SearchBar } from '@devtron-labs/devtron-fe-common-lib'
17+
import { getDocumentationUrl, InfoIconTippy, SearchBar } from '@devtron-labs/devtron-fe-common-lib'
1818

1919
import { CUSTOM_CHART_TITLE_DESCRIPTION_CONTENT, DOCUMENTATION } from '@Config/constants'
2020

@@ -38,7 +38,7 @@ const DeploymentChartsListHeader = ({
3838
</p>
3939
}
4040
documentationLinkText={CUSTOM_CHART_TITLE_DESCRIPTION_CONTENT.documentationLinkText}
41-
documentationLink={DOCUMENTATION.CUSTOM_CHART}
41+
documentationLink={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_CUSTOM_CHART)}
4242
iconClassName="icon-dim-20 fcn-6"
4343
/>
4444
</div>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { useRef, useState } from 'react'
1919
import {
2020
ButtonWithLoader,
2121
CustomInput,
22+
getDocumentationUrl,
2223
noop,
2324
showError,
2425
Textarea,
@@ -203,7 +204,7 @@ const UploadChartModal = ({ closeUploadPopup }: UploadChartModalType) => {
203204
📙 Need help?&nbsp;
204205
<a
205206
className="dc__link fw-6"
206-
href={DOCUMENTATION.CUSTOM_CHART_PRE_REQUISITES}
207+
href={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_CUSTOM_CHART_PRE_REQUISITES)}
207208
target="_blank"
208209
rel="noreferrer noopener"
209210
>

src/Pages/Shared/ConfigMapSecret/helpers.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,7 @@ export const renderESOInfo = (isESO: boolean) =>
4444
External Secrets Operator
4545
</Link>
4646
&nbsp;<span>should be installed in the target cluster.</span>&nbsp;
47-
<a
48-
className="anchor"
49-
href={DOCUMENTATION.EXTERNAL_SECRET}
50-
rel="noreferrer noopener"
51-
target="_blank"
52-
>
53-
Learn more
54-
</a>
47+
<DocLink docLink={DOCUMENTATION.EXTERNAL_SECRET} dataTestId="learn-more-about-external-secrets" />
5548
</p>
5649
}
5750
/>

src/components/CIPipelineN/CustomScriptCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
import { stopPropagation } from '@devtron-labs/devtron-fe-common-lib'
16+
import { getDocumentationUrl, stopPropagation } from '@devtron-labs/devtron-fe-common-lib'
1717

1818
import { ReactComponent as ICBookOpen } from '@Icons/ic-book-open.svg'
1919
import { ReactComponent as ICCDStage } from '@Icons/ic-cd-stage.svg'
@@ -38,7 +38,7 @@ const CustomScriptCard = () => (
3838

3939
<div className="flexbox dc__gap-4 dc__visible-hover--child dc__align-items-center">
4040
<a
41-
href={DOCUMENTATION.EXECUTE_CUSTOM_SCRIPT}
41+
href={getDocumentationUrl(DOCUMENTATION.EXECUTE_CUSTOM_SCRIPT)}
4242
className="anchor fs-12 fw-6 lh-20"
4343
target="_blank"
4444
rel="noopener noreferrer"

0 commit comments

Comments
 (0)