mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 11:47:36 +08:00
Merge pull request #988 from yangkaa/master-maven
Fix Bug: Returns whether the maven configuration is the default value
This commit is contained in:
commit
09c90113a3
@ -223,6 +223,7 @@ type MavenSetting struct {
|
||||
CreateTime string `json:"create_time"`
|
||||
UpdateTime string `json:"update_time"`
|
||||
Content string `json:"content" validate:"required"`
|
||||
IsDefault bool `json:"is_default"`
|
||||
}
|
||||
|
||||
//MavenSettingList maven setting list
|
||||
@ -234,11 +235,16 @@ func (c *clusterAction) MavenSettingList(ctx context.Context) (re []MavenSetting
|
||||
logrus.Errorf("list maven setting config list failure %s", err.Error())
|
||||
}
|
||||
for _, sm := range cms.Items {
|
||||
isDefault := false
|
||||
if sm.Labels["default"] == "true" {
|
||||
isDefault = true
|
||||
}
|
||||
re = append(re, MavenSetting{
|
||||
Name: sm.Name,
|
||||
CreateTime: sm.CreationTimestamp.Format(time.RFC3339),
|
||||
UpdateTime: sm.Labels["updateTime"],
|
||||
Content: sm.Data["mavensetting"],
|
||||
IsDefault: isDefault,
|
||||
})
|
||||
}
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user