Skip to content

Commit 71e165d

Browse files
committed
chore: import doc link component in info icon tippy
1 parent d752ed6 commit 71e165d

File tree

13 files changed

+86
-115
lines changed

13 files changed

+86
-115
lines changed

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

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

2323
import {
2424
CustomInput,
25-
getDocumentationUrl,
2625
InfoIconTippy,
2726
ServerErrors,
2827
showError,
@@ -58,7 +57,7 @@ export const renderQuestionwithTippy = () => (
5857
<InfoIconTippy
5958
heading={API_COMPONENTS.TITLE}
6059
infoText={API_COMPONENTS.QUESTION_ICON_INFO}
61-
documentationLink={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_API_TOKEN)}
60+
documentationLink={DOCUMENTATION.GLOBAL_CONFIG_API_TOKEN}
6261
documentationLinkText="View Documentation"
6362
iconClassName="icon-dim-20 fcn-9 ml-4"
6463
/>

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

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ import {
2020
Button,
2121
ButtonComponentType,
2222
ComponentSizeType,
23-
getDocumentationUrl,
24-
InfoIconTippy,
23+
FeatureTitleWithInfo,
2524
SearchBar,
2625
useMainContext,
2726
} from '@devtron-labs/devtron-fe-common-lib'
2827

2928
import { ReactComponent as PlusIcon } from '../../../../../assets/icons/ic-add.svg'
30-
import { ReactComponent as ArrowSquareOut } from '../../../../../assets/icons/ic-arrow-square-out.svg'
3129
import { DOCUMENTATION } from '../../../../../config'
3230
import ExportPermissionGroupsToCsv from './ExportPermissionGroupsToCsv'
3331
import { PermissionGroupListHeaderProps } from './types'
@@ -44,24 +42,13 @@ const PermissionGroupListHeader = ({
4442
return (
4543
<div className="flex dc__content-space pl-20 pr-20 pt-16">
4644
<div className="flex dc__gap-8">
47-
<h2 className="fs-16 lh-32 cn-9 fw-6 m-0">Permission Groups</h2>
48-
<InfoIconTippy
49-
infoText="Permission groups allow you to easily manage user permissions by assigning desired permissions to a group and assigning these groups to users to provide all underlying permissions."
50-
heading="Permission Groups"
51-
additionalContent={
52-
<div className="pl-12 pb-12">
53-
<a
54-
href={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_GROUPS)}
55-
target="_blank"
56-
rel="noreferrer noreferrer"
57-
className="anchor flexbox flex-align-center fs-13 dc__gap-4"
58-
>
59-
View Documentation
60-
<ArrowSquareOut className="icon-dim-14 scb-5" />
61-
</a>
62-
</div>
45+
<FeatureTitleWithInfo
46+
title="Permission Groups"
47+
renderDescriptionContent={() =>
48+
'Permission groups allow you to easily manage user permissions by assigning desired permissions to a group and assigning these groups to users to provide all underlying permissions.'
6349
}
64-
iconClassName="mw-20 icon-dim-20 fcn-6"
50+
docLink={DOCUMENTATION.GLOBAL_CONFIG_GROUPS}
51+
showInfoIconTippy
6552
/>
6653
</div>
6754
<div className="flex dc__gap-8">

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import {
3939
DEFAULT_SECRET_PLACEHOLDER,
4040
ErrorScreenManager,
4141
FeatureTitleWithInfo,
42-
getDocumentationUrl,
4342
InfoBlock,
4443
MODES,
4544
noop,
@@ -834,7 +833,7 @@ class SSOLogin extends Component<SSOLoginProps, SSOLoginState> {
834833
<FeatureTitleWithInfo
835834
title={HEADER_TEXT.SSO_LOGIN.title}
836835
renderDescriptionContent={() => HEADER_TEXT.SSO_LOGIN.description}
837-
docLink={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_SSO)}
836+
docLink={DOCUMENTATION.GLOBAL_CONFIG_SSO}
838837
showInfoIconTippy
839838
dataTestId="sso-login-heading"
840839
/>

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

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ import {
2020
Button,
2121
ButtonComponentType,
2222
ComponentSizeType,
23-
getDocumentationUrl,
24-
InfoIconTippy,
23+
FeatureTitleWithInfo,
2524
SearchBar,
2625
useMainContext,
2726
} from '@devtron-labs/devtron-fe-common-lib'
2827

2928
import { ReactComponent as PlusIcon } from '../../../../../assets/icons/ic-add.svg'
30-
import { ReactComponent as ArrowSquareOut } from '../../../../../assets/icons/ic-arrow-square-out.svg'
3129
import { importComponentFromFELibrary } from '../../../../../components/common'
3230
import { DOCUMENTATION } from '../../../../../config'
3331
import ExportUserPermissionsToCsv from './ExportUserPermissionsToCsv'
@@ -50,24 +48,13 @@ const UserPermissionListHeader = ({
5048
return (
5149
<div className="flex dc__content-space px-20 dc__zi-2 pt-16">
5250
<div className="flex dc__gap-8">
53-
<h2 className="fs-16 lh-32 cn-9 fw-6 m-0">User Permissions</h2>
54-
<InfoIconTippy
55-
infoText="Manage your organization's users and their permissions."
56-
heading="User Permissions"
57-
additionalContent={
58-
<div className="pl-12 pb-12">
59-
<a
60-
href={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_USER)}
61-
target="_blank"
62-
rel="noreferrer noreferrer"
63-
className="anchor flexbox flex-align-center fs-13 dc__gap-4"
64-
>
65-
View Documentation
66-
<ArrowSquareOut className="icon-dim-14 scb-5" />
67-
</a>
68-
</div>
51+
<FeatureTitleWithInfo
52+
title="User Permissions"
53+
renderDescriptionContent={() =>
54+
"Manage your organization's users and their permissions. You can assign users to permission groups to provide all underlying permissions."
6955
}
70-
iconClassName="mw-20 icon-dim-20 fcn-6"
56+
docLink={DOCUMENTATION.GLOBAL_CONFIG_USER}
57+
showInfoIconTippy
7158
/>
7259
</div>
7360
<div className="flex dc__gap-8">

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 { getDocumentationUrl, InfoIconTippy, SearchBar } from '@devtron-labs/devtron-fe-common-lib'
17+
import { 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={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_CUSTOM_CHART)}
41+
documentationLink={DOCUMENTATION.GLOBAL_CONFIG_CUSTOM_CHART}
4242
iconClassName="icon-dim-20 fcn-6"
4343
/>
4444
</div>

src/components/charts/list/DiscoverCharts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ export const ChartGroupListMin = ({
826826
renderDescriptionContent={() =>
827827
'Use chart groups to pre-configure and deploy frequently used charts together.'
828828
}
829-
docLink={getDocumentationUrl(DOCUMENTATION.CHART_GROUP)}
829+
docLink={DOCUMENTATION.CHART_GROUP}
830830
docLinkText="Learn more"
831831
dataTestId="chart-store"
832832
showInfoIconTippy

src/components/ciConfig/CIBuildpackBuildOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const BuilderTippy = () => {
159159
infoText={CI_BUILDPACK_OPTION_TEXTS.BuilderTippyContent.infoText}
160160
additionalContent={additionalBuilderTippyContent()}
161161
documentationLinkText={CI_BUILDPACK_OPTION_TEXTS.BuilderTippyContent.documentationLinkText}
162-
documentationLink={getDocumentationUrl(DOCUMENTATION.APP_CI_CONFIG_BUILD_WITHOUT_DOCKER)}
162+
documentationLink={DOCUMENTATION.APP_CI_CONFIG_BUILD_WITHOUT_DOCKER}
163163
iconClassName="icon-dim-16 fcn-6 ml-4"
164164
/>
165165
)

src/components/cluster/Cluster.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class ClusterList extends Component<ClusterListProps, any> {
244244
<FeatureTitleWithInfo
245245
title={moduleBasedTitle}
246246
renderDescriptionContent={() => `Manage your organization’s ${moduleBasedTitle.toLowerCase()}.`}
247-
docLink={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_CLUSTER)}
247+
docLink={DOCUMENTATION.GLOBAL_CONFIG_CLUSTER}
248248
showInfoIconTippy
249249
additionalContainerClasses="mb-20"
250250
/>

src/components/externalLinks/ExternalLinks.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
ErrorScreenManager,
2323
FilterChips,
2424
getClusterListMin,
25-
getDocumentationUrl,
2625
InfoIconTippy,
2726
Progressing,
2827
SearchBar,
@@ -265,7 +264,7 @@ const ExternalLinks = ({ isAppConfigView, userRole }: ExternalLinksProps) => {
265264
heading="External Links"
266265
infoText="Configure links to third-party applications (e.g. Kibana, New Relic) for quick access. Configured
267266
links will be available in the App details page."
268-
documentationLink={getDocumentationUrl(DOCUMENTATION.EXTERNAL_LINKS)}
267+
documentationLink={DOCUMENTATION.EXTERNAL_LINKS}
269268
iconClassName="icon-dim-20 fcn-6 ml-8"
270269
/>
271270
</h3>

src/components/notifications/Notifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default class Notifications extends Component<NotificationsProps, {}> {
3535
<FeatureTitleWithInfo
3636
title={HEADER_TEXT.NOTIFICATIONS.title}
3737
renderDescriptionContent={() => HEADER_TEXT.NOTIFICATIONS.description}
38-
docLink={getDocumentationUrl(DOCUMENTATION.GLOBAL_CONFIG_NOTIFICATION)}
38+
docLink={DOCUMENTATION.GLOBAL_CONFIG_NOTIFICATION}
3939
showInfoIconTippy
4040
dataTestId="notifications-feature-title"
4141
/>

0 commit comments

Comments
 (0)