@@ -109,7 +109,6 @@ export const Testing = ({
109109 const { setFlash, config} = useAppStore ( state => state ) ;
110110 const navigate = useNavigate ( ) ;
111111
112- const [ alertClosed , setAlertClosed ] = useState ( false ) ;
113112 const [ isCopyConnectionOpen , setIsCopyConnectionOpen ] = useState ( false ) ;
114113 const [ isMaxRefreshValidity , setIsMaxRefreshValidity ] = useState ( false ) ;
115114 const [ section , setSection ] = useState ( sections . technical ) ;
@@ -138,10 +137,17 @@ export const Testing = ({
138137 if ( ! isEmpty ( connectionId ) ) {
139138 const conn = application . connections . find ( c => c . id === parseInt ( connectionId , 10 ) ) ;
140139 if ( isEmpty ( conn ) ) {
141- navigate ( "/404" ) ;
140+ navigate ( `/connection/ ${ application . id } / ${ isProduction ? "prod" : "testing" } ` ) ;
142141 } else {
143142 showConnectionDetails ( conn ) ;
144143 }
144+ } else {
145+ const urlSearchParams = new URLSearchParams ( window . location . search ) ;
146+ const action = urlSearchParams . get ( "action" ) ;
147+ if ( action === "activate" ) {
148+ showConnectionDetails ( connections
149+ . find ( conn => conn . status === CONNECTION_STATUSES . COMPLETE || conn . status === CONNECTION_STATUSES . IN_PROGRESS ) )
150+ }
145151 }
146152 } , [ application ] ) ;
147153
@@ -393,7 +399,7 @@ export const Testing = ({
393399 } else {
394400 setLoading ( true ) ;
395401 deleteConnectionById ( connection . id ) . then ( ( ) => {
396- refresh ( ) ;
402+ refresh ( isProduction ? "prod" : "testing" ) ;
397403 setConfirmation ( { open : false } ) ;
398404 setLoading ( false ) ;
399405 setFlash ( I18n . t ( "connection.flash.deleted" , {
@@ -1299,17 +1305,17 @@ export const Testing = ({
12991305 ]
13001306
13011307 return (
1302- < Entities entities = { connections }
1303- modelName = "table-connections"
1304- defaultSort = "name"
1305- columns = { columns }
1306- hideTitle = { true }
1307- showNew = { false }
1308- rowLinkMapper = { ( e , conn ) => showConnectionDetails ( conn ) }
1309- displaySearch = { false }
1310- searchAttributes = { [ "name" , "protocol" ] }
1311- inputFocus = { true } >
1312- </ Entities >
1308+ < Entities entities = { connections }
1309+ modelName = "table-connections"
1310+ defaultSort = "name"
1311+ columns = { columns }
1312+ hideTitle = { true }
1313+ showNew = { false }
1314+ rowLinkMapper = { ( e , conn ) => showConnectionDetails ( conn ) }
1315+ displaySearch = { false }
1316+ searchAttributes = { [ "name" , "protocol" ] }
1317+ inputFocus = { true } >
1318+ </ Entities >
13131319 )
13141320
13151321 } ;
0 commit comments