Skip to content
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

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

LidolLxf
Copy link
Contributor

@LidolLxf LidolLxf commented Dec 5, 2024

feat: project-manager提供项目活跃度接口

@LidolLxf LidolLxf force-pushed the feat_project_activity branch from 7fb3154 to 027856a Compare December 5, 2024 06:17
}

// 没有集群则返回不活跃
if len(clusters) == 0 {
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

项目不存在直接报错就行吧,本身就是请求参数错误

}

// 未开启容器服务,直接返回不活跃
if p.Kind != "k8s" {
Copy link
Collaborator

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: "返回可用业务列表"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不对

@LidolLxf LidolLxf force-pushed the feat_project_activity branch from acd667a to ee201b3 Compare December 5, 2024 08:27
@LidolLxf LidolLxf force-pushed the feat_project_activity branch from ee201b3 to 62af3bb Compare December 5, 2024 08:34
@ifooth ifooth merged commit 0578d06 into TencentBlueKing:master Dec 5, 2024
13 of 14 checks passed
evanlixin added a commit that referenced this pull request Dec 6, 2024
* github-bk-bcs/master:
  fix: 修改更新集群接口status状态字段验证规则 (#3628)
  feat: project-manager提供项目活跃度接口 (#3627)
  feat: 新增获取模板文件关联labels接口 (#3599)
  feat: 新增草稿模板文件语法模式 (#3605)
  feat: project-manager支持原生ns接口 (#3612)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants