diff --git a/docs/apidoc/bk-api-gateway/v3/zh/batch_get_job_instance_ip_log.md b/docs/apidoc/bk-api-gateway/v3/zh/batch_get_job_instance_ip_log.md index ef4a783d10..2abd98dbdb 100644 --- a/docs/apidoc/bk-api-gateway/v3/zh/batch_get_job_instance_ip_log.md +++ b/docs/apidoc/bk-api-gateway/v3/zh/batch_get_job_instance_ip_log.md @@ -109,7 +109,10 @@ }, "dest_path": "/tmp/1.log", "status": 4, - "log_content": "[2021-06-28 11:32:16] FileName: /tmp/1.log FileSize: 9.0 Bytes State: dest agent success download file Speed: 1 KB/s Progress: 100% StatusDesc: dest agent success download file Detail: success" + "log_content": "[2021-06-28 11:32:16] FileName: /tmp/1.log FileSize: 9.0 Bytes State: dest agent success download file Speed: 1 KB/s Progress: 100% StatusDesc: dest agent success download file Detail: success", + "size": "1.0 Bytes", + "speed": "0 KB/s", + "process": "100%" } ] }, @@ -127,7 +130,10 @@ }, "src_path": "/data/1.log", "status": 4, - "log_content": "[2021-06-28 11:32:16] FileName: /data/1.log FileSize: 9.0 Bytes State: source agent success upload file Speed: 1 KB/s Progress: 100% StatusDesc: source agent success upload file Detail: success upload" + "log_content": "[2021-06-28 11:32:16] FileName: /data/1.log FileSize: 9.0 Bytes State: source agent success upload file Speed: 1 KB/s Progress: 100% StatusDesc: source agent success upload file Detail: success upload", + "size": "1.0 Bytes", + "speed": "0 KB/s", + "process": "100%" } ] } @@ -173,15 +179,18 @@ ##### file_log -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| mode | 分发模式 | 0:上传;1:下载| -| src_ip | object |文件源主机IP。定义见ip | -| src_path | string | 源文件路径 | -| dest_ip | object | 分发目标主机IP,mode=1时有值。定义见ip | -| dest_path | string | 目标路径,mode=1时有值 | -| status | int | 任务状态。1-等待开始;2-上传中;3-下载中;4-成功;5-失败 | -| log_content | string | 文件分发日志内容 | +| 字段 | 类型 | 描述 | +|--------------|-----------|-----------| +| mode | 分发模式 | 0:上传;1:下载| +| src_ip | object |文件源主机IP。定义见ip | +| src_path | string | 源文件路径 | +| dest_ip | object | 分发目标主机IP,mode=1时有值。定义见ip | +| dest_path | string | 目标路径,mode=1时有值 | +| status | int | 任务状态。1-等待开始;2-上传中;3-下载中;4-成功;5-失败 | +| log_content | string | 文件分发日志内容 | +| size | string | 文件大小 | +| speed | string | 文件传输速率 | +| process | string | 文件传输进度 | ##### ip diff --git a/docs/apidoc/esb/jobv3-confapis/apidocs/en/batch_get_job_instance_ip_log.md b/docs/apidoc/esb/jobv3-confapis/apidocs/en/batch_get_job_instance_ip_log.md index 82b827c9fb..6076c6465d 100644 --- a/docs/apidoc/esb/jobv3-confapis/apidocs/en/batch_get_job_instance_ip_log.md +++ b/docs/apidoc/esb/jobv3-confapis/apidocs/en/batch_get_job_instance_ip_log.md @@ -102,7 +102,10 @@ Bulk query of job execution logs by host list }, "dest_path": "/tmp/1.log", "status": 4, - "log_content": "[2021-06-28 11:32:16] FileName: /tmp/1.log FileSize: 9.0 Bytes State: dest agent success download file Speed: 1 KB/s Progress: 100% StatusDesc: dest agent success download file Detail: success" + "log_content": "[2021-06-28 11:32:16] FileName: /tmp/1.log FileSize: 9.0 Bytes State: dest agent success download file Speed: 1 KB/s Progress: 100% StatusDesc: dest agent success download file Detail: success", + "size": "1.0 Bytes", + "speed": "0 KB/s", + "process": "100%" } ] }, @@ -120,7 +123,10 @@ Bulk query of job execution logs by host list }, "src_path": "/data/1.log", "status": 4, - "log_content": "[2021-06-28 11:32:16] FileName: /data/1.log FileSize: 9.0 Bytes State: source agent success upload file Speed: 1 KB/s Progress: 100% StatusDesc: source agent success upload file Detail: success upload" + "log_content": "[2021-06-28 11:32:16] FileName: /data/1.log FileSize: 9.0 Bytes State: source agent success upload file Speed: 1 KB/s Progress: 100% StatusDesc: source agent success upload file Detail: success upload", + "size": "1.0 Bytes", + "speed": "0 KB/s", + "process": "100%" } ] } @@ -176,15 +182,18 @@ Bulk query of job execution logs by host list #### file_log -| Fields | Type | Description | -|-----------|-----------|-----------| -| mode | int | Distribution mode. 0: Upload; 1: Download | -| src_ip | object |File source host IP. see ip for definition | -| src_path | string | Source file paths | -| dest_ip | object | Distribute the target host IP, with value for mode=1. See ip for definition. | -| dest_path | string | Target path, with value for mode=1 | -| status | int | Task status. 1-Waiting; 2-Uploading; 3-Downloading; 4- Success; 5- Failure | +| Fields | Type | Description | +|-------------|-----------|-----------| +| mode | int | Distribution mode. 0: Upload; 1: Download | +| src_ip | object |File source host IP. see ip for definition | +| src_path | string | Source file paths | +| dest_ip | object | Distribute the target host IP, with value for mode=1. See ip for definition. | +| dest_path | string | Target path, with value for mode=1 | +| status | int | Task status. 1-Waiting; 2-Uploading; 3-Downloading; 4- Success; 5- Failure | | log_content | string | File distribution log contents | +| size | string | File size | +| speed | string | File transfer speed | +| process | string | File transfer process | #### ip diff --git a/docs/apidoc/esb/jobv3-confapis/apidocs/zh_hans/batch_get_job_instance_ip_log.md b/docs/apidoc/esb/jobv3-confapis/apidocs/zh_hans/batch_get_job_instance_ip_log.md index fcef5cc8bb..906bf51387 100644 --- a/docs/apidoc/esb/jobv3-confapis/apidocs/zh_hans/batch_get_job_instance_ip_log.md +++ b/docs/apidoc/esb/jobv3-confapis/apidocs/zh_hans/batch_get_job_instance_ip_log.md @@ -103,7 +103,10 @@ }, "dest_path": "/tmp/1.log", "status": 4, - "log_content": "[2021-06-28 11:32:16] FileName: /tmp/1.log FileSize: 9.0 Bytes State: dest agent success download file Speed: 1 KB/s Progress: 100% StatusDesc: dest agent success download file Detail: success" + "log_content": "[2021-06-28 11:32:16] FileName: /tmp/1.log FileSize: 9.0 Bytes State: dest agent success download file Speed: 1 KB/s Progress: 100% StatusDesc: dest agent success download file Detail: success", + "size": "1.0 Bytes", + "speed": "0 KB/s", + "process": "100%" } ] }, @@ -121,7 +124,10 @@ }, "src_path": "/data/1.log", "status": 4, - "log_content": "[2021-06-28 11:32:16] FileName: /data/1.log FileSize: 9.0 Bytes State: source agent success upload file Speed: 1 KB/s Progress: 100% StatusDesc: source agent success upload file Detail: success upload" + "log_content": "[2021-06-28 11:32:16] FileName: /data/1.log FileSize: 9.0 Bytes State: source agent success upload file Speed: 1 KB/s Progress: 100% StatusDesc: source agent success upload file Detail: success upload", + "size": "1.0 Bytes", + "speed": "0 KB/s", + "process": "100%" } ] } @@ -176,15 +182,18 @@ #### file_log -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| mode | int | 分发模式。0:上传;1:下载| -| src_ip | object |文件源主机IP。定义见ip | -| src_path | string | 源文件路径 | -| dest_ip | object | 分发目标主机IP,mode=1时有值。定义见ip | -| dest_path | string | 目标路径,mode=1时有值 | -| status | int | 任务状态。1-等待开始;2-上传中;3-下载中;4-成功;5-失败 | -| log_content | string | 文件分发日志内容 | +| 字段 | 类型 | 描述 | +|--------------|-----------|-----------| +| mode | 分发模式 | 0:上传;1:下载| +| src_ip | object |文件源主机IP。定义见ip | +| src_path | string | 源文件路径 | +| dest_ip | object | 分发目标主机IP,mode=1时有值。定义见ip | +| dest_path | string | 目标路径,mode=1时有值 | +| status | int | 任务状态。1-等待开始;2-上传中;3-下载中;4-成功;5-失败 | +| log_content | string | 文件分发日志内容 | +| size | string | 文件大小 | +| speed | string | 文件传输速率 | +| process | string | 文件传输进度 | #### ip diff --git a/src/backend/job-execute/api-job-execute/src/main/java/com/tencent/bk/job/execute/model/esb/v3/EsbFileLogV3DTO.java b/src/backend/job-execute/api-job-execute/src/main/java/com/tencent/bk/job/execute/model/esb/v3/EsbFileLogV3DTO.java index 7f146d81f0..3d4e612fdf 100644 --- a/src/backend/job-execute/api-job-execute/src/main/java/com/tencent/bk/job/execute/model/esb/v3/EsbFileLogV3DTO.java +++ b/src/backend/job-execute/api-job-execute/src/main/java/com/tencent/bk/job/execute/model/esb/v3/EsbFileLogV3DTO.java @@ -55,6 +55,15 @@ public class EsbFileLogV3DTO { @JsonProperty("log_content") private String logContent; + @JsonProperty("size") + private String size; + + @JsonProperty("speed") + private String speed; + + @JsonProperty("process") + private String process; + } diff --git a/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/api/esb/v3/EsbBatchGetJobInstanceIpLogV3ResourceImpl.java b/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/api/esb/v3/EsbBatchGetJobInstanceIpLogV3ResourceImpl.java index cc6edc4334..a10077c812 100644 --- a/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/api/esb/v3/EsbBatchGetJobInstanceIpLogV3ResourceImpl.java +++ b/src/backend/job-execute/service-job-execute/src/main/java/com/tencent/bk/job/execute/api/esb/v3/EsbBatchGetJobInstanceIpLogV3ResourceImpl.java @@ -229,6 +229,9 @@ private EsbFileLogV3DTO toEsbFileLogV3DTO(ServiceFileTaskLogDTO fileTaskLog) { } fileLog.setLogContent(fileTaskLog.getContent()); + fileLog.setSize(fileTaskLog.getSize()); + fileLog.setSpeed(fileTaskLog.getSpeed()); + fileLog.setProcess(fileTaskLog.getProcess()); fileLog.setStatus(fileTaskLog.getStatus()); return fileLog; }