Skip to content

Commit

Permalink
Merge pull request #7667 from ZQHcode/merge-feature-auth-code
Browse files Browse the repository at this point in the history
merge v3.12.x into feature-auth
  • Loading branch information
ZQHcode authored Dec 20, 2023
2 parents 4f2da6e + bfedae8 commit e2fc0d1
Show file tree
Hide file tree
Showing 99 changed files with 1,814 additions and 351 deletions.
22 changes: 22 additions & 0 deletions docs/apidoc/cc/cc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1685,3 +1685,25 @@
comp_codename: generic.v2.cc.cc_component
dest_path: /api/v3/findmany/kube/workload/{kind}
dest_http_method: POST

- path: /v2/cc/sync_service_template_to_service_instance/
name: sync_service_template_to_service_instance
label: 同步服务模板信息到相应的服务实例上
label_en: sync service template to service instance
suggest_method: POST
api_type: operate
comp_codename: generic.v2.cc.cc_component
dest_path: /api/v3/update/proc/service_instance/sync
dest_http_method: PUT
is_hidden: true

- path: /v2/cc/list_service_template_sync_status/
name: list_service_template_sync_status
label: 查询服务模板的同步状态
label_en: list service template sync status
suggest_method: POST
api_type: query
comp_codename: generic.v2.cc.cc_component
dest_path: /api/v3/findmany/proc/service_template_sync_status/bk_biz_id/{bk_biz_id}
dest_http_method: POST
is_hidden: true
99 changes: 99 additions & 0 deletions docs/apidoc/cc/en/list_service_template_sync_status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
Functional description

Example Query the synchronization status of a service template(v3.12.3+, permission: biz access)

### Request Parameters

{{ common_args_desc }}

#### Interface Parameters

| Field | Type | Required | Description |
|---------------------|-------|----------|-------------------------------------------------------------------|
| bk_biz_id | int | yes | Business ID |
| service_template_id | int | yes | Service template ID |
| bk_module_ids | array | yes | List of module ids whose synchronization status you want to query |

### Request Parameters Example

```json
{
"bk_app_code": "esb_test",
"bk_app_secret": "xxx",
"bk_username": "xxx",
"bk_token": "xxx",
"bk_biz_id": 3,
"service_template_id": 1,
"bk_module_ids": [
28,
29,
30
]
}
```

### Return Result Example

```json
{
"result": true,
"code": 0,
"message": "success",
"permission": null,
"request_id": "e43da4ef221746868dc4c837d36f3807",
"data": [
{
"bk_inst_id": 30,
"status": "finished",
"creator": "admin",
"create_time": "2023-10-07T12:43:22.795Z",
"last_time": "2023-11-10T03:37:31.009Z"
},
{
"bk_inst_id": 29,
"status": "finished",
"creator": "admin",
"create_time": "2023-10-07T07:22:43.167Z",
"last_time": "2023-11-10T03:37:31.005Z"
},
{
"bk_inst_id": 28,
"status": "new",
"creator": "admin",
"create_time": "2023-11-30T09:52:13.706Z",
"last_time": "2023-11-30T09:52:13.706Z"
}
]
}
```

### Return Result Parameters Description

#### response

| Name | Type | Description |
|------------|--------|-----------------------------------------------------------------------------------------|
| result | bool | Whether the request was successful or not. True: request succeeded;false request failed |
| code | int | Wrong code. 0 indicates success,>0 indicates failure error |
| message | string | Error message returned by request failure |
| permission | object | Permission information |
| request_id | string | Request chain id |
| data | array | Data returned by request |

#### data

| Name | Type | Description |
|-------------|--------|--------------------------------------------------|
| bk_inst_id | int | Instance id, where is the module ID |
| status | string | Synchronous status |
| creator | string | The creator of a synchronization task |
| create_time | string | The create time of the synchronization task |
| last_time | string | The last update time of the synchronization task |

**Synchronization status declaration**: An instance has six states: need_sync, new, waiting, executing, finished, and
failure,among:

- **need_sync** Indicates to be synchronized
- **new/waiting/executing** Indicates synchronization
- **finished** Indicates synchronization complete
- **failure** Indicates synchronization failure
57 changes: 57 additions & 0 deletions docs/apidoc/cc/en/sync_service_template_to_service_instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
### Functional description

Synchronize the service template information to the corresponding service instance(v3.12.3+, permission: service instance create, edit, and delete permission)

### Request Parameters

{{ common_args_desc }}

#### Interface Parameters

| Field | Type | Required | Description |
|---------------------|-------|----------|------------------------------------------|
| bk_biz_id | int | yes | Business ID |
| service_template_id | int | yes | Service template ID |
| bk_module_ids | array | yes | ID list of the module to be synchronized |

### Request Parameters Example

```json
{
"bk_app_code": "esb_test",
"bk_app_secret": "xxx",
"bk_username": "xxx",
"bk_token": "xxx",
"bk_biz_id": 3,
"service_template_id": 1,
"bk_module_ids": [
28
]
}
```

### Return Result Example

```json
{
"result": true,
"code": 0,
"message": "success",
"permission": null,
"request_id": "e43da4ef221746868dc4c837d36f3807",
"data": null
}
```

### Return Result Parameters Description

#### response

| Name | Type | Description |
|------------|--------|-----------------------------------------------------------------------------------------|
| result | bool | Whether the request was successful or not. True: request succeeded;false request failed |
| code | int | Wrong code. 0 indicates success,>0 indicates failure error |
| message | string | Error message returned by request failure |
| permission | object | Permission information |
| request_id | string | Request chain id |
| data | object | Data returned by request |
98 changes: 98 additions & 0 deletions docs/apidoc/cc/zh_hans/list_service_template_sync_status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
### 功能描述

查询服务模板的同步状态(版本:v3.12.3+,权限:业务访问)

### 请求参数

{{ common_args_desc }}

#### 接口参数

| 字段 | 类型 | 必选 | 描述 |
|---------------------|-------|----|----------------|
| bk_biz_id | int || 业务ID |
| service_template_id | int || 服务模板ID |
| bk_module_ids | array || 要查询同步状态的模块ID列表 |

### 请求参数示例

```json
{
"bk_app_code": "esb_test",
"bk_app_secret": "xxx",
"bk_username": "xxx",
"bk_token": "xxx",
"bk_biz_id": 3,
"service_template_id": 1,
"bk_module_ids": [
28,
29,
30
]
}
```

### 返回结果示例

```json
{
"result": true,
"code": 0,
"message": "success",
"permission": null,
"request_id": "e43da4ef221746868dc4c837d36f3807",
"data": [
{
"bk_inst_id": 30,
"status": "finished",
"creator": "admin",
"create_time": "2023-10-07T12:43:22.795Z",
"last_time": "2023-11-10T03:37:31.009Z"
},
{
"bk_inst_id": 29,
"status": "finished",
"creator": "admin",
"create_time": "2023-10-07T07:22:43.167Z",
"last_time": "2023-11-10T03:37:31.005Z"
},
{
"bk_inst_id": 28,
"status": "new",
"creator": "admin",
"create_time": "2023-11-30T09:52:13.706Z",
"last_time": "2023-11-30T09:52:13.706Z"
}
]
}
```

### 返回结果参数说明

#### response

| 名称 | 类型 | 描述 |
|------------|--------|----------------------------|
| result | bool | 请求成功与否。true:请求成功;false请求失败 |
| code | int | 错误编码。 0表示success,>0表示失败错误 |
| message | string | 请求失败返回的错误信息 |
| permission | object | 权限信息 |
| request_id | string | 请求链id |
| data | array | 请求返回的数据 |

#### data

| 字段 | 类型 | 描述 |
|-------------|--------|---------------|
| bk_inst_id | int | 实例id,此处为模块ID |
| status | string | 同步状态 |
| creator | string | 同步任务的创建者 |
| create_time | string | 同步任务的创建时间 |
| last_time | string | 同步任务的最后一次更新时间 |

**同步状态说明**: 实例状态共有need_sync、new、waiting、executing、finished、failure 6种状态,其中:

- **need_sync** 为待同步
- **new(新建)/waiting(等待中)/executing(执行中)** 为同步中
- **finished** 为已同步
- **failure** 为同步失败
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
### 功能描述

同步服务模板信息到相应的服务实例上(版本:v3.12.3+,权限:服务实例的的创建、编辑、删除权限)

### 请求参数

{{ common_args_desc }}

#### 接口参数

| 字段 | 类型 | 必选 | 描述 |
|---------------------|-------|----|-----------|
| bk_biz_id | int || 业务ID |
| service_template_id | int || 服务模板ID |
| bk_module_ids | array || 待同步模块ID列表 |

### 请求参数示例

```json
{
"bk_app_code": "esb_test",
"bk_app_secret": "xxx",
"bk_username": "xxx",
"bk_token": "xxx",
"bk_biz_id": 3,
"service_template_id": 1,
"bk_module_ids": [
28
]
}
```

### 返回结果示例

```json
{
"result": true,
"code": 0,
"message": "success",
"permission": null,
"request_id": "e43da4ef221746868dc4c837d36f3807",
"data": null
}
```

### 返回结果参数说明

#### response

| 名称 | 类型 | 描述 |
|------------|--------|----------------------------|
| result | bool | 请求成功与否。true:请求成功;false请求失败 |
| code | int | 错误编码。 0表示success,>0表示失败错误 |
| message | string | 请求失败返回的错误信息 |
| permission | object | 权限信息 |
| request_id | string | 请求链id |
| data | object | 请求返回的数据 |
Binary file modified docs/resource/img/bk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion docs/support-file/changelog/release.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [Version: v3.12.3-feature-auth-alpha10] - 2023-11-28
## [Version: v3.12.3-feature-auth-alpha11] - 2023-11-28
**缺陷修复**
- 修复查询模型多鉴了内置和主线模型的问题
- 修复新添加模型的权限数据异常问题
Expand Down Expand Up @@ -66,6 +66,18 @@
**新增功能**
- 新增空间级查看权限控制能力

## [Version: v3.12.4] - 2023-12-19
**功能优化**
- 优化了一些前端的显示问题
- 修改文档中心默认首页的地址
- 采用认证信息标准化方案调用esb API
- 更新bkDesktopUrl配置为bkComponentApiUrl配置

**缺陷修复**
- 修复设置agentID缓存数据错误问题
- 添加job资源限制
- 修复add_host_to_business_idle接口鉴权问题

## [Version: v3.12.3] - 2023-11-17
**新增功能**
- 主机搜索支持“多个管控区域IP”的混合搜索
Expand Down
13 changes: 13 additions & 0 deletions docs/support-file/changelog_user/ch/v3.12.4_2023-12-18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- ### 优化

- [优化] 修改文档中心默认首页的地址
- [优化] 采用认证信息标准化方案调用esb API
- [优化] 更新bkDesktopUrl配置为bkComponentApiUrl配置
- [优化] 优化了一些前端的显示问题



### 修复

- [修复] 修复设置agentID缓存数据错误问题
- [修复] 修复`add_host_to_business_idle`权限校验相关问题
13 changes: 13 additions & 0 deletions docs/support-file/changelog_user/en/v3.12.4_2023-12-18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Improved

- [Improved] Modified the default homepage address of the document center
- [Improved] Adopted standardized authentication information scheme to call esb API
- [Improved] Updated bkDesktopUrl configuration to bkComponentApiUrl configuration
- [Improved] Update some front-end display issues



### Fixed

- [Fixed] Fixed the occasional issue of duplicate registration in the permission center when creating a model
- [Fixed] Fix `add_host_to_business_idle` permission validation related issues
Loading

0 comments on commit e2fc0d1

Please sign in to comment.