@@ -3809,18 +3809,6 @@ module view_layout {
38093809
38103810 } )
38113811
3812- // gateway disconnect!
3813- socketIo . on ( 'disconnectClickCallBack' , resopn => {
3814- this . disconnecting ( true )
3815- if ( this . selectedQTGateRegion ( ) ) {
3816- this . selectedQTGateRegion ( ) . showConnectedArea ( false )
3817- this . ConnectGatewayShow ( false )
3818- this . disconnecting ( false )
3819- return this . selectedQTGateRegionCancel ( )
3820- }
3821-
3822- } )
3823-
38243812
38253813 socketIo . once ( 'reconnect_error' , err => {
38263814 if ( this . modalContent ( ) . length )
@@ -3829,9 +3817,6 @@ module view_layout {
38293817 return $ ( '.ui.basic.modal' ) . modal ( 'setting' , 'closable' , false ) . modal ( 'show' )
38303818 } )
38313819
3832- socketIo . on ( 'disconnectClickCallBack' , ( ) => {
3833- return this . desconnectCallBack ( )
3834- } )
38353820
38363821 socketIo . on ( 'QTGateGatewayConnectRequest' , ( err , data ) => {
38373822 return this . QTGateGatewayConnectRequestCallBack ( this , err , data )
@@ -4549,7 +4534,11 @@ module view_layout {
45494534 }
45504535
45514536 public getAvaliableRegion ( ) {
4552- this . pingCheckLoading ( true )
4537+ if ( this . pingCheckLoading ( ) ) {
4538+ return
4539+ }
4540+ this . pingCheckLoading ( true )
4541+ this . showRegionData ( false )
45534542 socketIo . emit ( 'getAvaliableRegion' , ( region : string [ ] , dataTransfer : iTransferData , config : install_config ) => {
45544543 if ( region && region . length )
45554544 return this . getAvaliableRegionCallBack ( region , dataTransfer , config )
@@ -4561,10 +4550,7 @@ module view_layout {
45614550 this . ConnectGatewayShow ( false )
45624551 this . selectedQTGateRegionCancel ( )
45634552 this . disconnecting ( false )
4564- socketIo . emit ( 'getAvaliableRegion' , ( region : string [ ] , dataTransfer : iTransferData , config : install_config ) => {
4565-
4566- return this . getAvaliableRegionCallBack ( region , dataTransfer , config )
4567- } )
4553+ return this . getAvaliableRegion ( )
45684554 }
45694555
45704556 public getCurrentPlan = ko . computed ( ( ) => {
@@ -4604,6 +4590,10 @@ module view_layout {
46044590
46054591 public disconnectClick ( ) {
46064592 this . disconnecting ( true )
4593+
4594+ socketIo . once ( 'disconnectClickCallBack' , ( ) => {
4595+ return this . desconnectCallBack ( )
4596+ } )
46074597 return socketIo . emit ( 'disconnectClick' )
46084598 }
46094599
0 commit comments