feat: 数据库查询结果导出&其他小问题修复

This commit is contained in:
meilin.huang
2022-09-23 14:27:50 +08:00
parent 22c401f9d8
commit cfb7fd5b29
74 changed files with 331 additions and 5556 deletions

View File

@@ -589,7 +589,7 @@ func (mm *MysqlMetadata) GetTableInfos() []map[string]interface{} {
// 获取表索引信息
func (mm *MysqlMetadata) GetTableIndex(tableName string) []map[string]interface{} {
_, res, _ := mm.di.SelectData(MYSQL_INDEX_INFO)
_, res, _ := mm.di.SelectData(fmt.Sprintf(MYSQL_INDEX_INFO, tableName))
return res
}
@@ -708,7 +708,7 @@ func (pm *PgsqlMetadata) GetTableInfos() []map[string]interface{} {
// 获取表索引信息
func (pm *PgsqlMetadata) GetTableIndex(tableName string) []map[string]interface{} {
_, res, _ := pm.di.SelectData(PGSQL_INDEX_INFO)
_, res, _ := pm.di.SelectData(fmt.Sprintf(PGSQL_INDEX_INFO, tableName))
return res
}

View File

@@ -63,6 +63,7 @@ func newProjectApp(projectRepo repository.Project,
machineApp: machineApp,
redisApp: redisApp,
dbApp: dbApp,
mongoApp: mongoApp,
}
}

View File

@@ -72,7 +72,7 @@ func (r *Redis) RedisInfo(rc *ctx.ReqCtx) {
var err error
ctx := context.Background()
if ri.Mode == "" || ri.Mode == entity.RedisModeStandalone {
if ri.Mode == "" || ri.Mode == entity.RedisModeStandalone || ri.Mode == entity.RedisModeSentinel {
res, err = ri.Cli.Info(ctx).Result()
} else if ri.Mode == entity.RedisModeCluster {
host := rc.GinCtx.Query("host")