🔨 命令执行用户.
This commit is contained in:
@@ -108,12 +108,12 @@ public class ExecJobController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DemoDisableApi
|
@DemoDisableApi
|
||||||
@OperatorLog(ExecJobOperatorType.SET_EXEC_USER)
|
@OperatorLog(ExecJobOperatorType.UPDATE_EXEC_USER)
|
||||||
@PutMapping("/set-exec-user")
|
@PutMapping("/update-exec-user")
|
||||||
@Operation(summary = "设置计划任务执行用户")
|
@Operation(summary = "修改计划任务执行用户")
|
||||||
@PreAuthorize("@ss.hasPermission('exec:exec-job:set-exec-user')")
|
@PreAuthorize("@ss.hasPermission('asset:exec-job:update-exec-user')")
|
||||||
public Integer setExecJobExecUser(@Validated @RequestBody ExecJobSetExecUserRequest request) {
|
public Integer updateExecJobExecUser(@Validated @RequestBody ExecJobUpdateExecUserRequest request) {
|
||||||
return execJobService.setExecJobExecUser(request);
|
return execJobService.updateExecJobExecUser(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DemoDisableApi
|
@DemoDisableApi
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import static org.dromara.visor.framework.biz.operator.log.core.enums.OperatorRi
|
|||||||
* @version 1.0.3
|
* @version 1.0.3
|
||||||
* @since 2024-3-28 12:03
|
* @since 2024-3-28 12:03
|
||||||
*/
|
*/
|
||||||
@Module("exec:exec-job")
|
@Module("asset:exec-job")
|
||||||
public class ExecJobOperatorType extends InitializingOperatorTypes {
|
public class ExecJobOperatorType extends InitializingOperatorTypes {
|
||||||
|
|
||||||
public static final String CREATE = "exec-job:create";
|
public static final String CREATE = "exec-job:create";
|
||||||
@@ -39,7 +39,7 @@ public class ExecJobOperatorType extends InitializingOperatorTypes {
|
|||||||
|
|
||||||
public static final String TRIGGER = "exec-job:trigger";
|
public static final String TRIGGER = "exec-job:trigger";
|
||||||
|
|
||||||
public static final String SET_EXEC_USER = "exec-job:set-exec-user";
|
public static final String UPDATE_EXEC_USER = "exec-job:update-exec-user";
|
||||||
|
|
||||||
public static final String DELETE = "exec-job:delete";
|
public static final String DELETE = "exec-job:delete";
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ public class ExecJobOperatorType extends InitializingOperatorTypes {
|
|||||||
new OperatorType(M, UPDATE, "更新计划任务 <sb>${before}</sb>"),
|
new OperatorType(M, UPDATE, "更新计划任务 <sb>${before}</sb>"),
|
||||||
new OperatorType(M, UPDATE_STATUS, "<sb>${statusName}</sb> 计划任务 <sb>${name}</sb>"),
|
new OperatorType(M, UPDATE_STATUS, "<sb>${statusName}</sb> 计划任务 <sb>${name}</sb>"),
|
||||||
new OperatorType(M, TRIGGER, "手动触发计划任务 <sb>${name}</sb>"),
|
new OperatorType(M, TRIGGER, "手动触发计划任务 <sb>${name}</sb>"),
|
||||||
new OperatorType(M, SET_EXEC_USER, "修改计划任务 <sb>${name}</sb> 执行用户为 <sb>${username}</sb>"),
|
new OperatorType(M, UPDATE_EXEC_USER, "修改计划任务 <sb>${name}</sb> 执行用户为 <sb>${username}</sb>"),
|
||||||
new OperatorType(H, DELETE, "删除计划任务 <sb>${name}</sb>"),
|
new OperatorType(H, DELETE, "删除计划任务 <sb>${name}</sb>"),
|
||||||
new OperatorType(H, IMPORT, "导入计划任务 <sb>${count}</sb> 条"),
|
new OperatorType(H, IMPORT, "导入计划任务 <sb>${count}</sb> 条"),
|
||||||
new OperatorType(H, EXPORT, "导出计划任务 <sb>${count}</sb> 条"),
|
new OperatorType(H, EXPORT, "导出计划任务 <sb>${count}</sb> 条"),
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import org.dromara.visor.framework.common.entity.PageRequest;
|
|||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置计划任务执行用户 查询请求对象
|
* 修改计划任务执行用户 查询请求对象
|
||||||
*
|
*
|
||||||
* @author Jiahang Li
|
* @author Jiahang Li
|
||||||
* @version 1.0.3
|
* @version 1.0.3
|
||||||
@@ -33,8 +33,8 @@ import javax.validation.constraints.NotNull;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Schema(name = "ExecJobSetExecUserRequest", description = "设置计划任务执行用户 查询请求对象")
|
@Schema(name = "ExecJobUpdateExecUserRequest", description = "修改计划任务执行用户 查询请求对象")
|
||||||
public class ExecJobSetExecUserRequest extends PageRequest {
|
public class ExecJobUpdateExecUserRequest extends PageRequest {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Schema(description = "id")
|
@Schema(description = "id")
|
||||||
@@ -55,6 +55,14 @@ public interface ExecJobService {
|
|||||||
*/
|
*/
|
||||||
Integer updateExecJobStatus(ExecJobUpdateStatusRequest request);
|
Integer updateExecJobStatus(ExecJobUpdateStatusRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改执行用户
|
||||||
|
*
|
||||||
|
* @param request request
|
||||||
|
* @return effect
|
||||||
|
*/
|
||||||
|
Integer updateExecJobExecUser(ExecJobUpdateExecUserRequest request);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询计划任务
|
* 查询计划任务
|
||||||
*
|
*
|
||||||
@@ -78,14 +86,6 @@ public interface ExecJobService {
|
|||||||
*/
|
*/
|
||||||
DataGrid<ExecJobVO> getExecJobPage(ExecJobQueryRequest request);
|
DataGrid<ExecJobVO> getExecJobPage(ExecJobQueryRequest request);
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置执行用户
|
|
||||||
*
|
|
||||||
* @param request request
|
|
||||||
* @return effect
|
|
||||||
*/
|
|
||||||
Integer setExecJobExecUser(ExecJobSetExecUserRequest request);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取下一个执行序列
|
* 获取下一个执行序列
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ public class ExecCommandServiceImpl implements ExecCommandService {
|
|||||||
.username(request.getUsername())
|
.username(request.getUsername())
|
||||||
.source(request.getSource())
|
.source(request.getSource())
|
||||||
.sourceId(request.getSourceId())
|
.sourceId(request.getSourceId())
|
||||||
|
.execMode(request.getExecMode())
|
||||||
.execSeq(request.getExecSeq())
|
.execSeq(request.getExecSeq())
|
||||||
.description(Strings.ifBlank(request.getDescription(), () -> {
|
.description(Strings.ifBlank(request.getDescription(), () -> {
|
||||||
if (command.length() < DESC_OMIT + Const.OMIT.length()) {
|
if (command.length() < DESC_OMIT + Const.OMIT.length()) {
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public class ExecJobServiceImpl implements ExecJobService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long createExecJob(ExecJobCreateRequest request) {
|
public Long createExecJob(ExecJobCreateRequest request) {
|
||||||
log.info("ExecJobService-createExecJob request: {}", JSON.toJSONString(request));
|
log.info("ExecJobService-createExecJob request: {}", JSON.toJSONString(request));
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
// 验证表达式是否正确
|
// 验证表达式是否正确
|
||||||
Cron.of(request.getExpression());
|
Cron.of(request.getExpression());
|
||||||
Valid.valid(ScriptExecEnum::of, request.getScriptExec());
|
Valid.valid(ScriptExecEnum::of, request.getScriptExec());
|
||||||
@@ -108,6 +109,10 @@ public class ExecJobServiceImpl implements ExecJobService {
|
|||||||
this.checkHostPermission(request.getHostIdList());
|
this.checkHostPermission(request.getHostIdList());
|
||||||
// 插入任务
|
// 插入任务
|
||||||
record.setStatus(ExecJobStatusEnum.DISABLED.getStatus());
|
record.setStatus(ExecJobStatusEnum.DISABLED.getStatus());
|
||||||
|
if (loginUser != null) {
|
||||||
|
record.setExecUserId(loginUser.getId());
|
||||||
|
record.setExecUsername(loginUser.getUsername());
|
||||||
|
}
|
||||||
int effect = execJobDAO.insert(record);
|
int effect = execJobDAO.insert(record);
|
||||||
Long id = record.getId();
|
Long id = record.getId();
|
||||||
// 设置任务主机
|
// 设置任务主机
|
||||||
@@ -170,6 +175,31 @@ public class ExecJobServiceImpl implements ExecJobService {
|
|||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Integer updateExecJobExecUser(ExecJobUpdateExecUserRequest request) {
|
||||||
|
Long id = request.getId();
|
||||||
|
Long userId = request.getUserId();
|
||||||
|
log.info("ExecJobService-updateExecJobExecUser id: {}, userId: {}", id, userId);
|
||||||
|
// 查询任务
|
||||||
|
ExecJobDO job = execJobDAO.selectById(id);
|
||||||
|
Valid.notNull(job, ErrorMessage.DATA_ABSENT);
|
||||||
|
// 查询用户
|
||||||
|
String username = systemUserApi.getUsernameById(userId);
|
||||||
|
Valid.notNull(username, ErrorMessage.USER_ABSENT);
|
||||||
|
// 修改任务
|
||||||
|
ExecJobDO update = new ExecJobDO();
|
||||||
|
update.setId(id);
|
||||||
|
update.setExecUserId(userId);
|
||||||
|
update.setExecUsername(username);
|
||||||
|
int effect = execJobDAO.updateById(update);
|
||||||
|
// 设置日志参数
|
||||||
|
OperatorLogs.add(OperatorLogs.NAME, job.getName());
|
||||||
|
OperatorLogs.add(OperatorLogs.USERNAME, username);
|
||||||
|
log.info("ExecJobService-setExecJobExecUser effect: {}", effect);
|
||||||
|
return effect;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ExecJobVO getExecJobById(Long id) {
|
public ExecJobVO getExecJobById(Long id) {
|
||||||
// 查询任务
|
// 查询任务
|
||||||
@@ -239,30 +269,6 @@ public class ExecJobServiceImpl implements ExecJobService {
|
|||||||
return dataGrid;
|
return dataGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer setExecJobExecUser(ExecJobSetExecUserRequest request) {
|
|
||||||
Long id = request.getId();
|
|
||||||
Long userId = request.getUserId();
|
|
||||||
log.info("ExecJobService-setExecJobExecUser id: {}, userId: {}", id, userId);
|
|
||||||
// 查询任务
|
|
||||||
ExecJobDO job = execJobDAO.selectById(id);
|
|
||||||
Valid.notNull(job, ErrorMessage.DATA_ABSENT);
|
|
||||||
// 查询用户
|
|
||||||
String username = systemUserApi.getUsernameById(userId);
|
|
||||||
Valid.notNull(username, ErrorMessage.USER_ABSENT);
|
|
||||||
// 修改任务
|
|
||||||
ExecJobDO update = new ExecJobDO();
|
|
||||||
update.setId(id);
|
|
||||||
update.setExecUserId(userId);
|
|
||||||
update.setExecUsername(username);
|
|
||||||
int effect = execJobDAO.updateById(update);
|
|
||||||
// 设置日志参数
|
|
||||||
OperatorLogs.add(OperatorLogs.NAME, job.getName());
|
|
||||||
OperatorLogs.add(OperatorLogs.USERNAME, username);
|
|
||||||
log.info("ExecJobService-setExecJobExecUser effect: {}", effect);
|
|
||||||
return effect;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getNextExecSeq(Long id) {
|
public Integer getNextExecSeq(Long id) {
|
||||||
// 自增
|
// 自增
|
||||||
|
|||||||
@@ -32,6 +32,14 @@ export interface ExecJobUpdateStatusRequest {
|
|||||||
status: number;
|
status: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新计划任务执行用户
|
||||||
|
*/
|
||||||
|
export interface ExecJobUpdateExecUserRequest {
|
||||||
|
id?: number;
|
||||||
|
userId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划任务查询请求
|
* 计划任务查询请求
|
||||||
*/
|
*/
|
||||||
@@ -66,14 +74,6 @@ export interface ExecJobQueryResponse extends TableData {
|
|||||||
hostList: Array<HostQueryResponse>;
|
hostList: Array<HostQueryResponse>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置计划任务执行用户
|
|
||||||
*/
|
|
||||||
export interface ExecJobSetExecUserRequest {
|
|
||||||
id: number;
|
|
||||||
userId: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建计划任务
|
* 创建计划任务
|
||||||
*/
|
*/
|
||||||
@@ -95,6 +95,13 @@ export function updateExecJobStatus(request: ExecJobUpdateStatusRequest) {
|
|||||||
return axios.put('/asset/exec-job/update-status', request);
|
return axios.put('/asset/exec-job/update-status', request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新计划任务执行用户
|
||||||
|
*/
|
||||||
|
export function updateExecJobExecUser(request: ExecJobUpdateExecUserRequest) {
|
||||||
|
return axios.put<number>('/asset/exec-job/update-exec-user', request);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询计划任务
|
* 查询计划任务
|
||||||
*/
|
*/
|
||||||
@@ -116,13 +123,6 @@ export function getExecJobPage(request: ExecJobQueryRequest) {
|
|||||||
return axios.post<DataGrid<ExecJobQueryResponse>>('/asset/exec-job/query', request);
|
return axios.post<DataGrid<ExecJobQueryResponse>>('/asset/exec-job/query', request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置计划任务执行用户
|
|
||||||
*/
|
|
||||||
export function setExecJobExecUser(request: ExecJobSetExecUserRequest) {
|
|
||||||
return axios.put<number>('/exec/exec-job/set-exec-user', request);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除计划任务
|
* 删除计划任务
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { ITerminalInitOnlyOptions, ITerminalOptions, Terminal } from '@xter
|
|||||||
export type ExecType = 'BATCH' | 'JOB';
|
export type ExecType = 'BATCH' | 'JOB';
|
||||||
|
|
||||||
// 批量执行状态
|
// 批量执行状态
|
||||||
export const execStatus = {
|
export const ExecStatus = {
|
||||||
// 等待中
|
// 等待中
|
||||||
WAITING: 'WAITING',
|
WAITING: 'WAITING',
|
||||||
// 运行中
|
// 运行中
|
||||||
@@ -18,7 +18,7 @@ export const execStatus = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 主机执行状态
|
// 主机执行状态
|
||||||
export const execHostStatus = {
|
export const ExecHostStatus = {
|
||||||
// 等待中
|
// 等待中
|
||||||
WAITING: 'WAITING',
|
WAITING: 'WAITING',
|
||||||
// 运行中
|
// 运行中
|
||||||
@@ -33,6 +33,12 @@ export const execHostStatus = {
|
|||||||
INTERRUPTED: 'INTERRUPTED',
|
INTERRUPTED: 'INTERRUPTED',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 执行模式
|
||||||
|
export const ExecMode = {
|
||||||
|
MANUAL: 'MANUAL',
|
||||||
|
JOB: 'JOB'
|
||||||
|
};
|
||||||
|
|
||||||
// 执行状态 字典项
|
// 执行状态 字典项
|
||||||
export const execStatusKey = 'execStatus';
|
export const execStatusKey = 'execStatus';
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
import { onUnmounted, ref, nextTick, onMounted } from 'vue';
|
import { onUnmounted, ref, nextTick, onMounted } from 'vue';
|
||||||
import { getExecCommandLogStatus } from '@/api/exec/exec-command-log';
|
import { getExecCommandLogStatus } from '@/api/exec/exec-command-log';
|
||||||
import { getExecJobLogStatus } from '@/api/exec/exec-job-log';
|
import { getExecJobLogStatus } from '@/api/exec/exec-job-log';
|
||||||
import { dictKeys, execHostStatus, execStatus } from '../const';
|
import { dictKeys, ExecHostStatus, ExecStatus } from '../const';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import ExecHost from './exec-host.vue';
|
import ExecHost from './exec-host.vue';
|
||||||
import LogView from './log-view.vue';
|
import LogView from './log-view.vue';
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
execLog.value = record;
|
execLog.value = record;
|
||||||
currentHostExecId.value = record.hosts[0].id;
|
currentHostExecId.value = record.hosts[0].id;
|
||||||
// 定时查询执行状态
|
// 定时查询执行状态
|
||||||
if (record.status === execStatus.WAITING ||
|
if (record.status === ExecStatus.WAITING ||
|
||||||
record.status === execStatus.RUNNING) {
|
record.status === ExecStatus.RUNNING) {
|
||||||
// 等待一秒后先查询一下状态
|
// 等待一秒后先查询一下状态
|
||||||
setTimeout(pullExecStatus, 1000);
|
setTimeout(pullExecStatus, 1000);
|
||||||
// 注册状态轮询
|
// 注册状态轮询
|
||||||
@@ -100,8 +100,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 已完成跳过
|
// 已完成跳过
|
||||||
if (execLog.value.status === execStatus.COMPLETED ||
|
if (execLog.value.status === ExecStatus.COMPLETED ||
|
||||||
execLog.value.status === execStatus.FAILED) {
|
execLog.value.status === ExecStatus.FAILED) {
|
||||||
closeClient();
|
closeClient();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -114,8 +114,8 @@
|
|||||||
}
|
}
|
||||||
hosts.forEach(s => {
|
hosts.forEach(s => {
|
||||||
// 未完成自动设置完成时间为当前时间 用于展示使用时间
|
// 未完成自动设置完成时间为当前时间 用于展示使用时间
|
||||||
if (s.status === execHostStatus.WAITING ||
|
if (s.status === ExecHostStatus.WAITING ||
|
||||||
s.status === execHostStatus.RUNNING) {
|
s.status === ExecHostStatus.RUNNING) {
|
||||||
if (!s.startTime) {
|
if (!s.startTime) {
|
||||||
s.startTime = Date.now();
|
s.startTime = Date.now();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
color="arcoblue"
|
color="arcoblue"
|
||||||
title="持续时间">
|
title="持续时间">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<icon-loading v-if="host.status === execHostStatus.WAITING || host.status === execHostStatus.RUNNING" />
|
<icon-loading v-if="host.status === ExecHostStatus.WAITING || host.status === ExecHostStatus.RUNNING" />
|
||||||
<icon-clock-circle v-else />
|
<icon-clock-circle v-else />
|
||||||
</template>
|
</template>
|
||||||
<span class="tag-value">{{ formatDuration(host.startTime, host.finishTime) || '0s' }}</span>
|
<span class="tag-value">{{ formatDuration(host.startTime, host.finishTime) || '0s' }}</span>
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
import type { ExecLogQueryResponse, ExecHostLogQueryResponse } from '@/api/exec/exec-log';
|
import type { ExecLogQueryResponse, ExecHostLogQueryResponse } from '@/api/exec/exec-log';
|
||||||
import type { ExecType, ILogAppender } from '../const';
|
import type { ExecType, ILogAppender } from '../const';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { execHostStatus, execHostStatusKey } from '../const';
|
import { ExecHostStatus, execHostStatusKey } from '../const';
|
||||||
import { formatDuration } from '@/utils';
|
import { formatDuration } from '@/utils';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { downloadExecCommandLogFile } from '@/api/exec/exec-command-log';
|
import { downloadExecCommandLogFile } from '@/api/exec/exec-command-log';
|
||||||
|
|||||||
@@ -1,37 +1,60 @@
|
|||||||
import type { AppRouteRecordRaw } from '../types';
|
import type { AppRouteRecordRaw } from '../types';
|
||||||
import { DEFAULT_LAYOUT } from '../base';
|
import { DEFAULT_LAYOUT, FULL_LAYOUT } from '../base';
|
||||||
|
|
||||||
const EXEC: AppRouteRecordRaw = {
|
const EXEC: Array<AppRouteRecordRaw> = [
|
||||||
name: 'execModule',
|
{
|
||||||
path: '/exec-module',
|
name: 'execModule',
|
||||||
component: DEFAULT_LAYOUT,
|
path: '/exec-module',
|
||||||
children: [
|
component: DEFAULT_LAYOUT,
|
||||||
{
|
children: [
|
||||||
name: 'execCommand',
|
{
|
||||||
path: '/exec-command',
|
name: 'execCommand',
|
||||||
component: () => import('@/views/exec/exec-command/index.vue'),
|
path: '/exec-command',
|
||||||
},
|
component: () => import('@/views/exec/exec-command/index.vue'),
|
||||||
{
|
},
|
||||||
name: 'execCommandLog',
|
{
|
||||||
path: '/exec-log',
|
name: 'execCommandLog',
|
||||||
component: () => import('@/views/exec/exec-command-log/index.vue'),
|
path: '/exec-log',
|
||||||
},
|
component: () => import('@/views/exec/exec-command-log/index.vue'),
|
||||||
{
|
},
|
||||||
name: 'batchUpload',
|
{
|
||||||
path: '/batch-upload',
|
name: 'execJob',
|
||||||
component: () => import('@/views/exec/batch-upload/index.vue'),
|
path: '/exec-job',
|
||||||
},
|
component: () => import('@/views/exec/exec-job/index.vue'),
|
||||||
{
|
},
|
||||||
name: 'uploadTask',
|
{
|
||||||
path: '/upload-task',
|
name: 'execJobLog',
|
||||||
component: () => import('@/views/exec/upload-task/index.vue'),
|
path: '/exec-job-log',
|
||||||
},
|
component: () => import('@/views/exec/exec-job-log/index.vue'),
|
||||||
{
|
},
|
||||||
name: 'execTemplate',
|
{
|
||||||
path: '/exec-template',
|
name: 'batchUpload',
|
||||||
component: () => import('@/views/exec/exec-template/index.vue'),
|
path: '/batch-upload',
|
||||||
},
|
component: () => import('@/views/exec/batch-upload/index.vue'),
|
||||||
],
|
},
|
||||||
};
|
{
|
||||||
|
name: 'uploadTask',
|
||||||
|
path: '/upload-task',
|
||||||
|
component: () => import('@/views/exec/upload-task/index.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'execTemplate',
|
||||||
|
path: '/exec-template',
|
||||||
|
component: () => import('@/views/exec/exec-template/index.vue'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}, {
|
||||||
|
name: 'execFullModule',
|
||||||
|
path: '/exec-full-module',
|
||||||
|
component: FULL_LAYOUT,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'execJobLogView',
|
||||||
|
path: '/job-log-view',
|
||||||
|
component: () => import('@/views/exec/exec-job-log-view/index.vue'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
export default EXEC;
|
export default EXEC;
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
import type { AppRouteRecordRaw } from '../types';
|
|
||||||
import { DEFAULT_LAYOUT, FULL_LAYOUT } from '../base';
|
|
||||||
|
|
||||||
const JOB: AppRouteRecordRaw[] = [
|
|
||||||
{
|
|
||||||
name: 'jobModule',
|
|
||||||
path: '/job-module',
|
|
||||||
component: DEFAULT_LAYOUT,
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: 'execJob',
|
|
||||||
path: '/exec-job',
|
|
||||||
component: () => import('@/views/exec/exec-job/index.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'execJobLog',
|
|
||||||
path: '/exec-job-log',
|
|
||||||
component: () => import('@/views/exec/exec-job-log/index.vue'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'jobFullModule',
|
|
||||||
path: '/job-full-module',
|
|
||||||
component: FULL_LAYOUT,
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: 'execJobLogView',
|
|
||||||
path: '/job-log-view',
|
|
||||||
component: () => import('@/views/exec/exec-job-log-view/index.vue'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
export default JOB;
|
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
status="danger"
|
status="danger"
|
||||||
:disabled="record.status !== execHostStatus.WAITING && record.status !== execHostStatus.RUNNING">
|
:disabled="record.status !== ExecHostStatus.WAITING && record.status !== ExecHostStatus.RUNNING">
|
||||||
中断
|
中断
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/host-table.columns';
|
import columns from '../types/host-table.columns';
|
||||||
import { execHostStatusKey, execHostStatus } from '@/components/exec/log/const';
|
import { execHostStatusKey, ExecHostStatus } from '@/components/exec/log/const';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { useExpandable } from '@/hooks/table';
|
import { useExpandable } from '@/hooks/table';
|
||||||
import { dateFormat, formatDuration } from '@/utils';
|
import { dateFormat, formatDuration } from '@/utils';
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
hostLogId: record.id
|
hostLogId: record.id
|
||||||
});
|
});
|
||||||
Message.success('已中断');
|
Message.success('已中断');
|
||||||
record.status = execHostStatus.INTERRUPTED;
|
record.status = ExecHostStatus.INTERRUPTED;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
@@ -177,7 +177,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
status="danger"
|
status="danger"
|
||||||
:disabled="record.status !== execStatus.WAITING && record.status !== execStatus.RUNNING">
|
:disabled="record.status !== ExecStatus.WAITING && record.status !== ExecStatus.RUNNING">
|
||||||
中断
|
中断
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { execStatus, execStatusKey } from '@/components/exec/log/const';
|
import { ExecStatus, execStatusKey } from '@/components/exec/log/const';
|
||||||
import { useExpandable, useTablePagination, useRowSelection } from '@/hooks/table';
|
import { useExpandable, useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { dateFormat, formatDuration } from '@/utils';
|
import { dateFormat, formatDuration } from '@/utils';
|
||||||
@@ -312,7 +312,7 @@
|
|||||||
logId: record.id
|
logId: record.id
|
||||||
});
|
});
|
||||||
Message.success('已中断');
|
Message.success('已中断');
|
||||||
record.status = execStatus.COMPLETED;
|
record.status = ExecStatus.COMPLETED;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -345,7 +345,7 @@
|
|||||||
// 加载状态
|
// 加载状态
|
||||||
const pullExecStatus = async () => {
|
const pullExecStatus = async () => {
|
||||||
const unCompleteIdList = tableRenderData.value
|
const unCompleteIdList = tableRenderData.value
|
||||||
.filter(s => s.status === execStatus.WAITING || s.status === execStatus.RUNNING)
|
.filter(s => s.status === ExecStatus.WAITING || s.status === ExecStatus.RUNNING)
|
||||||
.map(s => s.id);
|
.map(s => s.id);
|
||||||
if (!unCompleteIdList.length) {
|
if (!unCompleteIdList.length) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
status="danger"
|
status="danger"
|
||||||
:disabled="record.status !== execHostStatus.WAITING && record.status !== execHostStatus.RUNNING">
|
:disabled="record.status !== ExecHostStatus.WAITING && record.status !== ExecHostStatus.RUNNING">
|
||||||
中断
|
中断
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ExecLogQueryResponse, ExecHostLogQueryResponse } from '@/api/exec/exec-log';
|
import type { ExecLogQueryResponse, ExecHostLogQueryResponse } from '@/api/exec/exec-log';
|
||||||
import { deleteExecJobHostLog, interruptHostExecJob } from '@/api/exec/exec-job-log';
|
import { deleteExecJobHostLog, interruptHostExecJob } from '@/api/exec/exec-job-log';
|
||||||
import { execHostStatusKey, execHostStatus } from '@/components/exec/log/const';
|
import { execHostStatusKey, ExecHostStatus } from '@/components/exec/log/const';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '@/views/exec/exec-command-log/types/host-table.columns';
|
import columns from '@/views/exec/exec-command-log/types/host-table.columns';
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
hostLogId: record.id
|
hostLogId: record.id
|
||||||
});
|
});
|
||||||
Message.success('已中断');
|
Message.success('已中断');
|
||||||
record.status = execHostStatus.INTERRUPTED;
|
record.status = ExecHostStatus.INTERRUPTED;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
@@ -118,6 +118,28 @@
|
|||||||
{{ record.command }}
|
{{ record.command }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 执行用户 -->
|
||||||
|
<template #username="{ record }">
|
||||||
|
<div class="flex-center">
|
||||||
|
<!-- 执行用户 -->
|
||||||
|
<span :title="record.username">
|
||||||
|
{{ record.username }}
|
||||||
|
</span>
|
||||||
|
<!-- 手动触发 -->
|
||||||
|
<a-tooltip v-if="ExecMode.MANUAL === record.execMode"
|
||||||
|
position="top"
|
||||||
|
content="手动触发"
|
||||||
|
mini>
|
||||||
|
<a-tag class="ml8"
|
||||||
|
style="width: 28px"
|
||||||
|
color="pinkpurple">
|
||||||
|
<template #icon>
|
||||||
|
<icon-user />
|
||||||
|
</template>
|
||||||
|
</a-tag>
|
||||||
|
</a-tooltip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<!-- 执行状态 -->
|
<!-- 执行状态 -->
|
||||||
<template #status="{ record }">
|
<template #status="{ record }">
|
||||||
<a-tag :color="getDictValue(execStatusKey, record.status, 'color')">
|
<a-tag :color="getDictValue(execStatusKey, record.status, 'color')">
|
||||||
@@ -160,7 +182,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
status="danger"
|
status="danger"
|
||||||
:disabled="record.status !== execStatus.WAITING && record.status !== execStatus.RUNNING">
|
:disabled="record.status !== ExecStatus.WAITING && record.status !== ExecStatus.RUNNING">
|
||||||
中断
|
中断
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
@@ -202,7 +224,7 @@
|
|||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { execStatus, execStatusKey } from '@/components/exec/log/const';
|
import { ExecStatus, execStatusKey, ExecMode } from '@/components/exec/log/const';
|
||||||
import { useExpandable, useTablePagination, useRowSelection } from '@/hooks/table';
|
import { useExpandable, useTablePagination, useRowSelection } from '@/hooks/table';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import { dateFormat, formatDuration } from '@/utils';
|
import { dateFormat, formatDuration } from '@/utils';
|
||||||
@@ -267,7 +289,6 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 中断执行
|
// 中断执行
|
||||||
const doInterruptExecJob = async (record: ExecLogQueryResponse) => {
|
const doInterruptExecJob = async (record: ExecLogQueryResponse) => {
|
||||||
try {
|
try {
|
||||||
@@ -277,7 +298,7 @@
|
|||||||
logId: record.id
|
logId: record.id
|
||||||
});
|
});
|
||||||
Message.success('已中断');
|
Message.success('已中断');
|
||||||
record.status = execStatus.COMPLETED;
|
record.status = ExecStatus.COMPLETED;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -310,7 +331,7 @@
|
|||||||
// 加载状态
|
// 加载状态
|
||||||
const pullJobStatus = async () => {
|
const pullJobStatus = async () => {
|
||||||
const unCompleteIdList = tableRenderData.value
|
const unCompleteIdList = tableRenderData.value
|
||||||
.filter(s => s.status === execStatus.WAITING || s.status === execStatus.RUNNING)
|
.filter(s => s.status === ExecStatus.WAITING || s.status === ExecStatus.RUNNING)
|
||||||
.map(s => s.id);
|
.map(s => s.id);
|
||||||
if (!unCompleteIdList.length) {
|
if (!unCompleteIdList.length) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ const columns = [
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
minWidth: 238,
|
minWidth: 238,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
}, {
|
||||||
|
title: '执行用户',
|
||||||
|
dataIndex: 'username',
|
||||||
|
slotName: 'username',
|
||||||
|
align: 'left',
|
||||||
|
width: 128,
|
||||||
|
ellipsis: true,
|
||||||
}, {
|
}, {
|
||||||
title: '执行状态',
|
title: '执行状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
|
|||||||
@@ -146,13 +146,6 @@
|
|||||||
@click="emits('openDetail', record.id)">
|
@click="emits('openDetail', record.id)">
|
||||||
详情
|
详情
|
||||||
</a-button>
|
</a-button>
|
||||||
<!-- 修改 -->
|
|
||||||
<a-button v-permission="['asset:exec-job:update']"
|
|
||||||
type="text"
|
|
||||||
size="mini"
|
|
||||||
@click="emits('openUpdate', record.id)">
|
|
||||||
修改
|
|
||||||
</a-button>
|
|
||||||
<!-- 手动触发 -->
|
<!-- 手动触发 -->
|
||||||
<a-popconfirm content="确认要手动触发吗?"
|
<a-popconfirm content="确认要手动触发吗?"
|
||||||
position="left"
|
position="left"
|
||||||
@@ -176,6 +169,24 @@
|
|||||||
删除
|
删除
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
<!-- 更多 -->
|
||||||
|
<a-dropdown trigger="hover" :popup-max-height="false">
|
||||||
|
<a-button type="text" size="mini">
|
||||||
|
更多
|
||||||
|
</a-button>
|
||||||
|
<template #content>
|
||||||
|
<!-- 修改任务 -->
|
||||||
|
<a-doption v-permission="['asset:exec-job:update']"
|
||||||
|
@click="emits('openUpdate', record.id)">
|
||||||
|
<span class="more-doption normal">修改任务</span>
|
||||||
|
</a-doption>
|
||||||
|
<!-- 修改执行用户 -->
|
||||||
|
<a-doption v-permission="['asset:exec-job:update-exec-user']"
|
||||||
|
@click="emits('updateExecUser', record)">
|
||||||
|
<span class="more-doption normal">修改执行用户</span>
|
||||||
|
</a-doption>
|
||||||
|
</template>
|
||||||
|
</a-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -202,7 +213,7 @@
|
|||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import { dateFormat } from '@/utils';
|
import { dateFormat } from '@/utils';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openDetail', 'testCron']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openDetail', 'updateExecUser', 'testCron']);
|
||||||
|
|
||||||
const pagination = useTablePagination();
|
const pagination = useTablePagination();
|
||||||
const rowSelection = useRowSelection();
|
const rowSelection = useRowSelection();
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
<template>
|
||||||
|
<a-modal v-model:visible="visible"
|
||||||
|
modal-class="modal-form-large"
|
||||||
|
title-align="start"
|
||||||
|
title="修改执行用户"
|
||||||
|
:align-center="false"
|
||||||
|
:draggable="true"
|
||||||
|
:mask-closable="false"
|
||||||
|
:unmount-on-close="true"
|
||||||
|
:ok-button-props="{ disabled: loading }"
|
||||||
|
:cancel-button-props="{ disabled: loading }"
|
||||||
|
:on-before-ok="handlerOk"
|
||||||
|
@close="handleClose">
|
||||||
|
<a-spin class="full" :loading="loading">
|
||||||
|
<a-form :model="formModel"
|
||||||
|
label-align="right"
|
||||||
|
:auto-label-width="true">
|
||||||
|
<!-- 执行用户 -->
|
||||||
|
<a-form-item field="userId" label="执行用户">
|
||||||
|
<user-selector v-model="formModel.userId"
|
||||||
|
placeholder="请选择执行用户"
|
||||||
|
allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
export default {
|
||||||
|
name: 'execUserUpdateModal'
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import type { ExecJobUpdateExecUserRequest, ExecJobQueryResponse } from '@/api/exec/exec-job';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import useLoading from '@/hooks/loading';
|
||||||
|
import useVisible from '@/hooks/visible';
|
||||||
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
import { useCacheStore, useDictStore } from '@/store';
|
||||||
|
import { updateExecJobExecUser } from '@/api/exec/exec-job';
|
||||||
|
import UserSelector from '@/components/user/user/selector/index.vue';
|
||||||
|
|
||||||
|
const { toOptions } = useDictStore();
|
||||||
|
const { loadUsers } = useCacheStore();
|
||||||
|
const { visible, setVisible } = useVisible();
|
||||||
|
const { loading, setLoading } = useLoading();
|
||||||
|
|
||||||
|
const formModel = ref<ExecJobUpdateExecUserRequest>({});
|
||||||
|
const job = ref<ExecJobQueryResponse>();
|
||||||
|
|
||||||
|
// 打开
|
||||||
|
const open = (record: ExecJobQueryResponse) => {
|
||||||
|
formModel.value = { id: record.id, userId: record.execUserId };
|
||||||
|
job.value = record;
|
||||||
|
setVisible(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
defineExpose({ open });
|
||||||
|
|
||||||
|
// 确定
|
||||||
|
const handlerOk = async () => {
|
||||||
|
const execUserId = formModel.value.userId;
|
||||||
|
if (!execUserId) {
|
||||||
|
Message.error('请选择执行用户');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
setLoading(true);
|
||||||
|
try {
|
||||||
|
// 更新
|
||||||
|
await updateExecJobExecUser(formModel.value);
|
||||||
|
if (job.value) {
|
||||||
|
job.value.execUserId = execUserId;
|
||||||
|
job.value.execUsername = (await loadUsers()).find(s => s.id === execUserId)?.username || '';
|
||||||
|
}
|
||||||
|
Message.success('修改成功');
|
||||||
|
// 清空
|
||||||
|
handlerClear();
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 关闭
|
||||||
|
const handleClose = () => {
|
||||||
|
handlerClear();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 清空
|
||||||
|
const handlerClear = () => {
|
||||||
|
setLoading(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
@open-add="() => drawer.openAdd()"
|
@open-add="() => drawer.openAdd()"
|
||||||
@open-update="(e) => drawer.openUpdate(e)"
|
@open-update="(e) => drawer.openUpdate(e)"
|
||||||
@open-detail="(e) => detail.open(e)"
|
@open-detail="(e) => detail.open(e)"
|
||||||
|
@update-exec-user="(e) => execUserModal.open(e)"
|
||||||
@test-cron="openNextCron" />
|
@test-cron="openNextCron" />
|
||||||
<!-- 添加修改模态框 -->
|
<!-- 添加修改模态框 -->
|
||||||
<exec-job-form-drawer ref="drawer"
|
<exec-job-form-drawer ref="drawer"
|
||||||
@@ -16,6 +17,8 @@
|
|||||||
@gen-cron="(e) => genModal.open(e)" />
|
@gen-cron="(e) => genModal.open(e)" />
|
||||||
<!-- 任务详情模态框 -->
|
<!-- 任务详情模态框 -->
|
||||||
<exec-job-detail-drawer ref="detail" />
|
<exec-job-detail-drawer ref="detail" />
|
||||||
|
<!-- 修改执行用户模态框 -->
|
||||||
|
<exec-user-update-modal ref="execUserModal" />
|
||||||
<!-- cron 执行时间模态框 -->
|
<!-- cron 执行时间模态框 -->
|
||||||
<cron-next-modal ref="nextCron" />
|
<cron-next-modal ref="nextCron" />
|
||||||
<!-- cron 生成模态框 -->
|
<!-- cron 生成模态框 -->
|
||||||
@@ -43,6 +46,7 @@
|
|||||||
import { CronNextTimes, dictKeys } from './types/const';
|
import { CronNextTimes, dictKeys } from './types/const';
|
||||||
import ExecJobTable from './components/exec-job-table.vue';
|
import ExecJobTable from './components/exec-job-table.vue';
|
||||||
import ExecJobFormDrawer from './components/exec-job-form-drawer.vue';
|
import ExecJobFormDrawer from './components/exec-job-form-drawer.vue';
|
||||||
|
import ExecUserUpdateModal from './components/exec-user-update-modal.vue';
|
||||||
import ExecJobDetailDrawer from './components/exec-job-detail-drawer.vue';
|
import ExecJobDetailDrawer from './components/exec-job-detail-drawer.vue';
|
||||||
import AuthorizedHostModal from '@/components/asset/host/authorized-host-modal/index.vue';
|
import AuthorizedHostModal from '@/components/asset/host/authorized-host-modal/index.vue';
|
||||||
import ExecTemplateModal from '@/components/exec/template/modal/index.vue';
|
import ExecTemplateModal from '@/components/exec/template/modal/index.vue';
|
||||||
@@ -53,6 +57,7 @@
|
|||||||
const table = ref();
|
const table = ref();
|
||||||
const drawer = ref();
|
const drawer = ref();
|
||||||
const detail = ref();
|
const detail = ref();
|
||||||
|
const execUserModal = ref();
|
||||||
const nextCron = ref();
|
const nextCron = ref();
|
||||||
const genModal = ref();
|
const genModal = ref();
|
||||||
const templateModal = ref();
|
const templateModal = ref();
|
||||||
|
|||||||
@@ -32,6 +32,14 @@ const columns = [
|
|||||||
minWidth: 238,
|
minWidth: 238,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
|
}, {
|
||||||
|
title: '执行用户',
|
||||||
|
dataIndex: 'execUsername',
|
||||||
|
slotName: 'execUsername',
|
||||||
|
align: 'left',
|
||||||
|
ellipsis: true,
|
||||||
|
tooltip: true,
|
||||||
|
width: 124,
|
||||||
}, {
|
}, {
|
||||||
title: '任务状态',
|
title: '任务状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
|
|||||||
Reference in New Issue
Block a user