| 80 | } |
| 81 | |
| 82 | func (m *imlPluginClusterModule) Options(ctx context.Context) ([]*dto.PluginOption, error) { |
| 83 | defines, err := m.service.Defines(ctx, plugin_model.OpenKind) |
| 84 | if err != nil { |
| 85 | return nil, err |
| 86 | } |
| 87 | |
| 88 | return utils.SliceToSlice(defines, func(s *plugin_cluster.PluginDefine) *dto.PluginOption { |
| 89 | return &dto.PluginOption{ |
| 90 | Name: s.Name, |
| 91 | Cname: s.Cname, |
| 92 | Desc: s.Desc, |
| 93 | Default: s.Config, |
| 94 | Render: s.Render, |
| 95 | } |
| 96 | }), nil |
| 97 | } |
| 98 | |
| 99 | func (m *imlPluginClusterModule) List(ctx context.Context, clusterId string) ([]*dto.Item, error) { |
| 100 | |