diff --git a/src/Common/Constants.ts b/src/Common/Constants.ts
index a5a013b75..c74a92f82 100644
--- a/src/Common/Constants.ts
+++ b/src/Common/Constants.ts
@@ -86,6 +86,7 @@ export const URLS = {
// NOTE: using appId since we are re-using AppConfig component
GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_DETAIL: `${GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP}/detail/:appId`,
LICENSE_AUTH: '/license-auth',
+ GLOBAL_CONFIG_EDIT_CLUSTER: '/global-config/cluster-env/edit/:clusterId',
} as const
export const ROUTES = {
@@ -381,6 +382,7 @@ export const API_STATUS_CODES = {
NOT_FOUND: 404,
REQUEST_TIMEOUT: 408,
CONFLICT: 409,
+ PRE_CONDITION_FAILED: 412,
EXPECTATION_FAILED: 417,
UNPROCESSABLE_ENTITY: 422,
LOCKED: 423,
diff --git a/src/Shared/Components/InfoBlock/InfoBlock.component.tsx b/src/Shared/Components/InfoBlock/InfoBlock.component.tsx
index 0f5309242..194cd67a1 100644
--- a/src/Shared/Components/InfoBlock/InfoBlock.component.tsx
+++ b/src/Shared/Components/InfoBlock/InfoBlock.component.tsx
@@ -19,8 +19,9 @@ import { deriveBorderRadiusAndBorderClassFromConfig } from '@Shared/Helpers'
import { Button } from '../Button'
import {
- CONTAINER_SIZE_TO_BUTTON_SIZE,
CONTAINER_SIZE_TO_CLASS_MAP,
+ CONTAINER_SIZE_TO_ICON_BUTTON_SIZE,
+ CONTAINER_SIZE_TO_TEXT_BUTTON_SIZE,
SIZE_TO_ICON_CLASS_MAP,
VARIANT_TO_ICON_MAP,
} from './constants'
@@ -40,6 +41,9 @@ const InfoBlock = ({
const baseContainerClass = `${CONTAINER_SIZE_TO_CLASS_MAP[size]} ${VARIANT_TO_BG_MAP[variant]} ${VARIANT_TO_BORDER_MAP[variant]} ${deriveBorderRadiusAndBorderClassFromConfig({ borderConfig, borderRadiusConfig })} w-100 py-8 br-4 bw-1`
const iconClass = `dc__no-shrink flex dc__fill-available-space ${SIZE_TO_ICON_CLASS_MAP[size]}`
const icon = customIcon ?? VARIANT_TO_ICON_MAP[variant]
+ const buttonSize = buttonProps?.icon
+ ? CONTAINER_SIZE_TO_ICON_BUTTON_SIZE[size]
+ : CONTAINER_SIZE_TO_TEXT_BUTTON_SIZE[size]
const renderIcon = () => {icon}
@@ -99,7 +103,7 @@ const InfoBlock = ({
{renderContent()}
- {buttonProps && }
+ {buttonProps && }
)
}
@@ -112,7 +116,7 @@ const InfoBlock = ({
{renderIcon()}
- {buttonProps && }
+ {buttonProps && }
)
}
diff --git a/src/Shared/Components/InfoBlock/constants.tsx b/src/Shared/Components/InfoBlock/constants.tsx
index 037ad7b23..26dace5b8 100644
--- a/src/Shared/Components/InfoBlock/constants.tsx
+++ b/src/Shared/Components/InfoBlock/constants.tsx
@@ -39,7 +39,12 @@ export const SIZE_TO_ICON_CLASS_MAP: Record = {
[ComponentSizeType.medium]: 'icon-dim-18',
}
-export const CONTAINER_SIZE_TO_BUTTON_SIZE: Record = {
+export const CONTAINER_SIZE_TO_TEXT_BUTTON_SIZE: Record = {
[ComponentSizeType.large]: ComponentSizeType.medium,
- [ComponentSizeType.medium]: ComponentSizeType.small,
+ [ComponentSizeType.medium]: ComponentSizeType.xs,
+}
+
+export const CONTAINER_SIZE_TO_ICON_BUTTON_SIZE: Record = {
+ [ComponentSizeType.large]: ComponentSizeType.xxs,
+ [ComponentSizeType.medium]: ComponentSizeType.xxs,
}
diff --git a/src/Shared/Providers/types.ts b/src/Shared/Providers/types.ts
index c1d1cd9c9..0145ede6b 100644
--- a/src/Shared/Providers/types.ts
+++ b/src/Shared/Providers/types.ts
@@ -18,7 +18,13 @@ import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react'
import { SERVER_MODE } from '../../Common'
import { ServerInfo } from '../Components/Header/types'
-import { DevtronLicenseInfo, IntelligenceConfig, LicenseInfoDialogType, ToastManager } from '..'
+import {
+ DevtronLicenseInfo,
+ EnvironmentDataValuesDTO,
+ IntelligenceConfig,
+ LicenseInfoDialogType,
+ ToastManager,
+} from '..'
export interface ReloadVersionConfigTypes {
bgUpdated: boolean
@@ -48,6 +54,7 @@ type AIAgentContextType = {
context: Record
}
+// Please make sure to make it optional if not required in gatekeeper
type CommonMainContextProps = {
setServerMode: (serverMode: SERVER_MODE) => void
isHelpGettingStartedClicked: boolean
@@ -90,7 +97,7 @@ type CommonMainContextProps = {
setIntelligenceConfig: Dispatch>
setAIAgentContext: (aiAgentContext: AIAgentContextType) => void
setSidePanelConfig: Dispatch>
-}
+} & Pick
export type MainContext = CommonMainContextProps &
(
diff --git a/src/Shared/Services/types.ts b/src/Shared/Services/types.ts
index 2d98e6c76..54ca9fc7c 100644
--- a/src/Shared/Services/types.ts
+++ b/src/Shared/Services/types.ts
@@ -60,4 +60,5 @@ export interface EnvironmentDataValuesDTO extends Pick &