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

Fix some bug #2529

Merged
merged 14 commits into from
Nov 15, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ public JobConfig buildJobConfig(TaskDTO task) {
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
33 changes: 20 additions & 13 deletions dinky-web/src/pages/DevOps/JobList/components/JobHistoryList.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
/*
*
* 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';
Expand Down Expand Up @@ -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>
]
}
];

Expand Down