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
flinkClusterCfg.getAppConfig().setUserJarParas(buildParams(config.getTaskId()));
flinkClusterCfg.getAppConfig().setUserJarMainAppClass(CommonConstant.DINKY_APP_MAIN_CLASS);
config.buildGatewayConfig(flinkClusterCfg);
Optional.ofNullable(task.getJobInstanceId()).ifPresent(i -> {
JobInstance jobInstance = jobInstanceService.getById(i);
if (task.getJobInstanceId() == null) {
config.setClusterId(null);
} else {
JobInstance jobInstance = jobInstanceService.getById(task.getJobInstanceId());
config.setClusterId(jobInstance.getClusterId());
});
}
} else {
Optional.ofNullable(task.getClusterId()).ifPresent(config::setClusterId);
}
......
......@@ -21,13 +21,13 @@ package org.dinky.daemon.entity;
import org.dinky.daemon.task.DaemonTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@Data
@Slf4j
public class TaskWorker implements Runnable {
private static final Logger log = LoggerFactory.getLogger(TaskWorker.class);
private volatile boolean running = true;
private final TaskQueue<DaemonTask> queue;
......
......@@ -35,7 +35,7 @@ const JobVersionTab = (props: JobProps) => {
type: jobDetail.history.type,
statement: jobDetail.history.statement,
createTime: jobDetail.history.startTime,
versionId: 'LATEST',
versionId: 'Current',
isLatest: true
};
......
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* 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 obtain a copy of the License at
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import StatusTag from '@/components/JobTags/StatusTag';
import { queryList } from '@/services/api';
import { API_CONSTANTS } from '@/services/endpoints';
......@@ -63,7 +64,13 @@ const JobHistoryList = (props: HistoryProps) => {
{
title: l('global.table.operate'),
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