20250227-隐私修改,添加重要选项
2
.env
@ -1,6 +1,6 @@
|
||||
VITE_BASE_URL=/
|
||||
|
||||
VITE_APP_TITLE=Snail Job
|
||||
VITE_APP_TITLE=数采任务调度系统
|
||||
|
||||
VITE_APP_DESC=A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling.
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
"keywords": [
|
||||
"Job",
|
||||
"Retry",
|
||||
"Snail Job",
|
||||
"数采任务调度系统",
|
||||
"Vue3 admin ",
|
||||
"vue-admin-template",
|
||||
"Vite5",
|
||||
|
BIN
public/logo.png
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 684 KiB |
11656
public/logo.svg
Normal file
After Width: | Height: | Size: 877 KiB |
BIN
public/logo2.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 877 KiB |
3
src/assets/svg-icon/logo1.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg id="snail-job" data-name="snail-job" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 709.6845005488 690.7728719041">
|
||||
<path d="M338.3025810878.1920476727c-24.3000003621,2.1000000313-31.0000004619,2.8000000417-41.0000006109,4.5000000671C156.7025783818,28.3920480929,44.9025767158,131.4920496292,10.4025762017,269.0920516796,2.8025760885,299.5920521341.0025760468,322.4920524753.0025760468,354.0920529462c-.1000000015,33.1000004932,2.7000000402,55.8000008315,10.400000155,86.7000012919,9.9000001475,39.4000005871,26.0000003874,76.0000011325,47.9000007138,109.1000016257,13.9000002071,20.9000003114,25.100000374,34.7000005171,42.5000006333,52.6000007838,29.8000004441,30.5000004545,62.0000009239,53.8000008017,99.2000014782,71.8000010699,8.3000001237,4.0000000596,15.7000002339,7.3000001088,16.4000002444,7.3000001088.6000000089,0,5.4000000805,1.3000000194,10.5000001565,3.0000000447,44.7000006661,14.3000002131,92.2000013739,3.7000000551,138.4000020623-30.9000004604,4.1000000611-3.1000000462,12.9000001922-10.8000001609,19.4000002891-17.1000002548,10.1000001505-9.7000001445,12.4000001848-12.6000001878,15.2000002265-18.5000002757,15.6000002325-33.9000005051,14.6000002176-69.0000010282-3.2000000477-110.9000016525-8.6000001281-20.1000002995-25.9000003859-46.1000006869-43.3000006452-65.0000009686-3.0000000447-3.4000000507-10.7000001594-9.6000001431-17.1000002548-14.0000002086-24.5000003651-16.7000002488-43.7000006512-32.1000004783-54.3000008091-43.4000006467-6.3000000939-6.8000001013-16.1000002399-21.9000003263-18.7000002787-28.9000004306-2.8000000417-7.5000001118-3.6000000536-17.5000002608-2.0000000298-24.4000003636,1.8000000268-7.8000001162,7.2000001073-18.7000002787,12.0000001788-24.2000003606,4.1000000611-4.6000000685,4.2000000626-4.8000000715,3.5000000522-10.000000149-1.6000000238-11.7000001743-17.8000002652-62.0000009239-20.600000307-63.8000009507-.6000000089-.3000000045-3.3000000492-.9000000134-6.0000000894-1.2000000179-10.5000001565-1.3000000194-18.3000002727-6.9000001028-22.7000003383-16.6000002474-2.1000000313-4.5000000671-2.4000000358-6.4000000954-2.0000000298-12.1000001803,1.1000000164-15.500000231,13.5000002012-26.0000003874,29.2000004351-24.8000003695,18.3000002727,1.5000000224,30.1000004485,19.2000002861,23.7000003532,35.8000005335-1.2000000179,3.0000000447-2.1000000313,6.5000000969-2.1000000313,7.7000001147,0,3.1000000462,8.2000001222,18.5000002757,14.2000002116,26.6000003964,13.9000002071,18.8000002801,30.000000447,27.6000004113,48.4000007212,26.4000003934,10.600000158-.6000000089,13.3000001982-2.0000000298,16.4000002444-8.2000001222,2.3000000343-4.5000000671,2.5000000373-6.2000000924,2.5000000373-17.0000002533,0-7.7000001147-.7000000104-15.0000002235-1.9000000283-20.5000003055-2.5000000373-11.6000001729-11.3000001684-38.4000005722-13.7000002041-41.4000006169-1.1000000164-1.3000000194-4.1000000611-3.2000000477-6.8000001013-4.1000000611-14.700000219-4.900000073-23.3000003472-16.7000002488-23.3000003472-32.1000004783,0-13.1000001952,7.2000001073-24.3000003621,19.5000002906-30.000000447,7.8000001162-3.6000000536,19.0000002831-3.4000000507,27.2000004053.5000000075,3.5000000522,1.6000000238,7.8000001162,4.8000000715,10.3000001535,7.5000001118,10.3000001535,11.2000001669,11.8000001758,24.4000003636,4.5000000671,39.4000005871-3.3000000492,6.7000000998-3.0000000447,8.1000001207,5.100000076,24.6000003666,18.2000002712,36.8000005484,52.2000007778,76.8000011444,101.1000015065,118.7000017688,39.2000005841,33.7000005022,64.9000009671,65.4000009745,84.9000012651,105.1000015661,15.6000002325,31.0000004619,24.1000003591,57.9000008628,30.20000045,96.300001435,1.0000000149,6.1000000909,1.8000000268,19.7000002936,2.1000000313,34.6000005156.6000000089,26.0000003874-.3000000045,39.5000005886-3.8000000566,59.3000008836-1.1000000164,6.0000000894-1.8000000268,11.0000001639-1.6000000238,11.2000001669.8000000119.8000000119,31.7000004724-31.7000004724,40.1000005975-42.1000006273,18.9000002816-23.5000003502,38.6000005752-56.6000008434,50.400000751-84.5000012591,13.0000001937-30.800000459,22.7000003383-68.9000010267,26.4000003934-104.0000015497,1.8000000268-17.3000002578,1.5000000224-54.7000008151-.6000000089-72.0000010729-13.2000001967-111.000001654-73.5000010952-206.1000030711-167.300002493-264.0000039339-13.3000001982-8.2000001222-37.4000005573-20.5000003055-52.2000007778-26.5000003949-29.7000004426-12.1000001803-67.1000009999-21.3000003174-99.1000014767-24.5000003651-11.4000001699-1.1000000164-43.8000006527-2.0000000298-51.00000076-1.4000000209Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
@ -11,7 +11,7 @@ const { watermark } = useThemeStore();
|
||||
const { userInfo } = useAuthStore();
|
||||
|
||||
const watermarkContent = computed(() => {
|
||||
const appTitle = import.meta.env.VITE_APP_TITLE || 'Snail Job';
|
||||
const appTitle = import.meta.env.VITE_APP_TITLE || '数采任务调度系统';
|
||||
return userInfo.userName ? `${userInfo.userName}@${appTitle}` : appTitle;
|
||||
});
|
||||
</script>
|
||||
|
@ -10,7 +10,7 @@ const type = route.name as string;
|
||||
|
||||
const text = computed(() => {
|
||||
if (type === 'job_task') {
|
||||
return '删除前请检查待删除定时任务是存在通知配置或者工作流任务;';
|
||||
return '删除前请检查待删除数采任务是存在通知配置或者工作流任务;';
|
||||
}
|
||||
|
||||
if (type === 'retry_scene') {
|
||||
|
@ -42,7 +42,7 @@ const onClose = () => {
|
||||
<DetailDrawer v-model="visible" title="工作流详情" :width="['500px', '90%']" @after-leave="onClose">
|
||||
<NDescriptions :column="1" label-placement="left" bordered :label-style="{ width: '120px' }">
|
||||
<NDescriptionsItem label="工作流名称">{{ modelValue.workflowName }}</NDescriptionsItem>
|
||||
<NDescriptionsItem label="组名称">{{ modelValue.groupName }}</NDescriptionsItem>
|
||||
<NDescriptionsItem label="网站名称">{{ modelValue.groupName }}</NDescriptionsItem>
|
||||
<NDescriptionsItem label="触发类型">{{ $t(triggerTypeRecord[modelValue.triggerType!]) }}</NDescriptionsItem>
|
||||
|
||||
<NDescriptionsItem label="触发间隔">
|
||||
|
@ -147,7 +147,7 @@ const rules: Record<RuleKey, FormItemRule> = {
|
||||
<EditableInput v-model="form.workflowName" class="max-w-570px min-w-570px" />
|
||||
</template>
|
||||
<NForm ref="formRef" :model="form" :rules="rules" label-align="left" label-width="100px">
|
||||
<NFormItem path="groupName" label="组名称">
|
||||
<NFormItem path="groupName" label="网站名称">
|
||||
<NSelect
|
||||
v-model:value="form.groupName"
|
||||
placeholder="请选择组"
|
||||
|
@ -154,7 +154,7 @@ const getClass = (item: Workflow.ConditionNodeType) => {
|
||||
<template #trigger>
|
||||
<icon-ant-design:info-circle-outlined class="ml-3px text-16px" />
|
||||
</template>
|
||||
此节点后续将废弃,请使用定时任务中的 HTTP 内置执行器进行替换。
|
||||
此节点后续将废弃,请使用数采任务中的 HTTP 内置执行器进行替换。
|
||||
</NTooltip>
|
||||
</span>
|
||||
</span>
|
||||
|
@ -92,7 +92,7 @@ const show = () => {
|
||||
</div>
|
||||
<div v-if="nodeData.groupName" class="content">
|
||||
<div>
|
||||
<span class="content_label">组名称: </span>
|
||||
<span class="content_label">网站名称: </span>
|
||||
<NEllipsis class="max-w-132px">
|
||||
{{ nodeData.groupName }}
|
||||
</NEllipsis>
|
||||
|
@ -12,13 +12,21 @@ export const enableStatusNumberRecord: Record<Api.Common.EnableStatusNumber, App
|
||||
};
|
||||
|
||||
export const enableStatusNumberOptions = transformRecordToNumberOption(enableStatusNumberRecord, true);
|
||||
|
||||
export const roleTypeRecord: Record<number, string> = {
|
||||
1: 'R_USER',
|
||||
2: 'R_ADMIN'
|
||||
};
|
||||
|
||||
export const podsType: Record<Api.Dashboard.DashboardPodsType, App.I18n.I18nKey> = {
|
||||
export const isImportantRecord: Record<Api.Common.EnableStatusNumber, App.I18n.I18nKey> = {
|
||||
1: 'common.yesOrNo.yes',
|
||||
0: 'common.yesOrNo.no'
|
||||
};
|
||||
|
||||
export const isImportantOptions = transformRecordToNumberOption(isImportantRecord, true);
|
||||
|
||||
|
||||
|
||||
export const podsType: Record<Api.Dashboard.DashboardPodsType, App.I18n.I18nKey> = {
|
||||
1: 'page.pods.type.client',
|
||||
2: 'page.pods.type.server'
|
||||
};
|
||||
@ -213,7 +221,7 @@ export const DelayLevel: Record<number, string> = {
|
||||
export const triggerTypeRecord: Record<Api.Job.TriggerType, App.I18n.I18nKey> = {
|
||||
2: 'page.jobTask.triggerTypeItem.fixed',
|
||||
3: 'page.jobTask.triggerTypeItem.cron',
|
||||
// 只会在定时任务中使用
|
||||
// 只会在数采任务中使用
|
||||
99: 'page.jobTask.triggerTypeItem.workflow'
|
||||
};
|
||||
|
||||
|
@ -13,7 +13,7 @@ const version = ref<string>(`${localStg.get('version') || VITE_APP_VERSION}`);
|
||||
<template>
|
||||
<DarkModeContainer class="h-full flex-center">
|
||||
<a href="https://gitee.com/aizuda/easy-retry/blob/master/LICENSE" target="_blank" rel="noopener noreferrer">
|
||||
Copyright © 2024 Snail Job v{{ version }}
|
||||
Copyright © 2024 数采任务调度系统 v{{ version }}
|
||||
</a>
|
||||
</DarkModeContainer>
|
||||
</template>
|
||||
|
@ -45,27 +45,6 @@ const href = (url: string) => {
|
||||
<div class="h-full flex-y-center justify-end">
|
||||
<NamespaceSelect />
|
||||
<GlobalSearch />
|
||||
<ButtonIcon
|
||||
v-if="!appStore.isMobile"
|
||||
class="color-#c71d23 xl:block sm:hidden"
|
||||
tooltip-content="Gitee"
|
||||
icon="simple-icons:gitee"
|
||||
@click="href('https://gitee.com/aizuda/snail-job')"
|
||||
/>
|
||||
<ButtonIcon
|
||||
v-if="!appStore.isMobile"
|
||||
tooltip-content="Github"
|
||||
class="color-#010409 xl:block sm:hidden dark:color-#e6edf3"
|
||||
icon="simple-icons:github"
|
||||
@click="href('https://github.com/aizuda/snail-job')"
|
||||
/>
|
||||
<ButtonIcon
|
||||
v-if="!appStore.isMobile"
|
||||
tooltip-content="Document"
|
||||
class="color-#272636 dark:color-#f0f2f5"
|
||||
icon="material-symbols:unknown-document-outline"
|
||||
@click="href('https://snailjob.opensnail.com/')"
|
||||
/>
|
||||
<FullScreen v-if="!appStore.isMobile" class="xl:block sm:hidden" :full="isFullscreen" @click="toggle" />
|
||||
<LangSwitch :lang="appStore.locale" :lang-options="appStore.localeOptions" @change-lang="appStore.changeLocale" />
|
||||
<ThemeSchemaSwitch
|
||||
|
@ -1,6 +1,6 @@
|
||||
const local: App.I18n.Schema = {
|
||||
system: {
|
||||
title: 'Snail Job',
|
||||
title: '数采任务调度系统',
|
||||
desc: 'A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling.',
|
||||
updateTitle: 'System Version Update Notification',
|
||||
updateContent: 'A new version of the system has been detected. Do you want to refresh the page immediately?',
|
||||
@ -324,7 +324,7 @@ const local: App.I18n.Schema = {
|
||||
log: 'Log',
|
||||
home: 'Home',
|
||||
about: 'About',
|
||||
document: 'Document',
|
||||
// document: 'Document',
|
||||
pods: 'Online Machine',
|
||||
namespace: 'Namespace',
|
||||
notify: 'Notify',
|
||||
@ -782,6 +782,7 @@ const local: App.I18n.Schema = {
|
||||
ownerName: 'Ower name',
|
||||
jobName: 'Mission name',
|
||||
argsStr: 'Method parameters',
|
||||
isImportant: 'Is Important',
|
||||
shardNum: 'Reduce shard num',
|
||||
argsType: 'Parameter Type',
|
||||
nextTriggerAt: 'Next trigger time',
|
||||
|
@ -1,6 +1,6 @@
|
||||
const local: App.I18n.Schema = {
|
||||
system: {
|
||||
title: 'Snail Job',
|
||||
title: '数采任务调度系统',
|
||||
desc: '灵活,可靠和快速的分布式任务重试和分布式任务调度平台',
|
||||
updateTitle: '系统版本更新通知',
|
||||
updateContent: '检测到系统有新版本发布,是否立即刷新页面?',
|
||||
@ -97,7 +97,7 @@ const local: App.I18n.Schema = {
|
||||
systemTaskType: {
|
||||
retry: '重试任务',
|
||||
callback: '回调任务',
|
||||
job: '定时任务',
|
||||
job: '数采任务',
|
||||
workflow: '工作流'
|
||||
},
|
||||
routeKey: {
|
||||
@ -324,10 +324,10 @@ const local: App.I18n.Schema = {
|
||||
log: '日志',
|
||||
home: '首页',
|
||||
about: '关于',
|
||||
document: '文档',
|
||||
// document: '文档',
|
||||
pods: '在线机器',
|
||||
namespace: '命名空间',
|
||||
group: '组管理',
|
||||
group: '网站管理',
|
||||
notify: '告警通知',
|
||||
notify_recipient: '通知人',
|
||||
notify_config: '通知配置',
|
||||
@ -347,7 +347,7 @@ const local: App.I18n.Schema = {
|
||||
workflow_form_detail: '工作流详情',
|
||||
workflow_form_edit: '编辑工作流',
|
||||
workflow_form_add: '新增工作流',
|
||||
job: '定时任务',
|
||||
job: '数采任务',
|
||||
job_task: '任务管理',
|
||||
job_batch: '执行批次'
|
||||
},
|
||||
@ -387,7 +387,7 @@ const local: App.I18n.Schema = {
|
||||
},
|
||||
about: {
|
||||
title: '关于',
|
||||
introduction: `<span style="font-weight: bold; color: #1366ff">Snail Job</span>
|
||||
introduction: `<span style="font-weight: bold; color: #1366ff">数采任务调度系统</span>
|
||||
<br />
|
||||
是一个功能强大的分布式重试和任务调度平台,为支持提高分布式业务系统一致性和分布式任务调度而设计。具备高度可伸缩性和容错性,还包含完善的权限管理和强大的告警监控功能。
|
||||
一次部署即可获得重试和任务调度功能,为开发人员提供了简单而高效的解决方案。
|
||||
@ -423,11 +423,11 @@ const local: App.I18n.Schema = {
|
||||
eveningGreeting: '晚上好,{userName},今天过得怎么样?请注意早点休息!',
|
||||
earlyMorningGreeting: '{userName},已经这么晚了呀,早点休息吧,晚安~',
|
||||
retryTaskCount: '重试任务',
|
||||
jobTaskCount: '定时任务',
|
||||
jobTaskCount: '数采任务',
|
||||
userCount: '用户',
|
||||
retryDeadLetter: '死信任务',
|
||||
retryTaskTip: '总任务量: 重试/回调任务量',
|
||||
jobTask: '定时任务',
|
||||
jobTask: '数采任务',
|
||||
jobBatch: '任务批次',
|
||||
jobTaskTip: '成功率:总完成/总调度量',
|
||||
onlineServiceCount: '总在线机器',
|
||||
@ -460,7 +460,7 @@ const local: App.I18n.Schema = {
|
||||
},
|
||||
task: {
|
||||
title: '任务汇总',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
run: '运行中任务数',
|
||||
total: '总任务数'
|
||||
},
|
||||
@ -472,7 +472,7 @@ const local: App.I18n.Schema = {
|
||||
pods: {
|
||||
title: '在线机器',
|
||||
nodeType: '类型',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
hostId: 'Pod ID',
|
||||
hostIp: 'IP',
|
||||
hostPort: 'Port',
|
||||
@ -480,7 +480,7 @@ const local: App.I18n.Schema = {
|
||||
updateDt: '更新时间',
|
||||
contextPath: '路径/组',
|
||||
form: {
|
||||
groupName: '请输入组名称'
|
||||
groupName: '请输入网站名称'
|
||||
},
|
||||
type: {
|
||||
client: '客户端',
|
||||
@ -502,10 +502,10 @@ const local: App.I18n.Schema = {
|
||||
editNamespace: '编辑命名空间'
|
||||
},
|
||||
groupConfig: {
|
||||
title: '组管理',
|
||||
title: '网站管理',
|
||||
detail: '组详情',
|
||||
namespaceId: '命名空间ID',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
token: 'Token',
|
||||
groupStatus: '状态',
|
||||
idGeneratorMode: 'ID生成模式',
|
||||
@ -518,7 +518,7 @@ const local: App.I18n.Schema = {
|
||||
commonConfig: '通用配置',
|
||||
retryConfig: '重试配置',
|
||||
form: {
|
||||
groupName: '请输入组名称',
|
||||
groupName: '请输入网站名称',
|
||||
token: 'Token',
|
||||
groupStatus: '状态',
|
||||
description: '描述',
|
||||
@ -527,19 +527,19 @@ const local: App.I18n.Schema = {
|
||||
initScene: '初始化场景',
|
||||
collapseCommon: '通用配置',
|
||||
collapseRetry: '重试配置',
|
||||
groupNameRule: '组名称: 仅支持长度为:1~64位字符.格式为:数字、字母、下划线、短横线。'
|
||||
groupNameRule: '网站名称: 仅支持长度为:1~64位字符.格式为:数字、字母、下划线、短横线。'
|
||||
},
|
||||
idMode: {
|
||||
idWorker: '雪花算法',
|
||||
segment: '号段模式'
|
||||
},
|
||||
addGroupConfig: '新增组管理',
|
||||
editGroupConfig: '编辑组管理',
|
||||
addGroupConfig: '新增网站管理',
|
||||
editGroupConfig: '编辑网站管理',
|
||||
generateToken: '随机生成'
|
||||
},
|
||||
notifyConfig: {
|
||||
title: '告警通知列表',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
businessName: '业务ID',
|
||||
notifyName: '通知名称',
|
||||
notifyStatus: '通知状态',
|
||||
@ -549,7 +549,7 @@ const local: App.I18n.Schema = {
|
||||
description: '描述',
|
||||
notifyAttribute: '通知属性',
|
||||
retryScene: '重试场景',
|
||||
job: '定时任务',
|
||||
job: '数采任务',
|
||||
workflow: '工作流',
|
||||
form: {
|
||||
notifyName: '请输入通知名称',
|
||||
@ -557,14 +557,14 @@ const local: App.I18n.Schema = {
|
||||
notifyType: '请选择通知类型',
|
||||
notifyAttribute: '请求输入通知属性',
|
||||
notifyScene: '请选择通知场景',
|
||||
groupName: '请选择组名称',
|
||||
groupName: '请选择网站名称',
|
||||
notifyThreshold: '请输入通知阈值',
|
||||
notifyStatus: '请选择状态',
|
||||
systemTaskType: '请选择任务类型',
|
||||
notifyRecipient: '请选择通知人',
|
||||
rateLimiterThreshold: '请选择阈值',
|
||||
sceneName: '请选择重试场景',
|
||||
jobName: '请选择定时任务',
|
||||
jobName: '请选择数采任务',
|
||||
workflowName: '请选择工作流'
|
||||
},
|
||||
addNotifyConfig: '新增告警通知',
|
||||
@ -652,7 +652,7 @@ const local: App.I18n.Schema = {
|
||||
title: '重试任务列表',
|
||||
detail: '重试任务详情',
|
||||
uniqueId: 'UniqueId',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
sceneName: '场景名称',
|
||||
idempotentId: '幂等ID',
|
||||
bizNo: '业务编号',
|
||||
@ -666,7 +666,7 @@ const local: App.I18n.Schema = {
|
||||
retryStatus: '请输入重试状态',
|
||||
bizNo: '请输入业务编号',
|
||||
uniqueId: '请输入UniqueId',
|
||||
groupName: '请输入组名称',
|
||||
groupName: '请输入网站名称',
|
||||
argsStr: '请输入执行方法参数',
|
||||
sceneName: '请输入场景名称',
|
||||
executorName: '请输入执行器名称',
|
||||
@ -732,7 +732,7 @@ const local: App.I18n.Schema = {
|
||||
title: '重试日志列表',
|
||||
detail: '重试日志详情',
|
||||
UniqueId: 'UniqueId',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
sceneName: '场景名称',
|
||||
retryStatus: '重试状态',
|
||||
taskType: '任务类型',
|
||||
@ -740,7 +740,7 @@ const local: App.I18n.Schema = {
|
||||
bizNo: '业务编号',
|
||||
createDt: '创建时间',
|
||||
form: {
|
||||
groupName: '请输入组名称',
|
||||
groupName: '请输入网站名称',
|
||||
idempotentId: '请输入幂等id',
|
||||
sceneName: '请输入场景名称',
|
||||
bizNo: '请输入业务编号',
|
||||
@ -752,7 +752,7 @@ const local: App.I18n.Schema = {
|
||||
workflow: {
|
||||
title: '工作流列表',
|
||||
workflowName: '工作流名称',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
nextTriggerAt: '触发时间',
|
||||
workflowStatus: '状态',
|
||||
triggerType: '触发类型',
|
||||
@ -761,7 +761,7 @@ const local: App.I18n.Schema = {
|
||||
updateDt: '更新时间',
|
||||
form: {
|
||||
workflowName: '请输入工作流名称',
|
||||
groupName: '请输入组名称',
|
||||
groupName: '请输入网站名称',
|
||||
workflowStatus: '请输入状态'
|
||||
},
|
||||
addWorkflow: '新增工作流',
|
||||
@ -770,7 +770,7 @@ const local: App.I18n.Schema = {
|
||||
workflowBatch: {
|
||||
title: '工作流批次列表',
|
||||
workflowName: '工作流名称',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
executionAt: '执行时间',
|
||||
taskBatchStatus: '状态',
|
||||
operationReason: '操作原因',
|
||||
@ -778,14 +778,14 @@ const local: App.I18n.Schema = {
|
||||
form: {
|
||||
workflowName: '请输入工作流名称',
|
||||
taskBatchStatus: '请输入状态',
|
||||
groupName: '请输入组名称'
|
||||
groupName: '请输入网站名称'
|
||||
},
|
||||
addWorkflowBatch: '新增工作流批次',
|
||||
editWorkflowBatch: '编辑工作流批次'
|
||||
},
|
||||
jobTask: {
|
||||
title: '定时任务列表',
|
||||
groupName: '组名称',
|
||||
title: '数采任务列表',
|
||||
groupName: '网站名称',
|
||||
ownerName: '负责人',
|
||||
jobName: '任务名称',
|
||||
argsStr: '方法参数',
|
||||
@ -793,6 +793,7 @@ const local: App.I18n.Schema = {
|
||||
argsType: '参数类型',
|
||||
nextTriggerAt: '触发时间',
|
||||
jobStatus: '状态',
|
||||
isImportant: '是否重要',
|
||||
routeKey: '路由策略',
|
||||
executorType: '执行器类型',
|
||||
executorInfo: '执行器名称',
|
||||
@ -828,22 +829,22 @@ const local: App.I18n.Schema = {
|
||||
argsType: '请输入参数类型',
|
||||
argsStr: '请输入方法参数',
|
||||
shardNum: '请输入 reduce 分片数',
|
||||
groupName: '请输入组名称',
|
||||
groupName: '请输入网站名称',
|
||||
retryInterval: '请输入重试间隔',
|
||||
notifyId: '请输入选择告警配置'
|
||||
},
|
||||
addJobTask: '新增定时任务',
|
||||
editJobTask: '编辑定时任务',
|
||||
addJobTask: '新增数采任务',
|
||||
editJobTask: '编辑数采任务',
|
||||
triggerTypeItem: {
|
||||
fixed: '固定时间',
|
||||
cron: 'CRON表达式',
|
||||
workflow: '工作流'
|
||||
},
|
||||
detail: '定时任务详情'
|
||||
detail: '数采任务详情'
|
||||
},
|
||||
jobBatch: {
|
||||
title: '任务批次列表',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
jobName: '任务名称',
|
||||
taskType: '任务类型',
|
||||
executorInfo: '执行器名称',
|
||||
@ -853,7 +854,7 @@ const local: App.I18n.Schema = {
|
||||
taskBatchStatus: '状态',
|
||||
operationReason: '操作原因',
|
||||
form: {
|
||||
groupName: '请输入组名称',
|
||||
groupName: '请输入网站名称',
|
||||
jobName: '请输入任务名称',
|
||||
taskBatchStatus: '请输入状态'
|
||||
},
|
||||
@ -861,7 +862,7 @@ const local: App.I18n.Schema = {
|
||||
jobTask: {
|
||||
title: 'JobTask 列表',
|
||||
id: 'ID',
|
||||
groupName: '组名称',
|
||||
groupName: '网站名称',
|
||||
taskStatus: '状态',
|
||||
clientInfo: '地址',
|
||||
argsStr: '参数',
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { getRgb } from '@sa/color';
|
||||
import { $t } from '@/locales';
|
||||
import { localStg } from '@/utils/storage';
|
||||
import systemLogo from '@/assets/svg-icon/logo.svg?raw';
|
||||
import systemLogo from '@/assets/svg-icon/logo1.svg?raw';
|
||||
|
||||
export function setupLoading() {
|
||||
const themeColor = localStg.get('themeColor') || '#1366FF';
|
||||
|
@ -45,9 +45,7 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
component: 'layout.base$view.about',
|
||||
meta: {
|
||||
title: 'about',
|
||||
i18nKey: 'route.about',
|
||||
order: 999,
|
||||
icon: 'material-symbols:help-outline-rounded'
|
||||
i18nKey: 'route.about'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -13,21 +13,21 @@ const customRoutes: CustomRoute[] = [];
|
||||
/** create routes when the auth route mode is static */
|
||||
export function createStaticRoutes() {
|
||||
const constantRoutes: ElegantRoute[] = [
|
||||
{
|
||||
name: 'document',
|
||||
path: '/document',
|
||||
component: 'layout.base$view.iframe-page',
|
||||
props: {
|
||||
url: 'https://snailjob.opensnail.com/'
|
||||
},
|
||||
meta: {
|
||||
title: 'document',
|
||||
i18nKey: 'route.document',
|
||||
order: 1000,
|
||||
icon: 'mdi:file-document-multiple-outline',
|
||||
href: 'https://snailjob.opensnail.com/'
|
||||
}
|
||||
}
|
||||
// {
|
||||
// name: 'document',
|
||||
// path: '/document',
|
||||
// component: 'layout.base$view.iframe-page',
|
||||
// props: {
|
||||
// url: 'https://snailjob.opensnail.com/'
|
||||
// },
|
||||
// meta: {
|
||||
// title: 'document',
|
||||
// i18nKey: 'route.document',
|
||||
// order: 1000,
|
||||
// icon: 'mdi:file-document-multiple-outline',
|
||||
// href: 'https://snailjob.opensnail.com/'
|
||||
// }
|
||||
// }
|
||||
];
|
||||
|
||||
const authRoutes: ElegantRoute[] = [];
|
||||
|
@ -71,6 +71,16 @@ export function fetchUpdateJobStatus(data: Api.Job.JobUpdateJobStatusRequestVO)
|
||||
});
|
||||
}
|
||||
|
||||
/** edit Job fetchUpdateIsImportant */
|
||||
export function fetchUpdateIsImportant(data: Api.Job.JobUpdateIsImportantRequestVO) {
|
||||
return request<boolean>({
|
||||
url: '/job/important',
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** batch delete Job by id */
|
||||
export function fetchBatchDeleteJob(data: string[]) {
|
||||
return request<boolean>({
|
||||
|
@ -73,7 +73,7 @@ export const themeSettings: App.Theme.ThemeSetting = {
|
||||
},
|
||||
watermark: {
|
||||
visible: false,
|
||||
text: 'Snail Job'
|
||||
text: '数采任务调度系统'
|
||||
}
|
||||
};
|
||||
|
||||
|
34
src/typings/api.d.ts
vendored
@ -319,7 +319,7 @@ declare namespace Api {
|
||||
createDt: string;
|
||||
/** ext attrs */
|
||||
extAttrs: string;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** host id */
|
||||
hostId: string;
|
||||
@ -574,7 +574,7 @@ declare namespace Api {
|
||||
|
||||
/** notify-config */
|
||||
type NotifyConfig = Common.CommonRecord<{
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string | null;
|
||||
/** 通知人id */
|
||||
recipientIds: number[];
|
||||
@ -701,7 +701,7 @@ declare namespace Api {
|
||||
id?: number;
|
||||
/** UniqueId */
|
||||
uniqueId?: string;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName?: string;
|
||||
/** 场景名称 * */
|
||||
sceneName?: string;
|
||||
@ -753,7 +753,7 @@ declare namespace Api {
|
||||
type RetryTask = Common.CommonRecord<{
|
||||
/** UniqueId */
|
||||
uniqueId?: string;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 场景名称 */
|
||||
sceneName: string;
|
||||
@ -778,7 +778,7 @@ declare namespace Api {
|
||||
}>;
|
||||
|
||||
type RetryTaskBatchAdd = {
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 重试状态 0、重试中 1、重试完成 2、最大次数 3、暂停 */
|
||||
retryStatus: RetryStatusType;
|
||||
@ -789,7 +789,7 @@ declare namespace Api {
|
||||
type RetryTaskUpdateStatusRequest = {
|
||||
/** id */
|
||||
id: number;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 重试状态 0、重试中 1、重试完成 2、最大次数 3、暂停 */
|
||||
retryStatus: RetryStatusType;
|
||||
@ -806,7 +806,7 @@ declare namespace Api {
|
||||
};
|
||||
|
||||
type GenerateRetryIdempotentIdVO = {
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 场景名称 */
|
||||
sceneName: string;
|
||||
@ -904,7 +904,7 @@ declare namespace Api {
|
||||
type Workflow = Common.CommonRecord<{
|
||||
/** 工作流名称 */
|
||||
workflowName: string;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 触发时间 */
|
||||
nextTriggerAt: string;
|
||||
@ -963,12 +963,14 @@ declare namespace Api {
|
||||
|
||||
/** Job */
|
||||
type Job = Common.CommonRecord<{
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 负责人id */
|
||||
ownerId: string;
|
||||
/** 负责人名 */
|
||||
ownerName: string;
|
||||
// 是否重要
|
||||
isImportant: number;
|
||||
/** 通知场景ids */
|
||||
notifyIds: number[];
|
||||
/** 任务名称 */
|
||||
@ -1049,6 +1051,12 @@ declare namespace Api {
|
||||
jobStatus: Common.EnableStatusNumber;
|
||||
};
|
||||
|
||||
type JobUpdateIsImportantRequestVO = {
|
||||
id: string;
|
||||
isImportant: Common.EnableStatusNumber;
|
||||
};
|
||||
|
||||
|
||||
/** JobTask list */
|
||||
type JobList = Common.PaginatingQueryRecord<Job>;
|
||||
|
||||
@ -1072,7 +1080,7 @@ declare namespace Api {
|
||||
id: string;
|
||||
/** 任务 ID */
|
||||
jobId: string;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 任务名称 */
|
||||
taskName: string;
|
||||
@ -1130,7 +1138,7 @@ declare namespace Api {
|
||||
|
||||
/** JobBatch */
|
||||
type JobBatch = Common.CommonRecord<{
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 任务名称 */
|
||||
jobName: string;
|
||||
@ -1186,7 +1194,7 @@ declare namespace Api {
|
||||
workflowName: string;
|
||||
/** 工作流ID */
|
||||
workflowId?: number;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 执行时间 */
|
||||
executionAt: string;
|
||||
@ -1222,7 +1230,7 @@ declare namespace Api {
|
||||
type RetryLog = Common.CommonRecord<{
|
||||
/** UniqueId */
|
||||
uniqueId: string;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName: string;
|
||||
/** 场景名称 */
|
||||
sceneName: string;
|
||||
|
1
src/typings/app.d.ts
vendored
@ -989,6 +989,7 @@ declare namespace App {
|
||||
ownerName: string;
|
||||
jobName: string;
|
||||
argsStr: string;
|
||||
isImportant: string;
|
||||
shardNum: string;
|
||||
argsType: string;
|
||||
nextTriggerAt: string;
|
||||
|
10
src/typings/workflow.d.ts
vendored
@ -5,7 +5,7 @@ declare namespace Workflow {
|
||||
id?: string;
|
||||
/** 工作流名称 */
|
||||
workflowName?: string;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName?: string;
|
||||
/** 告警通知场景ids */
|
||||
notifyIds?: number[];
|
||||
@ -123,11 +123,11 @@ declare namespace Workflow {
|
||||
icon: string;
|
||||
};
|
||||
|
||||
/** 定时任务详情 */
|
||||
/** 数采任务详情 */
|
||||
export type JobTaskType = {
|
||||
/** 定时任务 ID */
|
||||
/** 数采任务 ID */
|
||||
id?: string;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName?: string;
|
||||
/** 任务信息 ID */
|
||||
jobId?: string;
|
||||
@ -163,7 +163,7 @@ declare namespace Workflow {
|
||||
id?: string;
|
||||
/** 任务 ID */
|
||||
jobId?: string;
|
||||
/** 组名称 */
|
||||
/** 网站名称 */
|
||||
groupName?: string;
|
||||
/** 地址 */
|
||||
clientInfo?: string;
|
||||
|
@ -96,26 +96,6 @@ const href = (url: string) => {
|
||||
<component :is="activeModule.component" />
|
||||
</Transition>
|
||||
</div>
|
||||
<div class="pt-12px text-center">
|
||||
<ButtonIcon
|
||||
tooltip-content="Mail"
|
||||
class="color-#272636 dark:color-#f0f2f5"
|
||||
icon="simple-icons:maildotru"
|
||||
@click="href('mailto:598092184@qq.com')"
|
||||
/>
|
||||
<ButtonIcon
|
||||
class="color-#c71d23"
|
||||
tooltip-content="Gitee"
|
||||
icon="simple-icons:gitee"
|
||||
@click="href('https://gitee.com/aizuda/snail-job')"
|
||||
/>
|
||||
<ButtonIcon
|
||||
tooltip-content="Github"
|
||||
class="color-#010409 dark:color-#e6edf3"
|
||||
icon="simple-icons:github"
|
||||
@click="href('https://github.com/aizuda/snail-job')"
|
||||
/>
|
||||
</div>
|
||||
<GlobalFooter />
|
||||
</main>
|
||||
</div>
|
||||
|
@ -55,6 +55,15 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
);
|
||||
}
|
||||
},
|
||||
// {
|
||||
// key: 'type',
|
||||
// title: '分类',
|
||||
// align: 'center',
|
||||
// width: 200,
|
||||
// render: () => {
|
||||
// return <p>政府部门/美国军方/美国海军</p>;
|
||||
// }
|
||||
// },
|
||||
{
|
||||
key: 'groupStatus',
|
||||
title: $t('page.groupConfig.groupStatus'),
|
||||
|
@ -21,7 +21,7 @@ const noSearchFlag = ref(false);
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
/** 定时任务列表 */
|
||||
/** 数采任务列表 */
|
||||
const jobList = ref<Api.Job.Job[]>([]);
|
||||
|
||||
const model = defineModel<Api.JobBatch.JobBatchSearchParams>('model', { required: true });
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { NButton, NDropdown, NPopconfirm, NTag } from 'naive-ui';
|
||||
import { useBoolean } from '@sa/hooks';
|
||||
import { ref } from 'vue';
|
||||
import { fetchBatchDeleteJob, fetchGetJobPage, fetchUpdateJobStatus } from '@/service/api';
|
||||
import {fetchBatchDeleteJob, fetchGetJobPage, fetchUpdateIsImportant, fetchUpdateJobStatus} from '@/service/api';
|
||||
import { $t } from '@/locales';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useTable, useTableOperate } from '@/hooks/common/table';
|
||||
@ -112,6 +112,25 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
||||
return <StatusSwitch v-model:value={row.jobStatus} onSubmitted={fetchFn} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'isImportant',
|
||||
title: $t('page.jobTask.isImportant'),
|
||||
align: 'center',
|
||||
width: 60,
|
||||
render: row => {
|
||||
const fetchFn = async (isImportant: Api.Common.EnableStatusNumber, callback: (flag: boolean) => void) => {
|
||||
const { error } = await fetchUpdateIsImportant({ id: row.id!, isImportant });
|
||||
if (!error) {
|
||||
row.isImportant = isImportant;
|
||||
window.$message?.success($t('common.updateSuccess'));
|
||||
}
|
||||
callback(!error);
|
||||
};
|
||||
|
||||
return <StatusSwitch v-model:value={row.isImportant} onSubmitted={fetchFn} />;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
key: 'taskType',
|
||||
title: $t('page.jobTask.taskType'),
|
||||
|
@ -4,7 +4,7 @@ import { type FormInst, NInputNumber } from 'naive-ui';
|
||||
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
||||
import OperateDrawer from '@/components/common/operate-drawer.vue';
|
||||
import { $t } from '@/locales';
|
||||
import { enableStatusNumberOptions } from '@/constants/business';
|
||||
import { enableStatusNumberOptions, isImportantOptions } from '@/constants/business';
|
||||
import { fetchAddJob, fetchEditJob, fetchGetNotifyConfigSystemTaskTypeList } from '@/service/api';
|
||||
import RouteKey from '@/components/common/route-key.vue';
|
||||
import BlockStrategy from '@/components/common/block-strategy.vue';
|
||||
@ -63,6 +63,7 @@ type Model = Pick<
|
||||
| 'groupName'
|
||||
| 'ownerId'
|
||||
| 'ownerName'
|
||||
| 'isImportant'
|
||||
| 'notifyIds'
|
||||
| 'jobName'
|
||||
| 'argsStr'
|
||||
@ -97,6 +98,7 @@ function createDefaultModel(): Model {
|
||||
// @ts-expect-error owerId is required
|
||||
ownerId: undefined,
|
||||
notifyIds: [],
|
||||
isImportant: 0,
|
||||
jobName: '',
|
||||
argsStr: '',
|
||||
argsType: 1,
|
||||
@ -283,7 +285,8 @@ async function handleSubmit() {
|
||||
retryInterval,
|
||||
taskType,
|
||||
parallelNum,
|
||||
description
|
||||
description,
|
||||
isImportant
|
||||
} = model;
|
||||
|
||||
let argsStr = taskType === 5 ? JSON.stringify({ shardNum: shardNum.value, argsStr: model.argsStr }) : model.argsStr;
|
||||
@ -305,6 +308,7 @@ async function handleSubmit() {
|
||||
groupName,
|
||||
ownerId,
|
||||
ownerName,
|
||||
isImportant,
|
||||
notifyIds,
|
||||
jobName,
|
||||
argsStr,
|
||||
@ -333,6 +337,7 @@ async function handleSubmit() {
|
||||
groupName,
|
||||
ownerId,
|
||||
ownerName,
|
||||
isImportant,
|
||||
notifyIds,
|
||||
jobName,
|
||||
argsStr,
|
||||
@ -481,6 +486,13 @@ const scriptMethodOptions = [
|
||||
</NSpace>
|
||||
</NRadioGroup>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.jobTask.isImportant')" path="isImportant">
|
||||
<NRadioGroup v-model:value="model.isImportant" name="isImportant">
|
||||
<NSpace>
|
||||
<NRadio v-for="item in isImportantOptions" :key="item.value" :value="item.value" :label="$t(item.label)" />
|
||||
</NSpace>
|
||||
</NRadioGroup>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.jobTask.taskType')" path="taskType">
|
||||
<TaskType v-model:value="model.taskType" :placeholder="$t('page.jobTask.form.taskType')" />
|
||||
</NFormItem>
|
||||
|