Skip to content

Commit 38221aa

Browse files
committed
fix: doc link updated
1 parent 8c46840 commit 38221aa

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

src/Shared/Components/DocLink/constants.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { DOCUMENTATION_HOME_PAGE } from '@Common/Constants'
1818

1919
export const DOCUMENTATION = {
2020
ADMIN_PASSWORD: 'install/install-devtron#devtron-admin-credentials',
21-
AI_RECOMMENDATIONS: 'usage/ai-recommendations',
2221
APPLICATIONS: 'usage/applications',
2322
APP_CONFIGURATION: 'docs/user-guide/app-configurations',
2423
APP_CI_CONFIG_BUILD_WITHOUT_DOCKER:
@@ -124,6 +123,9 @@ export const DOCUMENTATION = {
124123
GLOBAL_CONFIG_PULL_IMAGE_DIGEST: 'global-configurations/pull-image-digest',
125124
GLOBAL_CONFIG_TAGS: 'getting-started/global-configurations/tags-policy',
126125

126+
// Application Management
127+
APP_MANAGEMENT: 'docs/user-guide/app-management',
128+
127129
// Software Release Management
128130
SOFTWARE_DISTRIBUTION_HUB: 'usage/software-distribution-hub',
129131
RELEASE_TRACKS: 'usage/software-distribution-hub/release-hub#creating-release-tracks-and-versions',
@@ -135,10 +137,19 @@ export const DOCUMENTATION = {
135137
// Infrastructure Management
136138
AUTOSCALER_DETECTION: 'user-guide/infra-management/infrastructure-overview#troubleshooting-autoscaler-detection',
137139
HELM_APPS: 'user-guide/infra-management/other-applications',
138-
INFRA_OVERVIEW: 'user-guide/infra-management/overview',
140+
INFRA_MANAGEMENT: 'docs/user-guide/infra-management',
139141

140142
// Cost Visibility
141-
COST_BREAKDOWN: 'user-guide/finops/cost-breakdown',
143+
COST_BREAKDOWN: 'user-guide/finops',
142144
COST_CALCULATION: 'user-guide/finops/overview-cost-visibility#how-is-the-cost-calculated',
143145
COST_VISIBILITY_OVERVIEW: 'user-guide/finops/overview-cost-visibility',
146+
147+
// Security Center
148+
SECURITY_CENTER: 'docs/user-guide/security-features',
149+
150+
// AI Recommendations
151+
AI_RECOMMENDATIONS: 'usage/ai-recommendations',
152+
153+
// Automation & Enablement
154+
AUTOMATION_AND_ENABLEMENT: 'docs/user-guide/automation',
144155
} as const

src/Shared/Components/Header/HeaderWithCreateButton/HeaderWithCreateButon.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { BreadCrumb, BreadcrumbText, useBreadcrumb } from '@Common/index'
2222
import { ActionMenu } from '@Shared/Components/ActionMenu'
2323
import { ButtonComponentType } from '@Shared/Components/Button'
2424
import Button from '@Shared/Components/Button/Button.component'
25+
import { DOCUMENTATION } from '@Shared/Components/DocLink'
2526
import { Icon } from '@Shared/Components/Icon'
2627
import { ComponentSizeType } from '@Shared/constants'
2728
import { useMainContext } from '@Shared/Providers'
@@ -93,6 +94,17 @@ export const HeaderWithCreateButton = ({ viewType }: HeaderWithCreateButtonProps
9394
)
9495
const renderBreadcrumbs = () => <BreadCrumb breadcrumbs={breadcrumbs} />
9596

97+
const getDocPath = () => {
98+
let docPath: string = DOCUMENTATION.APP_MANAGEMENT
99+
100+
if (viewType === 'jobs') {
101+
docPath = DOCUMENTATION.AUTOMATION_AND_ENABLEMENT
102+
} else if (viewType === 'infra-apps') {
103+
docPath = DOCUMENTATION.INFRA_MANAGEMENT
104+
}
105+
return docPath
106+
}
107+
96108
return (
97109
<div className="create-button-container dc__position-sticky dc__top-0 bg__primary dc__zi-4">
98110
<PageHeader
@@ -110,6 +122,7 @@ export const HeaderWithCreateButton = ({ viewType }: HeaderWithCreateButtonProps
110122
},
111123
}
112124
: {})}
125+
docPath={getDocPath()}
113126
/>
114127
</div>
115128
)

0 commit comments

Comments
 (0)