Skip to content

Commit 33acdb0

Browse files
Merge pull request #2816 from devtron-labs/chore/dt-39-sync
chore: dt 39 sync
2 parents 268904d + 613992e commit 33acdb0

25 files changed

+116
-101
lines changed

Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
FROM node:20-alpine AS builder
2-
3-
RUN apk add --no-cache git
1+
FROM node:22-alpine AS builder
42

53
WORKDIR /app
4+
5+
RUN corepack enable yarn && \
6+
yarn set version 4.9.2
7+
68
COPY package.json .
79
COPY yarn.lock .
10+
COPY .yarn/ .yarn/
11+
COPY .yarnrc.yml ./
812

9-
RUN yarn install --frozen-lockfile --network-timeout 600000
13+
RUN apk add --no-cache git
14+
RUN yarn install --immutable --network-timeout 600000
1015

11-
COPY src/ src
12-
COPY nginx.conf .
13-
COPY tsconfig.json .
14-
COPY vite.config.mts .
1516
COPY . .
1617

1718
RUN echo `git rev-parse --short=9 HEAD` > health.html && \
1819
echo "" >> .env && \
19-
echo "SENTRY_RELEASE_VERSION=dashboard@$(git rev-parse --short=9 HEAD)" >> .env
20-
21-
RUN yarn build
20+
echo "SENTRY_RELEASE_VERSION=dashboard@$(git rev-parse --short=9 HEAD)" >> .env && \
21+
yarn build
2222

2323
FROM fholzer/nginx-brotli:v1.26.2
2424

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-7",
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/App/CreateAppModal/ProjectSelector.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ const ProjectSelector = ({ selectedProjectId, handleProjectIdChange, error }: Pr
6161
onChange={handleChange}
6262
error={error}
6363
autoFocus
64-
defaultMenuIsOpen
6564
/>
6665
</div>
6766
)

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/ClusterNodes/ClusterOverview.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import React, { useEffect, useRef, useState } from 'react'
1818
import { generatePath, useHistory, useParams } from 'react-router-dom'
1919

2020
import {
21-
DUMMY_RESOURCE_GVK_VERSION,
2221
EditableTextArea,
2322
ErrorScreenManager,
2423
getRandomColor,
@@ -216,7 +215,6 @@ function ClusterOverview({ selectedCluster, addTab }: ClusterOverviewProps) {
216215
clusterId,
217216
kind: 'node',
218217
group: K8S_EMPTY_GROUP,
219-
version: DUMMY_RESOURCE_GVK_VERSION,
220218
})}?${queryParam}=${encodeURIComponent(filterText)}`
221219
history.push(newUrl)
222220
}

src/components/ClusterNodes/NodeDetails.tsx

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ import {
4141
Button,
4242
ButtonVariantType,
4343
ButtonStyleType,
44+
RESOURCE_BROWSER_ROUTES,
45+
getUrlWithSearchParams,
46+
ResourceBrowserActionMenuEnum,
4447
} from '@devtron-labs/devtron-fe-common-lib'
45-
import { useParams, useLocation, useHistory } from 'react-router-dom'
48+
import { useParams, useLocation, useHistory, generatePath } from 'react-router-dom'
4649
import YAML from 'yaml'
4750
import * as jsonpatch from 'fast-json-patch'
4851
import { applyPatch } from 'fast-json-patch'
@@ -78,7 +81,7 @@ import { importComponentFromFELibrary } from '@Components/common'
7881

7982
const REDFISH_NODE_UI_TABS = importComponentFromFELibrary('REDFISH_NODE_UI_TABS', [], 'function')
8083

81-
const NodeDetails = ({ addTab, lowercaseKindToResourceGroupMap, updateTabUrl }: ClusterListType) => {
84+
const NodeDetails = ({ lowercaseKindToResourceGroupMap, updateTabUrl }: ClusterListType) => {
8285
const { clusterId, name } = useParams<{ clusterId: string; nodeType: string; name: string }>()
8386
const [loader, setLoader] = useState(true)
8487
const [apiInProgress, setApiInProgress] = useState(false)
@@ -673,9 +676,13 @@ const NodeDetails = ({ addTab, lowercaseKindToResourceGroupMap, updateTabUrl }:
673676
const openDebugTerminal = () => {
674677
const queryParams = new URLSearchParams(location.search)
675678
queryParams.set('node', nodeDetail.name)
676-
const url = location.pathname
677679
push(
678-
`${url.split('/').slice(0, -3).join('/')}/${AppDetailsTabs.terminal}/${K8S_EMPTY_GROUP}?${queryParams.toString()}`,
680+
getUrlWithSearchParams(
681+
generatePath(RESOURCE_BROWSER_ROUTES.TERMINAL, {
682+
clusterId,
683+
}),
684+
{ node: nodeDetail.name },
685+
),
679686
)
680687
}
681688

@@ -711,17 +718,19 @@ const NodeDetails = ({ addTab, lowercaseKindToResourceGroupMap, updateTabUrl }:
711718
}
712719

713720
const handleResourceClick = (e) => {
714-
const { name, tab, namespace } = e.currentTarget.dataset
715-
let _nodeSelectionData
716-
let _group
717-
_group = selectedResource?.gvk.Group.toLowerCase() || K8S_EMPTY_GROUP
718-
_nodeSelectionData = { name: `pod` + `_${name}`, namespace, isFromNodeDetails: true }
719-
const _url = `${URLS.RESOURCE_BROWSER}/${clusterId}/${namespace}/pod/${_group}/${name}${
720-
tab ? `/${tab.toLowerCase()}` : ''
721-
}`
722-
addTab({ idPrefix: `${_group}_${namespace}`, kind: 'pod', name, url: _url }).then(() => {
723-
push(_url)
724-
})
721+
const { name, tab = ResourceBrowserActionMenuEnum.manifest, namespace } = e.currentTarget.dataset
722+
push(
723+
getUrlWithSearchParams(
724+
generatePath(RESOURCE_BROWSER_ROUTES.K8S_RESOURCE_DETAIL, {
725+
clusterId,
726+
group: selectedResource?.gvk.Group.toLowerCase() || K8S_EMPTY_GROUP,
727+
kind: 'pod',
728+
name,
729+
namespace,
730+
}),
731+
{ tab },
732+
),
733+
)
725734
}
726735

727736
const getTriggerSortingHandler =

src/components/ClusterNodes/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ export interface ColumnMetadataType {
135135
}
136136

137137
export interface ClusterListType extends Pick<K8SResourceListType, 'lowercaseKindToResourceGroupMap'> {
138-
addTab?: UseTabsReturnType['addTab']
139138
updateTabUrl: (params: Omit<UpdateTabUrlParamsType, 'id'>) => void
140139
}
141140

0 commit comments

Comments
 (0)