(ctx *gin.Context, module string, keyword string, clusterId string, page string, pageSize string)
| 80 | } |
| 81 | |
| 82 | func (i *imlDynamicModuleController) List(ctx *gin.Context, module string, keyword string, clusterId string, page string, pageSize string) ([]map[string]interface{}, *dynamic_module_dto.PluginInfo, int64, error) { |
| 83 | p, err := strconv.Atoi(page) |
| 84 | if err != nil { |
| 85 | p = 1 |
| 86 | } |
| 87 | ps, err := strconv.Atoi(pageSize) |
| 88 | if err != nil { |
| 89 | ps = 20 |
| 90 | |
| 91 | } |
| 92 | list, total, err := i.module.List(ctx, module, keyword, p, ps) |
| 93 | if err != nil { |
| 94 | return nil, nil, 0, err |
| 95 | } |
| 96 | //if clusterId == "" { |
| 97 | // clusterId = "[]" |
| 98 | //} |
| 99 | //ids := make([]string, 0) |
| 100 | //err = json.Unmarshal([]byte(clusterId), &ids) |
| 101 | //if err != nil { |
| 102 | // return nil, nil, 0, err |
| 103 | //} |
| 104 | plugin, err := i.module.PluginInfo(ctx, module) |
| 105 | if err != nil { |
| 106 | return nil, nil, 0, err |
| 107 | } |
| 108 | return list, plugin, total, nil |
| 109 | } |
nothing calls this directly
no test coverage detected