From 7710c3cac325fc8705b28990e34c20a5840f5f15 Mon Sep 17 00:00:00 2001 From: opensnail <598092184@qq.com> Date: Thu, 23 May 2024 15:26:30 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat(sj=5F1.0.0):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81id=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/batch/index.vue | 7 +------ src/views/workflow/task/index.vue | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/views/workflow/batch/index.vue b/src/views/workflow/batch/index.vue index 2379da3..01e7188 100644 --- a/src/views/workflow/batch/index.vue +++ b/src/views/workflow/batch/index.vue @@ -28,13 +28,8 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP taskBatchStatus: null }, columns: () => [ - // { - // type: 'selection', - // align: 'center', - // width: 48 - // }, { - key: 'index', + key: 'id', title: $t('common.index'), align: 'center', width: 120 diff --git a/src/views/workflow/task/index.vue b/src/views/workflow/task/index.vue index 1b63625..6c23fb9 100644 --- a/src/views/workflow/task/index.vue +++ b/src/views/workflow/task/index.vue @@ -38,7 +38,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP // width: 48 // }, { - key: 'index', + key: 'id', title: $t('common.index'), align: 'center', width: 120 From a5b4a498bf13533ca8d68ebfaab7855024ad9869 Mon Sep 17 00:00:00 2001 From: xlsea Date: Thu, 23 May 2024 15:52:04 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E6=8E=A5=E5=8F=A3=E8=B0=83=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/lib/assets/{index-QMlLtH5y.js => index-Z7Fd-PmT.js} | 2 +- public/lib/index.html | 3 +-- src/utils/service.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) rename public/lib/assets/{index-QMlLtH5y.js => index-Z7Fd-PmT.js} (99%) diff --git a/public/lib/assets/index-QMlLtH5y.js b/public/lib/assets/index-Z7Fd-PmT.js similarity index 99% rename from public/lib/assets/index-QMlLtH5y.js rename to public/lib/assets/index-Z7Fd-PmT.js index 37c40f4..47c5289 100644 --- a/public/lib/assets/index-QMlLtH5y.js +++ b/public/lib/assets/index-Z7Fd-PmT.js @@ -1,4 +1,4 @@ -import{d as e,l as t,Y as a,Z as n,u as l,f as o,w as i,o as s,j as u,_ as d,k as r,$ as c,a0 as p,F as g,a1 as m,a2 as v,a3 as f,a4 as y,a5 as h,a6 as b,n as C,a7 as k,a8 as _,a9 as w,G as N,O as x,aa as S,B as V,ab as T,r as I,c as O,S as E}from"./vue--_kkPoVD.js";import{d as U,s as j,c as M,a as $}from"./pinia-_F_MrjSh.js";import{m as R,W as D,C as P,a as A,b as L,S as B,M as F,I as Y,L as z,_ as W,c as q,d as K,R as J,D as G,e as H,f as X,g as Z,B as Q,h as ee,i as te,j as ae,T as ne,k as le,P as oe,U as ie,l as se,n as ue,o as de,p as re,q as ce,r as pe,s as ge,t as me,u as ve,F as fe,v as ye,w as he,x as be,y as Ce,z as ke,A as _e,E as we,G as Ne,H as xe,J as Se,K as Ve,N as Te,O as Ie,Q as Oe,V as Ee,X as Ue,Y as je,Z as Me,$ as $e}from"./antdv-3leNc9CG.js";import{C as Re,j as De,o as Pe}from"./codemirror-tLd6xVyG.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const a of e)if("childList"===a.type)for(const e of a.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const Ae=U("main",{state:()=>({id:"",type:0,mode:"development",token:"",nameSpaceId:"",groupName:"",jobList:[]}),persist:!0,getters:{ID:e=>e.id,TYPE:e=>e.type,TOKEN:e=>e.token,NAME_SPACE_ID:e=>e.nameSpaceId,GROUP_NAME:e=>e.groupName,JOB_LIST:e=>e.jobList},actions:{clear(){this.id="",this.type=0,this.mode="development",this.token="",this.nameSpaceId="",this.groupName="",this.jobList=[]},setId(e){this.id=e},setType(e){this.type=e},setMode(e){this.mode=e},setToken(e){e&&(this.token=e.replace(/"|\\/g,""))},setNameSpaceId(e){e&&(this.nameSpaceId=e.replace(/"|\\/g,""))},setGroupName(e){this.groupName=e},setJobList(e){this.jobList=e}}}),Le=(e,t="get",a,n)=>{const l=Ae(),{token:o,nameSpaceId:i,mode:s}=j(l);return new Promise(((l,u)=>{fetch(("production"===s.value?"/snail-job":"/proxy-default")+e,{signal:n,method:t,headers:{"Content-Type":"application/json","Snail-Job-Auth":o.value,"Snail-Job-Namespace-Id":i.value},body:a?JSON.stringify(a):null}).then((e=>e.json())).then((e=>{1===e.status?(e.page&&l(e),l(e.data)):(R.error(e.message||"未知错误,请联系管理员"),u())})).catch((()=>{u()}))}))}; +import{d as e,l as t,Y as a,Z as n,u as l,f as o,w as i,o as s,j as u,_ as d,k as r,$ as c,a0 as p,F as g,a1 as m,a2 as v,a3 as f,a4 as y,a5 as h,a6 as b,n as C,a7 as k,a8 as _,a9 as w,G as N,O as x,aa as S,B as V,ab as T,r as I,c as O,S as E}from"./vue--_kkPoVD.js";import{d as U,s as j,c as M,a as $}from"./pinia-_F_MrjSh.js";import{m as R,W as D,C as P,a as A,b as L,S as B,M as F,I as Y,L as z,_ as W,c as q,d as K,R as J,D as G,e as H,f as X,g as Z,B as Q,h as ee,i as te,j as ae,T as ne,k as le,P as oe,U as ie,l as se,n as ue,o as de,p as re,q as ce,r as pe,s as ge,t as me,u as ve,F as fe,v as ye,w as he,x as be,y as Ce,z as ke,A as _e,E as we,G as Ne,H as xe,J as Se,K as Ve,N as Te,O as Ie,Q as Oe,V as Ee,X as Ue,Y as je,Z as Me,$ as $e}from"./antdv-3leNc9CG.js";import{C as Re,j as De,o as Pe}from"./codemirror-tLd6xVyG.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const a of e)if("childList"===a.type)for(const e of a.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const Ae=U("main",{state:()=>({id:"",type:0,mode:"development",token:"",nameSpaceId:"",groupName:"",jobList:[]}),persist:!0,getters:{ID:e=>e.id,TYPE:e=>e.type,TOKEN:e=>e.token,NAME_SPACE_ID:e=>e.nameSpaceId,GROUP_NAME:e=>e.groupName,JOB_LIST:e=>e.jobList},actions:{clear(){this.id="",this.type=0,this.mode="development",this.token="",this.nameSpaceId="",this.groupName="",this.jobList=[]},setId(e){this.id=e},setType(e){this.type=e},setMode(e){this.mode=e},setToken(e){e&&(this.token=e.replace(/"|\\/g,""))},setNameSpaceId(e){e&&(this.nameSpaceId=e.replace(/"|\\/g,""))},setGroupName(e){this.groupName=e},setJobList(e){this.jobList=e}}}),Le=(e,t="get",a,n)=>{const l=Ae(),{token:o,nameSpaceId:i}=j(l);return new Promise(((l,s)=>{fetch("/snail-job"+e,{signal:n,method:t,headers:{"Content-Type":"application/json","Snail-Job-Auth":o.value,"Snail-Job-Namespace-Id":i.value},body:a?JSON.stringify(a):null}).then((e=>e.json())).then((e=>{1===e.status?(e.page&&l(e),l(e.data)):(R.error(e.message||"未知错误,请联系管理员"),s())})).catch((()=>{s()}))}))}; /*! * is-plain-object * diff --git a/public/lib/index.html b/public/lib/index.html index dcb7ffb..028040d 100644 --- a/public/lib/index.html +++ b/public/lib/index.html @@ -5,7 +5,7 @@ Easy Retry - + @@ -15,7 +15,6 @@
- diff --git a/src/utils/service.ts b/src/utils/service.ts index 5ae09fb..7408448 100644 --- a/src/utils/service.ts +++ b/src/utils/service.ts @@ -66,7 +66,7 @@ export function getServiceBaseURL(env: Env.ImportMeta, isProxy: boolean) { */ function createProxyPattern(key?: App.Service.OtherBaseURLKey) { if (!key) { - return '/proxy-default'; + return '/snail-job'; } return `/proxy-${key}`; From 5232221c7bc9977bf64f211b9e91e7675a41b646 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 23 May 2024 16:07:13 +0800 Subject: [PATCH 3/7] =?UTF-8?q?refactor:=20JobTriggerInterval=E8=83=BD?= =?UTF-8?q?=E5=A4=9F=E6=BB=A1=E8=B6=B3=E8=A7=A6=E5=8F=91=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=EF=BC=8C=E6=97=A0=E9=9C=80=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?TriggerType@update?= 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 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 65b1c19..82b34cd 100644 --- a/src/views/job/task/modules/job-task-operate-drawer.vue +++ b/src/views/job/task/modules/job-task-operate-drawer.vue @@ -351,11 +351,7 @@ watch(visible, () => { - + From e6c9d21a4111141ed5e95ea2c74ae503478ca5ee Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 23 May 2024 22:39:43 +0800 Subject: [PATCH 4/7] =?UTF-8?q?feat:=20=E7=BB=84=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 ++++ src/views/group/modules/group-operate-drawer.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.env b/.env index e1dbf3f..1ba6444 100644 --- a/.env +++ b/.env @@ -4,6 +4,8 @@ VITE_APP_DESC=A flexible, reliable, and fast platform for distributed task retry VITE_APP_VERSION=1.0.0-beta2 +VITE_APP_DEFAULT_TOKEN=SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj + # the prefix of the icon name VITE_ICON_PREFIX=icon @@ -46,3 +48,5 @@ VITE_SOURCE_MAP=N # Used to differentiate storage across different domains VITE_STORAGE_PREFIX= + + diff --git a/src/views/group/modules/group-operate-drawer.vue b/src/views/group/modules/group-operate-drawer.vue index 56fff7c..80c8654 100644 --- a/src/views/group/modules/group-operate-drawer.vue +++ b/src/views/group/modules/group-operate-drawer.vue @@ -52,7 +52,7 @@ const model: Model = reactive(createDefaultModel()); function createDefaultModel(): Model { return { groupName: '', - token: generateToken(32), + token: import.meta.env.VITE_APP_DEFAULT_TOKEN || '', groupStatus: 1, description: '', idGeneratorMode: 2, From f7e1fc5417a44c67ffdc86222221c0b5218955ca Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 23 May 2024 22:45:31 +0800 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20=E7=99=BB=E5=BD=95=E7=95=8C?= =?UTF-8?q?=E9=9D=A2devMode=E6=89=8D=E6=9C=89=E9=BB=98=E8=AE=A4=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/_builtin/login/modules/pwd-login.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/_builtin/login/modules/pwd-login.vue b/src/views/_builtin/login/modules/pwd-login.vue index 22b77f2..144f2bc 100644 --- a/src/views/_builtin/login/modules/pwd-login.vue +++ b/src/views/_builtin/login/modules/pwd-login.vue @@ -9,6 +9,8 @@ defineOptions({ name: 'PwdLogin' }); +const devMode = import.meta.env.DEV; + const authStore = useAuthStore(); const { formRef, validate } = useNaiveForm(); const { defaultRequiredRule } = useFormRules(); @@ -19,8 +21,8 @@ interface FormModel { } const model: FormModel = reactive({ - userName: 'admin', - password: 'admin' + userName: devMode ? 'admin' : '', + password: devMode ? 'admin' : '' }); type RuleKey = Extract; From 649a896fadf897efaad2a3705eb886aa9a362f31 Mon Sep 17 00:00:00 2001 From: xlsea Date: Fri, 24 May 2024 13:18:27 +0800 Subject: [PATCH 6/7] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E6=8A=98?= =?UTF-8?q?=E5=8F=A0=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/task/index.vue | 64 ++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/src/views/workflow/task/index.vue b/src/views/workflow/task/index.vue index 6c23fb9..53f83b9 100644 --- a/src/views/workflow/task/index.vue +++ b/src/views/workflow/task/index.vue @@ -1,5 +1,5 @@