Skip to content

Commit 4e678a4

Browse files
committed
Merge branch 'develop' of https://github.com/devtron-labs/dashboard into feat/tree-view
2 parents 847320c + 33acdb0 commit 4e678a4

File tree

7 files changed

+20
-9
lines changed

7 files changed

+20
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "1.16.0-pre-10",
7+
"@devtron-labs/devtron-fe-common-lib": "1.17.0-pre-0",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,7 @@ const ClusterForm = ({
15151515
clusterId={String(id)}
15161516
clusterName={clusterName}
15171517
handleClose={hideConfirmationModal}
1518+
handleSuccess={hideEditModal}
15181519
reload={reload}
15191520
installationId={String(installationId)}
15201521
/>

src/Pages/GlobalConfigurations/ClustersAndEnvironments/DeleteClusterConfirmationModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const DeleteClusterConfirmationModal = ({
2323
handleClose,
2424
installationId,
2525
reload,
26+
handleSuccess,
2627
}: DeleteClusterConfirmationModalProps) => {
2728
const isClusterInCreationPhase = Number(clusterId) === 0
2829

@@ -40,6 +41,7 @@ const DeleteClusterConfirmationModal = ({
4041
await deleteCluster({ id: numberedClusterId })
4142
}
4243
reload?.()
44+
handleSuccess?.()
4345
}
4446

4547
const handleToggleShouldDeleteInstalledCluster = () => {

src/Pages/GlobalConfigurations/ClustersAndEnvironments/cluster.type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ export interface DeleteClusterConfirmationModalProps
231231
Pick<ClusterEnvironmentListProps, 'clusterId'> {
232232
handleClose: () => void
233233
installationId: string
234+
handleSuccess?: () => void
234235
}
235236

236237
export interface DeleteClusterPayload {

src/components/CIPipelineN/CIPipeline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ export default function CIPipeline({
812812
const renderCIPipelineModalContent = () => {
813813
if (pageState === ViewType.ERROR) {
814814
return (
815-
<div className="p-20">
815+
<div className="flex-grow-1 p-20">
816816
<ErrorScreenManager code={errorCode} reload={handleOnMountAPICalls} />
817817
</div>
818818
)

src/components/common/navigation/NavigationRoutes.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesType
149149
const showCloseButtonAfterGettingStartedClicked = () => {
150150
setHelpGettingStartedClicked(true)
151151
}
152+
// We use this to determine if we can show resource recommender, since we do not allow users to feed prometheus url if grafana module is not installed
153+
const [isGrafanaModuleInstalled, setIsGrafanaModuleInstalled] = useState(false)
152154
const [environmentId, setEnvironmentId] = useState(null)
153155
const contextValue = useMemo(() => ({ environmentId, setEnvironmentId }), [environmentId])
154156

@@ -387,17 +389,21 @@ const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesType
387389
}
388390
}
389391

392+
const getGrafanaModuleStatus = () => getModuleInfo(ModuleNameMap.GRAFANA)
393+
390394
const handleFetchInitialData = async () => {
391395
try {
392-
const [serverModeResponse, environmentDataResponse] = await Promise.all([
396+
const [serverModeResponse, environmentDataResponse, grafanaModuleStatus] = await Promise.all([
393397
getServerMode(),
394398
getEnvironmentDataValues(),
399+
getGrafanaModuleStatus(),
395400
getCurrentServerInfo(),
396401
handleFetchUserPreferences(),
397402
])
398403

399404
await getInit(serverModeResponse)
400405

406+
setIsGrafanaModuleInstalled(grafanaModuleStatus?.result?.status === ModuleStatus.INSTALLED)
401407
setEnvironmentDataState({
402408
isAirgapped: environmentDataResponse.isAirGapEnvironment,
403409
isManifestScanningEnabled: environmentDataResponse.isManifestScanningEnabled,
@@ -663,7 +669,8 @@ const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesType
663669
setSidePanelConfig,
664670
isEnterprise: currentServerInfo?.serverInfo?.installationType === InstallationType.ENTERPRISE,
665671
isFELibAvailable: !!isFELibAvailable,
666-
isResourceRecommendationEnabled: environmentDataState.isResourceRecommendationEnabled,
672+
isResourceRecommendationEnabled:
673+
isGrafanaModuleInstalled && environmentDataState.isResourceRecommendationEnabled,
667674
}}
668675
>
669676
<ConfirmationModalProvider>

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,9 +1722,9 @@ __metadata:
17221722
languageName: node
17231723
linkType: hard
17241724

1725-
"@devtron-labs/devtron-fe-common-lib@npm:1.16.0-pre-10":
1726-
version: 1.16.0-pre-10
1727-
resolution: "@devtron-labs/devtron-fe-common-lib@npm:1.16.0-pre-10"
1725+
"@devtron-labs/devtron-fe-common-lib@npm:1.17.0-pre-0":
1726+
version: 1.17.0-pre-0
1727+
resolution: "@devtron-labs/devtron-fe-common-lib@npm:1.17.0-pre-0"
17281728
dependencies:
17291729
"@codemirror/autocomplete": "npm:6.18.6"
17301730
"@codemirror/lang-json": "npm:6.0.1"
@@ -1773,7 +1773,7 @@ __metadata:
17731773
react-select: 5.8.0
17741774
rxjs: ^7.8.1
17751775
yaml: ^2.4.1
1776-
checksum: 10c0/b02939d8adb7ec1cadf11076ef195a6a2a80c91ca215b3ae298e8a43105e8dc5419fbe3e064ff8b63b7df6f2e1c922a5e119ea23d575c522ec26c30edd2b40d0
1776+
checksum: 10c0/b73859860e959e79fcc358de6611c6a3501cd35c8fd7ea743f488e9f89bc605abb4e691f2f52c709c434d12b65fda3bd42e4b216b061378e0ebee61af25e7b75
17771777
languageName: node
17781778
linkType: hard
17791779

@@ -5685,7 +5685,7 @@ __metadata:
56855685
version: 0.0.0-use.local
56865686
resolution: "dashboard@workspace:."
56875687
dependencies:
5688-
"@devtron-labs/devtron-fe-common-lib": "npm:1.16.0-pre-10"
5688+
"@devtron-labs/devtron-fe-common-lib": "npm:1.17.0-pre-0"
56895689
"@esbuild-plugins/node-globals-polyfill": "npm:0.2.3"
56905690
"@playwright/test": "npm:^1.32.1"
56915691
"@rjsf/core": "npm:^5.13.3"

0 commit comments

Comments
 (0)