Skip to content

Commit a6ea722

Browse files
authored
Merge pull request #2920 from devtron-labs/fix/navigation-route
chore: application and job Header fixes
2 parents 8e68933 + e2a1308 commit a6ea722

File tree

34 files changed

+223
-173
lines changed

34 files changed

+223
-173
lines changed

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.20.1-pre-2",
7+
"@devtron-labs/devtron-fe-common-lib": "1.20.1-pre-3",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/Pages-Devtron-2.0/ApplicationManagement/Configurations/ConfigurationsRouter.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export const Configurations = () => {
5151
...getApplicationManagementBreadcrumb(),
5252
configurations: {
5353
component: <span className="cn-9 fs-16 fw-6 lh-24">Configurations</span>,
54-
linked: true,
5554
},
5655
},
5756
},

src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetailsRoute.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ const ExternalFluxAppDetailsRoute = () => {
3232
title={AppListConstants.AppTabs.FLUX_APPS}
3333
redirectURL={`${URLS.APPLICATION_MANAGEMENT_APP}/${URLS.APP_LIST}/${AppListConstants.AppType.FLUX_APPS}`}
3434
showAppDetailsOnly
35+
breadCrumbConfig={{
36+
':namespace': null,
37+
'external-flux': null,
38+
':templateType': null,
39+
}}
3540
/>
3641
<Suspense fallback={<Progressing pageLoader />}>
3742
<Switch>

src/Pages/ChartStore/ChartDetails/ChartDetails.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ export const ChartDetails = () => {
8585
{
8686
alias: {
8787
...getApplicationManagementBreadcrumb(),
88+
discover: {
89+
component: 'Chart Store',
90+
linked: true,
91+
},
8892
':chartSegment?': null,
8993
':chartId': {
9094
component: (

src/components/ApplicationGroup/List/EnvironmentsList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { useLocation } from 'react-router-dom'
1919

2020
import {
2121
BreadCrumb,
22+
BreadcrumbText,
2223
ErrorScreenManager,
2324
FilterChips,
2425
FilterSelectPicker,
@@ -209,9 +210,9 @@ const EnvironmentsList = ({ isSuperAdmin }: AppGroupAdminType) => {
209210
alias: {
210211
...getApplicationManagementBreadcrumb(),
211212
'application-group': {
212-
component: <span className="cb-5 fs-16 dc__capitalize">Application groups</span>,
213-
linked: true,
213+
component: <BreadcrumbText heading="Application Groups" isActive />,
214214
},
215+
list: null,
215216
},
216217
},
217218
[pathname],

src/components/Jobs/JobDetails/JobDetails.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
TabGroup,
3838
URLS as CommonURLS,
3939
handleAnalyticsEvent,
40+
BreadcrumbText,
4041
} from '@devtron-labs/devtron-fe-common-lib'
4142
import AppConfig from '../../../Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig'
4243
import Overview from '../../app/Overview/Overview'
@@ -152,8 +153,8 @@ const JobHeader = ({ jobName }: { jobName: string }) => {
152153
),
153154
linked: false,
154155
},
155-
app: {
156-
component: <span className="cb-5 fs-16 dc__capitalize">Jobs</span>,
156+
job: {
157+
component: <BreadcrumbText heading="Job" />,
157158
linked: true,
158159
},
159160
},

src/components/Jobs/JobList/JobListView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,12 @@ export default function JobListView(props: JobListViewProps) {
201201
}
202202
if (props.view === JobListViewType.EMPTY || props.view === JobListViewType.NO_RESULT) {
203203
return (
204+
<>
204205
<JobsEmptyState
205206
view={props.view}
206207
clickHandler={props.view === JobListViewType.EMPTY ? createJobHandler : props.clearFilters}
207208
/>
209+
</>
208210
)
209211
}
210212
if (props.view === JobListViewType.ERROR) {

src/components/Jobs/JobList/JobsList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import {
4040
} from '../Types'
4141
import { getJobStatusLabelFromValue, parseSearchParams } from '../Utils'
4242
import JobListContainer from './JobListContainer'
43-
import { renderAdditionalJobsHeaderInfo } from './utils'
4443

4544
import '../../app/list/list.scss'
4645

@@ -156,7 +155,7 @@ const JobsList = () => {
156155
)}
157156
{dataStateType === JobListViewType.LIST && (
158157
<>
159-
<HeaderWithCreateButton headerName="" additionalHeaderInfo={renderAdditionalJobsHeaderInfo} />
158+
<HeaderWithCreateButton isJobView />
160159
{renderCreateJobRouter()}
161160
<JobListContainer
162161
masterFilters={masterFilters}

src/components/ResourceBrowser/ClusterInstallationStatus.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
import { useMemo } from 'react'
1818
import { useHistory, useParams } from 'react-router-dom'
1919

20-
import { getInfrastructureManagementBreadcrumb, useAsync, useBreadcrumb } from '@devtron-labs/devtron-fe-common-lib'
20+
import {
21+
BreadcrumbText,
22+
getInfrastructureManagementBreadcrumb,
23+
useAsync,
24+
useBreadcrumb,
25+
} from '@devtron-labs/devtron-fe-common-lib'
2126

2227
import { importComponentFromFELibrary } from '@Components/common'
2328

@@ -62,8 +67,7 @@ const ClusterInstallationStatus = () => {
6267
alias: {
6368
...getInfrastructureManagementBreadcrumb(),
6469
'resource-browser': {
65-
component: <span className="cn-9 fs-16 fw-6 lh-24">Resource Browser</span>,
66-
linked: true,
70+
component: <BreadcrumbText heading="Resource Browser" isActive />,
6771
},
6872
'installation-cluster': {
6973
component: (

src/components/ResourceBrowser/Constants.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,5 @@ export const ResourceBrowserRouteToTabIdMap: Partial<
386386
[`${URLS.INFRASTRUCTURE_MANAGEMENT_RESOURCE_BROWSER}/:clusterId/resource-recommender`]: RESOURCE_RECOMMENDER_TAB_ID,
387387
}
388388

389-
export const INFRASTRUCTURE_MANAGEMENT_BREADCRUMB_CONFIG = [
390-
{
391-
key: 'resource-browser',
392-
route: URLS.INFRASTRUCTURE_MANAGEMENT_RESOURCE_BROWSER,
393-
heading: 'Resource Browser',
394-
},
395-
]
396-
397389
export const KUBERNETES_RESOURCE_BROWSER_DESCRIPTION =
398390
'The Resource Browser gives you a powerful, centralized view of all your Kubernetes objects across clusters. Effortlessly troubleshoot and manage resources with features like live manifest editing, log viewing, and direct resource creation or deletion—right from the UI. All in one place, across all your cluster'

0 commit comments

Comments
 (0)