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 44 "private" : true ,
55 "homepage" : " /dashboard" ,
66 "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 " ,
88 "@esbuild-plugins/node-globals-polyfill" : " 0.2.3" ,
99 "@rjsf/core" : " ^5.13.3" ,
1010 "@rjsf/utils" : " ^5.13.3" ,
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import { importComponentFromFELibrary } from '@Components/common'
2626import { URLS } from '@Config/routes'
2727
2828import {
29+ Cluster ,
2930 ClusterEnvTabs ,
3031 ClusterListFields ,
3132 ClusterRowData ,
@@ -257,7 +258,7 @@ export const AddEnvironment = ({
257258 handleClose,
258259} : {
259260 reloadEnvironments : ( ) => void
260- handleClose
261+ handleClose : ( ) => void
261262} ) => {
262263 const { clusterId } = useParams < { clusterId ?: string } > ( )
263264
@@ -271,6 +272,29 @@ export const AddEnvironment = ({
271272 )
272273}
273274
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+
274298export const EditCluster = ( { clusterList, reloadClusterList, handleClose } : EditDeleteClusterProps ) => {
275299 const { clusterId } = useParams < { clusterId : string } > ( )
276300 const cluster = clusterList . find ( ( c ) => c . clusterId === + clusterId )
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ import {
6969import { parseClusterEnvSearchParams } from './cluster.util'
7070import {
7171 AddEnvironment ,
72+ AddEnvironmentFromClusterName ,
7273 ClusterEnvLoader ,
7374 ClusterListCellComponent ,
7475 DeleteCluster ,
@@ -453,6 +454,16 @@ const ClusterList = () => {
453454 < Route path = { `${ URLS . GLOBAL_CONFIG_CLUSTER } ${ URLS . CREATE_ENVIRONMENT } /:clusterId?` } >
454455 < AddEnvironment reloadEnvironments = { reloadEnvironments } handleClose = { handleRedirectToClusterList } />
455456 </ 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+ ) }
456467 { PodSpreadModal && (
457468 < Route
458469 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 = ({
276276 < >
277277 { /* Cluster metadata */ }
278278 < 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"
280280 style = { { top : '37px' } }
281281 >
282282 < ClusterIconWithStatus clusterStatus = { status } isVirtualCluster = { isVirtualCluster } />
@@ -394,7 +394,7 @@ const EnvironmentList = ({
394394 return (
395395 < >
396396 < 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` }
398398 >
399399 { /* Empty div for icon */ }
400400 < div />
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { CSVLink } from 'react-csv'
1919import moment from 'moment'
2020
2121import {
22+ ALLOW_ACTION_OUTSIDE_FOCUS_TRAP ,
2223 Button ,
2324 ButtonStyleType ,
2425 ButtonVariantType ,
@@ -271,6 +272,7 @@ const ExportToCsv = <ConfigValueType extends string = string>({
271272 filename = { `${ fileName } _${ moment ( ) . format ( Moment12HourExportFormat ) } .csv` }
272273 headers = { CSV_HEADERS [ fileName ] || [ ] }
273274 data = { dataToExport || [ ] }
275+ className = { ALLOW_ACTION_OUTSIDE_FOCUS_TRAP }
274276 />
275277 { ! hideExportResultModal && ( showExportingModal || isConfigurationAvailable ) && (
276278 < 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) => {
152152 </ div >
153153 </ div >
154154 </ div >
155- < div className = "flexbox-col dc__gap-12" >
155+ < div className = "flexbox-col dc__align-items-center dc__gap-12" >
156156 < Button
157157 disabled = { loading || ! form . password }
158158 isLoading = { loading }
Original file line number Diff line number Diff line change @@ -1722,9 +1722,9 @@ __metadata:
17221722 languageName : node
17231723 linkType : hard
17241724
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 "
17281728 dependencies :
17291729 " @codemirror/autocomplete " : " npm:6.18.6"
17301730 " @codemirror/lang-json " : " npm:6.0.1"
@@ -1774,7 +1774,7 @@ __metadata:
17741774 react-select : 5.8.0
17751775 rxjs : ^7.8.1
17761776 yaml : ^2.4.1
1777- checksum : 10c0/19e424e01f39f857ac2ef5b8eea4bc368ffdd0dd9caf5a77b95968f0b9923a7cca9f9649746822c260d1493fd02834f029410113ca9805a7fc1a235bbad9d0a5
1777+ checksum : 10c0/e1c09afd682b656be36c9170ab914e38009b58f204e74ad96468deb5ba46d5546c2e56b08bf25fa8f42e9b32d88adc04db234b376bee18e11f74d7d414ac46e1
17781778 languageName : node
17791779 linkType : hard
17801780
@@ -5721,7 +5721,7 @@ __metadata:
57215721 version : 0.0.0-use.local
57225722 resolution : " dashboard@workspace:."
57235723 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 "
57255725 " @esbuild-plugins/node-globals-polyfill " : " npm:0.2.3"
57265726 " @playwright/test " : " npm:^1.32.1"
57275727 " @rjsf/core " : " npm:^5.13.3"
You can’t perform that action at this time.
0 commit comments