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

Merge: 3.7.x->master #2368

Merged
merged 13 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ public GseTaskResponse asyncTransferFile(TransferFileRequest request) {
private List<api_copy_fileinfoV2> toV1CopyFileInfoRequest(TransferFileRequest request) {
return request.getTasks().stream()
.map(task -> buildCopyFileInfo(task, request.getUploadSpeed(),
request.getDownloadSpeed(), request.getTimeout()))
request.getDownloadSpeed(), request.getTimeout(), request.isAutoMkdir()))
.collect(Collectors.toList());
}

Expand Down Expand Up @@ -622,13 +622,18 @@ public GseTaskResponse terminateGseScriptTask(TerminateGseTaskRequest request) {
/**
* 构建 GSE 拷贝文件请求
*
* @param task 文件拷贝任务
* @param task 文件拷贝任务
* @param uploadSpeedLimit 上传限速,null 表示不限速
* @param downloadSpeedLimit 下载限速,null 表示不限速
* @param timeout 任务超时时间
* @param autoMkdir 目标目录不存在,是否自动创建目录
* @return 拷贝文件请求
*/
public api_copy_fileinfoV2 buildCopyFileInfo(FileTransferTask task,
Integer uploadSpeedLimit,
Integer downloadSpeedLimit,
Integer timeout) {
Integer timeout,
boolean autoMkdir) {
api_copy_fileinfoV2 copyFileInfo = new api_copy_fileinfoV2();

api_base_file_info baseFileInfo = new api_base_file_info();
Expand Down Expand Up @@ -657,6 +662,7 @@ public api_copy_fileinfoV2 buildCopyFileInfo(FileTransferTask task,
if (timeout != null) {
copyFileInfo.setTimeout(timeout);
}
copyFileInfo.setMkdirflag(autoMkdir ? 1 : 0);
return copyFileInfo;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ public class TerminateGseTaskRequest extends GseReq {
@JsonIgnore
private boolean gseV2Task;

public TerminateGseTaskRequest(String taskId, List<String> agentIds) {
public TerminateGseTaskRequest(String taskId,
List<String> agentIds,
boolean gseV2Task) {
this.taskId = taskId;
this.agentIds = agentIds;
this.gseV2Task = gseV2Task;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void execute() {
.collect(Collectors.toList());


TerminateGseTaskRequest request = new TerminateGseTaskRequest(gseTask.getGseTaskId(), agentIds);
TerminateGseTaskRequest request = new TerminateGseTaskRequest(gseTask.getGseTaskId(), agentIds, gseV2Task);
GseTaskResponse gseTaskResponse = gseClient.terminateGseFileTask(request);
if (GseTaskResponse.ERROR_CODE_SUCCESS != gseTaskResponse.getErrorCode()) {
log.error("Terminate gse task failed! gseTask: {}", gseTaskInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public void execute() {
.collect(Collectors.toList());


TerminateGseTaskRequest request = new TerminateGseTaskRequest(gseTask.getGseTaskId(), terminateAgentIds);
request.setGseV2Task(gseV2Task);
TerminateGseTaskRequest request = new TerminateGseTaskRequest(gseTask.getGseTaskId(),
terminateAgentIds, gseV2Task);
GseTaskResponse gseTaskResponse = gseClient.terminateGseScriptTask(request);
if (GseTaskResponse.ERROR_CODE_SUCCESS != gseTaskResponse.getErrorCode()) {
log.error("Terminate gse task failed! gseTask: {}", gseTaskInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Response<Long> heartBeat(HeartBeatReq heartBeatReq) {

@Override
public Response<String> updateFileSourceTask(UpdateFileSourceTaskReq updateFileSourceTaskReq) {
log.debug("Input=({})", updateFileSourceTaskReq);
log.info("updateFileSourceTaskReq=({})", updateFileSourceTaskReq);
String taskId = updateFileSourceTaskReq.getFileSourceTaskId();
String filePath = updateFileSourceTaskReq.getFilePath();
String downloadPath = updateFileSourceTaskReq.getDownloadPath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

@Configuration
public class RestTemplateConfig {
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
RestTemplate restTemplate = new RestTemplate();
OkHttp3ClientHttpRequestFactory requestFactory = new OkHttp3ClientHttpRequestFactory();
requestFactory.setConnectTimeout(5000);
requestFactory.setReadTimeout(15000);
requestFactory.setWriteTimeout(15000);
restTemplate.setRequestFactory(requestFactory);
return restTemplate;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

@Configuration
public class RestTemplateConfig {
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
RestTemplate restTemplate = new RestTemplate();
OkHttp3ClientHttpRequestFactory requestFactory = new OkHttp3ClientHttpRequestFactory();
requestFactory.setConnectTimeout(5000);
requestFactory.setReadTimeout(15000);
requestFactory.setWriteTimeout(15000);
restTemplate.setRequestFactory(requestFactory);
return restTemplate;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,7 @@ public Response<Long> savePlan(String username,
AuthResult authResult;
if (planId > 0) {
if (planService.isDebugPlan(appResourceScope.getAppId(), templateId, planId)) {
authResult = planAuthService.authEditJobPlan(username, appResourceScope, templateId,
planId, null);
authResult = templateAuthService.authDebugJobTemplate(username, appResourceScope, templateId);
} else {
authResult = planAuthService.authEditJobPlan(username, appResourceScope, templateId,
planId, null);
Expand Down Expand Up @@ -485,6 +484,7 @@ public Response<Long> savePlan(String username,
return Response.buildSuccessResp(savedPlanId);
}


@Override
public Response<Boolean> deletePlan(String username,
AppResourceScope appResourceScope,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@
return !this.isPopoverShowFlag && !this.isLogDownloaded && this.isPackageing;
},
},
watch: {
isFile() {
if (this.isFile) {
this.popperInstance.disable();
} else {
this.popperInstance.enable();
}
},
},
created() {
this.isPackageing = false;
// api 标记重新打包
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/src/views/task-manage/common/plan/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@
<jb-form
ref="titleForm"
slot="title"
fixed
form-type="vertical"
:model="formData"
style="width: 100%;">
<jb-form-item
error-display-type="tooltips"
label=""
property="name"
:rules="rules.name"
style="margin-bottom: 0;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
trigger: 'click mouseenter',
placement: 'left',
hideOnClick: false,
content: this.data.description,
content: `<div style="max-width: 340px">${this.data.description}</div>`,
disabled: !this.data.description,
};
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
trigger: 'click mouseenter',
placement: 'left',
hideOnClick: false,
content: this.data.description,
content: `<div style="max-width: 340px">${this.data.description}</div>`,
disabled: !this.data.description,
};
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
trigger: 'click mouseenter',
placement: 'left',
hideOnClick: false,
content: this.data.description,
content: `<div style="max-width: 340px">${this.data.description}</div>`,
disabled: !this.data.description,
};
},
Expand Down
Loading
Loading