Skip to content

Commit

Permalink
fix: failed to create agent group config using yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengYa-0110 authored and SongZhen0704 committed Dec 18, 2024
1 parent bb869d5 commit dde430f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/controller/http/service/agent_group_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (a *AgentGroupConfig) CreateAgentGroupConfig(groupLcuuid string, data inter
if dataType == DataTypeJSON {
log.Infof("create agent group config, group lcuuid: %s, data: %#v, data type: %d", groupLcuuid, data, dataType, dbInfo.LogPrefixORGID)
} else {
log.Infof("create agent group config, group lcuuid: %s, data: %s, data type: %d", groupLcuuid, data.(string), dataType, dbInfo.LogPrefixORGID)
log.Infof("create agent group config, group lcuuid: %s, data: %s, data type: %d", groupLcuuid, string(data.([]byte)), dataType, dbInfo.LogPrefixORGID)
}
var agentGroup model.VTapGroup
if err := dbInfo.Where("lcuuid = ?", groupLcuuid).First(&agentGroup).Error; err != nil {
Expand Down Expand Up @@ -328,7 +328,11 @@ func (a *AgentGroupConfig) UpdateAgentGroupConfig(groupLcuuid string, data inter
if err != nil {
return nil, err
}
log.Infof("update agent group config, group lcuuid: %s, data: %#v, data type: %d", groupLcuuid, data, dataType, dbInfo.LogPrefixORGID)
if dataType == DataTypeJSON {
log.Infof("update agent group config, group lcuuid: %s, data: %#v, data type: %d", groupLcuuid, data, dataType, dbInfo.LogPrefixORGID)
} else {
log.Infof("update agent group config, group lcuuid: %s, data: %s, data type: %d", groupLcuuid, string(data.([]byte)), dataType, dbInfo.LogPrefixORGID)
}
var agentGroup model.VTapGroup
if err := dbInfo.Where("lcuuid = ?", groupLcuuid).First(&agentGroup).Error; err != nil {
return nil, err
Expand Down

0 comments on commit dde430f

Please sign in to comment.