File tree Expand file tree Collapse file tree 7 files changed +47
-10
lines changed
Pages/GlobalConfigurations/ClustersAndEnvironments Expand file tree Collapse file tree 7 files changed +47
-10
lines changed Original file line number Diff line number Diff line change 4
4
"private" : true ,
5
5
"homepage" : " /dashboard" ,
6
6
"dependencies" : {
7
- "@devtron-labs/devtron-fe-common-lib" : " 1.18.1-pre-5 " ,
7
+ "@devtron-labs/devtron-fe-common-lib" : " 1.18.1-pre-7 " ,
8
8
"@esbuild-plugins/node-globals-polyfill" : " 0.2.3" ,
9
9
"@rjsf/core" : " ^5.13.3" ,
10
10
"@rjsf/utils" : " ^5.13.3" ,
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import { importComponentFromFELibrary } from '@Components/common'
26
26
import { URLS } from '@Config/routes'
27
27
28
28
import {
29
+ Cluster ,
29
30
ClusterEnvTabs ,
30
31
ClusterListFields ,
31
32
ClusterRowData ,
@@ -257,7 +258,7 @@ export const AddEnvironment = ({
257
258
handleClose,
258
259
} : {
259
260
reloadEnvironments : ( ) => void
260
- handleClose
261
+ handleClose : ( ) => void
261
262
} ) => {
262
263
const { clusterId } = useParams < { clusterId ?: string } > ( )
263
264
@@ -271,6 +272,29 @@ export const AddEnvironment = ({
271
272
)
272
273
}
273
274
275
+ export const AddEnvironmentFromClusterName = ( {
276
+ reloadEnvironments,
277
+ handleClose,
278
+ clusterList,
279
+ } : {
280
+ clusterList : Cluster [ ]
281
+ reloadEnvironments : ( ) => void
282
+ handleClose : ( ) => void
283
+ } ) => {
284
+ const { clusterName } = useParams < { clusterName ?: string } > ( )
285
+
286
+ const clusterId = clusterList . find ( ( c ) => c . clusterName === clusterName ) ?. clusterId
287
+
288
+ return (
289
+ < ClusterEnvironmentDrawer
290
+ drawerType = "addEnv"
291
+ reload = { reloadEnvironments }
292
+ clusterId = { clusterId }
293
+ hideClusterDrawer = { handleClose }
294
+ />
295
+ )
296
+ }
297
+
274
298
export const EditCluster = ( { clusterList, reloadClusterList, handleClose } : EditDeleteClusterProps ) => {
275
299
const { clusterId } = useParams < { clusterId : string } > ( )
276
300
const cluster = clusterList . find ( ( c ) => c . clusterId === + clusterId )
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ import {
69
69
import { parseClusterEnvSearchParams } from './cluster.util'
70
70
import {
71
71
AddEnvironment ,
72
+ AddEnvironmentFromClusterName ,
72
73
ClusterEnvLoader ,
73
74
ClusterListCellComponent ,
74
75
DeleteCluster ,
@@ -453,6 +454,16 @@ const ClusterList = () => {
453
454
< Route path = { `${ URLS . GLOBAL_CONFIG_CLUSTER } ${ URLS . CREATE_ENVIRONMENT } /:clusterId?` } >
454
455
< AddEnvironment reloadEnvironments = { reloadEnvironments } handleClose = { handleRedirectToClusterList } />
455
456
</ Route >
457
+ { /* Below route is to maintain backward compatibility and redirection from various places in dashboard */ }
458
+ { clusterListResult && (
459
+ < Route path = { `${ URLS . GLOBAL_CONFIG_CLUSTER } /:clusterName${ URLS . CREATE_ENVIRONMENT } ` } >
460
+ < AddEnvironmentFromClusterName
461
+ clusterList = { clusterListResult ?? [ ] }
462
+ reloadEnvironments = { reloadEnvironments }
463
+ handleClose = { handleRedirectToClusterList }
464
+ />
465
+ </ Route >
466
+ ) }
456
467
{ PodSpreadModal && (
457
468
< Route
458
469
path = { `${ URLS . GLOBAL_CONFIG_CLUSTER } /${ URLS . POD_SPREAD } /:clusterId` }
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ const ClustersEnvironmentsList = ({
276
276
< >
277
277
{ /* Cluster metadata */ }
278
278
< div
279
- className = "px-20 py-6 bg__secondary dc__grid dc__align-items-center cluster-metadata-header dc__gap-16 dc__content-start fs-12 lh-20 cn-7 dc__position-sticky"
279
+ className = "dc__zi-1 px-20 py-6 bg__secondary dc__grid dc__align-items-center cluster-metadata-header dc__gap-16 dc__content-start fs-12 lh-20 cn-7 dc__position-sticky"
280
280
style = { { top : '37px' } }
281
281
>
282
282
< ClusterIconWithStatus clusterStatus = { status } isVirtualCluster = { isVirtualCluster } />
@@ -394,7 +394,7 @@ const EnvironmentList = ({
394
394
return (
395
395
< >
396
396
< div
397
- className = { `border__secondary--bottom bg__primary px-20 py-10 dc__grid environment-row ${ isFELibAvailable ? 'with-category' : '' } dc__align-items-center dc__position-sticky dc__top-0` }
397
+ className = { `border__secondary--bottom bg__primary px-20 py-10 dc__grid environment-row dc__zi-1 ${ isFELibAvailable ? 'with-category' : '' } dc__align-items-center dc__position-sticky dc__top-0` }
398
398
>
399
399
{ /* Empty div for icon */ }
400
400
< div />
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { CSVLink } from 'react-csv'
19
19
import moment from 'moment'
20
20
21
21
import {
22
+ ALLOW_ACTION_OUTSIDE_FOCUS_TRAP ,
22
23
Button ,
23
24
ButtonStyleType ,
24
25
ButtonVariantType ,
@@ -271,6 +272,7 @@ const ExportToCsv = <ConfigValueType extends string = string>({
271
272
filename = { `${ fileName } _${ moment ( ) . format ( Moment12HourExportFormat ) } .csv` }
272
273
headers = { CSV_HEADERS [ fileName ] || [ ] }
273
274
data = { dataToExport || [ ] }
275
+ className = { ALLOW_ACTION_OUTSIDE_FOCUS_TRAP }
274
276
/>
275
277
{ ! hideExportResultModal && ( showExportingModal || isConfigurationAvailable ) && (
276
278
< VisibleModal className = "export-to-csv-modal" data-testid = "export-to-csv-modal" >
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ export const LoginForm = ({ loginList }: LoginFormType) => {
152
152
</ div >
153
153
</ div >
154
154
</ div >
155
- < div className = "flexbox-col dc__gap-12" >
155
+ < div className = "flexbox-col dc__align-items-center dc__gap-12" >
156
156
< Button
157
157
disabled = { loading || ! form . password }
158
158
isLoading = { loading }
Original file line number Diff line number Diff line change @@ -1722,9 +1722,9 @@ __metadata:
1722
1722
languageName : node
1723
1723
linkType : hard
1724
1724
1725
- " @devtron-labs/devtron-fe-common-lib@npm:1.18.1-pre-5 " :
1726
- version : 1.18.1-pre-5
1727
- resolution : " @devtron-labs/devtron-fe-common-lib@npm:1.18.1-pre-5 "
1725
+ " @devtron-labs/devtron-fe-common-lib@npm:1.18.1-pre-7 " :
1726
+ version : 1.18.1-pre-7
1727
+ resolution : " @devtron-labs/devtron-fe-common-lib@npm:1.18.1-pre-7 "
1728
1728
dependencies :
1729
1729
" @codemirror/autocomplete " : " npm:6.18.6"
1730
1730
" @codemirror/lang-json " : " npm:6.0.1"
@@ -1774,7 +1774,7 @@ __metadata:
1774
1774
react-select : 5.8.0
1775
1775
rxjs : ^7.8.1
1776
1776
yaml : ^2.4.1
1777
- checksum : 10c0/19e424e01f39f857ac2ef5b8eea4bc368ffdd0dd9caf5a77b95968f0b9923a7cca9f9649746822c260d1493fd02834f029410113ca9805a7fc1a235bbad9d0a5
1777
+ checksum : 10c0/e1c09afd682b656be36c9170ab914e38009b58f204e74ad96468deb5ba46d5546c2e56b08bf25fa8f42e9b32d88adc04db234b376bee18e11f74d7d414ac46e1
1778
1778
languageName : node
1779
1779
linkType : hard
1780
1780
@@ -5721,7 +5721,7 @@ __metadata:
5721
5721
version : 0.0.0-use.local
5722
5722
resolution : " dashboard@workspace:."
5723
5723
dependencies :
5724
- " @devtron-labs/devtron-fe-common-lib " : " npm:1.18.1-pre-5 "
5724
+ " @devtron-labs/devtron-fe-common-lib " : " npm:1.18.1-pre-7 "
5725
5725
" @esbuild-plugins/node-globals-polyfill " : " npm:0.2.3"
5726
5726
" @playwright/test " : " npm:^1.32.1"
5727
5727
" @rjsf/core " : " npm:^5.13.3"
You can’t perform that action at this time.
0 commit comments