Skip to content

Commit 76a4d0f

Browse files
authored
Merge pull request #2708 from devtron-labs/feat/doc-utm-source
feat: doc utm source
2 parents c47321f + f57d77d commit 76a4d0f

File tree

69 files changed

+587
-709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+587
-709
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,4 @@ FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE=false
6969
GATEKEEPER_URL=https://license.devtron.ai/dashboard
7070
FEATURE_AI_INTEGRATION_ENABLE=false
7171
LOGIN_PAGE_IMAGE=
72+
FEATURE_REDFISH_NODE_ENABLE=false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "1.13.0-pre-9",
7+
"@devtron-labs/devtron-fe-common-lib": "1.14.0-pre-0",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/Pages/App/CreateAppModal/Sidebar.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
import { ModalSidebarPanel } from '@devtron-labs/devtron-fe-common-lib'
1818

19-
import { DOCUMENTATION } from '@Config/constants'
20-
2119
import { CreationMethodType, SidebarProps } from './types'
2220

2321
const Sidebar = ({
@@ -80,7 +78,7 @@ const Sidebar = ({
8078
<div className="divider__secondary--horizontal" />
8179
<ModalSidebarPanel
8280
heading={null}
83-
documentationLink={isJobView ? DOCUMENTATION.JOBS : DOCUMENTATION.APP_CREATE}
81+
documentationLink={isJobView ? 'JOBS' : 'APP_CREATE'}
8482
rootClassName="w-100 dc__no-background-imp"
8583
>
8684
<div className="flexbox-col dc__gap-24">{isJobView ? renderJobContent() : renderAppContent()}</div>

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

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ import {
2020
AppConfigProps,
2121
BASE_CONFIGURATION_ENV_ID,
2222
ConfigResourceType,
23+
getDocumentationUrl,
2324
ResourceKindType,
2425
stringComparatorBySortOrder,
2526
URLS as CommonURLS,
2627
} from '@devtron-labs/devtron-fe-common-lib'
2728

28-
import { APP_COMPOSE_STAGE, DOCUMENTATION, getAppComposeURL, URLS } from '@Config/index'
29+
import { APP_COMPOSE_STAGE, getAppComposeURL, URLS } from '@Config/index'
2930

3031
import { AppConfigStatusItemType, EnvConfigDTO } from '../../service.types'
3132
import { AppConfigState, AppStageUnlockedType, CustomNavItemsType, EnvConfigType, STAGE_NAME } from './AppConfig.types'
@@ -137,7 +138,7 @@ export const getNavItems = ({
137138
href: `/job/${appId}/edit/materials`,
138139
stage: STAGE_NAME.GIT_MATERIAL,
139140
isLocked: !_isUnlocked.material,
140-
supportDocumentURL: DOCUMENTATION.JOB_SOURCE_CODE,
141+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'JOB_SOURCE_CODE' }),
141142
flowCompletionPercent: completedPercent,
142143
currentStep: completedSteps,
143144
required: true,
@@ -147,7 +148,7 @@ export const getNavItems = ({
147148
href: `/job/${appId}/edit/workflow`,
148149
stage: STAGE_NAME.WORKFLOW,
149150
isLocked: !_isUnlocked.workflowEditor,
150-
supportDocumentURL: DOCUMENTATION.JOB_WORKFLOW_EDITOR,
151+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'JOB_WORKFLOW_EDITOR' }),
151152
flowCompletionPercent: completedPercent,
152153
currentStep: completedSteps,
153154
required: true,
@@ -165,7 +166,7 @@ export const getNavItems = ({
165166
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.CONFIG_MAPS, true, isTemplateView),
166167
stage: STAGE_NAME.CONFIGMAP,
167168
isLocked: !_isUnlocked.configmap,
168-
supportDocumentURL: DOCUMENTATION.APP_CREATE_CONFIG_MAP,
169+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CONFIG_MAP' }),
169170
flowCompletionPercent: completedPercent,
170171
currentStep: completedSteps,
171172
isProtectionAllowed: true,
@@ -177,7 +178,7 @@ export const getNavItems = ({
177178
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.SECRETS, true, isTemplateView),
178179
stage: STAGE_NAME.SECRETS,
179180
isLocked: !_isUnlocked.secret,
180-
supportDocumentURL: DOCUMENTATION.APP_CREATE_SECRET,
181+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_SECRET' }),
181182
flowCompletionPercent: completedPercent,
182183
currentStep: completedSteps,
183184
isProtectionAllowed: true,
@@ -203,7 +204,7 @@ export const getNavItems = ({
203204
href: `${basePath}/edit/materials`,
204205
stage: STAGE_NAME.GIT_MATERIAL,
205206
isLocked: !_isUnlocked.material,
206-
supportDocumentURL: DOCUMENTATION.APP_CREATE_MATERIAL,
207+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_MATERIAL' }),
207208
flowCompletionPercent: completedPercent,
208209
currentStep: completedSteps,
209210
required: true,
@@ -213,7 +214,7 @@ export const getNavItems = ({
213214
href: `${basePath}/edit/docker-build-config`,
214215
stage: STAGE_NAME.CI_CONFIG,
215216
isLocked: !_isUnlocked.dockerBuildConfig,
216-
supportDocumentURL: DOCUMENTATION.APP_CREATE_CI_CONFIG,
217+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CI_CONFIG' }),
217218
flowCompletionPercent: completedPercent,
218219
currentStep: completedSteps,
219220
required: true,
@@ -232,7 +233,7 @@ export const getNavItems = ({
232233
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.DEPLOYMENT_TEMPLATE, null, isTemplateView),
233234
stage: STAGE_NAME.DEPLOYMENT_TEMPLATE,
234235
isLocked: !_isUnlocked.deploymentTemplate,
235-
supportDocumentURL: DOCUMENTATION.APP_DEPLOYMENT_TEMPLATE,
236+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_DEPLOYMENT_TEMPLATE' }),
236237
flowCompletionPercent: completedPercent,
237238
currentStep: completedSteps,
238239
isProtectionAllowed: true,
@@ -254,7 +255,7 @@ export const getNavItems = ({
254255
href: `${basePath}/edit/workflow`,
255256
stage: STAGE_NAME.WORKFLOW,
256257
isLocked: !_isUnlocked.workflowEditor,
257-
supportDocumentURL: DOCUMENTATION.APP_CREATE_WORKFLOW,
258+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_WORKFLOW' }),
258259
flowCompletionPercent: completedPercent,
259260
currentStep: completedSteps,
260261
required: true,
@@ -264,7 +265,7 @@ export const getNavItems = ({
264265
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.CONFIG_MAPS, null, isTemplateView),
265266
stage: STAGE_NAME.CONFIGMAP,
266267
isLocked: !_isUnlocked.configmap,
267-
supportDocumentURL: DOCUMENTATION.APP_CREATE_CONFIG_MAP,
268+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CONFIG_MAP' }),
268269
flowCompletionPercent: completedPercent,
269270
currentStep: completedSteps,
270271
isProtectionAllowed: true,
@@ -276,7 +277,7 @@ export const getNavItems = ({
276277
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.SECRETS, null, isTemplateView),
277278
stage: STAGE_NAME.SECRETS,
278279
isLocked: !_isUnlocked.secret,
279-
supportDocumentURL: DOCUMENTATION.APP_CREATE_SECRET,
280+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_SECRET' }),
280281
flowCompletionPercent: completedPercent,
281282
currentStep: completedSteps,
282283
isProtectionAllowed: true,
@@ -291,7 +292,7 @@ export const getNavItems = ({
291292
href: `${basePath}/edit/external-links`,
292293
stage: STAGE_NAME.EXTERNAL_LINKS,
293294
isLocked: false,
294-
supportDocumentURL: DOCUMENTATION.EXTERNAL_LINKS,
295+
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'EXTERNAL_LINKS' }),
295296
flowCompletionPercent: completedPercent,
296297
currentStep: completedSteps,
297298
},

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

Lines changed: 5 additions & 8 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,11 @@ const ChartSelectorDropdown = ({
181182
chart.description.substring(0, 250)}
182183
&nbsp;
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"
185+
<DocLink
186+
docLinkKey={CHART_DOCUMENTATION_LINK[chart.name]}
187+
dataTestId="chart-doc-link"
189188
onClick={stopPropagation}
190-
>
191-
Learn more
192-
</a>
189+
/>
193190
)}
194191
</div>
195192
)}

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

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

1717
import { SelectPickerOptionType } from '@devtron-labs/devtron-fe-common-lib'
1818

19-
import { DOCUMENTATION } from '@Config/constants'
20-
2119
export const PROTECT_BASE_DEPLOYMENT_TEMPLATE_IDENTIFIER_DTO = 'BaseDeploymentTemplate' as const
2220

2321
export const CHART_TYPE_TAB_KEYS = { DEVTRON_CHART: 'devtronChart', CUSTOM_CHARTS: 'customCharts' }
2422
export const CHART_TYPE_TAB = { devtronChart: 'Charts by Devtron', customCharts: 'Custom charts' }
2523

2624
export const CHART_DOCUMENTATION_LINK = {
27-
'Job & CronJob': DOCUMENTATION.JOB_CRONJOB,
28-
'Rollout Deployment': DOCUMENTATION.ROLLOUT,
29-
Deployment: DOCUMENTATION.DEPLOYMENT,
25+
'Job & CronJob': 'JOB_CRONJOB',
26+
'Rollout Deployment': 'ROLLOUT',
27+
Deployment: 'DEPLOYMENT',
3028
}
3129

3230
export const GUI_VIEW_TEXTS = {

src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/SelectMergeStrategy.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import {
1818
ComponentSizeType,
19-
DOCUMENTATION_HOME_PAGE,
2019
getSelectPickerOptionByValue,
2120
InfoIconTippy,
2221
noop,
@@ -104,7 +103,7 @@ const SelectMergeStrategy = ({
104103
{PatchStrategyTooltipInfo && <PatchStrategyTooltipInfo />}
105104
</OverrideStrategyTippyContent>
106105
}
107-
documentationLink={DOCUMENTATION_HOME_PAGE}
106+
documentationLink="HOME_PAGE"
108107
/>
109108

110109
{renderContent()}

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ import { Fragment, useEffect, useState } from 'react'
1818
import { Link, NavLink, useLocation, useParams, useRouteMatch } from 'react-router-dom'
1919

2020
import {
21+
ComponentSizeType,
2122
ConfirmationDialog,
2223
DeleteConfirmationModal,
24+
DocLink,
2325
EnvResourceType,
2426
getEnvironmentListMinPublic,
2527
InfoBlock,
@@ -39,7 +41,7 @@ import { ReactComponent as More } from '../../../../../../assets/icons/ic-more-o
3941
import warn from '../../../../../../assets/icons/ic-warning.svg'
4042
import { createClusterEnvGroup, usePrevious } from '../../../../../../components/common'
4143
import { RESOURCE_ACTION_MENU } from '../../../../../../components/ResourceBrowser/Constants'
42-
import { DOCUMENTATION, URLS } from '../../../../../../config'
44+
import { URLS } from '../../../../../../config'
4345
import { addJobEnvironment, deleteJobEnvironment, getCIConfig } from '../../../../../../services/service'
4446
import { AppConfigState, JobEnvOverrideRouteProps } from '../AppConfig.types'
4547
import { useAppConfigurationContext } from '../AppConfiguration.provider'
@@ -49,14 +51,11 @@ const EnvOverridesHelpNote = () => (
4951
<div className="fs-12 fw-4 lh-18">
5052
Environment overrides allow you to manage environment specific configurations after you’ve created deployment
5153
pipelines. &nbsp;
52-
<a
53-
className="dc__link"
54-
href={DOCUMENTATION.APP_CREATE_ENVIRONMENT_OVERRIDE}
55-
rel="noreferrer noopener"
56-
target="_blank"
57-
>
58-
Learn more
59-
</a>
54+
<DocLink
55+
docLinkKey="APP_CREATE_ENVIRONMENT_OVERRIDE"
56+
dataTestId="env-overrides-learn-more"
57+
size={ComponentSizeType.xs}
58+
/>
6059
</div>
6160
)
6261

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333

3434
import { ReactComponent as Error } from '../../../../assets/icons/ic-warning.svg'
3535
import { importComponentFromFELibrary } from '../../../../components/common'
36-
import { DOCUMENTATION, REQUIRED_FIELDS_MISSING } from '../../../../config'
36+
import { REQUIRED_FIELDS_MISSING } from '../../../../config'
3737
import { API_COMPONENTS } from '../../../../config/constantMessaging'
3838
import { createOrUpdateUser } from '../authorization.service'
3939
import { getDefaultUserStatusAndTimeout } from '../libUtils'
@@ -57,7 +57,7 @@ export const renderQuestionwithTippy = () => (
5757
<InfoIconTippy
5858
heading={API_COMPONENTS.TITLE}
5959
infoText={API_COMPONENTS.QUESTION_ICON_INFO}
60-
documentationLink={DOCUMENTATION.GLOBAL_CONFIG_API_TOKEN}
60+
documentationLink="GLOBAL_CONFIG_API_TOKEN"
6161
documentationLinkText="View Documentation"
6262
iconClassName="icon-dim-20 fcn-9 ml-4"
6363
/>

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-
InfoIconTippy,
23+
FeatureTitleWithInfo,
2424
SearchBar,
2525
useMainContext,
2626
} from '@devtron-labs/devtron-fe-common-lib'
2727

2828
import { ReactComponent as PlusIcon } from '../../../../../assets/icons/ic-add.svg'
29-
import { ReactComponent as ArrowSquareOut } from '../../../../../assets/icons/ic-arrow-square-out.svg'
30-
import { DOCUMENTATION } from '../../../../../config'
3129
import ExportPermissionGroupsToCsv from './ExportPermissionGroupsToCsv'
3230
import { PermissionGroupListHeaderProps } from './types'
3331

@@ -43,24 +41,13 @@ const PermissionGroupListHeader = ({
4341
return (
4442
<div className="flex dc__content-space pl-20 pr-20 pt-16">
4543
<div className="flex dc__gap-8">
46-
<h2 className="fs-16 lh-32 cn-9 fw-6 m-0">Permission Groups</h2>
47-
<InfoIconTippy
48-
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."
49-
heading="Permission Groups"
50-
additionalContent={
51-
<div className="pl-12 pb-12">
52-
<a
53-
href={DOCUMENTATION.GLOBAL_CONFIG_GROUPS}
54-
target="_blank"
55-
rel="noreferrer noreferrer"
56-
className="anchor flexbox flex-align-center fs-13 dc__gap-4"
57-
>
58-
View Documentation
59-
<ArrowSquareOut className="icon-dim-14 scb-5" />
60-
</a>
61-
</div>
44+
<FeatureTitleWithInfo
45+
title="Permission Groups"
46+
renderDescriptionContent={() =>
47+
'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.'
6248
}
63-
iconClassName="mw-20 icon-dim-20 fcn-6"
49+
docLink="GLOBAL_CONFIG_GROUPS"
50+
showInfoIconTippy
6451
/>
6552
</div>
6653
<div className="flex dc__gap-8">

0 commit comments

Comments
 (0)