Skip to content

Commit 046beb3

Browse files
committed
Merge branch 'kubecon-2025' into feat/nested-navigation-route
2 parents c556f63 + 27a9277 commit 046beb3

6 files changed

Lines changed: 23 additions & 14 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.20.3-pre-11",
3+
"version": "1.20.5-pre-5",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/API/CoreAPI.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class CoreAPI {
4949
preventLicenseRedirect = false,
5050
shouldParseServerErrorForUnauthorizedUser = false,
5151
isMultipartRequest,
52+
isProxyHost = false,
5253
}: FetchAPIParamsType<K>): Promise<ResponseType> => {
5354
const options: RequestInit = {
5455
method: type,
@@ -58,7 +59,7 @@ class CoreAPI {
5859
// eslint-disable-next-line dot-notation
5960
options['credentials'] = 'include' as RequestCredentials
6061
return fetch(
61-
`${this.host}/${url}`,
62+
`${isProxyHost ? '/proxy' : this.host}/${url}`,
6263
!isMultipartRequest
6364
? options
6465
: ({

src/Common/API/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,10 @@ export interface FetchInTimeParamsType<Data = object> {
4040
export interface FetchAPIParamsType<Data = object>
4141
extends Omit<FetchInTimeParamsType<Data>, 'options'>,
4242
Pick<APIOptions, 'preventAutoLogout' | 'preventLicenseRedirect' | 'shouldParseServerErrorForUnauthorizedUser'> {
43+
/**
44+
* @default false
45+
* @description - If true, will override the default host (orchestrator or whatever defined initially in CoreAPI constructor) with the `proxy` host
46+
*/
47+
isProxyHost?: boolean
4348
signal: AbortSignal
4449
}

src/Common/Constants.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const SOFTWARE_RELEASE_MANAGEMENT_ROOT = '/software-release-management'
5757
const COST_VISIBILITY_ROOT = '/cost-visibility'
5858
const SECURITY_CENTER_ROOT = '/security-center'
5959
const AUTOMATION_AND_ENABLEMENT_ROOT = '/automation-and-enablement'
60-
const BACKUP_AND_RESTORE_ROOT = '/backup-and-restore'
60+
const DATA_PROTECTION_ROOT = '/data-protection-management'
6161
const GLOBAL_CONFIG_ROOT = '/global-configuration'
6262
const AI_RECOMMENDATIONS_ROOT = '/ai-recommendations'
6363

@@ -124,9 +124,12 @@ export const URLS = {
124124
// AUTOMATION AND ENABLEMENT
125125
AUTOMATION_AND_ENABLEMENT: AUTOMATION_AND_ENABLEMENT_ROOT,
126126
AUTOMATION_AND_ENABLEMENT_JOB: `${AUTOMATION_AND_ENABLEMENT_ROOT}/job`,
127-
// BACKUP AND RESTORE
128-
BACKUP_AND_RESTORE: BACKUP_AND_RESTORE_ROOT,
129-
BACKUP_AND_RESTORE_OVERVIEW: `${BACKUP_AND_RESTORE_ROOT}/overview`,
127+
// DATA PROTECTION
128+
DATA_PROTECTION: DATA_PROTECTION_ROOT,
129+
DATA_PROTECTION_OVERVIEW: `${DATA_PROTECTION_ROOT}/overview`,
130+
DATA_PROTECTION_BACKUP_AND_SCHEDULE: `${DATA_PROTECTION_ROOT}/backup-and-schedule`,
131+
DATA_PROTECTION_RESTORES: `${DATA_PROTECTION_ROOT}/restores`,
132+
DATA_PROTECTION_BACKUP_LOCATIONS: `${DATA_PROTECTION_ROOT}/backup-locations`,
130133
// GLOBAL CONFIGURATION
131134
GLOBAL_CONFIG: GLOBAL_CONFIG_ROOT,
132135
GLOBAL_CONFIG_DOCKER: `${GLOBAL_CONFIG_ROOT}/docker`,

src/Shared/Hooks/useUserPreferences/types.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ export type NavigationItemID =
5151
| 'global-configuration-cluster-and-environments'
5252
| 'global-configuration-container-oci-registry'
5353
| 'global-configuration-authorization'
54-
| 'backup-and-restore-overview'
55-
| 'backup-and-restore-backup-and-schedule'
56-
| 'backup-and-restore-restores'
57-
| 'backup-and-restore-backup-repositories'
58-
| 'backup-and-restore-backup-locations'
59-
| 'backup-and-restore-history-and-logs'
54+
| 'data-protection-overview'
55+
| 'data-protection-backup-and-schedule'
56+
| 'data-protection-restores'
57+
| 'data-protection-backup-repositories'
58+
| 'data-protection-backup-locations'
59+
| 'data-protection-history-and-logs'
6060
| 'ai-recommendations-overview'
6161

6262
export type NavigationSubMenuItemID =

0 commit comments

Comments
 (0)