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
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "4.0.4-pre-0",
"version": "4.0.4-pre-2",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
Expand Down
3 changes: 3 additions & 0 deletions src/Assets/IconV2/ic-file-log-search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 13 additions & 4 deletions src/Pages-Devtron-2.0/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export type NavigationRootItemID =
| 'automation-and-enablement'
| 'data-protection-management'
| 'global-configuration'
| 'audit-logs'

export type CommonNavigationItemType = {
title: string
Expand Down Expand Up @@ -107,11 +108,19 @@ export type NavigationItemType = Pick<
})
)

export interface NavigationGroupType extends Pick<
export type NavigationGroupType = Pick<
CommonNavigationItemType,
'title' | 'icon' | 'hideNav' | 'forceHideEnvKey' | 'isAvailableInEA'
> {
> & {
id: NavigationRootItemID
items: NavigationItemType[]
disabled?: boolean
}
} & (
Comment thread
AbhishekA1509 marked this conversation as resolved.
| {
items: NavigationItemType[]
href?: never
}
| {
items?: never
href: string
}
)
10 changes: 8 additions & 2 deletions src/Pages-Devtron-2.0/Shared/Routes/routes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { generatePath } from 'react-router-dom'

import { InfrastructureManagementAppListType } from '@Common/Types'
import { CostBreakdownItemViewParamsType, CostBreakdownViewType } from '@PagesDevtron2.0/index'
import { CostBreakdownItemViewParamsType, CostBreakdownViewType } from '@PagesDevtron2.0/CostVisibility/Shared/types'

const OVERVIEW = 'overview'

Expand Down Expand Up @@ -279,6 +279,9 @@ export const BASE_ROUTES = {
DETAIL: ':locationId',
},
},
AUDIT_LOGS: {
ROOT: 'audit-logs',
},
GLOBAL_CONFIG: {
ROOT: 'global-configuration',
HOST_URL: 'host-url',
Expand Down Expand Up @@ -410,6 +413,7 @@ const JOBS_ROOT =
const JOB_DETAIL_ROOT = `${JOBS_ROOT}/${BASE_ROUTES.AUTOMATION_AND_ENABLEMENT.JOBS.DETAIL.ROOT}` as const

const DATA_PROTECTION_MANAGEMENT_ROOT = `/${BASE_ROUTES.DATA_PROTECTION_MANAGEMENT.ROOT}` as const
const AUDIT_LOGS_ROOT = `/${BASE_ROUTES.AUDIT_LOGS.ROOT}` as const
const GLOBAL_CONFIG_ROOT = `/${BASE_ROUTES.GLOBAL_CONFIG.ROOT}` as const
const GLOBAL_CONFIG_AUTH_ROOT = `${GLOBAL_CONFIG_ROOT}/${BASE_ROUTES.GLOBAL_CONFIG.AUTH.ROOT}` as const
const NETWORK_STATUS_INTERFACE_ROOT = `/${BASE_ROUTES.NETWORK_STATUS_INTERFACE.ROOT}` as const
Expand Down Expand Up @@ -670,7 +674,9 @@ export const ROUTER_URLS = {
DATA_PROTECTION_MANAGEMENT_BACKUP_LOCATIONS: `${DATA_PROTECTION_MANAGEMENT_ROOT}/${BASE_ROUTES.DATA_PROTECTION_MANAGEMENT.BACKUP_LOCATIONS.ROOT}`,
DATA_PROTECTION_MANAGEMENT_BACKUP_LOCATIONS_DETAIL: `${DATA_PROTECTION_MANAGEMENT_ROOT}/${BASE_ROUTES.DATA_PROTECTION_MANAGEMENT.BACKUP_LOCATIONS.ROOT}/${BASE_ROUTES.DATA_PROTECTION_MANAGEMENT.BACKUP_LOCATIONS.DETAIL}`,

// Global Config
// Audit Logs
AUDIT_LOGS: AUDIT_LOGS_ROOT,

GLOBAL_CONFIG_HOST_URL: `${GLOBAL_CONFIG_ROOT}/${BASE_ROUTES.GLOBAL_CONFIG.HOST_URL}`,
GLOBAL_CONFIG_EXTERNAL_LINKS: `${GLOBAL_CONFIG_ROOT}/${BASE_ROUTES.GLOBAL_CONFIG.EXTERNAL_LINKS}`,
GLOBAL_CONFIG_CHART_REPOSITORIES: `${GLOBAL_CONFIG_ROOT}/${BASE_ROUTES.GLOBAL_CONFIG.CHART_REPOSITORIES}`,
Expand Down
5 changes: 4 additions & 1 deletion src/Shared/Components/DatePicker/DateTimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ const DateTimePicker = ({
onChange(updateTime(dateObject, option.value).value)
}

const handleDateRangeChange = (range: DateRange) => {
const handleDateRangeChange = (range: DateRange | undefined) => {
if (!range) {
return
}
if (isDateUpdateRange(isRangePicker, onChange)) {
const fromDate = range.from ? range.from : new Date()
const toDate = range.to ? range.to : undefined
Expand Down
2 changes: 2 additions & 0 deletions src/Shared/Components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ import ICFileCode from '@IconsV2/ic-file-code.svg?react'
import ICFileDownload from '@IconsV2/ic-file-download.svg?react'
import ICFileEdit from '@IconsV2/ic-file-edit.svg?react'
import ICFileKey from '@IconsV2/ic-file-key.svg?react'
import ICFileLogSearch from '@IconsV2/ic-file-log-search.svg?react'
import ICFiles from '@IconsV2/ic-files.svg?react'
import ICFilesChanged from '@IconsV2/ic-files-changed.svg?react'
import ICFilter from '@IconsV2/ic-filter.svg?react'
Expand Down Expand Up @@ -492,6 +493,7 @@ export const iconMap = {
'ic-file-download': ICFileDownload,
'ic-file-edit': ICFileEdit,
'ic-file-key': ICFileKey,
'ic-file-log-search': ICFileLogSearch,
'ic-file': ICFile,
'ic-files-changed': ICFilesChanged,
'ic-files': ICFiles,
Expand Down
6 changes: 4 additions & 2 deletions src/Shared/Hooks/useUserPreferences/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { USER_PREFERENCES_ATTRIBUTE_KEY } from '@Shared/Hooks/useUserPreferences/constants'
import { AppThemeType, ThemeConfigType, ThemePreferenceType } from '@Shared/Providers/ThemeProvider/types'
import { ResourceKindType } from '@Shared/types'
import { NavigationItemID, NavigationSubMenuItemID } from '@PagesDevtron2.0/Navigation'
import { NavigationItemID, NavigationRootItemID, NavigationSubMenuItemID } from '@PagesDevtron2.0/Navigation'

export interface GetUserPreferencesQueryParamsType {
key: typeof USER_PREFERENCES_ATTRIBUTE_KEY
Expand Down Expand Up @@ -78,7 +78,9 @@ export interface GetUserPreferencesParsedDTO {
*/
resources?: UserPreferenceResourceType
commandBar: {
recentNavigationActions: { id: NavigationItemID | NavigationSubMenuItemID | CommandBarAdditionalItemsId }[]
recentNavigationActions: {
id: NavigationItemID | NavigationRootItemID | NavigationSubMenuItemID | CommandBarAdditionalItemsId
Comment thread
AbhishekA1509 marked this conversation as resolved.
}[]
}
}
export interface UserPreferencesPayloadValueType extends GetUserPreferencesParsedDTO {}
Expand Down
Loading