-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 模板文件支持展示最新部署及版本列表兼容非语义化版本 #3517
base: master
Are you sure you want to change the base?
Conversation
f52914d
to
6dc0483
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint 问题处理一下
@@ -279,12 +279,16 @@ func (t *TemplateAction) Create(ctx context.Context, req *clusterRes.CreateTempl | |||
VersionMode: 0, | |||
Version: req.GetVersion(), | |||
IsDraft: req.GetIsDraft(), | |||
LatestVersion: req.GetVersion(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成 LatestDeployVersion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
部署人改成 LatestDeployer
@@ -212,6 +226,11 @@ func (t *TemplateVersionAction) Create(ctx context.Context, req *clusterRes.Crea | |||
} | |||
|
|||
userName := ctxkey.GetUsernameFromCtx(ctx) | |||
// 更新最新版本及部署人 | |||
updateTemplate := entity.M{ | |||
"latestVersion": req.Version, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
db 字段名相应调整
@@ -31,6 +31,7 @@ type TemplateVersion struct { | |||
CreateAt int64 `json:"createAt" bson:"createAt"` | |||
Latest bool `json:"latest" bson:"-"` // 是否是最新版本,不存储在数据库 | |||
Draft bool `json:"draft" bson:"-"` | |||
LatestVersion string `json:"latestVersion" bson:"-"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LatestDeployVersion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里没添加部署人
@@ -212,6 +229,11 @@ func (t *TemplateVersionAction) Create(ctx context.Context, req *clusterRes.Crea | |||
} | |||
|
|||
userName := ctxkey.GetUsernameFromCtx(ctx) | |||
// 更新最新版本及部署人 | |||
updateTemplate := entity.M{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是部署版本,不是最新版本,只在部署是更新 latestDeployVersion
和 latestDeployer
8c13ff0
to
4d1448b
Compare
feat: 模板文件支持展示最新部署及版本列表兼容非语义化版本