Skip to content

Commit 7e7ef70

Browse files
committed
Merge branch 'fix/rb-table' into feat/rb-table
2 parents 6857d81 + 948da9e commit 7e7ef70

File tree

75 files changed

+15254
-9415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+15254
-9415
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
cache: 'yarn'
2626

2727
- name: Install dependencies
28-
run: yarn install --frozen-lockfile
28+
run: yarn install --immutable
2929

3030
- name: Check linting issues
3131
run: yarn lint

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.11.0
1+
v22

.yarn/releases/yarn-4.9.2.cjs

Lines changed: 942 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.9.2.cjs

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
FROM node:20-alpine AS builder
1+
FROM node:22-alpine AS builder
22

33
WORKDIR /app
44

5-
COPY package.json yarn.lock .
5+
RUN corepack enable yarn && \
6+
yarn set version 4.9.2
7+
8+
COPY package.json .
9+
COPY yarn.lock .
10+
COPY .yarn/ .yarn/
11+
COPY .yarnrc.yml ./
612

713
RUN apk add --no-cache git
8-
RUN yarn install --frozen-lockfile --network-timeout 600000
14+
RUN yarn install --immutable --network-timeout 600000
915

1016
COPY . .
1117

package.json

Lines changed: 8 additions & 8 deletions
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.15.1-pre-5",
7+
"@devtron-labs/devtron-fe-common-lib": "1.15.3-beta-4",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",
@@ -14,7 +14,6 @@
1414
"@sentry/tracing": "7.50.0",
1515
"@tippyjs/react": "4.2.6",
1616
"@typeform/embed-react": "2.20.0",
17-
"@vitejs/plugin-react": "4.3.1",
1817
"command-line-parser": "^0.2.10",
1918
"compute-histogram": "^0.9.11",
2019
"dayjs": "^1.11.8",
@@ -39,9 +38,6 @@
3938
"rxjs": "^7.5.4",
4039
"sockjs-client": "1.6.1",
4140
"tippy.js": "^6.3.7",
42-
"vite": "5.4.19",
43-
"vite-plugin-require-transform": "1.0.21",
44-
"vite-plugin-svgr": "^2.4.0",
4541
"xterm": "^4.19.0",
4642
"xterm-addon-fit": "^0.5.0",
4743
"xterm-addon-search": "^0.9.0",
@@ -87,6 +83,7 @@
8783
"@types/recompose": "^0.30.10",
8884
"@typescript-eslint/eslint-plugin": "8.3.0",
8985
"@typescript-eslint/parser": "8.3.0",
86+
"@vitejs/plugin-react": "4.5.2",
9087
"env-cmd": "10.1.0",
9188
"eslint": "^8.57.1",
9289
"eslint-config-airbnb": "^19.0.4",
@@ -115,9 +112,11 @@
115112
"ts-jest": "29.2.5",
116113
"ts-node": "10.9.2",
117114
"typescript": "5.5.4",
118-
"vite-plugin-compression2": "^1.3.3",
119-
"vite-plugin-image-optimizer": "^1.1.8",
115+
"vite": "6.3.5",
116+
"vite-plugin-compression2": "2.0.1",
120117
"vite-plugin-pwa": "^0.21.1",
118+
"vite-plugin-require-transform": "1.0.21",
119+
"vite-plugin-svgr": "^2.4.0",
121120
"vite-tsconfig-paths": "5.0.1"
122121
},
123122
"jest": {
@@ -139,5 +138,6 @@
139138
"rollup": "^4.22.4",
140139
"path-to-regexp": "^1.9.0",
141140
"cross-spawn": "^7.0.5"
142-
}
141+
},
142+
"packageManager": "[email protected]"
143143
}

src/Pages/App/CreateAppModal/AppClone/AppCloneList.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,17 @@ export const AppCloneList = ({ handleCloneAppClick, isJobView, handleCreationMet
4747
<div className="flexbox-col dc__gap-12 pt-20 px-20">
4848
<h2 className="m-0 fs-15 lh-1-5 fw-6 cn-9">Choose {isJobView ? 'a job' : 'an application'} to clone</h2>
4949

50-
<SearchBar
51-
dataTestId="template-list-search"
52-
initialSearchText={searchKey}
53-
size={ComponentSizeType.medium}
54-
handleEnter={handleSearch}
55-
inputProps={{
56-
placeholder: `Search ${isJobView ? 'job' : 'application'}`,
57-
}}
58-
/>
50+
{!!list.length && !listError && (
51+
<SearchBar
52+
dataTestId="template-list-search"
53+
initialSearchText={searchKey}
54+
size={ComponentSizeType.medium}
55+
handleEnter={handleSearch}
56+
inputProps={{
57+
placeholder: `Search ${isJobView ? 'job' : 'application'}`,
58+
}}
59+
/>
60+
)}
5961
</div>
6062
<div className="flex-grow-1 flexbox-col dc__gap-12 p-20 dc__overflow-auto">
6163
<GenericInfoCardListing

src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterComponent.tsx

Lines changed: 86 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ import {
2121
Button,
2222
ButtonComponentType,
2323
ComponentSizeType,
24+
Drawer,
2425
ErrorScreenNotAuthorized,
2526
FeatureTitleWithInfo,
27+
GenericEmptyState,
2628
Icon,
2729
Progressing,
2830
Reload,
2931
showError,
3032
sortCallback,
31-
URLS as CommonURLS,
33+
stopPropagation,
34+
URLS as COMMON_URLS,
3235
} from '@devtron-labs/devtron-fe-common-lib'
3336

3437
import { importComponentFromFELibrary } from '@Components/common'
@@ -42,9 +45,13 @@ import { getClusterList, getEnvironmentList } from './cluster.service'
4245
import { ClusterMetadataTypes, ClusterProps } from './cluster.type'
4346
import { getSelectParsedCategory } from './cluster.util'
4447
import { ClusterList } from './ClusterList'
48+
import EditClusterDrawerContent from './EditClusterDrawerContent'
4549

4650
const ManageCategories = importComponentFromFELibrary('ManageCategories', null, 'function')
4751
const ManageCategoryButton = importComponentFromFELibrary('ManageCategoryButton', null, 'function')
52+
const PodSpreadModal = importComponentFromFELibrary('PodSpreadModal', null, 'function')
53+
const HibernationRulesModal = importComponentFromFELibrary('HibernationRulesModal', null, 'function')
54+
const VirtualClusterForm = importComponentFromFELibrary('VirtualClusterForm', null, 'function')
4855

4956
const ClusterComponents = ({ isSuperAdmin }: ClusterProps) => {
5057
const [view, setView] = useState(ViewType.LOADING)
@@ -138,22 +145,15 @@ const ClusterComponents = ({ isSuperAdmin }: ClusterProps) => {
138145
clusterName={cluster.cluster_name}
139146
isVirtualCluster={cluster.isVirtualCluster}
140147
environments={cluster.environments}
141-
sshTunnelConfig={cluster.sshTunnelConfig}
142148
isProd={cluster.isProd}
143149
serverURL={cluster.server_url}
144-
prometheusURL={cluster.prometheus_url}
145-
prometheusAuth={cluster.prometheusAuth}
146-
proxyUrl={cluster.proxyUrl}
147-
insecureSkipTlsVerify={cluster.insecureSkipTlsVerify}
148-
installationId={cluster.installationId}
149150
category={cluster.category}
150-
toConnectWithSSHTunnel={cluster.toConnectWithSSHTunnel}
151151
clusterId={cluster.id}
152152
/>
153153
))}
154154

155155
{ManageCategories && (
156-
<Route path={CommonURLS.GLOBAL_CONFIG_MANAGE_CATEGORIES}>
156+
<Route path={COMMON_URLS.GLOBAL_CONFIG_MANAGE_CATEGORIES}>
157157
<ManageCategories />
158158
</Route>
159159
)}
@@ -162,6 +162,83 @@ const ClusterComponents = ({ isSuperAdmin }: ClusterProps) => {
162162
<CreateCluster handleReloadClusterList={initialize} />
163163
</Route>
164164

165+
<Route
166+
path={COMMON_URLS.GLOBAL_CONFIG_EDIT_CLUSTER}
167+
render={(props) => {
168+
const { clusterId } = props.match.params
169+
const cluster: ClusterMetadataTypes = clusters.find((c) => c.id === +clusterId)
170+
171+
if (!cluster || !cluster.isVirtualCluster) {
172+
return (
173+
<Drawer position="right" width="1000px" onClose={handleRedirectToClusterList}>
174+
<div className="h-100 bg__primary" onClick={stopPropagation}>
175+
{!cluster ? (
176+
<GenericEmptyState
177+
title="Cluster not found"
178+
subTitle="The cluster that you are looking is not available."
179+
/>
180+
) : (
181+
<EditClusterDrawerContent
182+
handleModalClose={handleRedirectToClusterList}
183+
sshTunnelConfig={cluster.sshTunnelConfig}
184+
clusterId={cluster.id}
185+
clusterName={cluster.cluster_name}
186+
serverURL={cluster.server_url}
187+
reload={initialize}
188+
prometheusURL={cluster.prometheus_url}
189+
proxyUrl={cluster.proxyUrl}
190+
toConnectWithSSHTunnel={cluster.toConnectWithSSHTunnel}
191+
isProd={cluster.isProd}
192+
installationId={cluster.installationId}
193+
category={cluster.category}
194+
insecureSkipTlsVerify={cluster.insecureSkipTlsVerify}
195+
/>
196+
)}
197+
</div>
198+
</Drawer>
199+
)
200+
}
201+
202+
return (
203+
<VirtualClusterForm
204+
id={+cluster.id}
205+
clusterName={cluster.cluster_name}
206+
handleModalClose={handleRedirectToClusterList}
207+
reload={initialize}
208+
category={cluster.category}
209+
/>
210+
)
211+
}}
212+
/>
213+
214+
{PodSpreadModal && (
215+
<Route
216+
path={`${URLS.GLOBAL_CONFIG_CLUSTER}/:clusterName/${URLS.POD_SPREAD}`}
217+
render={(props) => {
218+
const { clusterName } = props.match.params
219+
const foundCluster: ClusterMetadataTypes | { id?: number } =
220+
clusters.find((c) => c.cluster_name === clusterName) || {}
221+
const { id: clusterId } = foundCluster
222+
223+
return <PodSpreadModal clusterId={clusterId} handleClose={handleRedirectToClusterList} />
224+
}}
225+
/>
226+
)}
227+
228+
{HibernationRulesModal && (
229+
<Route
230+
path={`${URLS.GLOBAL_CONFIG_CLUSTER}/:clusterName/${URLS.HIBERNATION_RULES}`}
231+
render={(props) => {
232+
const { clusterName } = props.match.params
233+
const foundCluster: ClusterMetadataTypes | { id?: number } =
234+
clusters.find((c) => c.cluster_name === clusterName) || {}
235+
const { id: clusterId } = foundCluster
236+
237+
return <HibernationRulesModal clusterId={clusterId} handleClose={handleRedirectToClusterList} />
238+
}}
239+
/>
240+
)}
241+
165242
<Route
166243
path={`${URLS.GLOBAL_CONFIG_CLUSTER}/:clusterName${URLS.CREATE_ENVIRONMENT}`}
167244
render={(props) => {

0 commit comments

Comments
 (0)