mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 03:37:46 +08:00
Returns whether the maven configuration is the default value
This commit is contained in:
parent
0964ba3bff
commit
2b5af21d1a
@ -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