Skip to content

Commit 592a12a

Browse files
committed
Merge branch 'main' of https://github.com/devtron-labs/devtron-fe-common-lib into chore/sync-qr-dialog-behaviour
2 parents 5cdf8fb + bb2792a commit 592a12a

File tree

6 files changed

+5
-49
lines changed

6 files changed

+5
-49
lines changed

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.10.10",
3+
"version": "1.10.11",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Helpers.tsx

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ import {
5151
import {
5252
AggregationKeys,
5353
BorderConfigType,
54-
CentralAPILocalConfig,
5554
GitTriggers,
5655
IntersectionChangeHandler,
5756
IntersectionOptions,
@@ -61,12 +60,7 @@ import {
6160
TargetPlatformsDTO,
6261
WebhookEventNameType,
6362
} from './types'
64-
import {
65-
CENTRAL_API_LOCAL_STORAGE_KEY,
66-
DEPLOYMENT_STATUS,
67-
TIMELINE_STATUS,
68-
UNSAVED_CHANGES_PROMPT_MESSAGE,
69-
} from './constants'
63+
import { DEPLOYMENT_STATUS, TIMELINE_STATUS, UNSAVED_CHANGES_PROMPT_MESSAGE } from './constants'
7064
import {
7165
AggregatedNodes,
7266
DeploymentStatusDetailsBreakdownDataType,
@@ -1076,34 +1070,3 @@ export const getClassNameForStickyHeaderWithShadow = (isStuck: boolean, topClass
10761070
export const clearCookieOnLogout = () => {
10771071
document.cookie = `${TOKEN_COOKIE_NAME}=; expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/`
10781072
}
1079-
1080-
export const getCentralAPIHealthObjectFromLocalStorage = (): CentralAPILocalConfig => {
1081-
try {
1082-
const localStorageString = localStorage.getItem(CENTRAL_API_LOCAL_STORAGE_KEY)
1083-
const healthObj: CentralAPILocalConfig = JSON.parse(localStorageString)
1084-
1085-
const { lastUpdatedDate, isConnected, updateCount } = healthObj
1086-
1087-
return {
1088-
lastUpdatedDate: lastUpdatedDate || '',
1089-
updateCount: updateCount || 0,
1090-
isConnected: isConnected || false,
1091-
}
1092-
} catch {
1093-
localStorage.removeItem(CENTRAL_API_LOCAL_STORAGE_KEY)
1094-
return {
1095-
lastUpdatedDate: '',
1096-
updateCount: 0,
1097-
isConnected: false,
1098-
}
1099-
}
1100-
}
1101-
1102-
/**
1103-
*
1104-
* @returns null if we do not know yet
1105-
*/
1106-
export const getCentralAPIHealthFromLocalStorage = (): boolean | null => {
1107-
const healthObject = getCentralAPIHealthObjectFromLocalStorage()
1108-
return healthObject.isConnected
1109-
}

src/Shared/Services/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export interface EnvironmentDataValuesDTO extends Pick<MainContext, 'featureGitO
5555
isAirGapEnvironment: boolean
5656
isManifestScanningEnabled: boolean
5757
canOnlyViewPermittedEnvOrgLevel: boolean
58+
devtronManagedLicensingEnabled: boolean
5859
}
5960
export interface GetUserPreferencesQueryParamsType {
6061
key: typeof USER_PREFERENCES_ATTRIBUTE_KEY

src/Shared/constants.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,4 @@ export const Routes = {
536536

537537
export const ENTERPRISE_SUPPORT_LINK = 'enterprise@devtron.ai'
538538

539-
export const CENTRAL_API_LOCAL_STORAGE_KEY = 'central-api-connection-config'
540-
541539
export const INVALID_LICENSE_KEY = 'inValid'

src/Shared/types.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,12 +1098,6 @@ export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = Devt
10981098

10991099
export type CountryISO2Type = ParsedCountry['iso2']
11001100

1101-
export interface CentralAPILocalConfig {
1102-
lastUpdatedDate: string // date on which local storage is updated
1103-
isConnected: boolean | null // true/false acc to connection, null for first time
1104-
updateCount: number // number of times it has been updated, max 3
1105-
}
1106-
11071101
export enum ResponseHeaders {
11081102
LICENSE_STATUS = 'X-License-Status',
11091103
}

0 commit comments

Comments
 (0)