Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"homepage": "/dashboard",
"dependencies": {
"@devtron-labs/devtron-fe-common-lib": "1.20.6-pre-45",
"@devtron-labs/devtron-fe-common-lib": "1.20.6-pre-48",
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
"@rjsf/core": "^5.13.3",
"@rjsf/utils": "^5.13.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2292,4 +2292,4 @@ const DeploymentTemplate = ({
)
}

export default DeploymentTemplate
export default DeploymentTemplate
8 changes: 4 additions & 4 deletions src/components/Navigation/NavItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useState } from 'react'
import { NavLink, useLocation } from 'react-router-dom'

import { Icon, preventDefault, TreeView } from '@devtron-labs/devtron-fe-common-lib'
import { Icon, TreeView } from '@devtron-labs/devtron-fe-common-lib'

import { NavItemProps } from './types'
import { doesNavigationItemMatchPath, getNavigationTreeNodes } from './utils'
Expand All @@ -12,7 +12,7 @@

// Debug logging
if (!href && !hasSubMenu) {
console.error('NavItem missing href:', { id, title, hasSubMenu, href })

Check warning on line 15 in src/components/Navigation/NavItem.tsx

View workflow job for this annotation

GitHub Actions / ci

Unexpected console statement
}

// HOOKS
Expand Down Expand Up @@ -67,8 +67,8 @@
return (
<div
data-testid={dataTestId}
className={`nav-item flex left dc__gap-8 px-8 py-6 br-4 dc__disabled`}
aria-disabled={true}
className="nav-item flex left dc__gap-8 px-8 py-6 br-4 dc__disabled"
aria-disabled
>
<Icon name={icon} color="white" />
<span className="fs-13 lh-20 text__sidenav">{title}</span>
Expand All @@ -80,7 +80,7 @@
<NavLink
to={href}
data-testid={dataTestId}
className={`nav-item flex left dc__gap-8 px-8 py-6 br-4`}
className="nav-item flex left dc__gap-8 px-8 py-6 br-4"
activeClassName="is-selected fw-6"
aria-disabled={disabled}
>
Expand Down
45 changes: 9 additions & 36 deletions src/components/Navigation/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { URLS } from '@Config/routes'
import { NavigationGroupType, NavigationItemType } from './types'

const FE_LIB_ROUTER_URLS = importComponentFromFELibrary('ROUTER_URLS', {}, 'function')
const AuditLog = importComponentFromFELibrary('AuditLog')

export const APPLICATION_MANAGEMENT_CONFIGURATIONS: NavigationItemType['subItems'] = [
{
Expand Down Expand Up @@ -300,7 +299,7 @@ export const NAVIGATION_LIST: NavigationGroupType[] = [
id: 'infrastructure-management-audit-logs',
icon: 'ic-monitoring',
href: COMMON_URLS.INFRASTRUCTURE_MANAGEMENT_AUDIT_LOGS,
}
},
],
},
{
Expand Down Expand Up @@ -400,6 +399,13 @@ export const NAVIGATION_LIST: NavigationGroupType[] = [
icon: 'ic-k8s-job',
href: URLS.AUTOMATION_AND_ENABLEMENT_JOB,
},
{
title: 'Runbook Automation',
dataTestId: 'runbook-automation',
id: 'automation-and-enablement-runbook-automation',
icon: 'ic-book-open',
href: COMMON_URLS.AUTOMATION_ENABLEMENT_RUNBOOKS,
},
{
title: 'Alerting',
dataTestId: 'alerting',
Expand All @@ -424,14 +430,6 @@ export const NAVIGATION_LIST: NavigationGroupType[] = [
href: '/dummy-url',
disabled: true,
},
{
title: 'Runbook Automation',
dataTestId: 'runbook-automation',
id: 'automation-and-enablement-runbook-automation',
icon: 'ic-book-open',
href: '/dummy-url',
disabled: true,
},
],
},
{
Expand All @@ -444,8 +442,7 @@ export const NAVIGATION_LIST: NavigationGroupType[] = [
dataTestId: 'data-protection-overview',
id: 'data-protection-overview',
icon: 'ic-chart-line-up',
disabled: true,
href: '/dummy-url',
href: COMMON_URLS.DATA_PROTECTION_OVERVIEW,
},
{
title: 'Backup & Schedule',
Expand All @@ -472,30 +469,6 @@ export const NAVIGATION_LIST: NavigationGroupType[] = [
},
],
},
{
id: 'ai-recommendations',
title: 'AI Recommendations',
icon: 'ic-openai',
disabled: false, // Enable AI Recommendations section
items: [
{
title: 'Notifications',
dataTestId: 'ai-recommendations-notifications',
id: 'ai-recommendations-notifications',
icon: 'ic-speedometer',
disabled: false,
href: COMMON_URLS.AI_RECOMMENDATIONS_NOTIFICATIONS,
},
{
title: 'Runbooks',
dataTestId: 'ai-recommendations-runbooks',
id: 'ai-recommendations-runbooks',
icon: 'ic-book-open',
disabled: false,
href: COMMON_URLS.AI_RECOMMENDATIONS_RUNBOOKS,
},
],
},
{
id: 'global-configuration',
title: 'Global Configuration',
Expand Down
1 change: 0 additions & 1 deletion src/components/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export type NavigationRootItemID =
| 'automation-and-enablement'
| 'data-protection-management'
| 'global-configuration'
| 'ai-recommendations'

type CommonNavigationItemType = {
title: string
Expand Down
2 changes: 1 addition & 1 deletion src/components/app/Overview/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export default function AppOverview({ appMetaInfo, getAppMetaInfoRes, filteredEn
<span>{chartUsed.appStoreChartName}/</span>
<Link
className="dc__ellipsis-right"
to={`${URLS.INFRASTRUCTURE_MANAGEMENT_CHART_STORE_DISCOVER}/${URLS.CHART}/${chartUsed.appStoreChartId}`}
to={`${URLS.INFRASTRUCTURE_MANAGEMENT_CHART_STORE_DISCOVER}${URLS.CHART}/${chartUsed.appStoreChartId}`}
>
{chartUsed.appStoreAppName} ({chartUsed.appStoreAppVersion})
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const SidePanelDocumentation = ({ SidePanelHeaderActions }: SidePanelCont
const iframeKeyRef = useRef<string | null>(`${docLink}-${getUniqueId()}`)

// CONSTANTS
const iframeSrc = `${docLink}${docLink.includes('?') ? `&theme=${appTheme}` : `?theme=${appTheme}`}`
const iframeSrc = `${docLink}${docLink.includes('?') ? `&docusaurus-theme=${appTheme}` : `?docusaurus-theme=${appTheme}`}`

useEffect(() => {
/**
Expand Down
14 changes: 11 additions & 3 deletions src/components/common/navigation/NavigationRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const AIResponseWidget = importComponentFromFELibrary('AIResponseWidget', null,
const EnterpriseRouter = importComponentFromFELibrary('EnterpriseRouter', null, 'function')
const CostVisibilityRenderProvider: FunctionComponent<CostVisibilityRenderProviderProps> | null =
importComponentFromFELibrary('CostVisibilityRenderProvider', null, 'function')
const AIRecommendations = importComponentFromFELibrary('AIRecommendations', null, 'function')

const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesTypes>) => {
const history = useHistory()
Expand Down Expand Up @@ -599,10 +600,16 @@ const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesType
path={URLS.APPLICATION_MANAGEMENT_BULK_EDIT}
render={(props) => <BulkEdit {...props} serverMode={serverMode} />}
/>,
<Route key={CommonURLS.APPLICATION_MANAGEMENT_PROJECTS} path={CommonURLS.APPLICATION_MANAGEMENT_PROJECTS}>
<Route
key={CommonURLS.APPLICATION_MANAGEMENT_PROJECTS}
path={CommonURLS.APPLICATION_MANAGEMENT_PROJECTS}
>
{(props) => <ProjectList {...props} isSuperAdmin={isSuperAdmin} />}
</Route>,
<Route key={CommonURLS.APPLICATION_MANAGEMENT_CONFIGURATIONS} path={CommonURLS.APPLICATION_MANAGEMENT_CONFIGURATIONS}>
<Route
key={CommonURLS.APPLICATION_MANAGEMENT_CONFIGURATIONS}
path={CommonURLS.APPLICATION_MANAGEMENT_CONFIGURATIONS}
>
<ApplicationManagementConfigurationsRouter />
</Route>,
<Route
Expand Down Expand Up @@ -699,9 +706,9 @@ const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesType
path={[
CommonURLS.APPLICATION_MANAGEMENT,
CommonURLS.COST_VISIBILITY,
CommonURLS.AI_RECOMMENDATIONS,
CommonURLS.INFRASTRUCTURE_MANAGEMENT,
CommonURLS.DATA_PROTECTION,
CommonURLS.AUTOMATION_ENABLEMENT_RUNBOOKS,
]}
>
<CostVisibilityRenderProvider renderClusterForm={renderClusterForm}>
Expand Down Expand Up @@ -776,6 +783,7 @@ const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesType
isGrafanaModuleInstalled && environmentDataState.isResourceRecommendationEnabled,
tempAppWindowConfig,
setTempAppWindowConfig,
AIRecommendations,
}}
>
<ConfirmationModalProvider>
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1722,9 +1722,9 @@ __metadata:
languageName: node
linkType: hard

"@devtron-labs/devtron-fe-common-lib@npm:1.20.6-pre-45":
version: 1.20.6-pre-45
resolution: "@devtron-labs/devtron-fe-common-lib@npm:1.20.6-pre-45"
"@devtron-labs/devtron-fe-common-lib@npm:1.20.6-pre-48":
version: 1.20.6-pre-48
resolution: "@devtron-labs/devtron-fe-common-lib@npm:1.20.6-pre-48"
dependencies:
"@codemirror/autocomplete": "npm:6.18.6"
"@codemirror/lang-json": "npm:6.0.1"
Expand Down Expand Up @@ -1776,7 +1776,7 @@ __metadata:
react-select: 5.8.0
rxjs: ^7.8.1
yaml: ^2.4.1
checksum: 10c0/eda2e9de0756513f7c420f59e6b2908d2425a1f8407a7955892153e4102a55c5a7c58ff166863968308c7dc294853abe509a6171cb8691dc69e0016a872b3050
checksum: 10c0/e82ec479f6d6afb33220040900bbdd64d094676c1b375f7131714fbcc36b5487f3457d37821ac84a14625e643a276b5b6714d30504474d37c42476aaef3a9caa
languageName: node
linkType: hard

Expand Down Expand Up @@ -5581,7 +5581,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "dashboard@workspace:."
dependencies:
"@devtron-labs/devtron-fe-common-lib": "npm:1.20.6-pre-45"
"@devtron-labs/devtron-fe-common-lib": "npm:1.20.6-pre-48"
"@esbuild-plugins/node-globals-polyfill": "npm:0.2.3"
"@playwright/test": "npm:^1.32.1"
"@rjsf/core": "npm:^5.13.3"
Expand Down
Loading