Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/core/plugin/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func InitPlugins(basicRes context.BasicRes) {
if err != nil {
panic(fmt.Errorf("failed to initialize plugin %v due to %w", pluginName, err))
} else {
basicRes.GetLogger().Info("init plugin: %s done", pluginName)
basicRes.GetLogger().Info("init plugin: %s successfully", pluginName)
}
} else {
basicRes.GetLogger().Info("plugin: %s doesn't implement 'PluginInit', it will be skipped.", pluginName)
Expand Down
29 changes: 1 addition & 28 deletions backend/helpers/pluginhelper/api/connection_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,14 @@ func NewConnectionHelper(
if vld == nil {
vld = validator.New()
}
h := &ConnectionApiHelper{
return &ConnectionApiHelper{
encryptionSecret: basicRes.GetConfig(plugin.EncodeKeyEnvStr),
log: basicRes.GetLogger(),
db: basicRes.GetDal(),
validator: vld,
bpManager: services.NewBlueprintManager(basicRes.GetDal()),
pluginName: pluginName,
}
if h.db == nil {
h.log.Info("connection api helper db is nil")
fmt.Println("connection api helper db is nil")
} else {
h.log.Info("connection api helper db is not nil")
fmt.Println("connection api helper db is not nil")
}
return h
}

// Create a connection record based on request body
Expand Down Expand Up @@ -127,25 +119,6 @@ func (c *ConnectionApiHelper) FirstById(connection interface{}, id uint64) error

// List returns all connections with password/token decrypted
func (c *ConnectionApiHelper) List(connections interface{}) errors.Error {
if c == nil {
c.log.Info("connection api helper is nil")
fmt.Printf("connection api helper is nil\n")
} else {
c.log.Info("%s, connections :%+v", c.pluginName, connections)
fmt.Printf("%s connections :%+v\n", c.pluginName, connections)
c.log.Info("%s connection api helper :%+v", c.pluginName, c)
fmt.Printf("%s connection api helper :%+v\n", c.pluginName, c)
c.log.Info("%s connection api helper is not nil", c.pluginName)
fmt.Printf("%s connection api helper is not nil\n", c.pluginName)
if c.db == nil {
c.log.Info("%s connection api helper db is nil", c.pluginName)
fmt.Printf("%s connection api helper db is nil\n", c.pluginName)
} else {
c.log.Info("%s connection api helper db is not nil", c.pluginName)
fmt.Printf("%s connection api helper db is not nil", c.pluginName)
}
}

return CallDB(c.db.All, connections)
}

Expand Down
4 changes: 0 additions & 4 deletions backend/plugins/jira/api/connection_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,6 @@ func DeleteConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput
// @Failure 500 {string} errcode.Error "Internal Error"
// @Router /plugins/jira/connections [GET]
func ListConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) {
basicRes.GetLogger().Info("ds helper %+v", dsHelper)
if dsHelper != nil {
basicRes.GetLogger().Info("ds helper dsHelper %+v", dsHelper.ConnApi)
}
return dsHelper.ConnApi.GetAll(input)
}

Expand Down
1 change: 0 additions & 1 deletion backend/plugins/jira/api/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func Init(br context.BasicRes, p plugin.PluginMeta) {
nil,
nil,
)
basicRes.GetLogger().Info("init dshelper: %+v", dsHelper)
raProxy = api.NewDsRemoteApiProxyHelper[models.JiraConnection](dsHelper.ConnApi.ModelApiHelper)
raScopeList = api.NewDsRemoteApiScopeListHelper[models.JiraConnection, models.JiraBoard, JiraRemotePagination](raProxy, listJiraRemoteScopes)
raScopeSearch = api.NewDsRemoteApiScopeSearchHelper[models.JiraConnection, models.JiraBoard](raProxy, searchJiraRemoteBoards)
Expand Down
1 change: 0 additions & 1 deletion backend/plugins/jira/impl/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func (p Jira) ScopeConfig() dal.Tabler {

func (p Jira) Init(basicRes context.BasicRes) errors.Error {
api.Init(basicRes, p)
fmt.Println("init jira with basic res and p", basicRes, p)
return nil
}

Expand Down