File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -485,11 +485,7 @@ export class Endpoint {
485485 https_port : number ;
486486 http_port : number ;
487487 ssh_port : number ;
488- mysql_port : number ;
489- mariadb_port : number ;
490- postgresql_port : number ;
491- redis_port : number ;
492- oracle_port : number ;
488+ magnus_port : number ;
493489
494490 getHost ( ) : string {
495491 return this . host || window . location . host ;
@@ -500,7 +496,16 @@ export class Endpoint {
500496
501497 _protocol = _protocol . replace ( ':' , '' ) ;
502498
503- let port = this [ _protocol + '_port' ] ;
499+ const magnusProtocols = [
500+ 'mysql' ,
501+ 'mariadb' ,
502+ 'postgresql' ,
503+ 'redis' ,
504+ 'sqlserver' ,
505+ 'oracle' ,
506+ 'mongodb'
507+ ] ;
508+ let port = magnusProtocols . includes ( _protocol ) ? this . magnus_port : this [ _protocol + '_port' ] ;
504509
505510 // 处理 http(s) 协议的后台端口为0的时候, 使用当前地址中的端口
506511 if ( [ 'http' , 'https' ] . indexOf ( _protocol ) !== - 1 && port === 0 ) {
You can’t perform that action at this time.
0 commit comments