Skip to content

Commit

Permalink
fix: db alias not display in empty database
Browse files Browse the repository at this point in the history
  • Loading branch information
tiny-craft committed Jan 20, 2024
1 parent 700a540 commit 673159d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions backend/services/browser_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ func (b *browserService) OpenConnection(name string) (resp types.JSResp) {
queryDB := func(idx int) types.ConnectionDB {
dbName := "db" + strconv.Itoa(idx)
dbInfoStr := info["Keyspace"][dbName]
var alias string
if selConn.Alias != nil {
alias = selConn.Alias[idx]
}
if len(dbInfoStr) > 0 {
dbInfo := b.parseDBItemInfo(dbInfoStr)
var alias string
if selConn.Alias != nil {
alias = selConn.Alias[idx]
}
return types.ConnectionDB{
Name: dbName,
Alias: alias,
Expand All @@ -194,6 +194,7 @@ func (b *browserService) OpenConnection(name string) (resp types.JSResp) {
} else {
return types.ConnectionDB{
Name: dbName,
Alias: alias,
Index: idx,
}
}
Expand Down

0 comments on commit 673159d

Please sign in to comment.