From 40456b3b9ba457bf7c415e9d87da88944bbd2e41 Mon Sep 17 00:00:00 2001
From: hLinx <327159425@qq.com>
Date: Thu, 27 Apr 2023 17:37:09 +0800
Subject: [PATCH 1/6] =?UTF-8?q?feature:=20Job=20=E5=AF=B9=E6=8E=A5?=
=?UTF-8?q?=E5=AE=A1=E8=AE=A1=E4=B8=AD=E5=BF=83=20#1765?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/{time-task.js => cron-job.js} | 39 +--
.../src/domain/service/dangerous-rule.js | 4 +
.../src/domain/service/file-source-manage.js | 8 +-
.../domain/service/public-script-manage.js | 12 +-
.../src/domain/service/script-manage.js | 12 +-
.../src/domain/service/task-manage.js | 4 +
src/frontend/src/domain/service/task-plan.js | 3 +
.../src/domain/service/ticket-manage.js | 6 +
src/frontend/src/domain/service/white-ip.js | 7 +-
.../src/domain/source/account-manage.js | 5 +-
.../source/{time-task.js => cron-job.js} | 12 +-
.../src/domain/source/dangerous-rule.js | 12 +-
.../src/domain/source/file-source-manage.js | 11 +-
.../src/domain/source/public-script-manage.js | 44 +++-
.../src/domain/source/script-manage.js | 44 +++-
src/frontend/src/domain/source/task-manage.js | 10 +
src/frontend/src/domain/source/task-plan.js | 7 +
.../src/domain/source/ticket-manage.js | 9 +-
src/frontend/src/domain/source/white-ip.js | 15 +-
.../list/components/history-record/index.vue | 6 +-
.../history-record/unlaunch-list.vue | 4 +-
.../src/views/cron-job/list/index.vue | 8 +-
.../index/components/add-rule.vue | 3 +-
.../index/components/table-action-row.vue | 1 -
.../components/opertion/index.vue | 4 +-
.../script-manage/common/copy-create.vue | 2 +-
.../src/views/script-manage/common/edit.vue | 2 +-
.../src/views/script-manage/create/index.vue | 2 +-
.../src/views/script-manage/list/index.vue | 1 -
.../common/plan/confirm-cron/cron-detail.vue | 2 +-
.../common/plan/confirm-cron/index.vue | 22 +-
.../views/task-manage/common/plan/create.vue | 6 +-
.../task-manage/common/plan/list/index.vue | 10 +-
.../components/sync-script-version-diff.vue | 1 -
.../src/views/task-manage/debug-plan/edit.vue | 231 ++++++++++++++++++
.../views/task-manage/debug-plan/index.vue | 6 +-
.../task-manage/sync-plan-batch/index.vue | 10 +-
.../sync-plan/components/crontab-detail.vue | 4 +-
.../task-manage/sync-plan/pages/step3.vue | 28 +--
.../task-manage/template-operation/index.vue | 13 +-
.../list/components/opertion/index.vue | 6 +-
.../src/views/ticket-manage/list/index.vue | 8 +-
.../white-ip/index/components/operation.vue | 32 ++-
43 files changed, 524 insertions(+), 152 deletions(-)
rename src/frontend/src/domain/service/{time-task.js => cron-job.js} (81%)
rename src/frontend/src/domain/source/{time-task.js => cron-job.js} (93%)
create mode 100644 src/frontend/src/views/task-manage/debug-plan/edit.vue
diff --git a/src/frontend/src/domain/service/time-task.js b/src/frontend/src/domain/service/cron-job.js
similarity index 81%
rename from src/frontend/src/domain/service/time-task.js
rename to src/frontend/src/domain/service/cron-job.js
index f14a52c3c8..06b7c8b6f7 100644
--- a/src/frontend/src/domain/service/time-task.js
+++ b/src/frontend/src/domain/service/cron-job.js
@@ -26,22 +26,27 @@
/* eslint-disable no-param-reassign */
import CrontabModel from '@model/crontab/crontab';
+import CronJobSource from '../source/cron-job';
import TaskPlanSource from '../source/task-plan';
-import TimeTaskSource from '../source/time-task';
export default {
- timeTaskUpdate(params = {}) {
- return TimeTaskSource.update(params);
+ create(params) {
+ return CronJobSource.create(params)
+ .then(({ data }) => data);
+ },
+ update(params = {}) {
+ return CronJobSource.update(params)
+ .then(({ data }) => data);
},
getDetail(params = {}, payload) {
- return TimeTaskSource.getDataById(params, payload)
+ return CronJobSource.getDataById(params, payload)
.then(({ data }) => new CrontabModel(data));
},
- timeTaskDelete(params = {}) {
- return TimeTaskSource.deleteDataById(params);
+ remove(params = {}) {
+ return CronJobSource.deleteDataById(params);
},
- timeTaskList(params, payload) {
- return TimeTaskSource.getAll(params, payload)
+ fetchList(params, payload) {
+ return CronJobSource.getAll(params, payload)
.then(({ data }) => {
data.data = data.data.map(item => new CrontabModel(item));
@@ -63,7 +68,7 @@ export default {
return data;
});
// 获取定时任务的执行成功率信息
- TimeTaskSource.getStatictis({
+ CronJobSource.getStatictis({
cronJobIds: cronJobList.map(item => item.id).join(','),
}).then((data) => {
const statictisMap = data.data.reduce((result, item) => {
@@ -89,27 +94,27 @@ export default {
return data;
});
},
- timeTaskStatusUpdate(params = {}) {
- return TimeTaskSource.updateStatus(params);
+ updateStatus(params = {}) {
+ return CronJobSource.updateStatus(params);
},
- timeTaskCheckName(params = {}) {
- return TimeTaskSource.getCheckResult(params)
+ checkName(params = {}) {
+ return CronJobSource.getCheckResult(params)
.then(({ data }) => data);
},
updatePlanTask(params = {}) {
- return TimeTaskSource.updateVariableAndEnable(params)
+ return CronJobSource.updateVariableAndEnable(params)
.then(({ data }) => data);
},
fetchTaskOfPlan(params = {}) {
- return TimeTaskSource.getDataByPlanId(params)
+ return CronJobSource.getDataByPlanId(params)
.then(({ data }) => data.map(item => new CrontabModel(item)));
},
fetchTaskOfPlanBatch(params = {}) {
- return TimeTaskSource.getDataByPlanIds(params)
+ return CronJobSource.getDataByPlanIds(params)
.then(({ data }) => data);
},
fetchUnlaunchHistory(params) {
- return TimeTaskSource.getUnlaunchHistory(params)
+ return CronJobSource.getUnlaunchHistory(params)
.then(({ data }) => data);
},
};
diff --git a/src/frontend/src/domain/service/dangerous-rule.js b/src/frontend/src/domain/service/dangerous-rule.js
index afff9d3e2a..cb9daad1ba 100644
--- a/src/frontend/src/domain/service/dangerous-rule.js
+++ b/src/frontend/src/domain/service/dangerous-rule.js
@@ -35,6 +35,10 @@ export default {
return DangerousRuleSource.getData(params, payload)
.then(({ data }) => data.map(item => new DangerousRuleModel(item)));
},
+ create(params) {
+ return DangerousRuleSource.create(params)
+ .then(({ data }) => data);
+ },
update(params) {
return DangerousRuleSource.update(params)
.then(({ data }) => data);
diff --git a/src/frontend/src/domain/service/file-source-manage.js b/src/frontend/src/domain/service/file-source-manage.js
index b031437a13..6771c9e8f8 100644
--- a/src/frontend/src/domain/service/file-source-manage.js
+++ b/src/frontend/src/domain/service/file-source-manage.js
@@ -47,12 +47,12 @@ export default {
return data;
});
},
- addSource(params) {
- return FileSourceManageSource.addFileSource(params)
+ create(params) {
+ return FileSourceManageSource.create(params)
.then(({ data }) => data);
},
- updateSource(params) {
- return FileSourceManageSource.updateFileSource(params)
+ update(params) {
+ return FileSourceManageSource.update(params)
.then(({ data }) => data);
},
getSourceInfo(params) {
diff --git a/src/frontend/src/domain/service/public-script-manage.js b/src/frontend/src/domain/service/public-script-manage.js
index 95d3be83c0..6fca8fae32 100644
--- a/src/frontend/src/domain/service/public-script-manage.js
+++ b/src/frontend/src/domain/service/public-script-manage.js
@@ -32,6 +32,10 @@ import ScriptSyncModel from '@model/script/script-sync';
import PublicScriptManageSource from '../source/public-script-manage';
export default {
+ scriptcreate(params) {
+ return PublicScriptManageSource.create(params)
+ .then(({ data }) => data);
+ },
scriptList(params) {
return PublicScriptManageSource.getAll(params)
.then(({ data }) => {
@@ -54,8 +58,8 @@ export default {
return PublicScriptManageSource.getAllVersion(params)
.then(({ data }) => data.map(script => Object.freeze(new ScriptModel(script))));
},
- scriptUpdate(params) {
- return PublicScriptManageSource.update(params)
+ scriptVersionUpdate(params) {
+ return PublicScriptManageSource.versionUpdate(params)
.then(({ data }) => data);
},
scriptUpdateMeta(params) {
@@ -66,6 +70,10 @@ export default {
return PublicScriptManageSource.deleteById(params)
.then(({ data }) => data);
},
+ createVersion(params) {
+ return PublicScriptManageSource.createVersion(params)
+ .then(({ data }) => data);
+ },
versionDetail(params) {
return PublicScriptManageSource.getDataByVersionId(params)
.then(({ data }) => new ScriptModel(data));
diff --git a/src/frontend/src/domain/service/script-manage.js b/src/frontend/src/domain/service/script-manage.js
index 8ca009b811..e265c6c88b 100644
--- a/src/frontend/src/domain/service/script-manage.js
+++ b/src/frontend/src/domain/service/script-manage.js
@@ -32,6 +32,10 @@ import ScriptSyncModel from '@model/script/script-sync';
import ScriptManageSource from '../source/script-manage';
export default {
+ scriptCreate(params) {
+ return ScriptManageSource.create(params)
+ .then(({ data }) => data);
+ },
scriptList(params, payload) {
return ScriptManageSource.getAll(params, payload)
.then(({ data }) => {
@@ -54,8 +58,8 @@ export default {
return ScriptManageSource.getAllVersion(params, config)
.then(({ data }) => data.map(script => Object.freeze(new ScriptModel(script))));
},
- scriptUpdate(params) {
- return ScriptManageSource.update(params)
+ scriptVersionUpdate(params) {
+ return ScriptManageSource.versionUpdate(params)
.then(({ data }) => data);
},
scriptUpdateMeta(params) {
@@ -64,6 +68,10 @@ export default {
scriptDelete(params) {
return ScriptManageSource.deleteById(params);
},
+ createVersion(params) {
+ return ScriptManageSource.createVersion(params)
+ .then(({ data }) => data);
+ },
versionDetail(params, config) {
return ScriptManageSource.getDataByVersionId(params, config)
.then(({ data }) => new ScriptModel(data));
diff --git a/src/frontend/src/domain/service/task-manage.js b/src/frontend/src/domain/service/task-manage.js
index 7f8894e2e2..803f4eca2e 100644
--- a/src/frontend/src/domain/service/task-manage.js
+++ b/src/frontend/src/domain/service/task-manage.js
@@ -50,6 +50,10 @@ export default {
return Object.freeze(new TaskModel(data, true));
});
},
+ create(params) {
+ return TaskManageSource.create(params)
+ .then(({ data }) => data);
+ },
taskUpdate(params) {
return TaskManageSource.update(params)
.then(({ data }) => data);
diff --git a/src/frontend/src/domain/service/task-plan.js b/src/frontend/src/domain/service/task-plan.js
index 5177772074..89d2aa3cec 100644
--- a/src/frontend/src/domain/service/task-plan.js
+++ b/src/frontend/src/domain/service/task-plan.js
@@ -77,6 +77,9 @@ export default {
planSyncInfo(params) {
return TaskPlanSource.updateSyncInfo(params);
},
+ create(params) {
+ return TaskPlanSource.create(params).then(({ data }) => data);
+ },
planUpdate(params) {
return TaskPlanSource.update(params).then(({ data }) => data);
},
diff --git a/src/frontend/src/domain/service/ticket-manage.js b/src/frontend/src/domain/service/ticket-manage.js
index 1a514c17fb..eb87c91938 100644
--- a/src/frontend/src/domain/service/ticket-manage.js
+++ b/src/frontend/src/domain/service/ticket-manage.js
@@ -55,9 +55,15 @@ export default {
return data;
});
},
+
+ create(params = {}) {
+ return TicketSource.create(params);
+ },
+
update(params) {
return TicketSource.update(params);
},
+
remove(params) {
return TicketSource.delete(params);
},
diff --git a/src/frontend/src/domain/service/white-ip.js b/src/frontend/src/domain/service/white-ip.js
index 0a0e021f53..4b7960e607 100644
--- a/src/frontend/src/domain/service/white-ip.js
+++ b/src/frontend/src/domain/service/white-ip.js
@@ -29,8 +29,13 @@ import WhiteIpModel from '@model/white-ip';
import WhiteIpSource from '../source/white-ip';
export default {
+ create(params) {
+ return WhiteIpSource.create(params)
+ .then(({ data }) => data);
+ },
whiteIpUpdate(params = {}) {
- return WhiteIpSource.update(params);
+ return WhiteIpSource.update(params)
+ .then(({ data }) => data);
},
getAllCloudArea() {
return WhiteIpSource.getAllCloudArea()
diff --git a/src/frontend/src/domain/source/account-manage.js b/src/frontend/src/domain/source/account-manage.js
index 138898ad55..e6a428abf3 100644
--- a/src/frontend/src/domain/source/account-manage.js
+++ b/src/frontend/src/domain/source/account-manage.js
@@ -55,7 +55,10 @@ class AccountManage extends ModuleBase {
// 更新账号
update(params) {
- return Request.put(`${this.path}/account`, {
+ const realParams = { ...params };
+ delete realParams.id;
+
+ return Request.put(`${this.path}/account/${params.id}`, {
params,
});
}
diff --git a/src/frontend/src/domain/source/time-task.js b/src/frontend/src/domain/source/cron-job.js
similarity index 93%
rename from src/frontend/src/domain/source/time-task.js
rename to src/frontend/src/domain/source/cron-job.js
index 360f923eba..2f627d1083 100644
--- a/src/frontend/src/domain/source/time-task.js
+++ b/src/frontend/src/domain/source/cron-job.js
@@ -33,10 +33,18 @@ class TimeTask extends ModuleBase {
this.module = '/job-crontab/web';
}
+ create(params = {}) {
+ return Request.post(`${this.path}/cron/job`, { params });
+ }
+
// 新增/更新定时任务
update(params) {
- const { id } = params;
- return Request.put(`${this.path}/cron/job/${id}`, { params });
+ const realParams = { ...params };
+ delete realParams.id;
+
+ return Request.put(`${this.path}/cron/job/${params.id}`, {
+ params: realParams,
+ });
}
// 获取定时任务信息
diff --git a/src/frontend/src/domain/source/dangerous-rule.js b/src/frontend/src/domain/source/dangerous-rule.js
index c5117eceb8..3357636ba7 100644
--- a/src/frontend/src/domain/source/dangerous-rule.js
+++ b/src/frontend/src/domain/source/dangerous-rule.js
@@ -38,9 +38,19 @@ class DangerousRule {
});
}
+ // 新增
+ create(params = {}) {
+ return Request.post(`${this.module}`, {
+ params,
+ });
+ }
+
// 添加/修改高危语句规则
update(params = {}) {
- return Request.post(`${this.module}`, {
+ const realParams = { ...params };
+ delete realParams.id;
+
+ return Request.put(`${this.module}/${params.id}`, {
params,
});
}
diff --git a/src/frontend/src/domain/source/file-source-manage.js b/src/frontend/src/domain/source/file-source-manage.js
index f199305a35..92a827741e 100644
--- a/src/frontend/src/domain/source/file-source-manage.js
+++ b/src/frontend/src/domain/source/file-source-manage.js
@@ -55,15 +55,18 @@ class FileSourceManage extends ModuleBase {
}
// 新增文件源
- addFileSource(params) {
+ create(params = {}) {
return Request.post(`${this.path}`, {
params,
});
}
// 更新文件源
- updateFileSource(params) {
- return Request.put(`${this.path}`, {
+ update(params = {}) {
+ const realParams = { ...params };
+ delete realParams.id;
+
+ return Request.put(`${this.path}/${params.id}`, {
params,
});
}
@@ -74,7 +77,7 @@ class FileSourceManage extends ModuleBase {
}
// 删除文件源
- removeFileSource(params) {
+ removeFileSource(params = {}) {
return Request.delete(`${this.path}/ids/${params.id}`);
}
diff --git a/src/frontend/src/domain/source/public-script-manage.js b/src/frontend/src/domain/source/public-script-manage.js
index b580e07243..caecb0727c 100644
--- a/src/frontend/src/domain/source/public-script-manage.js
+++ b/src/frontend/src/domain/source/public-script-manage.js
@@ -31,13 +31,24 @@ class PublicScriptManage {
this.module = 'job-manage/web/public_script';
}
- // 更新脚本
- update(params = {}) {
+ create(params = {}) {
return Request.post(`${this.module}/script`, {
params,
});
}
+ // 更新脚本元数据(脚本描述,名称,标签)
+ updateMeta(payload = {}) {
+ const params = {
+ ...payload,
+ };
+ delete params.id;
+ return Request.put(`${this.module}/script/${payload.id}/info`, {
+ params,
+ });
+ }
+
+
// 通过脚本id获取脚本详情
getDataByScriptId({ id }) {
return Request.get(`${this.module}/script/${id}`);
@@ -50,17 +61,6 @@ class PublicScriptManage {
});
}
- // 更新脚本元数据(脚本描述,名称,标签)
- updateMeta(payload = {}) {
- const params = {
- ...payload,
- };
- delete params.id;
- return Request.put(`${this.module}/script/${payload.id}/info`, {
- params,
- });
- }
-
// 获取脚本的所有版本
getAllVersion(payload = {}) {
const params = { ...payload };
@@ -71,6 +71,24 @@ class PublicScriptManage {
});
}
+ // 新增脚本版本
+ createVersion(params = {}) {
+ return Request.post(`${this.path}/script/${params.id}/scriptVersion`, {
+ params,
+ });
+ }
+
+ // 更新脚本版本
+ versionUpdate(params = {}) {
+ const realParams = { ...params };
+ delete realParams.id;
+ delete realParams.scriptVersionId;
+
+ return Request.post(`${this.module}/script/${params.id}/scriptVersion/${params.scriptVersionId}`, {
+ params: realParams,
+ });
+ }
+
// 获取脚本列表
getAll(params = {}) {
return Request.get(`${this.module}/script/list`, {
diff --git a/src/frontend/src/domain/source/script-manage.js b/src/frontend/src/domain/source/script-manage.js
index 52205dbc0a..8b67e057cd 100644
--- a/src/frontend/src/domain/source/script-manage.js
+++ b/src/frontend/src/domain/source/script-manage.js
@@ -41,13 +41,24 @@ class ScriptManage extends ModuleBase {
});
}
- // 更新脚本
- update(params = {}) {
+ // 新建脚本
+ create(params = {}) {
return Request.post(`${this.path}/script`, {
params,
});
}
+ // 更新脚本元数据(脚本描述,名称,标签)
+ updateMeta(payload = {}) {
+ const params = {
+ ...payload,
+ };
+ delete params.id;
+ return Request.put(`${this.path}/script/${payload.id}/info`, {
+ params,
+ });
+ }
+
// 通过脚本id获取脚本详情
getDataByScriptId({ id }, payload = {}) {
return Request.get(`${this.path}/script/${id}`, {
@@ -62,17 +73,6 @@ class ScriptManage extends ModuleBase {
});
}
- // 更新脚本元数据(脚本描述,名称,标签)
- updateMeta(payload = {}) {
- const params = {
- ...payload,
- };
- delete params.id;
- return Request.put(`${this.path}/script/${payload.id}/info`, {
- params,
- });
- }
-
// 获取脚本的所有版本
getAllVersion(params = {}, payload = {}) {
return Request.get(`${this.path}/script/${params.id}/scriptVersion/list`, {
@@ -80,6 +80,24 @@ class ScriptManage extends ModuleBase {
});
}
+ // 新增脚本版本
+ createVersion(params = {}) {
+ return Request.post(`${this.path}/script/${params.id}/scriptVersion`, {
+ params,
+ });
+ }
+
+ // 更新脚本版本
+ versionUpdate(params = {}) {
+ const realParams = { ...params };
+ delete realParams.id;
+ delete realParams.scriptVersionId;
+
+ return Request.put(`${this.path}/script/${params.id}/scriptVersion/${params.scriptVersionId}`, {
+ params: realParams,
+ });
+ }
+
// 获取脚本名称列表
getName(params) {
return Request.get(`${this.path}/scriptNames`, {
diff --git a/src/frontend/src/domain/source/task-manage.js b/src/frontend/src/domain/source/task-manage.js
index 926c54022c..0dad3c2ccf 100644
--- a/src/frontend/src/domain/source/task-manage.js
+++ b/src/frontend/src/domain/source/task-manage.js
@@ -47,6 +47,16 @@ class TaskManage extends ModuleBase {
});
}
+ // 新建模版
+ create(params = {}) {
+ const realParams = { ...params };
+ delete realParams.id;
+
+ return Request.post(`${this.path}/task/template`, {
+ params: realParams,
+ });
+ }
+
// 更新模板
update(payload = {}) {
const params = { ...payload };
diff --git a/src/frontend/src/domain/source/task-plan.js b/src/frontend/src/domain/source/task-plan.js
index 63842172d1..83421565f0 100644
--- a/src/frontend/src/domain/source/task-plan.js
+++ b/src/frontend/src/domain/source/task-plan.js
@@ -56,6 +56,13 @@ class TaskPlan extends ModuleBase {
});
}
+ // 新建执行方案
+ create(params = {}) {
+ return Request.post(`${this.path}/task/plan/${params.templateId}`, {
+ params,
+ });
+ }
+
// 更新执行方案
update(params = {}) {
const realParams = { ...params };
diff --git a/src/frontend/src/domain/source/ticket-manage.js b/src/frontend/src/domain/source/ticket-manage.js
index 57587fd5c6..8687cf5274 100644
--- a/src/frontend/src/domain/source/ticket-manage.js
+++ b/src/frontend/src/domain/source/ticket-manage.js
@@ -41,8 +41,15 @@ class TicketManage extends ModuleBase {
}
// 新建凭证
+ create(params = {}) {
+ return Request.post(`${this.path}`, {
+ params,
+ });
+ }
+
+ // 修改凭证
update(params) {
- return Request.post(`${this.path}/`, {
+ return Request.put(`${this.path}/${params.id}`, {
params,
});
}
diff --git a/src/frontend/src/domain/source/white-ip.js b/src/frontend/src/domain/source/white-ip.js
index b939f22819..995d94550f 100644
--- a/src/frontend/src/domain/source/white-ip.js
+++ b/src/frontend/src/domain/source/white-ip.js
@@ -30,12 +30,21 @@ class WhiteIp {
this.module = '/job-manage/web/whiteIP';
}
- // 新增/更新IP白名单
- update(params) {
- return Request.post(`${this.module}/`, {
+ // 新增
+ create(params = {}) {
+ return Request.post(`${this.module}`, {
params,
});
}
+ // 更新IP白名单
+ update(params = {}) {
+ const realParams = { ...params };
+ delete realParams.id;
+
+ return Request.put(`${this.module}/${params.id}`, {
+ params: realParams,
+ });
+ }
// 获取业务下管控区域列表
getAllCloudArea() {
diff --git a/src/frontend/src/views/cron-job/list/components/history-record/index.vue b/src/frontend/src/views/cron-job/list/components/history-record/index.vue
index 323caa13bd..35dde23aea 100644
--- a/src/frontend/src/views/cron-job/list/components/history-record/index.vue
+++ b/src/frontend/src/views/cron-job/list/components/history-record/index.vue
@@ -73,8 +73,8 @@
+
diff --git a/src/frontend/src/views/task-manage/debug-plan/index.vue b/src/frontend/src/views/task-manage/debug-plan/index.vue
index b55ded4470..eb2036fef7 100644
--- a/src/frontend/src/views/task-manage/debug-plan/index.vue
+++ b/src/frontend/src/views/task-manage/debug-plan/index.vue
@@ -95,7 +95,7 @@
From 5e5b2e234fe92b2d34bf2cf0dd181e3b3b2d37dc Mon Sep 17 00:00:00 2001
From: hLinx <327159425@qq.com>
Date: Thu, 4 May 2023 15:14:57 +0800
Subject: [PATCH 2/6] =?UTF-8?q?feature:=20Job=20=E5=AF=B9=E6=8E=A5?=
=?UTF-8?q?=E5=AE=A1=E8=AE=A1=E4=B8=AD=E5=BF=83=20#1765?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/frontend/src/domain/service/public-script-manage.js | 2 +-
src/frontend/src/views/task-manage/common/plan/create.vue | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/frontend/src/domain/service/public-script-manage.js b/src/frontend/src/domain/service/public-script-manage.js
index 6fca8fae32..cf92b8261b 100644
--- a/src/frontend/src/domain/service/public-script-manage.js
+++ b/src/frontend/src/domain/service/public-script-manage.js
@@ -32,7 +32,7 @@ import ScriptSyncModel from '@model/script/script-sync';
import PublicScriptManageSource from '../source/public-script-manage';
export default {
- scriptcreate(params) {
+ scriptCreate(params) {
return PublicScriptManageSource.create(params)
.then(({ data }) => data);
},
diff --git a/src/frontend/src/views/task-manage/common/plan/create.vue b/src/frontend/src/views/task-manage/common/plan/create.vue
index ec067b0f9f..751fd4a43f 100644
--- a/src/frontend/src/views/task-manage/common/plan/create.vue
+++ b/src/frontend/src/views/task-manage/common/plan/create.vue
@@ -354,7 +354,7 @@
theme: 'success',
message: I18n.t('template.操作成功'),
});
- this.$emit('on-create', data);
+ this.$emit('on-create', data.id);
}))
.finally(() => {
this.submitLoading = false;
From 24faca5ef1c335103f36e233cf0db9119d6a4884 Mon Sep 17 00:00:00 2001
From: hLinx <327159425@qq.com>
Date: Thu, 4 May 2023 16:32:08 +0800
Subject: [PATCH 3/6] =?UTF-8?q?feature:=20Job=20=E5=AF=B9=E6=8E=A5?=
=?UTF-8?q?=E5=AE=A1=E8=AE=A1=E4=B8=AD=E5=BF=83=20#1765?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/frontend/src/domain/source/public-script-manage.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/frontend/src/domain/source/public-script-manage.js b/src/frontend/src/domain/source/public-script-manage.js
index caecb0727c..d29e31bc34 100644
--- a/src/frontend/src/domain/source/public-script-manage.js
+++ b/src/frontend/src/domain/source/public-script-manage.js
@@ -84,7 +84,7 @@ class PublicScriptManage {
delete realParams.id;
delete realParams.scriptVersionId;
- return Request.post(`${this.module}/script/${params.id}/scriptVersion/${params.scriptVersionId}`, {
+ return Request.put(`${this.module}/script/${params.id}/scriptVersion/${params.scriptVersionId}`, {
params: realParams,
});
}
From 79ccd58305993a5e48194a728291860bf3b970e0 Mon Sep 17 00:00:00 2001
From: hLinx <327159425@qq.com>
Date: Thu, 11 May 2023 12:15:44 +0800
Subject: [PATCH 4/6] =?UTF-8?q?chore:=20=E5=89=8D=E7=AB=AF=E6=9E=84?=
=?UTF-8?q?=E5=BB=BA=E4=BB=BB=E5=8A=A1=E5=8D=87=E7=BA=A7=20#2042?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/frontend/src/components/task-step/common/rolling/index.vue | 2 ++
src/frontend/src/utils/rolling-expr-parse.js | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/frontend/src/components/task-step/common/rolling/index.vue b/src/frontend/src/components/task-step/common/rolling/index.vue
index ddf9feeaa0..144637b833 100644
--- a/src/frontend/src/components/task-step/common/rolling/index.vue
+++ b/src/frontend/src/components/task-step/common/rolling/index.vue
@@ -103,6 +103,8 @@
import Guide from './guide';
+ import I18n from '@/i18n';
+
export default {
name: '',
components: {
diff --git a/src/frontend/src/utils/rolling-expr-parse.js b/src/frontend/src/utils/rolling-expr-parse.js
index d85224d07d..30e144208b 100644
--- a/src/frontend/src/utils/rolling-expr-parse.js
+++ b/src/frontend/src/utils/rolling-expr-parse.js
@@ -229,6 +229,7 @@ const translateEN = (value) => {
throw new Error(`${atoms} is not allowed.`);
};
+
const result = [];
value.forEach((atoms, index) => {
// eslint-disable-next-line prefer-spread
From 40fbcaa8aa0d7e0f0bcd3217d48b92ab6e6d8cd0 Mon Sep 17 00:00:00 2001
From: hLinx <327159425@qq.com>
Date: Tue, 6 Jun 2023 14:41:49 +0800
Subject: [PATCH 5/6] =?UTF-8?q?feature:=20=E6=9F=A5=E7=9C=8B=E4=BD=9C?=
=?UTF-8?q?=E4=B8=9A=E6=A8=A1=E6=9D=BF=E6=89=A7=E8=A1=8C=E8=84=9A=E6=9C=AC?=
=?UTF-8?q?=E6=AD=A5=E9=AA=A4=E6=97=B6=E9=9A=90=E8=97=8F=E6=95=8F=E6=84=9F?=
=?UTF-8?q?=E5=8F=82=E6=95=B0=20#2110?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/frontend/src/components/task-step/common/rolling/index.vue | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/frontend/src/components/task-step/common/rolling/index.vue b/src/frontend/src/components/task-step/common/rolling/index.vue
index 144637b833..ddf9feeaa0 100644
--- a/src/frontend/src/components/task-step/common/rolling/index.vue
+++ b/src/frontend/src/components/task-step/common/rolling/index.vue
@@ -103,8 +103,6 @@
import Guide from './guide';
- import I18n from '@/i18n';
-
export default {
name: '',
components: {
From 4d0b28a7c1de45eef022edbea50f049c23fdbbe8 Mon Sep 17 00:00:00 2001
From: hLinx <327159425@qq.com>
Date: Tue, 25 Jul 2023 19:57:34 +0800
Subject: [PATCH 6/6] =?UTF-8?q?perf:=20Job=E6=94=AF=E6=8C=81=E8=BD=BB?=
=?UTF-8?q?=E9=87=8F=E5=8C=96=E9=83=A8=E7=BD=B2=20#1894?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/frontend/src/domain/source/permission-check.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/frontend/src/domain/source/permission-check.js b/src/frontend/src/domain/source/permission-check.js
index 55a6e46868..fc163dd6f6 100644
--- a/src/frontend/src/domain/source/permission-check.js
+++ b/src/frontend/src/domain/source/permission-check.js
@@ -27,35 +27,35 @@ import Request from '@utils/request';
class Permission {
jobManage(params = {}) {
- return Request.get('/job-manage/web/permission/check', {
+ return Request.get('/job-manage/web/permission/manage/check', {
params,
cache: 2000,
});
}
jobCrontab(params = {}) {
- return Request.get('/job-crontab/web/permission/check', {
+ return Request.get('/job-crontab/web/permission/crontab/check', {
params,
cache: 2000,
});
}
jobExecute(params = {}) {
- return Request.get('/job-execute/web/permission/check', {
+ return Request.get('/job-execute/web/permission/execute/check', {
params,
cache: 2000,
});
}
jobFileSource(params = {}) {
- return Request.get('/job-file-gateway/web/permission/check', {
+ return Request.get('/job-file-gateway/web/permission/fileGateWay/check', {
params,
cache: 2000,
});
}
jobTicket(params = {}) {
- return Request.get('/job-ticket/web/permission/check', {
+ return Request.get('/job-ticket/web/permission/manage/check', {
params,
cache: 2000,
});