Unverified Commit b1afda7a authored by gaoyan's avatar gaoyan Committed by GitHub

Fix some bug (#2529)

* Optimize the process * fix some bug
parent 873ffedf
...@@ -206,10 +206,12 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen ...@@ -206,10 +206,12 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
flinkClusterCfg.getAppConfig().setUserJarParas(buildParams(config.getTaskId())); flinkClusterCfg.getAppConfig().setUserJarParas(buildParams(config.getTaskId()));
flinkClusterCfg.getAppConfig().setUserJarMainAppClass(CommonConstant.DINKY_APP_MAIN_CLASS); flinkClusterCfg.getAppConfig().setUserJarMainAppClass(CommonConstant.DINKY_APP_MAIN_CLASS);
config.buildGatewayConfig(flinkClusterCfg); config.buildGatewayConfig(flinkClusterCfg);
Optional.ofNullable(task.getJobInstanceId()).ifPresent(i -> { if (task.getJobInstanceId() == null) {
JobInstance jobInstance = jobInstanceService.getById(i); config.setClusterId(null);
} else {
JobInstance jobInstance = jobInstanceService.getById(task.getJobInstanceId());
config.setClusterId(jobInstance.getClusterId()); config.setClusterId(jobInstance.getClusterId());
}); }
} else { } else {
Optional.ofNullable(task.getClusterId()).ifPresent(config::setClusterId); Optional.ofNullable(task.getClusterId()).ifPresent(config::setClusterId);
} }
......
...@@ -21,13 +21,13 @@ package org.dinky.daemon.entity; ...@@ -21,13 +21,13 @@ package org.dinky.daemon.entity;
import org.dinky.daemon.task.DaemonTask; import org.dinky.daemon.task.DaemonTask;
import org.slf4j.Logger; import lombok.Data;
import org.slf4j.LoggerFactory; import lombok.extern.slf4j.Slf4j;
@Data
@Slf4j
public class TaskWorker implements Runnable { public class TaskWorker implements Runnable {
private static final Logger log = LoggerFactory.getLogger(TaskWorker.class);
private volatile boolean running = true; private volatile boolean running = true;
private final TaskQueue<DaemonTask> queue; private final TaskQueue<DaemonTask> queue;
......
...@@ -35,7 +35,7 @@ const JobVersionTab = (props: JobProps) => { ...@@ -35,7 +35,7 @@ const JobVersionTab = (props: JobProps) => {
type: jobDetail.history.type, type: jobDetail.history.type,
statement: jobDetail.history.statement, statement: jobDetail.history.statement,
createTime: jobDetail.history.startTime, createTime: jobDetail.history.startTime,
versionId: 'LATEST', versionId: 'Current',
isLatest: true isLatest: true
}; };
......
/* /*
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0 * The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with * (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at * the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
* *
*/ */
import StatusTag from '@/components/JobTags/StatusTag'; import StatusTag from '@/components/JobTags/StatusTag';
import { queryList } from '@/services/api'; import { queryList } from '@/services/api';
import { API_CONSTANTS } from '@/services/endpoints'; import { API_CONSTANTS } from '@/services/endpoints';
...@@ -63,7 +64,13 @@ const JobHistoryList = (props: HistoryProps) => { ...@@ -63,7 +64,13 @@ const JobHistoryList = (props: HistoryProps) => {
{ {
title: l('global.table.operate'), title: l('global.table.operate'),
valueType: 'option', valueType: 'option',
render: () => [<a key={'history-detail'}>{l('devops.joblist.detail')}</a>] render: (text: any, record: Jobs.JobInstance) => [
<a
key={'history-detail'}
onClick={() => history.push(`/devops/job-detail?id=${record.id}`)}>
{l('devops.joblist.detail')}
</a>
]
} }
]; ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment