-
Notifications
You must be signed in to change notification settings - Fork 249
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: project-manager提供项目活跃度接口 #3627
Conversation
7fb3154
to
027856a
Compare
} | ||
|
||
// 没有集群则返回不活跃 | ||
if len(clusters) == 0 { |
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.
这里要过滤出共享集群,不能直接判断 0
|
||
// 没有共享集群命名空间则返回不活跃 | ||
for _, v := range clusters { | ||
if v.IsShared { |
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.
层级太多
|
||
p, err := ga.model.GetProject(ctx, req.ProjectIDOrCode) | ||
// 未开启容器服务,直接返回不活跃 | ||
if err == drivers.ErrTableRecordNotFound { |
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.
项目不存在直接报错就行吧,本身就是请求参数错误
} | ||
|
||
// 未开启容器服务,直接返回不活跃 | ||
if p.Kind != "k8s" { |
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.
我们内部还有 mesos 的项目,这里直接判断这个字段是否为空就好了,为空就是未开启,
}]; | ||
ProjectActiveData data = 3[(grpc.gateway.protoc_gen_swagger.options.openapiv2_field) = { | ||
title: "data", | ||
description: "返回可用业务列表" |
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.
这个不对
acd667a
to
ee201b3
Compare
ee201b3
to
62af3bb
Compare
feat: project-manager提供项目活跃度接口