From dc3bff3801bc23fa5f94cea70ae7a04af96e32fc Mon Sep 17 00:00:00 2001 From: opensnail <598092184@qq.com> Date: Tue, 8 Oct 2024 09:19:16 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feat(1.2.0-beta2):=201.=20=E5=B9=BF?= =?UTF-8?q?=E6=92=AD=E7=B1=BB=E5=9E=8B=E9=9A=90=E8=97=8F=E5=B9=B6=E8=A1=8C?= =?UTF-8?q?=E6=95=B0=202.=20=E4=BF=AE=E6=94=B9=E9=9D=99=E6=80=81=E5=88=86?= =?UTF-8?q?=E7=89=87=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/langs/zh-cn.ts | 2 +- src/views/job/task/modules/job-task-operate-drawer.vue | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 2ac8561..106d03f 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -148,7 +148,7 @@ const local: App.I18n.Schema = { items: { cluster: '集群', broadcast: '广播', - slice: '静态切片', + slice: '静态分片', map: 'Map', mapreduce: 'MapReduce' } diff --git a/src/views/job/task/modules/job-task-operate-drawer.vue b/src/views/job/task/modules/job-task-operate-drawer.vue index 8dfea3d..4072162 100644 --- a/src/views/job/task/modules/job-task-operate-drawer.vue +++ b/src/views/job/task/modules/job-task-operate-drawer.vue @@ -659,7 +659,11 @@ const scriptMethodOptions = [ - + Date: Sat, 12 Oct 2024 09:11:28 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix(sj=5F1.2.0-beta2):=20=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1[=E6=89=B9=E6=AC=A1],=20=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=90=8E=E6=90=9C=E7=B4=A2=E4=BB=8D=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/job/batch/modules/job-batch-search.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/job/batch/modules/job-batch-search.vue b/src/views/job/batch/modules/job-batch-search.vue index b609de5..6e94267 100644 --- a/src/views/job/batch/modules/job-batch-search.vue +++ b/src/views/job/batch/modules/job-batch-search.vue @@ -53,6 +53,8 @@ watch( model.value.jobName = value; } else { noSearchFlag.value = false; + model.value.jobId = null; + model.value.jobName = null; } } ); From 04c3c3926a1911dd69cdb4157585af65d01e772f Mon Sep 17 00:00:00 2001 From: xlsea Date: Thu, 24 Oct 2024 14:32:48 +0800 Subject: [PATCH 3/8] =?UTF-8?q?feat:=20=E8=84=9A=E6=9C=AC=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=96=B0=E5=A2=9E=E7=BC=96=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/job/task/modules/job-task-operate-drawer.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/job/task/modules/job-task-operate-drawer.vue b/src/views/job/task/modules/job-task-operate-drawer.vue index 4072162..684b692 100644 --- a/src/views/job/task/modules/job-task-operate-drawer.vue +++ b/src/views/job/task/modules/job-task-operate-drawer.vue @@ -188,6 +188,7 @@ const executorCustomOptions = [ type ScriptParams = { method: string; scriptParams: string; + charset: string; }; const scriptParams = reactive(createDefaultScriptParams()); @@ -195,7 +196,8 @@ const scriptParams = reactive(createDefaultScriptParams()); function createDefaultScriptParams() { return { method: 'LOCAL_SCRIPT', - scriptParams: '' + scriptParams: '', + charset: '' }; } @@ -589,6 +591,9 @@ const scriptMethodOptions = [ + + + From fd57b113c099025df65c53d47997db6802911c10 Mon Sep 17 00:00:00 2001 From: xlsea Date: Thu, 24 Oct 2024 14:36:28 +0800 Subject: [PATCH 4/8] =?UTF-8?q?chore:=20=E6=89=A7=E8=A1=8C=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=E9=BB=98=E8=AE=A4=E6=9F=A5=E8=AF=A2=E4=B8=80=E5=91=A8?= =?UTF-8?q?=E5=86=85=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common.ts | 9 ++++++++- src/views/job/batch/index.vue | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/utils/common.ts b/src/utils/common.ts index fc28f14..637171e 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -147,6 +147,13 @@ export function monthRangeISO8601(months: number = 1, startOf: dayjs.OpUnitType ] as [string, string]; } +export function weekRangeISO8601(weeks: number = 1, startOf: dayjs.OpUnitType = 'day') { + return [ + dayjs().subtract(weeks, 'week').startOf(startOf).format('YYYY-MM-DDTHH:mm:ss'), + dayjs().endOf('day').format('YYYY-MM-DDTHH:mm:ss') + ] as [string, string]; +} + export function isNotNull(value: any) { return value !== undefined && value !== null && value !== '' && value !== 'undefined'; } @@ -190,7 +197,7 @@ export function stringToContent( if (typeof jsonString === 'string') { try { parsedObj = JSON.parse(jsonString); - } catch (e) { + } catch { return []; } } diff --git a/src/views/job/batch/index.vue b/src/views/job/batch/index.vue index bf03233..7e22fac 100644 --- a/src/views/job/batch/index.vue +++ b/src/views/job/batch/index.vue @@ -14,7 +14,7 @@ import { $t } from '@/locales'; import { useAppStore } from '@/store/modules/app'; import { useTable, useTableOperate } from '@/hooks/common/table'; import { operationReasonRecord, taskBatchStatusRecord, taskTypeRecord } from '@/constants/business'; -import { monthRangeISO8601, tagColor } from '@/utils/common'; +import { tagColor, weekRangeISO8601 } from '@/utils/common'; import SvgIcon from '@/components/custom/svg-icon.vue'; import JobBatchSearch from './modules/job-batch-search.vue'; import JobBatchDetailDrawer from './modules/job-batch-detail-drawer.vue'; @@ -38,7 +38,7 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP jobName: null, taskBatchStatus: null, jobId: null, - datetimeRange: monthRangeISO8601() + datetimeRange: weekRangeISO8601() }, searchParams: { jobId, From 7957e60319d8032a6ce65ea5604ba8875f666a72 Mon Sep 17 00:00:00 2001 From: xlsea Date: Thu, 24 Oct 2024 14:48:38 +0800 Subject: [PATCH 5/8] =?UTF-8?q?chore:=20=E6=89=B9=E6=AC=A1=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=9F=A5=E8=AF=A2=E6=94=AF=E6=8C=81=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/job/batch/modules/job-batch-search.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/job/batch/modules/job-batch-search.vue b/src/views/job/batch/modules/job-batch-search.vue index 6e94267..e893d30 100644 --- a/src/views/job/batch/modules/job-batch-search.vue +++ b/src/views/job/batch/modules/job-batch-search.vue @@ -91,6 +91,8 @@ function renderLabel(option: SelectOption) { import { $t } from '@/locales'; -import { monthRange } from '@/utils/common'; +import { dayRange, monthRange } from '@/utils/common'; defineOptions({ name: 'DatetimeRange' @@ -13,6 +13,9 @@ const modelValue = defineModel<[string, string] | null>('value'); const createShortcuts = () => { const shortcuts: any = {}; + shortcuts[$t('common.today')] = dayRange(1); + shortcuts[$t('common.lastWeek')] = dayRange(7); + shortcuts[$t('common.lastMonth')] = monthRange(1, 'month'); shortcuts[$t('common.currentMonth')] = monthRange(0, 'month'); shortcuts[$t('common.lastMonth')] = monthRange(1, 'month'); shortcuts[$t('common.lastTwoMonth')] = monthRange(2, 'month'); diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index ebe9d4c..cfb3369 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -210,6 +210,8 @@ const local: App.I18n.Schema = { }, updateDt: 'Updated Time', createDt: 'Created Time', + today: 'Today', + lastWeek: 'Last Week', currentMonth: 'Current Month', lastMonth: 'Last Month', lastTwoMonth: 'Last 2 Month' diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 106d03f..396de01 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -210,6 +210,8 @@ const local: App.I18n.Schema = { }, updateDt: '更新时间', createDt: '创建时间', + today: '今天', + lastWeek: '最近一周', currentMonth: '当月', lastMonth: '最近一月', lastTwoMonth: '最近两月' diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index f9b9367..06f551d 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -491,6 +491,8 @@ declare namespace App { }; updateDt: string; createDt: string; + today: string; + lastWeek: string; currentMonth: string; lastMonth: string; lastTwoMonth: string; diff --git a/src/utils/common.ts b/src/utils/common.ts index 637171e..a7e633a 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -120,7 +120,7 @@ export function toggleHtmlClass(className: string) { } /** - * 创建 `最近n个自然月` timestamp时间区间 + * 创建 `最近n个自然月` timestamp 时间区间 * * @param months 月数 * @param startOf 时间的开始类型 @@ -133,6 +133,23 @@ export function monthRange(months: number = 1, startOf: dayjs.OpUnitType = 'day' ]; } +/** + * 创建 `最近n个自然月` timestamp 时间区间 + * + * @param days 日数 + * @param startOf 时间的开始类型 + * @returns timestamp时间区间 + */ +export function dayRange(days: number = 1) { + return [ + dayjs() + .subtract(days - 1, 'day') + .startOf('day') + .valueOf(), + dayjs().endOf('day').valueOf() + ] as [number, number]; +} + /** * 创建 `最近n个自然月` 字符串时间区间 * From aeba97b278b7d3960765e521ed6505d56bb6bc6b Mon Sep 17 00:00:00 2001 From: opensnail <598092184@qq.com> Date: Fri, 25 Oct 2024 10:13:05 +0800 Subject: [PATCH 7/8] =?UTF-8?q?feat(sj=5F1.2.0-beta2):=20=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E7=89=88=E6=9C=AC=E5=A5=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 5df8d86..cdf208a 100644 --- a/.env +++ b/.env @@ -4,7 +4,7 @@ VITE_APP_TITLE=Snail Job VITE_APP_DESC=A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling. -VITE_APP_VERSION=1.2.0-beta1 +VITE_APP_VERSION=1.2.0-beta2 VITE_APP_DEFAULT_TOKEN=SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj From 9249a7fa3d2c434eaeb61723b89adf194f981b2a Mon Sep 17 00:00:00 2001 From: xlsea Date: Fri, 25 Oct 2024 10:27:35 +0800 Subject: [PATCH 8/8] =?UTF-8?q?chore:=20=E5=9B=9E=E8=B0=83=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=96=B0=E5=A2=9E=E5=BA=9F=E5=BC=83=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflow/modules/drawer/callback-drawer.vue | 2 +- .../workflow/modules/nodes/callback-node.vue | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/workflow/modules/drawer/callback-drawer.vue b/src/components/workflow/modules/drawer/callback-drawer.vue index 38b9b29..2aba6ac 100644 --- a/src/components/workflow/modules/drawer/callback-drawer.vue +++ b/src/components/workflow/modules/drawer/callback-drawer.vue @@ -77,7 +77,7 @@ const rules: FormRules = { diff --git a/src/components/workflow/modules/nodes/callback-node.vue b/src/components/workflow/modules/nodes/callback-node.vue index cca88ad..77ca391 100644 --- a/src/components/workflow/modules/nodes/callback-node.vue +++ b/src/components/workflow/modules/nodes/callback-node.vue @@ -146,9 +146,17 @@ const getClass = (item: Workflow.ConditionNodeType) => {
- -  {{ item.nodeName }} -  ({{ item.id }}) + + +  {{ item.nodeName }} +  ({{ item.id }}) + + + 此节点后续将废弃,请使用定时任务中的 HTTP 内置执行器进行替换。 + +