diff --git a/agent/scheduler.go b/agent/scheduler.go
index e7e0188..7d598e0 100644
--- a/agent/scheduler.go
+++ b/agent/scheduler.go
@@ -460,14 +460,17 @@ func (a *client) TryStartTask(plan common.TaskSchedulePlan) error {
})
return err
}, retry.RetryIf(func(err error) bool {
- if gerr, _ := status.FromError(err); gerr.Code() != codes.Aborted {
- a.logger.Debug("task aborted", zap.String("task_id", plan.Task.TaskID), zap.Int64("project_id", plan.Task.ProjectID),
- zap.String("tmp_id", plan.TmpID), zap.Error(err))
+ if gerr, _ := status.FromError(err); gerr.Code() == codes.Aborted || gerr.Code() == codes.Unauthenticated {
return false
}
return true
}), retry.Attempts(3), retry.DelayType(retry.BackOffDelay),
retry.MaxJitter(time.Second*30), retry.LastErrorOnly(true)); err != nil {
+ if gerr, _ := status.FromError(err); gerr.Code() == codes.Aborted {
+ a.logger.Debug("task aborted", zap.String("task_id", plan.Task.TaskID), zap.Int64("project_id", plan.Task.ProjectID),
+ zap.String("tmp_id", plan.TmpID), zap.Error(err))
+ return
+ }
taskExecuteInfo.CancelFunc()
a.metrics.SystemErrInc("agent_status_report_failure")
a.logger.Error(fmt.Sprintf("task: %s, id: %s, tmp_id: %s, change running status error, %v", plan.Task.Name,
@@ -708,9 +711,9 @@ func tryLockUntilCtxIsDone(cli cronpb.CenterClient, execInfo *common.TaskExecuti
safe.Run(func() {
// 任务执行后锁最少保持5s
// 防止分布式部署下多台机器共同执行
- // if time.Since(execInfo.RealTime).Seconds() < 5 {
- // time.Sleep(5*time.Second - time.Since(execInfo.RealTime))
- // }
+ if time.Since(execInfo.RealTime).Seconds() < 5 {
+ time.Sleep(5*time.Second - time.Since(execInfo.RealTime))
+ }
locker.Send(&cronpb.TryLockRequest{
ProjectId: execInfo.Task.ProjectID,
TaskId: execInfo.Task.TaskID,
diff --git a/cmd/service/rpc.go b/cmd/service/rpc.go
index 5699be9..764af39 100644
--- a/cmd/service/rpc.go
+++ b/cmd/service/rpc.go
@@ -409,9 +409,14 @@ Here:
return nil
}
+type registerInfo struct {
+ reqID string
+ info *cronpb.RegisterInfo
+}
+
// watchAgentResponse watch agent register request or event handle response
-func watchAgentResponse(ctx context.Context, receive func() (*cronpb.ClientEvent, error), callback func(*cronpb.ClientEvent)) <-chan *cronpb.RegisterInfo {
- newRegisterInfo := make(chan *cronpb.RegisterInfo)
+func watchAgentResponse(ctx context.Context, receive func() (*cronpb.ClientEvent, error), callback func(*cronpb.ClientEvent)) <-chan *registerInfo {
+ newRegisterInfo := make(chan *registerInfo)
go safe.Run(func() {
defer close(newRegisterInfo)
for {
@@ -425,7 +430,10 @@ func watchAgentResponse(ctx context.Context, receive func() (*cronpb.ClientEvent
}
if info.Type == cronpb.EventType_EVENT_REGISTER_REQUEST {
- newRegisterInfo <- info.GetRegisterInfo()
+ newRegisterInfo <- ®isterInfo{
+ reqID: info.Id,
+ info: info.GetRegisterInfo(),
+ }
} else {
callback(info)
}
@@ -527,15 +535,15 @@ func (s *cronRpc) buildAgentRegister(ctx context.Context) (registerFunc func(req
return registerFunc, deRegisterFunc
}
-type dispatcher func(meta infra.NodeMeta) app.JobDispatcher
+type dispatcher func(reqID string, meta infra.NodeMeta) app.JobDispatcher
func buildDispatchJobsV2Handler(sendEvent func(ctx context.Context, e *cronpb.ServiceEvent) error) dispatcher {
- return func(meta infra.NodeMeta) app.JobDispatcher {
+ return func(reqID string, meta infra.NodeMeta) app.JobDispatcher {
return func(taskRaw []byte) error {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*3)
defer cancel()
if err := sendEvent(ctx, &cronpb.ServiceEvent{
- Id: utils.GetStrID(),
+ Id: reqID,
Type: cronpb.EventType_EVENT_REGISTER_REPLY,
EventTime: time.Now().Unix(),
Event: &cronpb.ServiceEvent_RegisterReply{
@@ -599,7 +607,7 @@ func (s *cronRpc) RegisterAgentV2(req cronpb.Center_RegisterAgentV2Server) error
}
})
- // 注册成功后像agent下发任务的处理方法
+ // 注册成功后向agent下发任务的处理方法
dispatchHandler := buildDispatchJobsV2Handler(func(ctx context.Context, e *cronpb.ServiceEvent) error {
_, err := s.app.StreamManagerV2().SendEventWaitResponse(ctx, req, e)
return err
@@ -619,12 +627,12 @@ func (s *cronRpc) RegisterAgentV2(req cronpb.Center_RegisterAgentV2Server) error
return nil
}
// 将agent信息进行注册
- err := register(multiService, func(nm []infra.NodeMeta) error {
+ err := register(multiService.info, func(nm []infra.NodeMeta) error {
// 完成注册后将stream缓存至内存中,方便后续中心与agent通信时使用
for _, meta := range nm {
s.app.StreamManagerV2().SaveStream(meta, req, cancel)
// 下发对应项目的任务列表
- if err := s.app.DispatchAgentJob(meta.System, dispatchHandler(meta)); err != nil {
+ if err := s.app.DispatchAgentJob(meta.System, dispatchHandler(multiService.reqID, meta)); err != nil {
return err
}
}
diff --git a/dist/assets/Confirm.47315734.js b/dist/assets/Confirm.4116c3bd.js
similarity index 96%
rename from dist/assets/Confirm.47315734.js
rename to dist/assets/Confirm.4116c3bd.js
index 7fa628c..0e917ca 100644
--- a/dist/assets/Confirm.47315734.js
+++ b/dist/assets/Confirm.4116c3bd.js
@@ -1 +1 @@
-import{_ as m,k as C,l as p,r as v,o as g,c as b,w as a,a as o,Q as y,$ as k,b as h,t as V,D as w,x,C as B,h as s,i as Q,A as D,E as S,F as _}from"./index.d76e71bf.js";const A={class:"q-ml-sm"},L=C({props:{modelValue:{type:Boolean,default:!1},content:{type:String,default:""},confirmLabel:{type:String,default:"\u786E\u8BA4"},cancelLabel:{type:String,default:"\u53D6\u6D88"},type:{type:String,default:"confirm"},loading:{type:Boolean,default:!1}},emits:["update:modelValue","confirm","cancel"],setup(l,{emit:n}){const t=l,c=p({get:()=>t.modelValue,set:r=>n("update:modelValue",r)}),u=()=>{n("confirm")},d=()=>{n("cancel")},e=v({confirmColor:"",cancelColor:"",icon:"",iconColor:""});switch(t.type){case"warning":e.value.confirmColor="red",e.value.cancelColor="",e.value.icon="notifications_active",e.value.iconColor="red";break;default:e.value.confirmColor="primary",e.value.cancelColor="",e.value.icon="check",e.value.iconColor="primary";break}return(r,i)=>(g(),b(_,{modelValue:D(c),"onUpdate:modelValue":i[0]||(i[0]=f=>S(c)?c.value=f:null)},{default:a(()=>[o(Q,null,{default:a(()=>[o(y,{class:"row items-center"},{default:a(()=>[o(k,{icon:e.value.icon,color:e.value.iconColor,"text-color":e.value.iconColor==="primary"?"black":"white"},null,8,["icon","color","text-color"]),h("span",A,V(l.content),1)]),_:1}),o(w,{align:"right"},{default:a(()=>[x(o(s,{flat:"",label:l.cancelLabel,color:e.value.cancelColor,onClick:d},null,8,["label","color"]),[[B,!0]]),o(s,{flat:"",label:l.confirmLabel,color:e.value.confirmColor,loading:l.loading,onClick:u},null,8,["label","color","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});var F=m(L,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/Confirm.vue"]]);export{F as C};
+import{_ as m,k as C,l as p,r as v,o as g,c as b,w as a,a as o,Q as y,$ as k,b as h,t as V,D as w,x,C as B,h as s,i as Q,A as D,E as S,F as _}from"./index.f89dd3dd.js";const A={class:"q-ml-sm"},L=C({props:{modelValue:{type:Boolean,default:!1},content:{type:String,default:""},confirmLabel:{type:String,default:"\u786E\u8BA4"},cancelLabel:{type:String,default:"\u53D6\u6D88"},type:{type:String,default:"confirm"},loading:{type:Boolean,default:!1}},emits:["update:modelValue","confirm","cancel"],setup(l,{emit:n}){const t=l,c=p({get:()=>t.modelValue,set:r=>n("update:modelValue",r)}),u=()=>{n("confirm")},d=()=>{n("cancel")},e=v({confirmColor:"",cancelColor:"",icon:"",iconColor:""});switch(t.type){case"warning":e.value.confirmColor="red",e.value.cancelColor="",e.value.icon="notifications_active",e.value.iconColor="red";break;default:e.value.confirmColor="primary",e.value.cancelColor="",e.value.icon="check",e.value.iconColor="primary";break}return(r,i)=>(g(),b(_,{modelValue:D(c),"onUpdate:modelValue":i[0]||(i[0]=f=>S(c)?c.value=f:null)},{default:a(()=>[o(Q,null,{default:a(()=>[o(y,{class:"row items-center"},{default:a(()=>[o(k,{icon:e.value.icon,color:e.value.iconColor,"text-color":e.value.iconColor==="primary"?"black":"white"},null,8,["icon","color","text-color"]),h("span",A,V(l.content),1)]),_:1}),o(w,{align:"right"},{default:a(()=>[x(o(s,{flat:"",label:l.cancelLabel,color:e.value.cancelColor,onClick:d},null,8,["label","color"]),[[B,!0]]),o(s,{flat:"",label:l.confirmLabel,color:e.value.confirmColor,loading:l.loading,onClick:u},null,8,["label","color","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});var F=m(L,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/Confirm.vue"]]);export{F as C};
diff --git a/dist/assets/DummyContainer.53b75c50.js b/dist/assets/DummyContainer.2932fa1c.js
similarity index 76%
rename from dist/assets/DummyContainer.53b75c50.js
rename to dist/assets/DummyContainer.2932fa1c.js
index 52ec694..c21a790 100644
--- a/dist/assets/DummyContainer.53b75c50.js
+++ b/dist/assets/DummyContainer.2932fa1c.js
@@ -1 +1 @@
-import{_ as o,ag as r,c as n,o as t}from"./index.d76e71bf.js";const c={};function s(a,_){const e=r("router-view");return t(),n(e)}var u=o(c,[["render",s],["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/DummyContainer.vue"]]);export{u as default};
+import{_ as o,ag as r,c as n,o as t}from"./index.f89dd3dd.js";const c={};function s(a,_){const e=r("router-view");return t(),n(e)}var u=o(c,[["render",s],["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/DummyContainer.vue"]]);export{u as default};
diff --git a/dist/assets/HTTPStatus.a6c1441d.js b/dist/assets/HTTPStatus.da72d188.js
similarity index 90%
rename from dist/assets/HTTPStatus.a6c1441d.js
rename to dist/assets/HTTPStatus.da72d188.js
index df7f52a..7ff8135 100644
--- a/dist/assets/HTTPStatus.a6c1441d.js
+++ b/dist/assets/HTTPStatus.da72d188.js
@@ -1 +1 @@
-import{_ as d,k as _,K as t,a as s,q as c,p as n,d as a,o as e}from"./index.d76e71bf.js";const p={class:"tw-h-full tw-w-full tw-text-primary tw-grid tw-place-content-center tw-text-center tw-py-12"},l={key:0,class:"tw-font-bold tw-text-7xl tw-py-2"},u=a(" 403 Forbidden "),f={key:1,class:"tw-font-bold tw-text-7xl tw-py-2"},i=a(" 404 Not Found "),w=_({props:{code:{type:Number,default:404}},setup(r){const o=r;return(h,m)=>(e(),t("div",p,[o.code===403?(e(),t("h1",l,[u,s(c,{name:"do_not_touch"})])):n("v-if",!0),o.code===404?(e(),t("h1",f,[i,s(c,{name:"search_off"})])):n("v-if",!0)]))}});var y=d(w,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/HTTPStatus.vue"]]);export{y as default};
+import{_ as d,k as _,K as t,a as s,q as c,p as n,d as a,o as e}from"./index.f89dd3dd.js";const p={class:"tw-h-full tw-w-full tw-text-primary tw-grid tw-place-content-center tw-text-center tw-py-12"},l={key:0,class:"tw-font-bold tw-text-7xl tw-py-2"},u=a(" 403 Forbidden "),f={key:1,class:"tw-font-bold tw-text-7xl tw-py-2"},i=a(" 404 Not Found "),w=_({props:{code:{type:Number,default:404}},setup(r){const o=r;return(h,m)=>(e(),t("div",p,[o.code===403?(e(),t("h1",l,[u,s(c,{name:"do_not_touch"})])):n("v-if",!0),o.code===404?(e(),t("h1",f,[i,s(c,{name:"search_off"})])):n("v-if",!0)]))}});var y=d(w,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/HTTPStatus.vue"]]);export{y as default};
diff --git a/dist/assets/JSONViewer.6dded83c.js b/dist/assets/JSONViewer.177a839e.js
similarity index 91%
rename from dist/assets/JSONViewer.6dded83c.js
rename to dist/assets/JSONViewer.177a839e.js
index 1c6370a..d9e5032 100644
--- a/dist/assets/JSONViewer.6dded83c.js
+++ b/dist/assets/JSONViewer.177a839e.js
@@ -1 +1 @@
-import{_ as i,k as a,o as p,K as u}from"./index.d76e71bf.js";const c=["innerHTML"],_=a({props:{json:{type:String,default:"none"}},setup(r){const s=r;function l(e){try{return o(JSON.stringify(JSON.parse(e),null,2))}catch{return e}}function o(e){return e=e.replace(/&/g,"&").replace(//g,">"),e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\\-]?\d+)?)/g,function(n){let t="number";return/^"/.test(n)?/:$/.test(n)?t="key":t="string":/true|false/.test(n)?t="boolean":/null/.test(n)&&(t="null"),''+n+""})}return(e,n)=>(p(),u("pre",{innerHTML:l(s.json)},null,8,c))}});var g=i(_,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/JSONViewer.vue"]]);export{g as J};
+import{_ as i,k as a,o as p,K as u}from"./index.f89dd3dd.js";const c=["innerHTML"],_=a({props:{json:{type:String,default:"none"}},setup(r){const s=r;function l(e){try{return o(JSON.stringify(JSON.parse(e),null,2))}catch{return e}}function o(e){return e=e.replace(/&/g,"&").replace(//g,">"),e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\\-]?\d+)?)/g,function(n){let t="number";return/^"/.test(n)?/:$/.test(n)?t="key":t="string":/true|false/.test(n)?t="boolean":/null/.test(n)&&(t="null"),''+n+""})}return(e,n)=>(p(),u("pre",{innerHTML:l(s.json)},null,8,c))}});var g=i(_,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/JSONViewer.vue"]]);export{g as J};
diff --git a/dist/assets/LandingLayout.f500530e.js b/dist/assets/LandingLayout.0344366d.js
similarity index 99%
rename from dist/assets/LandingLayout.f500530e.js
rename to dist/assets/LandingLayout.0344366d.js
index d011b5a..a768383 100644
--- a/dist/assets/LandingLayout.f500530e.js
+++ b/dist/assets/LandingLayout.0344366d.js
@@ -1 +1 @@
-import{_ as Q,k as S,r as v,l as C,u as O,m as M,n as z,o as x,c as A,w as t,a as e,M as P,Q as $,K as B,f as I,x as N,C as T,h as k,A as u,i as H,E as j,F as G,H as q,S as g,T as c,b as p,ab as J,q as b,ac as K,ad as W,U as Y,a2 as X,d as y,t as F,z as Z,Y as ee,ae as te,J as ae,aa as se,af as oe,ag as le,ah as re,ai as ne,p as U,aj as ue,L as ie,ak as de,a4 as ce,al as me,W as fe,e as D,am as we,an as pe,ao as ge}from"./index.d76e71bf.js";const ve={key:0,class:"text-h6"},_e={key:1,class:"text-h6"},he=S({props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(_,{emit:w}){const d=_,f=v(!1),l=C({get:()=>d.modelValue,set:a=>w("update:modelValue",a)}),o=O(),s=v({title:"",remark:"",id:""}),m=v({title:"",remark:"",id:""}),r=C(()=>{const a=s.value,n=m.value;return(a==null?void 0:a.title.trim())===(n==null?void 0:n.title.trim())&&(a==null?void 0:a.remark.trim())===(n==null?void 0:n.remark.trim())}),V=C(()=>{const a=s.value;return(a==null?void 0:a.title.trim())!==""&&!r.value});M(()=>{z(()=>{l.value||(s.value=Object.assign({},m.value))})});async function h(){const a=s.value;if(!a){o.commit("error",{error:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u4FE1\u606F"});return}o.commit("cleanError"),f.value=!0,a.id!==""?await o.dispatch("updateOrg",{id:a.id,title:a.title.trim(),remark:a.remark.trim()}):await o.dispatch("createOrg",{title:a.title.trim(),remark:a.remark.trim()}),o.state.Root.currentError===void 0&&(l.value=!1),f.value=!1}return(a,n)=>(x(),A(G,{modelValue:u(l),"onUpdate:modelValue":n[2]||(n[2]=i=>j(l)?l.value=i:null),"no-backdrop-dismiss":!u(r)},{default:t(()=>[e(H,{class:"tw-w-96 q-pa-sm"},{default:t(()=>[e(P,{onSubmit:h},{default:t(()=>[e($,null,{default:t(()=>[s.value.id===""?(x(),B("div",ve,"\u521B\u5EFA\u7EC4\u7EC7")):(x(),B("div",_e,"\u7F16\u8F91\u7EC4\u7EC7"))]),_:1}),e($,null,{default:t(()=>[e(I,{modelValue:s.value.title,"onUpdate:modelValue":n[0]||(n[0]=i=>s.value.title=i),type:"text",label:"\u7EC4\u7EC7\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(I,{modelValue:s.value.remark,"onUpdate:modelValue":n[1]||(n[1]=i=>s.value.remark=i),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"])]),_:1}),e($,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:t(()=>[N(e(k,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[T,!0]]),e(k,{color:"primary","text-color":"black",type:"submit",label:s.value.id===""?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!u(V),class:"lg:tw-w-24 tw-w-full",loading:f.value},null,8,["label","disable","loading"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var be=Q(he,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogOrgForm.vue"]]);const xe={class:"text-center"},ye=S({props:{behavior:{type:String,default:"default"}},setup(_){const w=O(),d=v([]);async function f(s,m){var V;const r=[{label:"\u901A\u7528",value:"baseorg"}];(V=w.state.Root.userOrgs)==null||V.forEach((h,a,n)=>{h.id!=="baseorg"&&r.push({label:h.title,value:h.id})}),d.value=r,m(()=>{console.log("select done")})}f("",()=>{});const l=C({get:()=>w.state.Root.currentOrg,set:s=>{!s||(l.value?w.dispatch("switchOrg",s):w.commit("setCurrentOrg",s),localStorage.setItem("gc_choosed_org",s))}});M(()=>{if(!l.value){const s=q();l.value=s.params.orgId||"baseorg",w.commit("setCurrentOrg",l.value)}});const o=v(!1);return(s,m)=>(x(),B(ee,null,[e(be,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=r=>o.value=r)},null,8,["modelValue"]),e(u(Z),{ref:"search",modelValue:u(l),"onUpdate:modelValue":m[2]||(m[2]=r=>j(l)?l.value=r:null),dense:"",dark:"",color:"text-white",standout:"bg-white text-black","emit-value":"","map-options":"",label:"\u9009\u62E9\u7EC4\u7EC7",options:d.value,behavior:_.behavior,style:{width:"300px"},onFilter:f},{"no-option":t(()=>[e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[p("div",xe,[e(J,{color:"grey-5",size:"24px"})])]),_:1})]),_:1})]),append:t(()=>[e(b,{name:"add",onClick:m[1]||(m[1]=K(r=>o.value=!0,["stop","prevent"]))})]),option:t(r=>[e(g,W(r.itemProps,{class:"tw-text-white"}),{default:t(()=>[e(c,null,{default:t(()=>[e(Y,{innerHTML:r.opt.label},null,8,["innerHTML"])]),_:2},1024),e(c,{side:"",class:X({"default-type":!r.opt.type})},{default:t(()=>[e(k,{outline:"",dense:"","no-caps":"","text-color":"grey-5",size:"12px",class:"tw-bg-white q-px-sm"},{default:t(()=>[y(F(r.opt.type||"\u5207\u6362")+" ",1),e(b,{name:"subdirectory_arrow_left",size:"14px"})]),_:2},1024)]),_:2},1032,["class"])]),_:2},1040)]),_:1},8,["modelValue","options","behavior"])],64))}});var L=Q(ye,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/OrgSelect.vue"]]);const ke={class:"tw-flex tw-bg-primary tw-justify-start tw-space-x-2 tw-items-center tw-h-full tw-py-4 tw-px-3.5 tw-box-border tw-w-full tw-text-black tw-overflow-hidden"},Ee={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},Ce={class:"tw-text-xs tw-font-bold tw-rounded tw-leading-3 tw-text-white"},Fe={class:"q-item__section--main tw-flex tw-w-full tw-justify-between"},Ve={class:"tw-flex tw-flex-col tw-space-y-2 tw-overflow-hidden"},Be={class:"tw-text-base tw-leading-4 tw-whitespace-nowrap tw-overflow-hidden tw-overflow-ellipsis"},Qe={class:"tw-cursor-pointer tw-text-xs tw-leading-3"},Se=S({setup(_){const d=O().getters.currentUser,f=te(d.name),l=ae(),o=()=>{l.push({name:"user-profile"})};return(s,m)=>(x(),B("div",ke,[p("div",Ee,[p("p",Ce,F(u(f)),1)]),p("div",Fe,[p("div",Ve,[p("p",Be,F(u(d).name),1),p("p",Qe,F(u(d).account),1)]),e(k,{flat:"",dense:"",size:"md",icon:"more_horiz",round:"",onClick:o})])]))}});var Oe=Q(Se,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/UserBaseInfo.vue"]]);async function $e(){const _=await se.get("/version");return _.data.meta.code===0?_.data.response:""}const Ae=p("span",{class:"tw-text-lg tw-pl-2 tw-tracking-wide tw-font-bold tw-cursor-pointer"},"GopherCron",-1),Ie={key:0,class:"tw-text-sm"},Ue={class:"tw-hidden md:tw-flex"},De=p("svg",{fill:"#fff",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[p("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})],-1),Le=y("\u770B\u677F"),Me=y("\u9879\u76EE\u7BA1\u7406"),ze=y("\u4EFB\u52A1\u7F16\u6392"),Ne=y("\u7528\u6237\u7BA1\u7406"),je=y("\u8282\u70B9\u7BA1\u7406"),qe=y("\u9000\u51FA"),Re=S({setup(_){const w=oe(),d=v(!0);w.screen.lt.md&&(d.value=!1);const f=v(!0),l=v(!1),o=O(),s=q();z(()=>{if(!s.name)return;const n=["user-admin","node-admin"];l.value=n.includes(s.name.toString())});const m=C(()=>w.screen.lt.md?d.value:!f.value),r=v("");(async()=>{const n=await $e();r.value=n})();const h=C(()=>o.getters.notificationSetting);function a(){o.dispatch("changeNotificationStatus")}return(n,i)=>{const R=le("router-view");return x(),A(re,{view:"hHh Lpr lff",class:"rounded-borders tw-flex tw-flex-no-wrap tw-h-full tw-w-full"},{default:t(()=>[e(de,{class:"bg-black"},{default:t(()=>[e(ne,{class:"tw-gap-4"},{default:t(()=>[e(k,{flat:"",round:"",dense:"",icon:"menu",onClick:i[0]||(i[0]=E=>d.value=!d.value)}),Ae,r.value?(x(),B("span",Ie,"("+F(r.value)+")",1)):U("v-if",!0),p("div",Ue,[e(L)]),e(ue),e(k,{flat:"",round:"",dense:"",icon:u(h).status?"notifications":"notifications_off",onClick:a},{default:t(()=>[e(ie,null,{default:t(()=>[y(F(u(h).status?"\u70B9\u51FB\u5173\u95ED\u4EFB\u52A1\u72B6\u6001\u901A\u77E5":"\u70B9\u51FB\u5F00\u542F\u4EFB\u52A1\u72B6\u6001\u901A\u77E5"),1)]),_:1})]),_:1},8,["icon"]),e(k,{flat:"",round:"",dense:"",href:"https://github.com/holdno/gopherCron",target:"_blank"},{default:t(()=>[De]),_:1})]),_:1})]),_:1}),e(pe,{modelValue:d.value,"onUpdate:modelValue":i[2]||(i[2]=E=>d.value=E),mini:f.value,width:200,breakpoint:u(w).screen.sizes.md,onMouseover:i[3]||(i[3]=E=>f.value=!1),onMouseout:i[4]||(i[4]=E=>f.value=!0)},{default:t(()=>[e(ce,{style:{"margin-bottom":"80px",height:"calc(100% - 80px)"}},{default:t(()=>[e(me,{padding:""},{default:t(()=>[N(e(g,{class:"tw-flex md:tw-hidden"},{default:t(()=>[e(L,{behavior:"dialog"})]),_:1},512),[[fe,u(m)]]),e(g,{clickable:"",to:{name:"summary",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"timeline"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Le]),_:1})]),_:1},8,["to"]),e(g,{clickable:"",to:{name:"projects",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"view_list"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Me]),_:1})]),_:1},8,["to"]),e(g,{clickable:"",to:{name:"workflows",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"mediation"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[ze]),_:1})]),_:1},8,["to"]),e(D,{class:"tw-bg-stone-800"}),u(o).getters.isAdmin?(x(),A(we,{key:0,modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=E=>l.value=E),label:"\u7CFB\u7EDF\u7BA1\u7406","header-class":"tw-font-medium",icon:"admin_panel_settings"},{default:t(()=>[e(g,{clickable:"","inset-level":.2,to:{name:"user-admin",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"supervisor_account"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Ne]),_:1})]),_:1},8,["inset-level","to"]),e(g,{clickable:"","inset-level":.2,to:{name:"node-admin",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"dynamic_form"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[je]),_:1})]),_:1},8,["inset-level","to"])]),_:1},8,["modelValue"])):U("v-if",!0),e(D,{class:"tw-bg-stone-800"}),e(g,{clickable:"",to:{name:"logout"}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"logout"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[qe]),_:1})]),_:1})]),_:1})]),_:1}),e(Oe,{class:"tw-absolute tw-bottom-0 tw-left-0 tw-w-full",style:{height:"80px"}})]),_:1},8,["modelValue","mini","breakpoint"]),e(ge,{class:"tw-w-full tw-h-full tw-box-border"},{default:t(()=>[e(R)]),_:1})]),_:1})}}});var Te=Q(Re,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/LandingLayout.vue"]]);export{Te as default};
+import{_ as Q,k as S,r as v,l as C,u as O,m as M,n as z,o as x,c as A,w as t,a as e,M as P,Q as $,K as B,f as I,x as N,C as T,h as k,A as u,i as H,E as j,F as G,H as q,S as g,T as c,b as p,ab as J,q as b,ac as K,ad as W,U as Y,a2 as X,d as y,t as F,z as Z,Y as ee,ae as te,J as ae,aa as se,af as oe,ag as le,ah as re,ai as ne,p as U,aj as ue,L as ie,ak as de,a4 as ce,al as me,W as fe,e as D,am as we,an as pe,ao as ge}from"./index.f89dd3dd.js";const ve={key:0,class:"text-h6"},_e={key:1,class:"text-h6"},he=S({props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(_,{emit:w}){const d=_,f=v(!1),l=C({get:()=>d.modelValue,set:a=>w("update:modelValue",a)}),o=O(),s=v({title:"",remark:"",id:""}),m=v({title:"",remark:"",id:""}),r=C(()=>{const a=s.value,n=m.value;return(a==null?void 0:a.title.trim())===(n==null?void 0:n.title.trim())&&(a==null?void 0:a.remark.trim())===(n==null?void 0:n.remark.trim())}),V=C(()=>{const a=s.value;return(a==null?void 0:a.title.trim())!==""&&!r.value});M(()=>{z(()=>{l.value||(s.value=Object.assign({},m.value))})});async function h(){const a=s.value;if(!a){o.commit("error",{error:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u4FE1\u606F"});return}o.commit("cleanError"),f.value=!0,a.id!==""?await o.dispatch("updateOrg",{id:a.id,title:a.title.trim(),remark:a.remark.trim()}):await o.dispatch("createOrg",{title:a.title.trim(),remark:a.remark.trim()}),o.state.Root.currentError===void 0&&(l.value=!1),f.value=!1}return(a,n)=>(x(),A(G,{modelValue:u(l),"onUpdate:modelValue":n[2]||(n[2]=i=>j(l)?l.value=i:null),"no-backdrop-dismiss":!u(r)},{default:t(()=>[e(H,{class:"tw-w-96 q-pa-sm"},{default:t(()=>[e(P,{onSubmit:h},{default:t(()=>[e($,null,{default:t(()=>[s.value.id===""?(x(),B("div",ve,"\u521B\u5EFA\u7EC4\u7EC7")):(x(),B("div",_e,"\u7F16\u8F91\u7EC4\u7EC7"))]),_:1}),e($,null,{default:t(()=>[e(I,{modelValue:s.value.title,"onUpdate:modelValue":n[0]||(n[0]=i=>s.value.title=i),type:"text",label:"\u7EC4\u7EC7\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(I,{modelValue:s.value.remark,"onUpdate:modelValue":n[1]||(n[1]=i=>s.value.remark=i),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"])]),_:1}),e($,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:t(()=>[N(e(k,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[T,!0]]),e(k,{color:"primary","text-color":"black",type:"submit",label:s.value.id===""?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!u(V),class:"lg:tw-w-24 tw-w-full",loading:f.value},null,8,["label","disable","loading"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var be=Q(he,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogOrgForm.vue"]]);const xe={class:"text-center"},ye=S({props:{behavior:{type:String,default:"default"}},setup(_){const w=O(),d=v([]);async function f(s,m){var V;const r=[{label:"\u901A\u7528",value:"baseorg"}];(V=w.state.Root.userOrgs)==null||V.forEach((h,a,n)=>{h.id!=="baseorg"&&r.push({label:h.title,value:h.id})}),d.value=r,m(()=>{console.log("select done")})}f("",()=>{});const l=C({get:()=>w.state.Root.currentOrg,set:s=>{!s||(l.value?w.dispatch("switchOrg",s):w.commit("setCurrentOrg",s),localStorage.setItem("gc_choosed_org",s))}});M(()=>{if(!l.value){const s=q();l.value=s.params.orgId||"baseorg",w.commit("setCurrentOrg",l.value)}});const o=v(!1);return(s,m)=>(x(),B(ee,null,[e(be,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=r=>o.value=r)},null,8,["modelValue"]),e(u(Z),{ref:"search",modelValue:u(l),"onUpdate:modelValue":m[2]||(m[2]=r=>j(l)?l.value=r:null),dense:"",dark:"",color:"text-white",standout:"bg-white text-black","emit-value":"","map-options":"",label:"\u9009\u62E9\u7EC4\u7EC7",options:d.value,behavior:_.behavior,style:{width:"300px"},onFilter:f},{"no-option":t(()=>[e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[p("div",xe,[e(J,{color:"grey-5",size:"24px"})])]),_:1})]),_:1})]),append:t(()=>[e(b,{name:"add",onClick:m[1]||(m[1]=K(r=>o.value=!0,["stop","prevent"]))})]),option:t(r=>[e(g,W(r.itemProps,{class:"tw-text-white"}),{default:t(()=>[e(c,null,{default:t(()=>[e(Y,{innerHTML:r.opt.label},null,8,["innerHTML"])]),_:2},1024),e(c,{side:"",class:X({"default-type":!r.opt.type})},{default:t(()=>[e(k,{outline:"",dense:"","no-caps":"","text-color":"grey-5",size:"12px",class:"tw-bg-white q-px-sm"},{default:t(()=>[y(F(r.opt.type||"\u5207\u6362")+" ",1),e(b,{name:"subdirectory_arrow_left",size:"14px"})]),_:2},1024)]),_:2},1032,["class"])]),_:2},1040)]),_:1},8,["modelValue","options","behavior"])],64))}});var L=Q(ye,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/OrgSelect.vue"]]);const ke={class:"tw-flex tw-bg-primary tw-justify-start tw-space-x-2 tw-items-center tw-h-full tw-py-4 tw-px-3.5 tw-box-border tw-w-full tw-text-black tw-overflow-hidden"},Ee={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},Ce={class:"tw-text-xs tw-font-bold tw-rounded tw-leading-3 tw-text-white"},Fe={class:"q-item__section--main tw-flex tw-w-full tw-justify-between"},Ve={class:"tw-flex tw-flex-col tw-space-y-2 tw-overflow-hidden"},Be={class:"tw-text-base tw-leading-4 tw-whitespace-nowrap tw-overflow-hidden tw-overflow-ellipsis"},Qe={class:"tw-cursor-pointer tw-text-xs tw-leading-3"},Se=S({setup(_){const d=O().getters.currentUser,f=te(d.name),l=ae(),o=()=>{l.push({name:"user-profile"})};return(s,m)=>(x(),B("div",ke,[p("div",Ee,[p("p",Ce,F(u(f)),1)]),p("div",Fe,[p("div",Ve,[p("p",Be,F(u(d).name),1),p("p",Qe,F(u(d).account),1)]),e(k,{flat:"",dense:"",size:"md",icon:"more_horiz",round:"",onClick:o})])]))}});var Oe=Q(Se,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/UserBaseInfo.vue"]]);async function $e(){const _=await se.get("/version");return _.data.meta.code===0?_.data.response:""}const Ae=p("span",{class:"tw-text-lg tw-pl-2 tw-tracking-wide tw-font-bold tw-cursor-pointer"},"GopherCron",-1),Ie={key:0,class:"tw-text-sm"},Ue={class:"tw-hidden md:tw-flex"},De=p("svg",{fill:"#fff",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[p("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})],-1),Le=y("\u770B\u677F"),Me=y("\u9879\u76EE\u7BA1\u7406"),ze=y("\u4EFB\u52A1\u7F16\u6392"),Ne=y("\u7528\u6237\u7BA1\u7406"),je=y("\u8282\u70B9\u7BA1\u7406"),qe=y("\u9000\u51FA"),Re=S({setup(_){const w=oe(),d=v(!0);w.screen.lt.md&&(d.value=!1);const f=v(!0),l=v(!1),o=O(),s=q();z(()=>{if(!s.name)return;const n=["user-admin","node-admin"];l.value=n.includes(s.name.toString())});const m=C(()=>w.screen.lt.md?d.value:!f.value),r=v("");(async()=>{const n=await $e();r.value=n})();const h=C(()=>o.getters.notificationSetting);function a(){o.dispatch("changeNotificationStatus")}return(n,i)=>{const R=le("router-view");return x(),A(re,{view:"hHh Lpr lff",class:"rounded-borders tw-flex tw-flex-no-wrap tw-h-full tw-w-full"},{default:t(()=>[e(de,{class:"bg-black"},{default:t(()=>[e(ne,{class:"tw-gap-4"},{default:t(()=>[e(k,{flat:"",round:"",dense:"",icon:"menu",onClick:i[0]||(i[0]=E=>d.value=!d.value)}),Ae,r.value?(x(),B("span",Ie,"("+F(r.value)+")",1)):U("v-if",!0),p("div",Ue,[e(L)]),e(ue),e(k,{flat:"",round:"",dense:"",icon:u(h).status?"notifications":"notifications_off",onClick:a},{default:t(()=>[e(ie,null,{default:t(()=>[y(F(u(h).status?"\u70B9\u51FB\u5173\u95ED\u4EFB\u52A1\u72B6\u6001\u901A\u77E5":"\u70B9\u51FB\u5F00\u542F\u4EFB\u52A1\u72B6\u6001\u901A\u77E5"),1)]),_:1})]),_:1},8,["icon"]),e(k,{flat:"",round:"",dense:"",href:"https://github.com/holdno/gopherCron",target:"_blank"},{default:t(()=>[De]),_:1})]),_:1})]),_:1}),e(pe,{modelValue:d.value,"onUpdate:modelValue":i[2]||(i[2]=E=>d.value=E),mini:f.value,width:200,breakpoint:u(w).screen.sizes.md,onMouseover:i[3]||(i[3]=E=>f.value=!1),onMouseout:i[4]||(i[4]=E=>f.value=!0)},{default:t(()=>[e(ce,{style:{"margin-bottom":"80px",height:"calc(100% - 80px)"}},{default:t(()=>[e(me,{padding:""},{default:t(()=>[N(e(g,{class:"tw-flex md:tw-hidden"},{default:t(()=>[e(L,{behavior:"dialog"})]),_:1},512),[[fe,u(m)]]),e(g,{clickable:"",to:{name:"summary",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"timeline"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Le]),_:1})]),_:1},8,["to"]),e(g,{clickable:"",to:{name:"projects",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"view_list"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Me]),_:1})]),_:1},8,["to"]),e(g,{clickable:"",to:{name:"workflows",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"mediation"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[ze]),_:1})]),_:1},8,["to"]),e(D,{class:"tw-bg-stone-800"}),u(o).getters.isAdmin?(x(),A(we,{key:0,modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=E=>l.value=E),label:"\u7CFB\u7EDF\u7BA1\u7406","header-class":"tw-font-medium",icon:"admin_panel_settings"},{default:t(()=>[e(g,{clickable:"","inset-level":.2,to:{name:"user-admin",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"supervisor_account"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[Ne]),_:1})]),_:1},8,["inset-level","to"]),e(g,{clickable:"","inset-level":.2,to:{name:"node-admin",params:{orgId:u(o).getters.currentOrg}}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"dynamic_form"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[je]),_:1})]),_:1},8,["inset-level","to"])]),_:1},8,["modelValue"])):U("v-if",!0),e(D,{class:"tw-bg-stone-800"}),e(g,{clickable:"",to:{name:"logout"}},{default:t(()=>[e(c,{avatar:""},{default:t(()=>[e(b,{name:"logout"})]),_:1}),e(c,{class:"tw-font-medium"},{default:t(()=>[qe]),_:1})]),_:1})]),_:1})]),_:1}),e(Oe,{class:"tw-absolute tw-bottom-0 tw-left-0 tw-w-full",style:{height:"80px"}})]),_:1},8,["modelValue","mini","breakpoint"]),e(ge,{class:"tw-w-full tw-h-full tw-box-border"},{default:t(()=>[e(R)]),_:1})]),_:1})}}});var Te=Q(Re,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/layouts/LandingLayout.vue"]]);export{Te as default};
diff --git a/dist/assets/LoginPage.d43407c2.js b/dist/assets/LoginPage.945f899b.js
similarity index 98%
rename from dist/assets/LoginPage.d43407c2.js
rename to dist/assets/LoginPage.945f899b.js
index 20c875b..e139a13 100644
--- a/dist/assets/LoginPage.d43407c2.js
+++ b/dist/assets/LoginPage.945f899b.js
@@ -1 +1 @@
-import{_ as C,k as F,o as h,K as B,b as o,a2 as q,r as i,u as I,J as S,H as A,aS as x,aT as E,a as n,c as M,w as y,h as p,p as N,M as Q,d as V,aU as T,aV as P,f as b}from"./index.d76e71bf.js";const $=["src"],j=o("div",{class:"tw-font-bold tw-text-md tw-text-center"},"GOPHERCRON",-1),H=F({props:{class:{type:String,default:""},src:{type:String,default:"/logo.png"}},setup(m){const l=m;return(u,s)=>(h(),B("div",{class:q(l.class+" tw-flex tw-items-center tw-flex-col")},[o("img",{src:m.src,alt:"logo"},null,8,$),j],2))}});var z=C(H,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/LogoTpl.vue"]]);const G={class:"tw-h-full tw-bg-gradient-to-tl tw-from-primary tw-to-black tw-w-full tw-px-4"},J={class:"tw-flex tw-flex-col tw-items-center tw-justify-center tw-h-full tw-w-full"},K={class:"tw-bg-[#1D1D1D] tw-shadow tw-rounded-2xl tw-max-w-md lg:tw-w-1/3 sm:tw-w-2/3 tw-w-full tw-p-10 md:tw-mt-6 tw-mt-2"},W=V(" \u4F7F\u7528 OIDC \u767B\u5F55 "),X=o("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-2xl tw-font-extrabold tw-leading-6"}," \u8D26\u53F7\u5BC6\u7801\u767B\u5F55 ",-1),Y=o("p",{tabindex:"0",class:"tw-pb-8 focus:tw-outline-none tw-text-sm tw-mt-4 tw-font-medium tw-leading-none tw-text-gray-500"},[V(" \u6CA1\u6709\u8D26\u53F7? "),o("a",{href:"javascript:void(0)",class:"hover:text-gray-500 focus:text-gray-500 focus:outline-none focus:underline hover:underline text-sm font-medium leading-none text-gray-800 cursor-pointer"},"\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u5F00\u901A")],-1),Z=o("label",{id:"email",class:"tw-text-sm tw-font-medium tw-leading-none tw-text-white"},"\u8D26\u53F7",-1),tt={class:"tw-mt-6 tw-w-full"},et=o("label",{for:"pass",class:"tw-text-sm tw-font-medium tw-leading-none tw-text-white"},"\u5BC6\u7801",-1),ot={class:"tw-mt-8"},st=F({setup(m){const l=i(""),u=i(""),s=I(),L=S(),c=A(),r=i(!1),a=i(!1);let d=x("code"),w=x("state");d||(d=c.query.code),w||(w=c.query.state),d&&w&&D(d,w);const v=i();async function k(){try{v.value=await T()}catch(t){console.error(t),s.commit("error",{error:t})}}k();async function D(t,e){a.value=!0,await s.dispatch("loginWithOIDC",{code:t,state:e}),s.state.Root.logined&&await _(c.query.redirect),a.value=!1}async function _(t){const e={name:"",path:"",params:{}};if(t&&t.length>0&&t.indexOf("/summary")===-1)e.path=t||e.path;else{const f=localStorage.getItem("gc_choosed_org")||"baseorg";e.name="summary",e.params={orgId:f}}await L.push(e)}async function R(){a.value=!0;try{const t=await P();window.location.href=t}catch(t){console.error(t),a.value=!1,s.commit("error",{error:t})}}async function O(){r.value=!0,await s.dispatch("login",{username:l.value,password:u.value}),s.state.Root.logined&&await _(c.query.redirect),r.value=!1}function U(){l.value="",u.value=""}return E(()=>s.dispatch("logout")),(t,e)=>{var f;return h(),B("div",G,[o("div",J,[n(z,{class:"tw-w-24 md:tw-w-32",src:"./logo_white.png"}),o("div",K,[(f=v.value)!=null&&f.oidc?(h(),M(p,{key:0,outline:"","text-color":"white",loading:a.value,disable:a.value||r.value,class:"focus:tw-ring-2 tw-mb-6 focus:tw-ring-offset-2 tw-font-semibold tw-leading-none tw-text-black tw-outline-non tw-border tw-rounded tw-py-2 tw-w-full",onClick:R},{default:y(()=>[W]),_:1},8,["loading","disable"])):N("v-if",!0),X,Y,n(Q,{onSubmit:O,onReset:U},{default:y(()=>[o("div",null,[Z,n(b,{modelValue:l.value,"onUpdate:modelValue":e[0]||(e[0]=g=>l.value=g),dense:"",type:"text",square:"",filled:""},null,8,["modelValue"])]),o("div",tt,[et,n(b,{modelValue:u.value,"onUpdate:modelValue":e[1]||(e[1]=g=>u.value=g),dense:"",type:"password",square:"",filled:""},null,8,["modelValue"])]),o("div",ot,[n(p,{color:"primary",type:"submit",label:"\u767B\u5F55","text-color":"black",loading:r.value,disable:a.value||r.value,class:"focus:tw-ring-2 focus:tw-ring-offset-2 tw-font-semibold tw-leading-none tw-text-black tw-outline-non tw-border tw-rounded tw-py-2 tw-w-full"},null,8,["loading","disable"]),n(p,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",class:"tw-text-sm tw-w-full tw-mt-3 tw-border tw-rounded"})])]),_:1})])])])}}});var lt=C(st,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/LoginPage.vue"]]);export{lt as default};
+import{_ as C,k as F,o as h,K as B,b as o,a2 as q,r as i,u as I,J as S,H as A,aS as x,aT as E,a as n,c as M,w as y,h as p,p as N,M as Q,d as V,aU as T,aV as P,f as b}from"./index.f89dd3dd.js";const $=["src"],j=o("div",{class:"tw-font-bold tw-text-md tw-text-center"},"GOPHERCRON",-1),H=F({props:{class:{type:String,default:""},src:{type:String,default:"/logo.png"}},setup(m){const l=m;return(u,s)=>(h(),B("div",{class:q(l.class+" tw-flex tw-items-center tw-flex-col")},[o("img",{src:m.src,alt:"logo"},null,8,$),j],2))}});var z=C(H,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/LogoTpl.vue"]]);const G={class:"tw-h-full tw-bg-gradient-to-tl tw-from-primary tw-to-black tw-w-full tw-px-4"},J={class:"tw-flex tw-flex-col tw-items-center tw-justify-center tw-h-full tw-w-full"},K={class:"tw-bg-[#1D1D1D] tw-shadow tw-rounded-2xl tw-max-w-md lg:tw-w-1/3 sm:tw-w-2/3 tw-w-full tw-p-10 md:tw-mt-6 tw-mt-2"},W=V(" \u4F7F\u7528 OIDC \u767B\u5F55 "),X=o("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-2xl tw-font-extrabold tw-leading-6"}," \u8D26\u53F7\u5BC6\u7801\u767B\u5F55 ",-1),Y=o("p",{tabindex:"0",class:"tw-pb-8 focus:tw-outline-none tw-text-sm tw-mt-4 tw-font-medium tw-leading-none tw-text-gray-500"},[V(" \u6CA1\u6709\u8D26\u53F7? "),o("a",{href:"javascript:void(0)",class:"hover:text-gray-500 focus:text-gray-500 focus:outline-none focus:underline hover:underline text-sm font-medium leading-none text-gray-800 cursor-pointer"},"\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u5F00\u901A")],-1),Z=o("label",{id:"email",class:"tw-text-sm tw-font-medium tw-leading-none tw-text-white"},"\u8D26\u53F7",-1),tt={class:"tw-mt-6 tw-w-full"},et=o("label",{for:"pass",class:"tw-text-sm tw-font-medium tw-leading-none tw-text-white"},"\u5BC6\u7801",-1),ot={class:"tw-mt-8"},st=F({setup(m){const l=i(""),u=i(""),s=I(),L=S(),c=A(),r=i(!1),a=i(!1);let d=x("code"),w=x("state");d||(d=c.query.code),w||(w=c.query.state),d&&w&&D(d,w);const v=i();async function k(){try{v.value=await T()}catch(t){console.error(t),s.commit("error",{error:t})}}k();async function D(t,e){a.value=!0,await s.dispatch("loginWithOIDC",{code:t,state:e}),s.state.Root.logined&&await _(c.query.redirect),a.value=!1}async function _(t){const e={name:"",path:"",params:{}};if(t&&t.length>0&&t.indexOf("/summary")===-1)e.path=t||e.path;else{const f=localStorage.getItem("gc_choosed_org")||"baseorg";e.name="summary",e.params={orgId:f}}await L.push(e)}async function R(){a.value=!0;try{const t=await P();window.location.href=t}catch(t){console.error(t),a.value=!1,s.commit("error",{error:t})}}async function O(){r.value=!0,await s.dispatch("login",{username:l.value,password:u.value}),s.state.Root.logined&&await _(c.query.redirect),r.value=!1}function U(){l.value="",u.value=""}return E(()=>s.dispatch("logout")),(t,e)=>{var f;return h(),B("div",G,[o("div",J,[n(z,{class:"tw-w-24 md:tw-w-32",src:"./logo_white.png"}),o("div",K,[(f=v.value)!=null&&f.oidc?(h(),M(p,{key:0,outline:"","text-color":"white",loading:a.value,disable:a.value||r.value,class:"focus:tw-ring-2 tw-mb-6 focus:tw-ring-offset-2 tw-font-semibold tw-leading-none tw-text-black tw-outline-non tw-border tw-rounded tw-py-2 tw-w-full",onClick:R},{default:y(()=>[W]),_:1},8,["loading","disable"])):N("v-if",!0),X,Y,n(Q,{onSubmit:O,onReset:U},{default:y(()=>[o("div",null,[Z,n(b,{modelValue:l.value,"onUpdate:modelValue":e[0]||(e[0]=g=>l.value=g),dense:"",type:"text",square:"",filled:""},null,8,["modelValue"])]),o("div",tt,[et,n(b,{modelValue:u.value,"onUpdate:modelValue":e[1]||(e[1]=g=>u.value=g),dense:"",type:"password",square:"",filled:""},null,8,["modelValue"])]),o("div",ot,[n(p,{color:"primary",type:"submit",label:"\u767B\u5F55","text-color":"black",loading:r.value,disable:a.value||r.value,class:"focus:tw-ring-2 focus:tw-ring-offset-2 tw-font-semibold tw-leading-none tw-text-black tw-outline-non tw-border tw-rounded tw-py-2 tw-w-full"},null,8,["loading","disable"]),n(p,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",class:"tw-text-sm tw-w-full tw-mt-3 tw-border tw-rounded"})])]),_:1})])])])}}});var lt=C(st,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/LoginPage.vue"]]);export{lt as default};
diff --git a/dist/assets/ModifyBox.88f33ebb.js b/dist/assets/ModifyBox.25d0a805.js
similarity index 98%
rename from dist/assets/ModifyBox.88f33ebb.js
rename to dist/assets/ModifyBox.25d0a805.js
index 1c0df97..1746fb8 100644
--- a/dist/assets/ModifyBox.88f33ebb.js
+++ b/dist/assets/ModifyBox.25d0a805.js
@@ -1 +1 @@
-var Q=Object.defineProperty,q=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var y=(u,a,s)=>a in u?Q(u,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[a]=s,b=(u,a)=>{for(var s in a||(a={}))O.call(a,s)&&y(u,s,a[s]);if(v)for(var s of v(a))S.call(a,s)&&y(u,s,a[s]);return u},g=(u,a)=>q(u,N(a));import{_ as M,k as _,r as j,l as V,aP as n,o as p,c,w as i,a as r,Q as B,b as E,t as I,M as J,f as m,A as f,p as x,h as A,i as R,E as L,F as $,aQ as z,aR as G}from"./index.d76e71bf.js";const H={class:"text-h6"},K={class:"tw-flex tw-flex-row-reverse tw-gap-4"},T=_({props:{modelValue:{type:Boolean,default:!1},user:{type:Object,default:null}},emits:["update:modelValue","modify"],setup(u,{emit:a}){const s=u,w=s.user!=null?g(b({},s.user),{password:"",passwordAgain:"",newPassword:""}):{id:void 0,account:"",password:"",newPassword:"",passwordAgain:"",name:""},e=j(Object.assign({},w)),C=V(()=>JSON.stringify(w)===JSON.stringify(e.value)),k=n.getters.isAdmin,D=()=>{e.value=Object.assign({},w)},d=V({get(){return s.modelValue},set(t){t||D(),a("update:modelValue",t)}}),F=async()=>{try{if(e.value.newPassword!==e.value.passwordAgain){n.commit("error",{error:new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")});return}(await z({userID:e.value.id?e.value.id:0,password:e.value.password,newPassword:e.value.newPassword})).meta.code===0&&(n.commit("success",{message:"\u4FEE\u6539\u6210\u529F"}),d.value=!1,a("modify",{}))}catch(t){console.log(t)}},P=async()=>{try{if(e.value.password!==e.value.passwordAgain){n.commit("error",{error:new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")});return}(await G({account:e.value.account,password:e.value.password,name:e.value.name})).meta.code===0&&(n.commit("success",{message:"\u65B0\u589E\u6210\u529F"}),d.value=!1,a("modify",{}))}catch(t){console.log(t)}},U=async()=>s.user?await F():await P();return(t,l)=>(p(),c($,{modelValue:f(d),"onUpdate:modelValue":l[6]||(l[6]=o=>L(d)?d.value=o:null),"no-backdrop-dismiss":!f(C)},{default:i(()=>[r(R,{style:{width:"300px"}},{default:i(()=>[r(B,null,{default:i(()=>[E("div",H,I(u.user?"\u7F16\u8F91":"\u65B0\u589E"),1)]),_:1}),r(B,{class:"q-pt-none"},{default:i(()=>[r(J,{class:"tw-w-full",onSubmit:U},{default:i(()=>[r(m,{key:"name",modelValue:e.value.name,"onUpdate:modelValue":l[0]||(l[0]=o=>e.value.name=o),disable:e.value.id!==void 0,type:"textarea",label:"\u540D\u79F0",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","disable"]),r(m,{key:"account",modelValue:e.value.account,"onUpdate:modelValue":l[1]||(l[1]=o=>e.value.account=o),disable:e.value.id!==void 0,type:"text",label:"\u8D26\u53F7(\u90AE\u7BB1)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","disable"]),e.value.id===void 0||!f(k)?(p(),c(m,{key:"password_again",modelValue:e.value.password,"onUpdate:modelValue":l[2]||(l[2]=o=>e.value.password=o),type:"password",label:e.value.id===void 0?"\u5BC6\u7801":"\u65E7\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","label"])):x("v-if",!0),e.value.id!==void 0?(p(),c(m,{key:"password",modelValue:e.value.newPassword,"onUpdate:modelValue":l[3]||(l[3]=o=>e.value.newPassword=o),type:"password",label:"\u65B0\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"])):x("v-if",!0),r(m,{key:"password_again",modelValue:e.value.passwordAgain,"onUpdate:modelValue":l[4]||(l[4]=o=>e.value.passwordAgain=o),type:"password",label:"\u786E\u8BA4\u65B0\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),E("div",K,[r(A,{color:"primary","text-color":"black",type:"submit",label:"\u63D0\u4EA4",class:"lg:tw-w-24 tw-w-full"}),r(A,{flat:"",type:"reset",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full",onClick:l[5]||(l[5]=o=>d.value=!1)})])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var Y=M(T,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/ModifyBox.vue"]]);export{Y as M};
+var Q=Object.defineProperty,q=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var y=(u,a,s)=>a in u?Q(u,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[a]=s,b=(u,a)=>{for(var s in a||(a={}))O.call(a,s)&&y(u,s,a[s]);if(v)for(var s of v(a))S.call(a,s)&&y(u,s,a[s]);return u},g=(u,a)=>q(u,N(a));import{_ as M,k as _,r as j,l as V,aP as n,o as p,c,w as i,a as r,Q as B,b as E,t as I,M as J,f as m,A as f,p as x,h as A,i as R,E as L,F as $,aQ as z,aR as G}from"./index.f89dd3dd.js";const H={class:"text-h6"},K={class:"tw-flex tw-flex-row-reverse tw-gap-4"},T=_({props:{modelValue:{type:Boolean,default:!1},user:{type:Object,default:null}},emits:["update:modelValue","modify"],setup(u,{emit:a}){const s=u,w=s.user!=null?g(b({},s.user),{password:"",passwordAgain:"",newPassword:""}):{id:void 0,account:"",password:"",newPassword:"",passwordAgain:"",name:""},e=j(Object.assign({},w)),C=V(()=>JSON.stringify(w)===JSON.stringify(e.value)),k=n.getters.isAdmin,D=()=>{e.value=Object.assign({},w)},d=V({get(){return s.modelValue},set(t){t||D(),a("update:modelValue",t)}}),F=async()=>{try{if(e.value.newPassword!==e.value.passwordAgain){n.commit("error",{error:new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")});return}(await z({userID:e.value.id?e.value.id:0,password:e.value.password,newPassword:e.value.newPassword})).meta.code===0&&(n.commit("success",{message:"\u4FEE\u6539\u6210\u529F"}),d.value=!1,a("modify",{}))}catch(t){console.log(t)}},P=async()=>{try{if(e.value.password!==e.value.passwordAgain){n.commit("error",{error:new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")});return}(await G({account:e.value.account,password:e.value.password,name:e.value.name})).meta.code===0&&(n.commit("success",{message:"\u65B0\u589E\u6210\u529F"}),d.value=!1,a("modify",{}))}catch(t){console.log(t)}},U=async()=>s.user?await F():await P();return(t,l)=>(p(),c($,{modelValue:f(d),"onUpdate:modelValue":l[6]||(l[6]=o=>L(d)?d.value=o:null),"no-backdrop-dismiss":!f(C)},{default:i(()=>[r(R,{style:{width:"300px"}},{default:i(()=>[r(B,null,{default:i(()=>[E("div",H,I(u.user?"\u7F16\u8F91":"\u65B0\u589E"),1)]),_:1}),r(B,{class:"q-pt-none"},{default:i(()=>[r(J,{class:"tw-w-full",onSubmit:U},{default:i(()=>[r(m,{key:"name",modelValue:e.value.name,"onUpdate:modelValue":l[0]||(l[0]=o=>e.value.name=o),disable:e.value.id!==void 0,type:"textarea",label:"\u540D\u79F0",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","disable"]),r(m,{key:"account",modelValue:e.value.account,"onUpdate:modelValue":l[1]||(l[1]=o=>e.value.account=o),disable:e.value.id!==void 0,type:"text",label:"\u8D26\u53F7(\u90AE\u7BB1)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","disable"]),e.value.id===void 0||!f(k)?(p(),c(m,{key:"password_again",modelValue:e.value.password,"onUpdate:modelValue":l[2]||(l[2]=o=>e.value.password=o),type:"password",label:e.value.id===void 0?"\u5BC6\u7801":"\u65E7\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue","label"])):x("v-if",!0),e.value.id!==void 0?(p(),c(m,{key:"password",modelValue:e.value.newPassword,"onUpdate:modelValue":l[3]||(l[3]=o=>e.value.newPassword=o),type:"password",label:"\u65B0\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"])):x("v-if",!0),r(m,{key:"password_again",modelValue:e.value.passwordAgain,"onUpdate:modelValue":l[4]||(l[4]=o=>e.value.passwordAgain=o),type:"password",label:"\u786E\u8BA4\u65B0\u5BC6\u7801",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),E("div",K,[r(A,{color:"primary","text-color":"black",type:"submit",label:"\u63D0\u4EA4",class:"lg:tw-w-24 tw-w-full"}),r(A,{flat:"",type:"reset",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full",onClick:l[5]||(l[5]=o=>d.value=!1)})])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var Y=M(T,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/ModifyBox.vue"]]);export{Y as M};
diff --git a/dist/assets/NodeListAdmin.5e0c8013.js b/dist/assets/NodeListAdmin.4379dd19.js
similarity index 98%
rename from dist/assets/NodeListAdmin.5e0c8013.js
rename to dist/assets/NodeListAdmin.4379dd19.js
index 4c4e30e..4eb530b 100644
--- a/dist/assets/NodeListAdmin.5e0c8013.js
+++ b/dist/assets/NodeListAdmin.4379dd19.js
@@ -1 +1 @@
-import{aa as v,_ as h,k as x,r as p,o as m,K as _,b as t,t as w,A as D,a as n,w as u,h as f,i as I,Q as b,$ as C,D as N,x as j,C as F,F as L,Y as y,d as k,aP as A,u as P,a8 as B,R as $,c as E}from"./index.d76e71bf.js";async function Q(s){const e=await v.get("/client/list",{params:{oid:s.oid,project_ids:s.projectIDs}}),c=[];return e.data.response&&e.data.response.length>0&&e.data.response.forEach((l,i)=>{c.push({clientIP:l.client_ip,projectID:l.project_id,version:l.version})}),{nodeList:c,meta:{code:e.data.meta.code,message:e.data.meta.msg}}}async function V(s){const e=await v.post("/client/reload/config",{client_ip:s.clientIP,project_id:s.projectID});return{code:e.data.meta.code,message:e.data.meta.msg}}const q={tabindex:"0",class:"focus:tw-outline-none tw-text-sm tw-leading-none tw-text-gray-600 tw-h-16"},S={class:"tw-w-2/3"},U={class:"tw-flex tw-items-center"},O={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},R={class:"tw-text-xs tw-font-bold tw-leading-3 tw-text-white"},z={class:"tw-pl-2"},K={class:"tw-text-sm tw-font-medium tw-leading-none dark:tw-text-white"},T={class:"tw-text-xs tw-leading-3 tw-text-gray-400 tw-mt-2"},Y={class:"tw-w-min tw-flex tw-scale-75 md:tw-scale-100"},G=k("\u91CD\u8F7D\u914D\u7F6E"),H={class:"q-ml-sm"},J=x({props:{node:{type:Object,default:null}},setup(s){const e=s,l=(a=>{if(a==="")return"NODE";const o=a.split(".");return o[o.length-1]})(e.node.clientIP),i=p(!1),d=p(!1),r=async()=>{i.value=!0;try{const a=await V({clientIP:e.node.clientIP,projectID:e.node.projectID});a.code!==0?A.commit("error",{error:{message:a.message}}):d.value=!1}catch(a){console.log(a)}i.value=!1};return(a,o)=>(m(),_(y,null,[t("tr",q,[t("td",S,[t("div",U,[t("div",O,[t("p",R,w(D(l)),1)]),t("div",z,[t("p",K,w(s.node.clientIP),1),t("p",T,w(s.node.version),1)])])]),t("td",null,[t("div",Y,[n(f,{flat:"",class:"tw-text-red-300",onClick:o[0]||(o[0]=g=>d.value=!0)},{default:u(()=>[G]),_:1})])])]),n(L,{modelValue:d.value,"onUpdate:modelValue":o[1]||(o[1]=g=>d.value=g)},{default:u(()=>[n(I,null,{default:u(()=>[n(b,{class:"tw-flex-row tw-flex tw-items-center"},{default:u(()=>[n(C,{icon:"delete",color:"red","text-color":"white"}),t("span",H,"\u662F\u5426\u8981\u91CD\u8F7D\u8282\u70B9 "+w(s.node.clientIP)+" \u7684\u914D\u7F6E\uFF1F",1)]),_:1}),n(N,{align:"right"},{default:u(()=>[j(n(f,{flat:"",label:"\u53D6\u6D88"},null,512),[[F,!0]]),n(f,{flat:"",label:"\u786E\u5B9A",color:"primary",loading:i.value,onClick:r},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}});var M=h(J,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/NodeListAdmin/NodeItem.vue"]]);const W={class:"tw-w-full tw-p-4"},X={class:"q-dark tw-w-full tw-rounded tw-overflow-hidden"},Z=t("div",{class:"tw-px-4 tw-py-4"},[t("div",{class:"sm:tw-flex tw-items-center tw-justify-between"},[t("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-primary"}," \u8282\u70B9\u7BA1\u7406 "),t("div",{class:"tw-mt-4 sm:tw-mt-0"})])],-1),tt={class:"q-dark tw-px-4 tw-pb-5 tw-min-h-50 tw-relative"},et={class:"tw-overflow-x-auto"},st={class:"tw-w-full tw-whitespace-nowrap"},ot=x({props:{orgId:{type:String,required:!0}},setup(s){const e=s,c=P(),l=p([]),i=p(!1);return(async()=>{i.value=!0;try{const r=await Q({oid:e.orgId,projectIDs:[]});r.meta.code===0?l.value=r.nodeList:c.commit("error",{error:{message:r.meta.message}})}catch(r){console.log(r)}i.value=!1})(),(r,a)=>(m(),_("div",W,[t("div",X,[Z,t("div",tt,[t("div",et,[t("table",st,[t("tbody",null,[(m(!0),_(y,null,B(l.value,o=>(m(),E(M,{key:o.clientIP,node:o},null,8,["node"]))),128))])])]),n($,{size:"md",showing:i.value},null,8,["showing"])])])]))}});var nt=h(ot,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/NodeListAdmin/NodeListAdmin.vue"]]);export{nt as default};
+import{aa as v,_ as h,k as x,r as p,o as m,K as _,b as t,t as w,A as D,a as n,w as u,h as f,i as I,Q as b,$ as C,D as N,x as j,C as F,F as L,Y as y,d as k,aP as A,u as P,a8 as B,R as $,c as E}from"./index.f89dd3dd.js";async function Q(s){const e=await v.get("/client/list",{params:{oid:s.oid,project_ids:s.projectIDs}}),c=[];return e.data.response&&e.data.response.length>0&&e.data.response.forEach((l,i)=>{c.push({clientIP:l.client_ip,projectID:l.project_id,version:l.version})}),{nodeList:c,meta:{code:e.data.meta.code,message:e.data.meta.msg}}}async function V(s){const e=await v.post("/client/reload/config",{client_ip:s.clientIP,project_id:s.projectID});return{code:e.data.meta.code,message:e.data.meta.msg}}const q={tabindex:"0",class:"focus:tw-outline-none tw-text-sm tw-leading-none tw-text-gray-600 tw-h-16"},S={class:"tw-w-2/3"},U={class:"tw-flex tw-items-center"},O={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},R={class:"tw-text-xs tw-font-bold tw-leading-3 tw-text-white"},z={class:"tw-pl-2"},K={class:"tw-text-sm tw-font-medium tw-leading-none dark:tw-text-white"},T={class:"tw-text-xs tw-leading-3 tw-text-gray-400 tw-mt-2"},Y={class:"tw-w-min tw-flex tw-scale-75 md:tw-scale-100"},G=k("\u91CD\u8F7D\u914D\u7F6E"),H={class:"q-ml-sm"},J=x({props:{node:{type:Object,default:null}},setup(s){const e=s,l=(a=>{if(a==="")return"NODE";const o=a.split(".");return o[o.length-1]})(e.node.clientIP),i=p(!1),d=p(!1),r=async()=>{i.value=!0;try{const a=await V({clientIP:e.node.clientIP,projectID:e.node.projectID});a.code!==0?A.commit("error",{error:{message:a.message}}):d.value=!1}catch(a){console.log(a)}i.value=!1};return(a,o)=>(m(),_(y,null,[t("tr",q,[t("td",S,[t("div",U,[t("div",O,[t("p",R,w(D(l)),1)]),t("div",z,[t("p",K,w(s.node.clientIP),1),t("p",T,w(s.node.version),1)])])]),t("td",null,[t("div",Y,[n(f,{flat:"",class:"tw-text-red-300",onClick:o[0]||(o[0]=g=>d.value=!0)},{default:u(()=>[G]),_:1})])])]),n(L,{modelValue:d.value,"onUpdate:modelValue":o[1]||(o[1]=g=>d.value=g)},{default:u(()=>[n(I,null,{default:u(()=>[n(b,{class:"tw-flex-row tw-flex tw-items-center"},{default:u(()=>[n(C,{icon:"delete",color:"red","text-color":"white"}),t("span",H,"\u662F\u5426\u8981\u91CD\u8F7D\u8282\u70B9 "+w(s.node.clientIP)+" \u7684\u914D\u7F6E\uFF1F",1)]),_:1}),n(N,{align:"right"},{default:u(()=>[j(n(f,{flat:"",label:"\u53D6\u6D88"},null,512),[[F,!0]]),n(f,{flat:"",label:"\u786E\u5B9A",color:"primary",loading:i.value,onClick:r},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}});var M=h(J,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/NodeListAdmin/NodeItem.vue"]]);const W={class:"tw-w-full tw-p-4"},X={class:"q-dark tw-w-full tw-rounded tw-overflow-hidden"},Z=t("div",{class:"tw-px-4 tw-py-4"},[t("div",{class:"sm:tw-flex tw-items-center tw-justify-between"},[t("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-primary"}," \u8282\u70B9\u7BA1\u7406 "),t("div",{class:"tw-mt-4 sm:tw-mt-0"})])],-1),tt={class:"q-dark tw-px-4 tw-pb-5 tw-min-h-50 tw-relative"},et={class:"tw-overflow-x-auto"},st={class:"tw-w-full tw-whitespace-nowrap"},ot=x({props:{orgId:{type:String,required:!0}},setup(s){const e=s,c=P(),l=p([]),i=p(!1);return(async()=>{i.value=!0;try{const r=await Q({oid:e.orgId,projectIDs:[]});r.meta.code===0?l.value=r.nodeList:c.commit("error",{error:{message:r.meta.message}})}catch(r){console.log(r)}i.value=!1})(),(r,a)=>(m(),_("div",W,[t("div",X,[Z,t("div",tt,[t("div",et,[t("table",st,[t("tbody",null,[(m(!0),_(y,null,B(l.value,o=>(m(),E(M,{key:o.clientIP,node:o},null,8,["node"]))),128))])])]),n($,{size:"md",showing:i.value},null,8,["showing"])])])]))}});var nt=h(ot,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/NodeListAdmin/NodeListAdmin.vue"]]);export{nt as default};
diff --git a/dist/assets/ProjectList.cb9d1f1f.js b/dist/assets/ProjectList.81bcf7ef.js
similarity index 99%
rename from dist/assets/ProjectList.cb9d1f1f.js
rename to dist/assets/ProjectList.81bcf7ef.js
index f0e2102..da94a16 100644
--- a/dist/assets/ProjectList.cb9d1f1f.js
+++ b/dist/assets/ProjectList.81bcf7ef.js
@@ -1,4 +1,4 @@
-import{_ as q,k as S,l as I,u as N,r as h,o as g,c as j,A as c,E as H,m as ee,n as ve,w as t,a as e,M as ge,Q as $,K as E,f as Q,x as F,C as B,h as C,i as Y,F as O,I as te,e as A,z as le,aq as oe,b as r,a8 as K,t as D,Y as z,D as X,p as P,d as U,ar as ye,aa as M,as as he,at as _e,al as ae,T,U as R,ac as W,S as L,au as ke,X as xe,q as G,av as be,aw as je,ax as Ve,ag as se,a2 as ne,a4 as Ie,H as re}from"./index.d76e71bf.js";import{C as J}from"./Confirm.47315734.js";import{f as ue}from"./datetime.561112b0.js";import{t as Ce,b as Ee}from"./thumbStyle.856de4cb.js";const Ue=S({props:{projectId:{type:Number,required:!0},orgId:{type:String,required:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=I({get:()=>a.modelValue,set:w=>k("update:modelValue",w)}),i=N(),p=I(()=>i.state.Project.projects.find(w=>w.id===a.projectId)),d=h(!1);async function _(w){d.value=!0;try{i.commit("cleanError"),await i.dispatch("deleteProject",{projectId:w,orgId:a.orgId}),i.state.Root.currentError===void 0&&(f.value=!1)}catch(b){console.error(b),i.commit("error",{error:b})}d.value=!1}return(w,b)=>{var v;return g(),j(J,{modelValue:c(f),"onUpdate:modelValue":b[0]||(b[0]=x=>H(f)?f.value=x:null),content:"\u662F\u5426\u8981\u5220\u9664\u9879\u76EE"+((v=c(p))==null?void 0:v.title)+"?",type:"warning",loading:d.value,onConfirm:b[1]||(b[1]=x=>c(p)&&_(c(p).id))},null,8,["modelValue","content","loading"])}}});var ie=q(Ue,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogProjectDeleteConfirm.vue"]]);const $e={key:0,class:"text-h6"},Fe={key:1,class:"text-h6"},Be=S({props:{projectId:{type:Number,default:0},modelValue:{type:Boolean,default:!1},orgId:{type:String,required:!0}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=I({get:()=>a.modelValue,set:n=>k("update:modelValue",n)}),i=N(),p=I(()=>i.state.Project.projects.find(n=>n.id===a.projectId)),d=I(()=>{const n=p.value;return{title:(n==null?void 0:n.title)||"",remark:(n==null?void 0:n.remark)||""}}),_=h(d.value),w=I(()=>{const n=_.value,y=d.value;return n.title.trim()===y.title.trim()&&n.remark.trim()===y.remark.trim()}),b=I(()=>_.value.title.trim()!==""&&!w.value);ee(()=>{ve(()=>{f.value||(_.value=Object.assign({},d.value))})});const v=h(!1);async function x(){v.value=!0;try{const n=_.value;i.commit("cleanError"),a.projectId>0?await i.dispatch("updateProject",{projectId:a.projectId,title:n.title.trim(),remark:n.remark.trim(),orgId:a.orgId}):await i.dispatch("createProject",{orgId:a.orgId,title:n.title.trim(),remark:n.remark.trim()}),i.state.Root.currentError===void 0&&(f.value=!1)}catch(n){console.error(n),i.commit("error",{error:n})}v.value=!1}return(n,y)=>(g(),j(O,{modelValue:c(f),"onUpdate:modelValue":y[2]||(y[2]=V=>H(f)?f.value=V:null),"no-backdrop-dismiss":!c(w)},{default:t(()=>[e(Y,{class:"tw-w-96 q-pa-sm"},{default:t(()=>[e(ge,{onSubmit:x},{default:t(()=>[e($,null,{default:t(()=>[c(p)===void 0?(g(),E("div",$e,"\u521B\u5EFA\u9879\u76EE")):(g(),E("div",Fe,"\u7F16\u8F91\u9879\u76EE"))]),_:1}),e($,null,{default:t(()=>[e(Q,{modelValue:_.value.title,"onUpdate:modelValue":y[0]||(y[0]=V=>_.value.title=V),type:"text",label:"\u9879\u76EE\u540D",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(Q,{modelValue:_.value.remark,"onUpdate:modelValue":y[1]||(y[1]=V=>_.value.remark=V),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"])]),_:1}),e($,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:t(()=>[F(e(C,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[B,!0]]),e(C,{color:"primary","text-color":"black",type:"submit",label:c(p)===void 0?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!c(b),loading:v.value,class:"lg:tw-w-24 tw-w-full"},null,8,["label","disable","loading"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var de=q(Be,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogProjectForm.vue"]]);function De(o){return o?o.indexOf("manager")!==-1||o.indexOf("admin")!==-1:!1}function Pe(o){return o.indexOf("admin")!==-1}const ce=[{value:"admin",label:"\u7BA1\u7406\u5458"},{value:"manager",label:"\u53EF\u7F16\u8F91"},{value:"user",label:"\u4EC5\u67E5\u770B"}],pe=new Map;ce.forEach((o,k,a)=>{pe.set(o.value,o.label)});function qe(o){return pe.get(o)}const Se=r("div",{class:"text-h6"},"\u9879\u76EE\u6210\u5458\u7BA1\u7406",-1),Ae=U(" \u6DFB\u52A0 "),Me={role:"list",class:"tw-divide-y tw-divide-white/5"},Qe={class:"tw-min-w-0 tw-flex-auto"},Te={class:"tw-flex tw-items-center tw-gap-x-3"},Re=r("div",{class:"flex-none rounded-full p-1"},[r("div",{class:"tw-h-2 tw-w-2 tw-rounded-full tw-bg-current"})],-1),We={class:"tw-min-w-0 tw-text-sm tw-font-semibold tw-leading-6 tw-text-white"},Le={class:"tw-flex tw-gap-x-2"},Ne={class:"tw-whitespace-nowrap"},He=r("span",{class:"tw-text-gray-400"}," - ",-1),Ye={class:"tw-whitespace-nowrap tw-opacity-75"},Oe={class:"tw-mt-1 tw-flex tw-items-center tw-gap-x-2.5 tw-text-xs tw-leading-5 tw-text-gray-400"},ze={class:"tw-truncate tw-text-primary"},Ge=r("svg",{viewbox:"0 0 2 2",class:"tw-h-0.5 tw-w-0.5 tw-flex-none tw-fill-gray-300"},[r("circle",{cx:"1",cy:"1",r:"1"})],-1),Ke={class:"tw-whitespace-nowrap"},Xe={class:"rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset"},Je=U("\u79FB\u9664"),Ze=S({props:{projectId:{type:Number,default:0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=h("user"),i=I({get:()=>a.modelValue,set:s=>k("update:modelValue",s)}),p=h([]);async function d(){p.value=await ye(M,a.projectId)}te(()=>[a.projectId,i.value],async([,s])=>{s&&d(),_.value=""});const _=h(""),w=h(!1);async function b(){w.value=!0;try{await he(M,a.projectId,_.value,f.value),_.value="",await d()}finally{w.value=!1}}const v=h(),x=h(!1);function n(s){v.value=s,x.value=!0}function y(){v.value=void 0,x.value=!1}async function V(s){w.value=!0;try{await _e(M,a.projectId,s.id),await d()}finally{w.value=!1}}return(s,m)=>(g(),j(O,{modelValue:c(i),"onUpdate:modelValue":m[4]||(m[4]=u=>H(i)?i.value=u:null)},{default:t(()=>{var u;return[e(J,{modelValue:x.value,"onUpdate:modelValue":m[0]||(m[0]=l=>x.value=l),type:"warning",content:`\u786E\u5B9A\u8981\u79FB\u9664\u7528\u6237 ${(u=v.value)==null?void 0:u.name} \u5417\uFF1F`,onConfirm:m[1]||(m[1]=l=>v.value&&V(v.value).then(y))},null,8,["modelValue","content"]),e(Y,{class:"tw-w-full tw-mx-6 lg:tw-w-1/2"},{default:t(()=>[e($,null,{default:t(()=>[Se]),_:1}),e(A),e($,{class:"tw-flex md:tw-flex-row tw-flex-col tw-gap-2"},{default:t(()=>[e(Q,{modelValue:_.value,"onUpdate:modelValue":m[2]||(m[2]=l=>_.value=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u5E10\u53F7",dense:"",outlined:"",class:"tw-grow"},null,8,["modelValue"]),e(le,{modelValue:f.value,"onUpdate:modelValue":m[3]||(m[3]=l=>f.value=l),outlined:"",dense:"",class:"tw-w-full md:tw-w-32","emit-value":"","map-options":"",placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u6743\u9650",options:c(ce)},null,8,["modelValue","options"]),e(C,{loading:w.value,outline:"","text-color":"primary",onClick:b},{default:t(()=>[Ae]),_:1},8,["loading"])]),_:1}),e(A),e($,{style:{"max-height":"40vh",height:"40vh"},class:"scroll"},{default:t(()=>[e(oe,{class:"tw-w-full tw-h-full",offset:100},{default:t(()=>[r("ul",Me,[(g(!0),E(z,null,K(p.value,l=>(g(),E("li",{key:l.id,class:"tw-relative tw-flex tw-items-center tw-space-x-4 tw-py-2"},[r("div",Qe,[r("div",Te,[Re,r("h2",We,[r("a",Le,[r("span",Ne,D(l.name),1),He,r("span",Ye,D(l.permissions&&c(qe)(l.permissions[0])),1)])])]),r("div",Oe,[r("p",ze,D(l.account),1),Ge,r("p",Ke,D(c(ue)(l.createTime*1e3,"YYYY-MM-DD HH:mm")),1)])]),r("div",Xe,[e(C,{type:"primary",unelevated:"",class:"tw-text-red-500",onClick:we=>n(l)},{default:t(()=>[Je]),_:2},1032,["onClick"])])]))),128))])]),_:1})]),_:1}),e(A),e(X,{align:"right"},{default:t(()=>[F(e(C,{flat:"",label:"\u5173\u95ED",color:"primary"},null,512),[[B,!0]])]),_:1})]),_:1}),P(`
+import{_ as q,k as S,l as I,u as N,r as h,o as g,c as j,A as c,E as H,m as ee,n as ve,w as t,a as e,M as ge,Q as $,K as E,f as Q,x as F,C as B,h as C,i as Y,F as O,I as te,e as A,z as le,aq as oe,b as r,a8 as K,t as D,Y as z,D as X,p as P,d as U,ar as ye,aa as M,as as he,at as _e,al as ae,T,U as R,ac as W,S as L,au as ke,X as xe,q as G,av as be,aw as je,ax as Ve,ag as se,a2 as ne,a4 as Ie,H as re}from"./index.f89dd3dd.js";import{C as J}from"./Confirm.4116c3bd.js";import{f as ue}from"./datetime.561112b0.js";import{t as Ce,b as Ee}from"./thumbStyle.856de4cb.js";const Ue=S({props:{projectId:{type:Number,required:!0},orgId:{type:String,required:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=I({get:()=>a.modelValue,set:w=>k("update:modelValue",w)}),i=N(),p=I(()=>i.state.Project.projects.find(w=>w.id===a.projectId)),d=h(!1);async function _(w){d.value=!0;try{i.commit("cleanError"),await i.dispatch("deleteProject",{projectId:w,orgId:a.orgId}),i.state.Root.currentError===void 0&&(f.value=!1)}catch(b){console.error(b),i.commit("error",{error:b})}d.value=!1}return(w,b)=>{var v;return g(),j(J,{modelValue:c(f),"onUpdate:modelValue":b[0]||(b[0]=x=>H(f)?f.value=x:null),content:"\u662F\u5426\u8981\u5220\u9664\u9879\u76EE"+((v=c(p))==null?void 0:v.title)+"?",type:"warning",loading:d.value,onConfirm:b[1]||(b[1]=x=>c(p)&&_(c(p).id))},null,8,["modelValue","content","loading"])}}});var ie=q(Ue,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogProjectDeleteConfirm.vue"]]);const $e={key:0,class:"text-h6"},Fe={key:1,class:"text-h6"},Be=S({props:{projectId:{type:Number,default:0},modelValue:{type:Boolean,default:!1},orgId:{type:String,required:!0}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=I({get:()=>a.modelValue,set:n=>k("update:modelValue",n)}),i=N(),p=I(()=>i.state.Project.projects.find(n=>n.id===a.projectId)),d=I(()=>{const n=p.value;return{title:(n==null?void 0:n.title)||"",remark:(n==null?void 0:n.remark)||""}}),_=h(d.value),w=I(()=>{const n=_.value,y=d.value;return n.title.trim()===y.title.trim()&&n.remark.trim()===y.remark.trim()}),b=I(()=>_.value.title.trim()!==""&&!w.value);ee(()=>{ve(()=>{f.value||(_.value=Object.assign({},d.value))})});const v=h(!1);async function x(){v.value=!0;try{const n=_.value;i.commit("cleanError"),a.projectId>0?await i.dispatch("updateProject",{projectId:a.projectId,title:n.title.trim(),remark:n.remark.trim(),orgId:a.orgId}):await i.dispatch("createProject",{orgId:a.orgId,title:n.title.trim(),remark:n.remark.trim()}),i.state.Root.currentError===void 0&&(f.value=!1)}catch(n){console.error(n),i.commit("error",{error:n})}v.value=!1}return(n,y)=>(g(),j(O,{modelValue:c(f),"onUpdate:modelValue":y[2]||(y[2]=V=>H(f)?f.value=V:null),"no-backdrop-dismiss":!c(w)},{default:t(()=>[e(Y,{class:"tw-w-96 q-pa-sm"},{default:t(()=>[e(ge,{onSubmit:x},{default:t(()=>[e($,null,{default:t(()=>[c(p)===void 0?(g(),E("div",$e,"\u521B\u5EFA\u9879\u76EE")):(g(),E("div",Fe,"\u7F16\u8F91\u9879\u76EE"))]),_:1}),e($,null,{default:t(()=>[e(Q,{modelValue:_.value.title,"onUpdate:modelValue":y[0]||(y[0]=V=>_.value.title=V),type:"text",label:"\u9879\u76EE\u540D",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(Q,{modelValue:_.value.remark,"onUpdate:modelValue":y[1]||(y[1]=V=>_.value.remark=V),type:"textarea",label:"\u5907\u6CE8",square:"",filled:""},null,8,["modelValue"])]),_:1}),e($,{align:"right",class:"tw-flex tw-gap-4 tw-flex-col-reverse lg:tw-flex-row lg:tw-justify-end"},{default:t(()=>[F(e(C,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[B,!0]]),e(C,{color:"primary","text-color":"black",type:"submit",label:c(p)===void 0?"\u521B\u5EFA":"\u4FDD\u5B58",disable:!c(b),loading:v.value,class:"lg:tw-w-24 tw-w-full"},null,8,["label","disable","loading"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","no-backdrop-dismiss"]))}});var de=q(Be,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogProjectForm.vue"]]);function De(o){return o?o.indexOf("manager")!==-1||o.indexOf("admin")!==-1:!1}function Pe(o){return o.indexOf("admin")!==-1}const ce=[{value:"admin",label:"\u7BA1\u7406\u5458"},{value:"manager",label:"\u53EF\u7F16\u8F91"},{value:"user",label:"\u4EC5\u67E5\u770B"}],pe=new Map;ce.forEach((o,k,a)=>{pe.set(o.value,o.label)});function qe(o){return pe.get(o)}const Se=r("div",{class:"text-h6"},"\u9879\u76EE\u6210\u5458\u7BA1\u7406",-1),Ae=U(" \u6DFB\u52A0 "),Me={role:"list",class:"tw-divide-y tw-divide-white/5"},Qe={class:"tw-min-w-0 tw-flex-auto"},Te={class:"tw-flex tw-items-center tw-gap-x-3"},Re=r("div",{class:"flex-none rounded-full p-1"},[r("div",{class:"tw-h-2 tw-w-2 tw-rounded-full tw-bg-current"})],-1),We={class:"tw-min-w-0 tw-text-sm tw-font-semibold tw-leading-6 tw-text-white"},Le={class:"tw-flex tw-gap-x-2"},Ne={class:"tw-whitespace-nowrap"},He=r("span",{class:"tw-text-gray-400"}," - ",-1),Ye={class:"tw-whitespace-nowrap tw-opacity-75"},Oe={class:"tw-mt-1 tw-flex tw-items-center tw-gap-x-2.5 tw-text-xs tw-leading-5 tw-text-gray-400"},ze={class:"tw-truncate tw-text-primary"},Ge=r("svg",{viewbox:"0 0 2 2",class:"tw-h-0.5 tw-w-0.5 tw-flex-none tw-fill-gray-300"},[r("circle",{cx:"1",cy:"1",r:"1"})],-1),Ke={class:"tw-whitespace-nowrap"},Xe={class:"rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset"},Je=U("\u79FB\u9664"),Ze=S({props:{projectId:{type:Number,default:0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(o,{emit:k}){const a=o,f=h("user"),i=I({get:()=>a.modelValue,set:s=>k("update:modelValue",s)}),p=h([]);async function d(){p.value=await ye(M,a.projectId)}te(()=>[a.projectId,i.value],async([,s])=>{s&&d(),_.value=""});const _=h(""),w=h(!1);async function b(){w.value=!0;try{await he(M,a.projectId,_.value,f.value),_.value="",await d()}finally{w.value=!1}}const v=h(),x=h(!1);function n(s){v.value=s,x.value=!0}function y(){v.value=void 0,x.value=!1}async function V(s){w.value=!0;try{await _e(M,a.projectId,s.id),await d()}finally{w.value=!1}}return(s,m)=>(g(),j(O,{modelValue:c(i),"onUpdate:modelValue":m[4]||(m[4]=u=>H(i)?i.value=u:null)},{default:t(()=>{var u;return[e(J,{modelValue:x.value,"onUpdate:modelValue":m[0]||(m[0]=l=>x.value=l),type:"warning",content:`\u786E\u5B9A\u8981\u79FB\u9664\u7528\u6237 ${(u=v.value)==null?void 0:u.name} \u5417\uFF1F`,onConfirm:m[1]||(m[1]=l=>v.value&&V(v.value).then(y))},null,8,["modelValue","content"]),e(Y,{class:"tw-w-full tw-mx-6 lg:tw-w-1/2"},{default:t(()=>[e($,null,{default:t(()=>[Se]),_:1}),e(A),e($,{class:"tw-flex md:tw-flex-row tw-flex-col tw-gap-2"},{default:t(()=>[e(Q,{modelValue:_.value,"onUpdate:modelValue":m[2]||(m[2]=l=>_.value=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u5E10\u53F7",dense:"",outlined:"",class:"tw-grow"},null,8,["modelValue"]),e(le,{modelValue:f.value,"onUpdate:modelValue":m[3]||(m[3]=l=>f.value=l),outlined:"",dense:"",class:"tw-w-full md:tw-w-32","emit-value":"","map-options":"",placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u6743\u9650",options:c(ce)},null,8,["modelValue","options"]),e(C,{loading:w.value,outline:"","text-color":"primary",onClick:b},{default:t(()=>[Ae]),_:1},8,["loading"])]),_:1}),e(A),e($,{style:{"max-height":"40vh",height:"40vh"},class:"scroll"},{default:t(()=>[e(oe,{class:"tw-w-full tw-h-full",offset:100},{default:t(()=>[r("ul",Me,[(g(!0),E(z,null,K(p.value,l=>(g(),E("li",{key:l.id,class:"tw-relative tw-flex tw-items-center tw-space-x-4 tw-py-2"},[r("div",Qe,[r("div",Te,[Re,r("h2",We,[r("a",Le,[r("span",Ne,D(l.name),1),He,r("span",Ye,D(l.permissions&&c(qe)(l.permissions[0])),1)])])]),r("div",Oe,[r("p",ze,D(l.account),1),Ge,r("p",Ke,D(c(ue)(l.createTime*1e3,"YYYY-MM-DD HH:mm")),1)])]),r("div",Xe,[e(C,{type:"primary",unelevated:"",class:"tw-text-red-500",onClick:we=>n(l)},{default:t(()=>[Je]),_:2},1032,["onClick"])])]))),128))])]),_:1})]),_:1}),e(A),e(X,{align:"right"},{default:t(()=>[F(e(C,{flat:"",label:"\u5173\u95ED",color:"primary"},null,512),[[B,!0]])]),_:1})]),_:1}),P(`
\u9879\u76EE\u4EBA\u5458\u7BA1\u7406
diff --git a/dist/assets/SummaryPage.9cc28269.js b/dist/assets/SummaryPage.08383290.js
similarity index 99%
rename from dist/assets/SummaryPage.9cc28269.js
rename to dist/assets/SummaryPage.08383290.js
index 98f492c..f5fb55f 100644
--- a/dist/assets/SummaryPage.9cc28269.js
+++ b/dist/assets/SummaryPage.08383290.js
@@ -1,4 +1,4 @@
-import{_ as is,k as as,r as Ne,m as os,P as mh,n as vf,o as rr,c as il,w as _t,a as dt,h as i_,b as cp,q as a_,R as o_,S as s_,T as ci,U as Pe,d as Fe,t as di,A as an,e as u_,Q as l_,i as f_,V as h_,l as Ao,ap as dp,K as Hn,u as v_,H as c_,I as d_,X as p_,p as Os}from"./index.d76e71bf.js";import{g as g_}from"./log.a88c5349.js";import{J as y_}from"./JSONViewer.6dded83c.js";import{f as _h}from"./datetime.561112b0.js";const m_={class:"full-width tw-mt-4 row flex-center tw-text-white tw-text-lg q-gutter-sm"},__=cp("span",null," \u6682\u65E0\u6570\u636E ",-1),w_=Fe("\u4EFB\u52A1\u540D\u79F0"),x_=Fe("\u9879\u76EE\u540D\u79F0"),S_=Fe("\u8282\u70B9 IP"),b_=Fe("\u5F00\u59CB\u65F6\u95F4"),T_=Fe("\u7ED3\u675F\u65F6\u95F4"),C_=as({props:{orgId:{type:String,required:!0}},setup(r){const t=r,e=Ne([]),n=Ne(0),i=Ne(!1),a=Ne({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),o=async()=>{i.value=!0;try{const l=await g_({oid:t.orgId,page:a.value.page,pagesize:a.value.rowsPerPage});l.list&&(n.value=l.total,e.value=l.list)}catch(l){console.log(l)}i.value=!1};o();const s=Ne();os(()=>{mh(()=>{var l;(l=s.value)==null||l.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});async function u({pagination:{page:l,rowsPerPage:f}}){const h=a.value;h.page=l,h.rowsPerPage=f,await o(),mh(()=>{var c;window.scrollTo({top:((c=s.value)==null?void 0:c.$el.offsetTop)||0})})}return vf(()=>{const l=a.value;l.rowsNumber=n.value}),(l,f)=>(rr(),il(an(h_),{ref_key:"table",ref:s,pagination:a.value,"onUpdate:pagination":f[0]||(f[0]=h=>a.value=h),class:"tw-w-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],title:"\u9519\u8BEF\u65E5\u5FD7","title-class":"tw-text-white",rows:e.value,loading:i.value,"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:u},{"top-right":_t(()=>[dt(i_,{flat:"",dense:"",loading:i.value,icon:"refresh",onClick:o},null,8,["loading"])]),"no-data":_t(()=>[cp("div",m_,[dt(a_,{size:"2em",name:"sentiment_dissatisfied"}),__])]),loading:_t(()=>[dt(o_,{showing:"",color:"primary"})]),body:_t(h=>[dt(f_,{class:"tw-m-4",flat:"",bordered:""},{default:_t(()=>[dt(s_,null,{default:_t(()=>[dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[w_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.taskName),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[x_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.projectName),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[S_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.clientIp),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[b_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(an(_h)(h.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[T_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(an(_h)(h.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),dt(u_),dt(l_,{class:"tw-w-full tw-overflow-x-auto"},{default:_t(()=>[dt(y_,{json:h.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var M_=is(C_,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/Summary/ErrTaskLogs.vue"]]);/*! *****************************************************************************
+import{_ as is,k as as,r as Ne,m as os,P as mh,n as vf,o as rr,c as il,w as _t,a as dt,h as i_,b as cp,q as a_,R as o_,S as s_,T as ci,U as Pe,d as Fe,t as di,A as an,e as u_,Q as l_,i as f_,V as h_,l as Ao,ap as dp,K as Hn,u as v_,H as c_,I as d_,X as p_,p as Os}from"./index.f89dd3dd.js";import{g as g_}from"./log.a17ac264.js";import{J as y_}from"./JSONViewer.177a839e.js";import{f as _h}from"./datetime.561112b0.js";const m_={class:"full-width tw-mt-4 row flex-center tw-text-white tw-text-lg q-gutter-sm"},__=cp("span",null," \u6682\u65E0\u6570\u636E ",-1),w_=Fe("\u4EFB\u52A1\u540D\u79F0"),x_=Fe("\u9879\u76EE\u540D\u79F0"),S_=Fe("\u8282\u70B9 IP"),b_=Fe("\u5F00\u59CB\u65F6\u95F4"),T_=Fe("\u7ED3\u675F\u65F6\u95F4"),C_=as({props:{orgId:{type:String,required:!0}},setup(r){const t=r,e=Ne([]),n=Ne(0),i=Ne(!1),a=Ne({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),o=async()=>{i.value=!0;try{const l=await g_({oid:t.orgId,page:a.value.page,pagesize:a.value.rowsPerPage});l.list&&(n.value=l.total,e.value=l.list)}catch(l){console.log(l)}i.value=!1};o();const s=Ne();os(()=>{mh(()=>{var l;(l=s.value)==null||l.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});async function u({pagination:{page:l,rowsPerPage:f}}){const h=a.value;h.page=l,h.rowsPerPage=f,await o(),mh(()=>{var c;window.scrollTo({top:((c=s.value)==null?void 0:c.$el.offsetTop)||0})})}return vf(()=>{const l=a.value;l.rowsNumber=n.value}),(l,f)=>(rr(),il(an(h_),{ref_key:"table",ref:s,pagination:a.value,"onUpdate:pagination":f[0]||(f[0]=h=>a.value=h),class:"tw-w-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],title:"\u9519\u8BEF\u65E5\u5FD7","title-class":"tw-text-white",rows:e.value,loading:i.value,"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:u},{"top-right":_t(()=>[dt(i_,{flat:"",dense:"",loading:i.value,icon:"refresh",onClick:o},null,8,["loading"])]),"no-data":_t(()=>[cp("div",m_,[dt(a_,{size:"2em",name:"sentiment_dissatisfied"}),__])]),loading:_t(()=>[dt(o_,{showing:"",color:"primary"})]),body:_t(h=>[dt(f_,{class:"tw-m-4",flat:"",bordered:""},{default:_t(()=>[dt(s_,null,{default:_t(()=>[dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[w_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.taskName),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[x_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.projectName),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[S_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(h.row.clientIp),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[b_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(an(_h)(h.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),dt(ci,null,{default:_t(()=>[dt(Pe,{overline:""},{default:_t(()=>[T_]),_:1}),dt(Pe,null,{default:_t(()=>[Fe(di(an(_h)(h.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),dt(u_),dt(l_,{class:"tw-w-full tw-overflow-x-auto"},{default:_t(()=>[dt(y_,{json:h.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var M_=is(C_,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/Summary/ErrTaskLogs.vue"]]);/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
diff --git a/dist/assets/TaskDetail.78b1d32f.js b/dist/assets/TaskDetail.78b1d32f.js
deleted file mode 100644
index c956432..0000000
--- a/dist/assets/TaskDetail.78b1d32f.js
+++ /dev/null
@@ -1 +0,0 @@
-var Me=Object.defineProperty;var xe=Object.getOwnPropertySymbols;var Le=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable;var Ve=(F,t,p)=>t in F?Me(F,t,{enumerable:!0,configurable:!0,writable:!0,value:p}):F[t]=p,_e=(F,t)=>{for(var p in t||(t={}))Le.call(t,p)&&Ve(F,p,t[p]);if(xe)for(var p of xe(t))Ye.call(t,p)&&Ve(F,p,t[p]);return F};import{_ as Z,u as ee,r as g,o as w,c as T,w as o,a as e,b as D,t as R,d as C,Q as Y,e as be,f as j,g as He,h as V,i as se,j as Ke,k as re,l as x,m as X,n as ke,p as A,q as pe,s as De,v as We,x as G,C as ne,y as Je,z as qe,A as s,B as fe,D as ye,E as Ge,F as Fe,G as Xe,H as Ee,I as oe,J as Ie,K as U,L as Ae,M as je,N as Ze,O as Ue,P as Se,R as et,S as Re,T as ae,U as z,V as tt,W as Pe,X as H,Y as te,Z as lt,$ as at,a0 as ut,a1 as ot,a2 as st,a3 as Be,a4 as rt,a5 as me,a6 as nt,a7 as Te,a8 as $e}from"./index.d76e71bf.js";import{u as it}from"./index.650f2770.js";import{C as ue}from"./Confirm.47315734.js";import{a as dt,f as ie}from"./datetime.561112b0.js";import{T as le}from"./task.f3ffd066.js";import{J as Qe}from"./JSONViewer.6dded83c.js";import{G as ct}from"./log.a88c5349.js";import{t as mt,b as pt}from"./thumbStyle.856de4cb.js";const ft=D("br",null,null,-1),vt=D("br",null,null,-1),wt=C(" \u63D0\u4EA4 "),gt={props:{projectId:{type:Number,required:!0},clientIp:{type:String,required:!0},version:{type:String,required:!0},weight:{type:Number,required:!0},region:{type:String,required:!0}},setup(F){const t=F,p=ee(),f=g(t.weight),k=g(!1);async function m(){k.value=!0;const i=t.clientIp.split(":")[0];try{await Ke(t.projectId,i,Number(f.value)),await p.dispatch("Project/fetchProjectClients",{projectId:t.projectId}),p.commit("success",{message:"\u4FEE\u6539\u6210\u529F"})}catch(l){console.error(l)}k.value=!1}return(i,l)=>(w(),T(se,{flat:"",bordered:""},{default:o(()=>[e(Y,{class:"text-center"},{default:o(()=>[D("strong",null,R(F.clientIp),1),ft,C(" "+R(F.region)+" ",1),vt,C(" "+R(F.version),1)]),_:1}),e(be),e(Y,{class:"flex flex-center"},{default:o(()=>[e(j,{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=B=>f.value=B),outlined:"",dense:"",type:"number",prefix:"\u6743\u91CD\uFF1A",onKeyup:He(m,["enter"])},{append:o(()=>[e(V,{dense:"",unelevated:"",loading:k.value,onClick:m},{default:o(()=>[wt]),_:1},8,["loading"])]),_:1},8,["modelValue","onKeyup"])]),_:1})]),_:1}))}};var kt=Z(gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/ClientNode.vue"]]);const bt=D("div",{class:"text-h6"},"\u521B\u5EFA\u4EFB\u52A1",-1),yt=D("div",{class:"text-base"}," \u4E34\u65F6\u4EFB\u52A1\u540C\u6837\u4F1A\u4E0E\u6B63\u5F0F\u7684\u5B9A\u65F6\u4EFB\u52A1\u7ADE\u4E89\u76F8\u540C\u7684\u9501\uFF0C\u8BF7\u907F\u514D\u8C03\u5EA6\u51B2\u7A81(\u6307\u8FD0\u884C\u65F6\u95F4\u6709\u4EA4\u96C6) ",-1),Ft={class:"tw-flex tw-gap-2 tw-justify-end tw-mb-2"},Et={class:"row items-center justify-end"},It={class:"row items-center justify-end"},jt=re({props:{modelValue:{type:Boolean,default:!1},task:{type:Object,default:()=>({})}},emits:["update:modelValue","created"],setup(F,{emit:t}){const p=F,f=x({get:()=>p.modelValue,set:b=>{t("update:modelValue",b),l.value=""}}),k=x(()=>{const b=[{value:"",label:"\u968F\u673A"}],d=m.state.Project.projectClients.get(p.task.projectId);return d&&d.forEach((r,P,I)=>{const _=r.clientIP;b.push({value:_,label:_})}),b}),m=ee(),i=g({taskId:p.task.taskId,projectId:p.task.projectId,command:p.task.command,remark:p.task.remark,noseize:p.task.noseize,scheduleTime:0,timeout:p.task.timeout,host:p.task.host}),l=g("");function B(b){l.value=dt(b*60,"YYYY-MM-DD HH:mm")}X(()=>{ke(()=>{f.value&&(i.value=Object.assign({},{taskId:p.task.taskId,projectId:p.task.projectId,command:p.task.command,remark:p.task.remark,noseize:p.task.noseize,scheduleTime:0,timeout:p.task.timeout,host:p.task.host}))})});const $=g(!1);async function h(){const b=i.value;if(!b.remark){m.commit("error",{error:{message:"\u4EFB\u52A1\u8BF4\u660E\u5FC5\u586B"}});return}if(!b.command){m.commit("error",{error:{message:"\u6267\u884C\u547D\u4EE4\u5FC5\u586B"}});return}$.value=!0;try{const d=await Xe({projectId:b.projectId,taskId:b.taskId,command:b.command,noseize:b.noseize,scheduleTime:Date.parse(l.value)/1e3,remark:b.remark,timeout:b.timeout,host:b.host});d.code!==0?m.commit("error",{error:{message:d.message}}):(m.commit("success",{message:"\u521B\u5EFA\u6210\u529F"}),f.value=!1,t("created"))}catch{}$.value=!1}return(b,d)=>(w(),T(Fe,{modelValue:s(f),"onUpdate:modelValue":d[11]||(d[11]=r=>Ge(f)?f.value=r:null),persistent:""},{default:o(()=>[e(se,{class:"tw-w-96 q-pa-sm"},{default:o(()=>[e(Y,null,{default:o(()=>[bt,yt]),_:1}),e(Y,{style:{"max-height":"50vh"},class:"scroll"},{default:o(()=>[F.task?(w(),T(j,{key:"id","model-value":F.task.taskId,disable:"",label:"\u5173\u8054\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"remark",modelValue:i.value.remark,"onUpdate:modelValue":d[0]||(d[0]=r=>i.value.remark=r),type:"textarea",label:"\u4EFB\u52A1\u8BF4\u660E *",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),D("div",Ft,[e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E00\u5206\u949F\u540E",onClick:d[1]||(d[1]=r=>B(1))}),e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E94\u5206\u949F\u540E",onClick:d[2]||(d[2]=r=>B(5))}),e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E00\u5C0F\u65F6\u540E",onClick:d[3]||(d[3]=r=>B(60))})]),e(j,{modelValue:l.value,"onUpdate:modelValue":d[6]||(d[6]=r=>l.value=r),filled:"",square:"",label:"\u8C03\u5EA6\u65F6\u95F4 *",class:"tw-mb-4"},{prepend:o(()=>[e(pe,{name:"event",class:"cursor-pointer"},{default:o(()=>[e(De,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o(()=>[e(We,{modelValue:l.value,"onUpdate:modelValue":d[4]||(d[4]=r=>l.value=r),"text-color":"black",mask:"YYYY-MM-DD HH:mm"},{default:o(()=>[D("div",Et,[G(e(V,{label:"\u5173\u95ED",color:"primary",flat:""},null,512),[[ne,!0]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:o(()=>[e(pe,{name:"access_time",class:"cursor-pointer"},{default:o(()=>[e(De,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o(()=>[e(Je,{modelValue:l.value,"onUpdate:modelValue":d[5]||(d[5]=r=>l.value=r),mask:"YYYY-MM-DD HH:mm","text-color":"black",format24h:""},{default:o(()=>[D("div",It,[G(e(V,{label:"\u5173\u95ED",color:"primary",flat:""},null,512),[[ne,!0]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(j,{key:"timeout",modelValue:i.value.timeout,"onUpdate:modelValue":d[7]||(d[7]=r=>i.value.timeout=r),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 * (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:i.value.command,"onUpdate:modelValue":d[8]||(d[8]=r=>i.value.command=r),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4 *",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(qe,{modelValue:i.value.host,"onUpdate:modelValue":d[9]||(d[9]=r=>i.value.host=r),"emit-value":"","map-options":"",autogrow:"",square:"",filled:"",label:"\u6267\u884C\u8282\u70B9",options:s(k),class:"tw-mb-4"},null,8,["modelValue","options"]),e(fe,{key:"noseize",modelValue:i.value.noseize,"onUpdate:modelValue":d[10]||(d[10]=r=>i.value.noseize=r),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"])]),_:1}),e(ye,{align:"right",class:"tw-flex tw-gap-2 tw-flex-col-reverse lg:tw-flex-row tw-justify-center lg:tw-justify-end"},{default:o(()=>[G(e(V,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[ne,!0]]),e(V,{color:"primary","text-color":"black",label:"\u521B\u5EFA",class:"lg:tw-w-24 tw-w-full !tw-ml-0",loading:$.value,onClick:h},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});var Ne=Z(jt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogTemporaryTaskForm.vue"]]);const Ct={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},ht={key:0,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},xt=C("\u7ED3\u675F\u8FDB\u7A0B"),Vt=C("\u7ACB\u5373\u6267\u884C"),_t=C("\u4E34\u65F6\u8C03\u5EA6 "),Dt=C(" \u6307\u5B9A\u65F6\u95F4\u8C03\u5EA6\u4E00\u6B21\u7684\u4EFB\u52A1 "),At=C("\u590D\u5236\u4EFB\u52A1 "),Bt=C(" \u4EE5\u5F53\u524D\u4EFB\u52A1\u5185\u5BB9\u4E3A\u57FA\u7840\u8FDB\u884C\u65B0\u4EFB\u52A1\u7684\u521B\u5EFA "),Tt={key:1,class:"tw-flex tw-pb-3 tw-flex-wrap tw-gap-2 text-h6"},$t={class:"q-pa-sm"},qt=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0}},setup(F){const t=F;function p(){N.push({name:"temporary_tasks",params:{projectId:t.projectId}})}const f=x(()=>({id:"",name:"",projectId:t.projectId,command:"",cronExpr:"0 0 0 * * * *",remark:"",timeout:300,createTime:0,status:0,isRunning:-1,noseize:0,exclusion:0,clientIp:"",tmpId:""}));function k(c,n){return!c||!n?!1:c.projectId===n.projectId&&c.name===n.name&&c.cronExpr===n.cronExpr&&c.remark===n.remark&&c.timeout===n.timeout&&c.status===n.status&&c.noseize===n.noseize&&c.command===n.command}const m=ee(),i=Ee(),l=x(()=>{var c;return(c=m.state.Task.tasks.get(t.projectId))==null?void 0:c.find(n=>n.id===t.id||n.id===i.query.copyid)}),B=g();function $(c){B.value={command:c.command,createTime:c.createTime,projectId:c.projectId,scheduleTime:0,taskId:c.id,userId:0,userName:"",noseize:0,timeout:c.timeout,remark:"",host:"",isRunning:-1,tmpId:""}}l.value&&$(l.value);const h=x(()=>m.state.Project.projects.find(c=>c.id===t.projectId)),b=g([]);function d(c){const n=[];c==null||c.forEach((q,J,ge)=>{n.push({value:q.id,label:q.title})}),b.value=n}m.state.Project.projects&&m.state.Project.projects.length>0&&d(m.state.Project.projects),oe(()=>m.state.Project.projects,(c,n)=>{d(n)});const r=g(Object.assign({},l.value||f.value)),P=x(()=>i.name&&i.name.toString()==="create_crontab_task"),I=x(()=>i.query.copyid&&i.query.copyid!=="");P.value&&(r.value.id="",r.value.isRunning=-1),oe(()=>t.id,(c,n)=>{var q;(t.id!==((q=l.value)==null?void 0:q.id)||!P.value&&r.value.id===""||r.value.id!==l.value.id)&&(r.value=Object.assign({},l.value||f.value)),r.value.isRunning=-1,l.value&&$(l.value)});const _=x(()=>{var c;return((c=l.value)==null?void 0:c.isRunning)===1?!1:!k(l.value,r.value)}),M=x(()=>{const{name:c,command:n,timeout:q,cronExpr:J}=r.value;return c!==""&&n!==""&&q>0&&J!==""}),O=x(()=>{const{name:c,command:n,timeout:q,cronExpr:J}=r.value;return c===""?"\u4EFB\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A":n===""?"\u6267\u884C\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A":q<=0?"\u8D85\u65F6\u65F6\u95F4\u672A\u6307\u5B9A":J===""?"\u8C03\u5EA6\u8BA1\u5212\u672A\u6307\u5B9A":""});async function y(){await m.dispatch("Task/fetchTasks",{projectId:t.projectId})}const N=Ie(),Q=g(!1);async function a(){if(m.commit("cleanError"),!M.value){m.commit("error",{error:{message:O.value}});return}Q.value=!0,(P.value||I.value)&&(r.value.id="");try{const c=await m.dispatch("saveTask",{task:JSON.parse(JSON.stringify(r.value))});P.value&&(await y(),N.push({name:"crontab_task",params:{projectId:r.value.projectId,taskId:c.id}}))}catch{}Q.value=!1}function u(){r.value=Object.assign({},l.value||f.value)}const v=g(!1),L=g(!1);async function de(c,n){m.commit("cleanError"),L.value=!0,console.log("delete loading",L.value);try{await m.dispatch("deleteTask",{projectId:c,taskId:n}),m.state.Root.currentError===void 0&&(await y(),N.push({name:"crontab_tasks",params:{projectId:i.params.projectId}}),v.value=!1)}catch(q){console.error(q),m.commit("error",{error:q})}L.value=!1}const K=g(!1),W=g(!1);async function S(c,n){W.value=!1,K.value=!0;try{await Ze(m.getters.apiv1,c,n)}catch{K.value=!1}}X(()=>{m.watch(c=>[c.Root.eventTask],([c])=>{!c||c.projectId!==t.projectId||c.taskId!==t.id||le.isFinished(c.status)&&(K.value=!1)})});const ve=g(!1),ce=g(!1),ze=async()=>{ce.value=!1,ve.value=!0;try{await Ue({projectId:t.projectId,taskId:t.id}),await y(),r.value.status=0}catch(c){console.error(c),m.commit("error",{error:c})}ve.value=!1},we=g(!1);function Oe(){var c;N.push({name:"create_crontab_task",query:{copyid:(c=l.value)==null?void 0:c.id}})}return(c,n)=>{var q,J,ge,Ce,he;return w(),U("div",Ct,[e(Ne,{modelValue:we.value,"onUpdate:modelValue":n[0]||(n[0]=E=>we.value=E),task:B.value,onCreated:p},null,8,["modelValue","task"]),e(ue,{modelValue:v.value,"onUpdate:modelValue":n[1]||(n[1]=E=>v.value=E),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((q=s(l))==null?void 0:q.name)+"?",type:"warning",loading:L.value,onConfirm:n[2]||(n[2]=E=>s(h)&&s(l)&&de(s(h).id,s(l).id))},null,8,["modelValue","content","loading"]),e(ue,{modelValue:ce.value,"onUpdate:modelValue":n[3]||(n[3]=E=>ce.value=E),content:"\u786E\u5B9A\u8981\u7ED3\u675F\u8FDB\u7A0B\u5417\uFF1F\u5F3A\u5236\u7ED3\u675F\u540E\u4EFB\u52A1\u7684\u542F\u7528\u72B6\u6001\u4F1A\u81EA\u52A8\u53D8\u66F4\u4E3A\u505C\u7528\u72B6\u6001\u3002",type:"warning",onConfirm:ze},null,8,["modelValue"]),e(ue,{modelValue:W.value,"onUpdate:modelValue":n[4]||(n[4]=E=>W.value=E),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:n[5]||(n[5]=E=>s(l)&&S(F.projectId,s(l).id))},null,8,["modelValue"]),s(P)?A("v-if",!0):(w(),U("div",ht,[e(V,{flat:"",dense:"",class:"tw-w-24 tw-text-red-300 lg:tw-hidden",icon:"delete",onClick:n[6]||(n[6]=E=>v.value=!0)}),((J=s(l))==null?void 0:J.isRunning)===1?(w(),T(V,{key:0,flat:"","text-color":"red",disable:((ge=s(l))==null?void 0:ge.isRunning)!==1,class:"tw-w-24 tw-ml-1",loading:ve.value,onClick:n[7]||(n[7]=E=>ce.value=!0)},{default:o(()=>[xt]),_:1},8,["disable","loading"])):A("v-if",!0),e(V,{color:"primary","text-color":"black",disable:s(_)||((Ce=s(l))==null?void 0:Ce.isRunning)===1,class:"tw-w-24",loading:K.value||((he=s(l))==null?void 0:he.isRunning)===1,onClick:n[8]||(n[8]=E=>W.value=!0)},{default:o(()=>[Vt]),_:1},8,["disable","loading"]),e(V,{color:"warning","text-color":"black",class:"tw-w-24 tw-opacity-90",onClick:n[9]||(n[9]=E=>we.value=!0)},{default:o(()=>[_t,e(Ae,{class:"bg-warning tw-text-black",offset:[10,10]},{default:o(()=>[Dt]),_:1})]),_:1}),e(V,{outline:"",class:"tw-w-24 tw-opacity-90",onClick:Oe},{default:o(()=>[At,e(Ae,{class:"bg-warning tw-text-black",offset:[10,10]},{default:o(()=>[Bt]),_:1})]),_:1})])),s(I)?(w(),U("div",Tt," \u590D\u5236\u4EFB\u52A1 ")):A("v-if",!0),e(je,{class:"tw-w-full",onSubmit:a,onReset:u},{default:o(()=>[s(l)&&!s(P)?(w(),T(j,{key:"id","model-value":s(l).id,disable:"",label:"\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),s(P)?(w(),T(qe,{key:1,modelValue:r.value.projectId,"onUpdate:modelValue":n[10]||(n[10]=E=>r.value.projectId=E),square:"",filled:"",class:"tw-w-full tw-mb-4","emit-value":"","map-options":"",label:"\u6240\u5C5E\u9879\u76EE",placeholder:"\u8BF7\u9009\u62E9\u9879\u76EE",options:b.value},null,8,["modelValue","options"])):(w(),T(j,{key:"project","model-value":s(h)?s(h).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])),e(j,{key:"name",modelValue:r.value.name,"onUpdate:modelValue":n[11]||(n[11]=E=>r.value.name=E),label:"\u4EFB\u52A1\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"cron",modelValue:r.value.cronExpr,"onUpdate:modelValue":n[12]||(n[12]=E=>r.value.cronExpr=E),label:"\u8C03\u5EA6\u8BA1\u5212 (*\u79D2 *\u5206 *\u65F6 *\u65E5 *\u6708 *\u5468 *\u5E74)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout",modelValue:r.value.timeout,"onUpdate:modelValue":n[13]||(n[13]=E=>r.value.timeout=E),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:r.value.command,"onUpdate:modelValue":n[14]||(n[14]=E=>r.value.command=E),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"remark",modelValue:r.value.remark,"onUpdate:modelValue":n[15]||(n[15]=E=>r.value.remark=E),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"noseize",modelValue:r.value.noseize,"onUpdate:modelValue":n[16]||(n[16]=E=>r.value.noseize=E),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"status",modelValue:r.value.status,"onUpdate:modelValue":n[17]||(n[17]=E=>r.value.status=E),"false-value":0,"true-value":1,label:"\u662F\u5426\u542F\u7528",class:"tw-mb-4"},null,8,["modelValue"]),D("div",$t,[e(V,{color:"primary","text-color":"black",type:"submit",label:s(I)?"\u786E\u8BA4\u590D\u5236":"\u4FDD\u5B58",disable:!s(_),loading:Q.value,class:"lg:tw-w-24 tw-w-full lg:tw-mr-4 lg:tw-mb-0 tw-mb-4"},null,8,["label","disable","loading"]),e(V,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",disable:!s(_),class:"lg:tw-w-24 tw-w-full"},null,8,["disable"])])]),_:1})])}}});var Ut=Z(qt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskDetail.vue"]]);const St=C("\u8282\u70B9 IP"),Rt=C("\u5F00\u59CB\u65F6\u95F4"),Pt=C("\u7ED3\u675F\u65F6\u95F4"),Qt=re({props:{id:{type:String,required:!0},projectId:{type:Number,required:!0}},emits:["onpage"],setup(F,{emit:t}){const p=F,f=ee(),k=x(()=>f.state.Root.taskLogs),m=x(()=>f.state.Root.taskLogsTotal),i=x(()=>f.state.Root.loadingTaskLogs),l=g({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),B=g();X(()=>{Se(()=>{var h;(h=B.value)==null||h.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});function $({pagination:{page:h,rowsPerPage:b}}){const d=l.value;d.page=h,d.rowsPerPage=b,t("onpage")}return ke(()=>{const h=l.value;h.rowsNumber=m.value}),X(async()=>{ke(async()=>{const h=l.value;await f.dispatch("fetchTaskLogs",{projectId:p.projectId,taskId:p.id,page:h.page,pageSize:h.rowsPerPage})})}),(h,b)=>(w(),T(s(tt),{ref_key:"logTable",ref:B,pagination:l.value,"onUpdate:pagination":b[0]||(b[0]=d=>l.value=d),class:"tw-w-full tw-h-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],rows:s(k),loading:s(i),"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:$},{loading:o(()=>[e(et,{showing:"",color:"primary"})]),body:o(d=>[e(se,{class:"tw-my-4 tw-x-full",flat:"",bordered:""},{default:o(()=>[e(Re,null,{default:o(()=>[e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[St]),_:1}),e(z,null,{default:o(()=>[C(R(d.row.clientIp),1)]),_:2},1024)]),_:2},1024),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Rt]),_:1}),e(z,null,{default:o(()=>[C(R(s(ie)(d.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Pt]),_:1}),e(z,null,{default:o(()=>[C(R(s(ie)(d.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),e(be),e(Y,{class:"tw-w-full tw-overflow-x-auto"},{default:o(()=>[e(Qe,{json:d.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var Nt=Z(Qt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskLogs.vue"]]);const zt=C("\u8282\u70B9 IP"),Ot=C("\u5F00\u59CB\u65F6\u95F4"),Mt=C("\u7ED3\u675F\u65F6\u95F4"),Lt={key:1,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},Yt={key:2,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},Ht=C("\u5220\u9664\u4EFB\u52A1"),Kt=C("\u7ED3\u675F\u8FDB\u7A0B"),Wt=C("\u590D\u5236\u4EFB\u52A1"),Jt={key:3},Gt=re({props:{id:{type:Number,default:0,required:!0},projectId:{type:Number,required:!0}},setup(F){const t=F,p=g(!1),f=g();function k(a){f.value={taskId:a.taskId,projectId:a.projectId,remark:a.remark,command:a.command,timeout:a.timeout,host:a.host,createTime:0,isRunning:0,noseize:0,tmpId:"",scheduleTime:0,userId:0,userName:""}}const m=g(),i=ee(),l=g();function B(){var a;l.value=(a=i.state.Task.temporaryTasks.get(t.projectId))==null?void 0:a.find(u=>u.id===Number(t.id))}oe(()=>t.id,(a,u)=>{console.log("watched",a,u),B()}),oe(l,(a,u)=>{console.log("watched task",a,u),(!m.value||(a==null?void 0:a.tmpId)!==(u==null?void 0:u.tmpId))&&Q()});function $(){l.value?(k(l.value),p.value=!0):console.error("failed to copy task, the task is not found")}const h=x(()=>i.state.Project.projects.find(a=>a.id===t.projectId));async function b(){try{await i.dispatch("Task/fetchTemporaryTasks",{projectId:t.projectId})}catch(a){console.error("failed to dispatch fetchTemporaryTasks",a)}}X(()=>{i.watch(a=>[a.Root.eventTask],async([a])=>{var u;!a||a.projectId!==t.projectId||a.tmpId!==((u=l.value)==null?void 0:u.tmpId)||!m.value&&le.isFinished(a.status)&&Q()}),B()});const d=g(!1),r=g(!1),P=async()=>{if(!!l.value){r.value=!1,d.value=!0;try{await Ue({projectId:t.projectId,taskId:l.value.taskId}),await b()}catch(a){console.log(a)}d.value=!1}},I=g(!1),_=g(!1),M=Ie(),O=async()=>{_.value=!1,I.value=!0;try{await lt(Number(t.id)),await b(),M.back()}catch(a){console.log(a)}I.value=!1},y=g(!0);function N(a=500){let u=!1,v=!1;return y.value=!0,setTimeout(()=>{v=!0,u&&(y.value=!1)},a),()=>{u=!0,v&&(y.value=!1)}}async function Q(){if(!l.value)return;const a=N(500);m.value=null;try{m.value=await ct({taskId:l.value.taskId,projectId:l.value.projectId,tmpId:l.value.tmpId})}catch(u){console.error(u)}a()}return(a,u)=>{var v,L,de,K,W;return w(),U(te,null,[e(Ne,{modelValue:p.value,"onUpdate:modelValue":u[0]||(u[0]=S=>p.value=S),task:f.value,onCreated:b},null,8,["modelValue","task"]),e(ue,{modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=S=>r.value=S),content:"\u786E\u5B9A\u8981\u7ED3\u675F\u8FDB\u7A0B\u5417\uFF1F",type:"warning",onConfirm:P},null,8,["modelValue"]),e(ue,{modelValue:_.value,"onUpdate:modelValue":u[2]||(u[2]=S=>_.value=S),content:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u4E34\u65F6\u4EFB\u52A1\u5417\uFF1F",type:"warning",onConfirm:O},null,8,["modelValue"]),G(e(H,{type:"QInput",class:"tw-h-52 tw-mb-4",animation:"fade"},null,512),[[Pe,y.value]]),!y.value&&m.value?(w(),T(se,{key:0,class:"tw-mb-4",flat:"",bordered:""},{default:o(()=>[e(Re,null,{default:o(()=>[e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[zt]),_:1}),e(z,null,{default:o(()=>[C(R(m.value.clientIp),1)]),_:1})]),_:1}),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Ot]),_:1}),e(z,null,{default:o(()=>[C(R(s(ie)(m.value.startTime*1e3)),1)]),_:1})]),_:1}),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Mt]),_:1}),e(z,null,{default:o(()=>[C(R(s(ie)(m.value.endTime*1e3)),1)]),_:1})]),_:1})]),_:1}),e(be),e(Y,{class:"tw-w-full tw-overflow-x-auto"},{default:o(()=>[e(Qe,{json:m.value.result},null,8,["json"])]),_:1})]),_:1})):A("v-if",!0),y.value?(w(),U("div",Lt,[e(H,{type:"QBtn",animation:"fade"})])):A("v-if",!0),y.value?A("v-if",!0):(w(),U("div",Yt,[(v=l.value)!=null&&v.isRunning?(w(),T(V,{key:0,loading:!0})):A("v-if",!0),((L=l.value)==null?void 0:L.isRunning)!==1&&!((de=m.value)!=null&&de.result)?(w(),T(V,{key:1,"text-color":"red",outline:"",class:"tw-w-24 tw-ml-1",loading:I.value,onClick:u[3]||(u[3]=S=>_.value=!0)},{default:o(()=>[Ht]),_:1},8,["loading"])):A("v-if",!0),((K=l.value)==null?void 0:K.isRunning)===1?(w(),T(V,{key:2,outline:"","text-color":"red",disable:((W=l.value)==null?void 0:W.isRunning)!==1,class:"tw-w-24 tw-ml-1",loading:d.value,onClick:u[4]||(u[4]=S=>r.value=!0)},{default:o(()=>[Kt]),_:1},8,["disable","loading"])):A("v-if",!0),e(V,{outline:"",class:"tw-w-24 tw-ml-1",onClick:$},{default:o(()=>[Wt]),_:1})])),y.value?(w(),U("div",Jt,[e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"})])):A("v-if",!0),!y.value&&l.value?(w(),T(je,{key:4,class:"tw-w-full"},{default:o(()=>[l.value?(w(),T(j,{key:"id","model-value":l.value.taskId+" - "+l.value.tmpId,disable:"",label:"\u4EFB\u52A1 ID\uFF08task_id - tmp_id\uFF09",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"project","model-value":s(h)?s(h).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"remark",modelValue:l.value.remark,"onUpdate:modelValue":u[5]||(u[5]=S=>l.value.remark=S),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"cron","model-value":s(ie)(l.value.scheduleTime*1e3,"YYYY-MM-DD HH:mm"),label:"\u8C03\u5EA6\u65F6\u95F4",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"timeout",modelValue:l.value.timeout,"onUpdate:modelValue":u[6]||(u[6]=S=>l.value.timeout=S),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:l.value.command,"onUpdate:modelValue":u[7]||(u[7]=S=>l.value.command=S),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout","model-value":l.value.host||"\u968F\u673A",label:"\u6307\u5B9A\u6267\u884C\u8282\u70B9",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"noseize","model-value":l.value.noseize===1?"\u662F":"\u5426",type:"textarea",label:"\u5E76\u884C\u8C03\u5EA6",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])]),_:1})):A("v-if",!0)],64)}}});var Xt=Z(Gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TemporaryTaskDetail.vue"]]);const Zt={class:"q-ml-sm"},el={key:0,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-1"},tl=C(" \u6267\u884C "),ll={class:"q-pa-sm"},al=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0}},setup(F){const t=F,p=x(()=>({id:"",name:"",projectId:t.projectId,command:"",remark:"",timeout:300,createTime:0,noseize:0})),f=ee(),k=x(()=>{var a;return(a=f.state.WorkFlowTask.tasks.get(t.projectId))==null?void 0:a.find(u=>u.id===t.id)}),m=x(()=>f.state.Project.projects.find(a=>a.id===t.projectId)),i=g(Object.assign({},k.value||p.value));oe(()=>t.id,(a,u)=>{var v;(t.id!==((v=k.value)==null?void 0:v.id)||!O.value&&i.value.id===""||i.value.id!==k.value.id)&&(i.value=Object.assign({},k.value||p.value))});const l=g(!0);oe(k,()=>{l.value&&(l.value=!1,i.value=Object.assign({},k.value||p.value))});const B=x(()=>JSON.stringify(k.value)!==JSON.stringify(i.value)),$=x(()=>{const{name:a,command:u,timeout:v}=i.value;return a!==""&&u!==""&&v>0}),h=x(()=>{const{name:a,command:u,timeout:v}=i.value;return a===""?"\u4EFB\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A":u===""?"\u6267\u884C\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A":v<=0?"\u8D85\u65F6\u65F6\u95F4\u672A\u6307\u5B9A":""}),b=Ie(),d=g(!1);async function r(){d.value=!0;try{if(f.commit("cleanError"),!$.value){f.commit("error",{error:{message:h.value}});return}if(await f.dispatch("saveWorkFlowTask",{task:i.value}),l.value=!0,await f.dispatch("WorkFlowTask/fetchTasks",{projectId:t.projectId}),O.value){const a=Object.assign([],f.state.WorkFlowTask.tasks.get(t.projectId)||[]);a.sort((v,L)=>v.createTime-L.createTime);const u=a[a.length-1];b.push({name:"workflow_task",params:{projectId:t.projectId,taskId:u.id}})}}catch(a){console.error(a),f.commit("error",{error:a})}d.value=!1}function P(){i.value=Object.assign({},k.value||p.value)}const I=g(!1);async function _(a,u){f.commit("cleanError"),await f.dispatch("deleteWorkFlowTask",{projectId:a,taskId:u}),f.state.Root.currentError===void 0&&(f.dispatch("WorkFlowTask/fetchTasks",_e({},t)),b.push({name:"workflow_tasks"}),I.value=!1)}const M=Ee(),O=x(()=>M.name&&M.name.toString()==="create_workflow_task"),y=g(!1),N=g(!1);async function Q(a,u){N.value=!1,y.value=!0;try{await ut(f.getters.apiv1,a,u)}catch(v){y.value=!0,console.error(v)}}return X(()=>{f.watch(a=>[a.Root.eventWorkFlowTask],([a])=>{var u;console.log(a),!(!a||a.projectId!==t.projectId||a.taskId!==t.id)&&(f.commit("notifySuccess",{message:`\u4EFB\u52A1 ${(u=k.value)==null?void 0:u.name} \u5F53\u524D\u72B6\u6001: ${a.status}`}),le.isRunning(a.status)?y.value=!0:le.isFinished(a.status)&&(y.value=!1))}),f.watch(a=>[a.Root.eventTask],([a])=>{var u;!a||a.projectId!==t.projectId||a.taskId!==t.id||(f.commit("notifySuccess",{message:`\u4EFB\u52A1 ${(u=k.value)==null?void 0:u.name} \u5F53\u524D\u72B6\u6001: ${a.status}`}),le.isRunning(a.status)?y.value=!0:le.isFinished(a.status)&&(y.value=!1))})}),(a,u)=>(w(),U(te,null,[e(Fe,{modelValue:I.value,"onUpdate:modelValue":u[1]||(u[1]=v=>I.value=v)},{default:o(()=>[e(se,null,{default:o(()=>[e(Y,{class:"row items-center"},{default:o(()=>{var v;return[e(at,{icon:"delete",color:"primary","text-color":"white"}),D("span",Zt," \u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1 "+R((v=s(k))==null?void 0:v.name),1)]}),_:1}),e(ye,{align:"right"},{default:o(()=>[G(e(V,{flat:"",label:"\u53D6\u6D88",color:"primary"},null,512),[[ne,!0]]),e(V,{flat:"",label:"\u5220\u9664",color:"red",onClick:u[0]||(u[0]=()=>s(m)&&s(k)&&_(s(m).id,s(k).id))})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(O)?A("v-if",!0):(w(),U("div",el,[e(V,{flat:"",class:"tw-w-24 tw-text-red-300 lg:tw-hidden",icon:"delete",onClick:u[2]||(u[2]=v=>I.value=!0)}),e(V,{color:"primary","text-color":"black",disable:s(B),class:"tw-w-24",loading:y.value,onClick:u[3]||(u[3]=()=>N.value=!0)},{default:o(()=>[tl]),_:1},8,["disable","loading"])])),e(je,{class:"tw-w-full",onSubmit:r,onReset:P},{default:o(()=>[s(k)?(w(),T(j,{key:"id","model-value":s(k).id,disable:"",label:"\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"project","model-value":s(m)?s(m).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"name",modelValue:i.value.name,"onUpdate:modelValue":u[4]||(u[4]=v=>i.value.name=v),label:"\u4EFB\u52A1\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout",modelValue:i.value.timeout,"onUpdate:modelValue":u[5]||(u[5]=v=>i.value.timeout=v),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:i.value.command,"onUpdate:modelValue":u[6]||(u[6]=v=>i.value.command=v),type:"textarea",placeholder:'echo "hello word"',label:"\u6267\u884C\u6307\u4EE4",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"remark",modelValue:i.value.remark,"onUpdate:modelValue":u[7]||(u[7]=v=>i.value.remark=v),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"noseize",modelValue:i.value.noseize,"onUpdate:modelValue":u[8]||(u[8]=v=>i.value.noseize=v),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"]),D("div",ll,[e(V,{color:"primary","text-color":"black",type:"submit",label:"\u4FDD\u5B58",loading:d.value,disable:!s(B),class:"lg:tw-w-24 tw-w-full lg:tw-mr-4 lg:tw-mb-0 tw-mb-4"},null,8,["loading","disable"]),e(V,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",disable:!s(B),class:"lg:tw-w-24 tw-w-full"},null,8,["disable"])])]),_:1}),e(ue,{modelValue:N.value,"onUpdate:modelValue":u[9]||(u[9]=v=>N.value=v),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:u[10]||(u[10]=v=>s(k)&&Q(F.projectId,s(k).id))},null,8,["modelValue"])],64))}});var ul=Z(al,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowTaskDetail.vue"]]);const ol={class:"tw-px-4 tw-pt-2 tw-w-full tw-h-full tw-flex tw-flex-col"},sl={class:"tw-text-[#7e7e7e] tw-mb-4"},rl={class:"tw-flex tw-items-center tw-justify-start tw-gap-4 tw-text-lg tw-mb-4"},nl={key:0,class:"tw-pb-4"},il={class:"tw-flex tw-gap-2 tw-items-center"},dl=C(" \u5728\u7EBF\u8282\u70B9: "),cl={class:"tw-flex tw-w-full tw-grow"},ml={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},pl={key:0,class:"tw-hidden lg:tw-block"},fl=D("div",{class:"text-h6"},"\u8282\u70B9\u5217\u8868",-1),vl=D("div",{class:"text-base"},"\u4EC5 v2.4.6 \u53CA\u4EE5\u4E0A\u7248\u672C\u652F\u6301\u6743\u91CD\u53D8\u66F4",-1),wl={class:"tw-text-lg"},gl=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0},type:{type:String,default:"crontab"}},setup(F){const t=F,p=g(!1);function f(){p.value=!0}const k=ee(),m=x(()=>k.state.Project.projects.find(I=>I.id===t.projectId)),i=Ee(),l=g(),B=()=>{Se(()=>{var I;(I=l.value)==null||I.setScrollPosition("vertical",0)})},$=x(()=>i.name&&i.name.toString()===`create_${t.type}_task`),h=x(()=>{var I;if($.value)return"detail";if(i.name){const _=i.name.toString();if(_===`${t.type}_task_logs`)return"logs";if(_===`${t.type}_task`)return"detail"}throw new Error(`Unknown route name ${(I=i.name)==null?void 0:I.toString()}`)}),{width:b}=it();async function d(){await k.dispatch("Project/fetchProjectClients",{projectId:t.projectId})}X(()=>{d()}),ot(()=>{k.commit("Project/setProjectClients",{clients:[]})});const r=x(()=>k.state.Project.projectClients.get(t.projectId)),P=x(()=>{const I=new Map;return r.value&&r.value.forEach((_,M,O)=>{let y=I.get(_.region);y||(I.set(_.region,[]),y=I.get(_.region)),y==null||y.push(_)}),I});return(I,_)=>{var M,O;return w(),U(te,null,[D("div",ol,[D("div",sl,[D("div",rl,[D("span",null,[e(pe,{name:"folder"}),C(" "+R((M=s(m))==null?void 0:M.title),1)]),D("span",null," ID: "+R(F.projectId),1)]),s(m)&&s(m).remark.trim()!==""?(w(),U("div",nl,R(s(m).remark),1)):A("v-if",!0),D("div",il,[e(pe,{name:"hive"}),dl,D("span",{class:st(["tw-font-extrabold",{"tw-text-primary":s(r)&&s(r).length>0,"tw-text-red-500":!s(r)||s(r).length===0}])},R(((O=s(r))==null?void 0:O.length)||0),3),G(D("span",{class:"tw-text-white tw-cursor-pointer",onClick:f},"\u67E5\u770B\u8282\u70B9",512),[[Pe,s(r)&&s(r).length>0]])])]),s($)?A("v-if",!0):(w(),T(Be,{key:0,"model-value":s(h),"active-color":"primary",align:"left",class:"lg:tw-hidden tw-display"},{default:o(()=>[e(me,{name:"detail",label:"\u8BE6\u60C5",to:{name:`${t.type}_task`,params:{taskId:t.id}},replace:""},null,8,["to"]),e(me,{name:"logs",label:"\u65E5\u5FD7",to:{name:`${t.type}_task_logs`,params:{taskId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"])),D("div",cl,[D("div",ml,[e(s(rt),{ref_key:"scroll",ref:l,class:"tw-grow","thumb-style":s(mt),"bar-style":s(pt)},{default:o(()=>[e(nt,{"model-value":s(h),animated:"",vertical:s(b)>=1024,class:"tw-w-full tw-h-full tw-bg-[#121212] tw-p-0 lg:tw-pr-4"},{default:o(()=>[e(Te,{name:"detail",class:"tw-px-0"},{default:o(()=>[t.type==="crontab"?(w(),T(Ut,{key:0,id:t.id,"project-id":t.projectId},null,8,["id","project-id"])):t.type==="workflow"?(w(),T(ul,{key:1,id:t.id,"project-id":t.projectId},null,8,["id","project-id"])):A("v-if",!0),t.type==="temporary"?(w(),T(Xt,{key:2,id:Number(t.id),"project-id":t.projectId},null,8,["id","project-id"])):A("v-if",!0)]),_:1}),e(Te,{name:"logs",class:"tw-px-0"},{default:o(()=>[e(Nt,{id:t.id,"project-id":t.projectId,onOnpage:B},null,8,["id","project-id"])]),_:1})]),_:1},8,["model-value","vertical"])]),_:1},8,["thumb-style","bar-style"])]),t.type!="temporary"?(w(),U("div",pl,[s($)?A("v-if",!0):(w(),T(Be,{key:0,"model-value":s(h),"active-color":"primary",vertical:"","switch-indicator":"",align:"left"},{default:o(()=>[e(me,{name:"detail",label:"\u8BE6\u60C5",to:{name:`${t.type}_task`,params:{taskId:t.id}},replace:""},null,8,["to"]),e(me,{name:"logs",label:"\u65E5\u5FD7",to:{name:`${t.type}_task_logs`,params:{taskId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"]))])):A("v-if",!0)])]),e(Fe,{modelValue:p.value,"onUpdate:modelValue":_[0]||(_[0]=y=>p.value=y)},{default:o(()=>[e(se,{class:"tw-w-full"},{default:o(()=>[e(Y,null,{default:o(()=>[fl,vl]),_:1}),(w(!0),U(te,null,$e(s(P),([y,N])=>(w(),U(te,{key:y},[e(Y,null,{default:o(()=>[D("div",wl,"Region: "+R(y),1)]),_:2},1024),e(Y,{class:"tw-q-pt-none scroll tw-flex tw-items-center tw-justify-center tw-align-middle tw-gap-2 tw-flex-wrap",style:{"max-height":"60vh"}},{default:o(()=>[(w(!0),U(te,null,$e(N,Q=>(w(),U("div",{key:Q.clientIP,class:"md:tw-w-[48%] tw-w-full"},[e(kt,{"client-ip":Q.clientIP,weight:Q.weight,"project-id":F.projectId,version:Q.version,region:Q.region},null,8,["client-ip","weight","project-id","version","region"])]))),128))]),_:2},1024)],64))),128)),e(ye,{align:"right",class:"text-teal"},{default:o(()=>[G(e(V,{flat:"",label:"OK"},null,512),[[ne,!0]])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64)}}});var xl=Z(gl,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/TaskDetail.vue"]]);export{xl as default};
diff --git a/dist/assets/TaskDetail.ce4b2fe5.js b/dist/assets/TaskDetail.ce4b2fe5.js
new file mode 100644
index 0000000..3727fef
--- /dev/null
+++ b/dist/assets/TaskDetail.ce4b2fe5.js
@@ -0,0 +1 @@
+var Le=Object.defineProperty;var xe=Object.getOwnPropertySymbols;var Ye=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ve=(F,t,p)=>t in F?Le(F,t,{enumerable:!0,configurable:!0,writable:!0,value:p}):F[t]=p,_e=(F,t)=>{for(var p in t||(t={}))Ye.call(t,p)&&Ve(F,p,t[p]);if(xe)for(var p of xe(t))He.call(t,p)&&Ve(F,p,t[p]);return F};import{_ as Z,u as ee,r as g,o as w,c as T,w as o,a as e,b as D,t as R,d as h,Q as Y,e as ye,f as j,g as Ke,h as V,i as se,j as We,k as re,l as x,m as X,n as ke,p as A,q as pe,s as De,v as Je,x as G,C as ne,y as Ge,z as Ue,A as s,B as fe,D as be,E as Xe,F as Fe,G as Ze,H as Ee,I as oe,J as Ie,K as U,L as Ae,M as je,N as et,O as Se,P as Re,R as tt,S as Pe,T as ae,U as z,V as lt,W as Qe,X as H,Y as te,Z as at,$ as ut,a0 as ot,a1 as st,a2 as rt,a3 as Be,a4 as Te,a5 as me,a6 as nt,a7 as $e,a8 as qe}from"./index.f89dd3dd.js";import{u as it}from"./index.c4564906.js";import{C as ue}from"./Confirm.4116c3bd.js";import{a as dt,f as ie}from"./datetime.561112b0.js";import{T as le}from"./task.f3ffd066.js";import{J as Ne}from"./JSONViewer.177a839e.js";import{G as ct}from"./log.a17ac264.js";import{t as mt,b as pt}from"./thumbStyle.856de4cb.js";const ft=D("br",null,null,-1),vt=D("br",null,null,-1),wt=h(" \u63D0\u4EA4 "),gt={props:{projectId:{type:Number,required:!0},clientIp:{type:String,required:!0},version:{type:String,required:!0},weight:{type:Number,required:!0},region:{type:String,required:!0}},setup(F){const t=F,p=ee(),f=g(t.weight),k=g(!1);async function m(){k.value=!0;const d=t.clientIp.split(":")[0];try{await We(t.projectId,d,Number(f.value)),await p.dispatch("Project/fetchProjectClients",{projectId:t.projectId}),p.commit("success",{message:"\u4FEE\u6539\u6210\u529F"})}catch(l){console.error(l)}k.value=!1}return(d,l)=>(w(),T(se,{flat:"",bordered:""},{default:o(()=>[e(Y,{class:"text-center"},{default:o(()=>[D("strong",null,R(F.clientIp),1),ft,h(" "+R(F.region)+" ",1),vt,h(" "+R(F.version),1)]),_:1}),e(ye),e(Y,{class:"flex flex-center"},{default:o(()=>[e(j,{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=B=>f.value=B),outlined:"",dense:"",type:"number",prefix:"\u6743\u91CD\uFF1A",onKeyup:Ke(m,["enter"])},{append:o(()=>[e(V,{dense:"",unelevated:"",loading:k.value,onClick:m},{default:o(()=>[wt]),_:1},8,["loading"])]),_:1},8,["modelValue","onKeyup"])]),_:1})]),_:1}))}};var kt=Z(gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/ClientNode.vue"]]);const yt=D("div",{class:"text-h6"},"\u521B\u5EFA\u4EFB\u52A1",-1),bt=D("div",{class:"text-base"}," \u4E34\u65F6\u4EFB\u52A1\u540C\u6837\u4F1A\u4E0E\u6B63\u5F0F\u7684\u5B9A\u65F6\u4EFB\u52A1\u7ADE\u4E89\u76F8\u540C\u7684\u9501\uFF0C\u8BF7\u907F\u514D\u8C03\u5EA6\u51B2\u7A81(\u6307\u8FD0\u884C\u65F6\u95F4\u6709\u4EA4\u96C6) ",-1),Ft={class:"tw-flex tw-gap-2 tw-justify-end tw-mb-2"},Et={class:"row items-center justify-end"},It={class:"row items-center justify-end"},jt=re({props:{modelValue:{type:Boolean,default:!1},task:{type:Object,default:()=>({})}},emits:["update:modelValue","created"],setup(F,{emit:t}){const p=F,f=x({get:()=>p.modelValue,set:y=>{t("update:modelValue",y),l.value=""}}),k=x(()=>{const y=[{value:"",label:"\u968F\u673A"}],c=m.state.Project.projectClients.get(p.task.projectId);return c&&c.forEach((r,P,I)=>{const _=r.clientIP;y.push({value:_,label:_})}),y}),m=ee(),d=g({taskId:p.task.taskId,projectId:p.task.projectId,command:p.task.command,remark:p.task.remark,noseize:p.task.noseize,scheduleTime:0,timeout:p.task.timeout,host:p.task.host}),l=g("");function B(y){l.value=dt(y*60,"YYYY-MM-DD HH:mm")}X(()=>{ke(()=>{f.value&&(d.value=Object.assign({},{taskId:p.task.taskId,projectId:p.task.projectId,command:p.task.command,remark:p.task.remark,noseize:p.task.noseize,scheduleTime:0,timeout:p.task.timeout,host:p.task.host}))})});const $=g(!1);async function C(){const y=d.value;if(!y.remark){m.commit("error",{error:{message:"\u4EFB\u52A1\u8BF4\u660E\u5FC5\u586B"}});return}if(!y.command){m.commit("error",{error:{message:"\u6267\u884C\u547D\u4EE4\u5FC5\u586B"}});return}$.value=!0;try{const c=await Ze({projectId:y.projectId,taskId:y.taskId,command:y.command,noseize:y.noseize,scheduleTime:Date.parse(l.value)/1e3,remark:y.remark,timeout:y.timeout,host:y.host});c.code!==0?m.commit("error",{error:{message:c.message}}):(m.commit("success",{message:"\u521B\u5EFA\u6210\u529F"}),f.value=!1,t("created"))}catch{}$.value=!1}return(y,c)=>(w(),T(Fe,{modelValue:s(f),"onUpdate:modelValue":c[11]||(c[11]=r=>Xe(f)?f.value=r:null),persistent:""},{default:o(()=>[e(se,{class:"tw-w-96 q-pa-sm"},{default:o(()=>[e(Y,null,{default:o(()=>[yt,bt]),_:1}),e(Y,{style:{"max-height":"50vh"},class:"scroll"},{default:o(()=>[F.task?(w(),T(j,{key:"id","model-value":F.task.taskId,disable:"",label:"\u5173\u8054\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"remark",modelValue:d.value.remark,"onUpdate:modelValue":c[0]||(c[0]=r=>d.value.remark=r),type:"textarea",label:"\u4EFB\u52A1\u8BF4\u660E *",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),D("div",Ft,[e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E00\u5206\u949F\u540E",onClick:c[1]||(c[1]=r=>B(1))}),e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E94\u5206\u949F\u540E",onClick:c[2]||(c[2]=r=>B(5))}),e(V,{dense:"",unelevated:"",class:"tw-text-xs tw-h-6 tw-px-3",color:"warning","text-color":"black",label:"\u4E00\u5C0F\u65F6\u540E",onClick:c[3]||(c[3]=r=>B(60))})]),e(j,{modelValue:l.value,"onUpdate:modelValue":c[6]||(c[6]=r=>l.value=r),filled:"",square:"",label:"\u8C03\u5EA6\u65F6\u95F4 *",class:"tw-mb-4"},{prepend:o(()=>[e(pe,{name:"event",class:"cursor-pointer"},{default:o(()=>[e(De,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o(()=>[e(Je,{modelValue:l.value,"onUpdate:modelValue":c[4]||(c[4]=r=>l.value=r),"text-color":"black",mask:"YYYY-MM-DD HH:mm"},{default:o(()=>[D("div",Et,[G(e(V,{label:"\u5173\u95ED",color:"primary",flat:""},null,512),[[ne,!0]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:o(()=>[e(pe,{name:"access_time",class:"cursor-pointer"},{default:o(()=>[e(De,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o(()=>[e(Ge,{modelValue:l.value,"onUpdate:modelValue":c[5]||(c[5]=r=>l.value=r),mask:"YYYY-MM-DD HH:mm","text-color":"black",format24h:""},{default:o(()=>[D("div",It,[G(e(V,{label:"\u5173\u95ED",color:"primary",flat:""},null,512),[[ne,!0]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),e(j,{key:"timeout",modelValue:d.value.timeout,"onUpdate:modelValue":c[7]||(c[7]=r=>d.value.timeout=r),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 * (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:d.value.command,"onUpdate:modelValue":c[8]||(c[8]=r=>d.value.command=r),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4 *",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(Ue,{modelValue:d.value.host,"onUpdate:modelValue":c[9]||(c[9]=r=>d.value.host=r),"emit-value":"","map-options":"",autogrow:"",square:"",filled:"",label:"\u6267\u884C\u8282\u70B9",options:s(k),class:"tw-mb-4"},null,8,["modelValue","options"]),e(fe,{key:"noseize",modelValue:d.value.noseize,"onUpdate:modelValue":c[10]||(c[10]=r=>d.value.noseize=r),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"])]),_:1}),e(be,{align:"right",class:"tw-flex tw-gap-2 tw-flex-col-reverse lg:tw-flex-row tw-justify-center lg:tw-justify-end"},{default:o(()=>[G(e(V,{flat:"",label:"\u53D6\u6D88",class:"lg:tw-w-24 tw-w-full"},null,512),[[ne,!0]]),e(V,{color:"primary","text-color":"black",label:"\u521B\u5EFA",class:"lg:tw-w-24 tw-w-full !tw-ml-0",loading:$.value,onClick:C},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});var ze=Z(jt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogTemporaryTaskForm.vue"]]);const ht={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Ct={key:0,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},xt=h("\u7ED3\u675F\u8FDB\u7A0B"),Vt=h("\u7ACB\u5373\u6267\u884C"),_t=h("\u4E34\u65F6\u8C03\u5EA6 "),Dt=h(" \u6307\u5B9A\u65F6\u95F4\u8C03\u5EA6\u4E00\u6B21\u7684\u4EFB\u52A1 "),At=h("\u590D\u5236\u4EFB\u52A1 "),Bt=h(" \u4EE5\u5F53\u524D\u4EFB\u52A1\u5185\u5BB9\u4E3A\u57FA\u7840\u8FDB\u884C\u65B0\u4EFB\u52A1\u7684\u521B\u5EFA "),Tt={key:1,class:"tw-flex tw-pb-3 tw-flex-wrap tw-gap-2 text-h6"},$t={class:"q-pa-sm"},qt=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0}},setup(F){const t=F;function p(){N.push({name:"temporary_tasks",params:{projectId:t.projectId}})}const f=x(()=>({id:"",name:"",projectId:t.projectId,command:"",cronExpr:"0 0 0 * * * *",remark:"",timeout:300,createTime:0,status:0,isRunning:-1,noseize:0,exclusion:0,clientIp:"",tmpId:""}));function k(i,n){return!i||!n?!1:i.projectId===n.projectId&&i.name===n.name&&i.cronExpr===n.cronExpr&&i.remark===n.remark&&i.timeout===n.timeout&&i.status===n.status&&i.noseize===n.noseize&&i.command===n.command}const m=ee(),d=Ee(),l=x(()=>{var i;return(i=m.state.Task.tasks.get(t.projectId))==null?void 0:i.find(n=>n.id===t.id||n.id===d.query.copyid)}),B=g();function $(i){B.value={command:i.command,createTime:i.createTime,projectId:i.projectId,scheduleTime:0,taskId:i.id,userId:0,userName:"",noseize:0,timeout:i.timeout,remark:"",host:"",isRunning:-1,tmpId:""}}l.value&&$(l.value);const C=x(()=>m.state.Project.projects.find(i=>i.id===t.projectId)),y=g([]);function c(i){const n=[];i==null||i.forEach((q,J,ge)=>{n.push({value:q.id,label:q.title})}),y.value=n}m.state.Project.projects&&m.state.Project.projects.length>0&&c(m.state.Project.projects),oe(()=>m.state.Project.projects,(i,n)=>{c(n)});const r=g(Object.assign({},l.value||f.value)),P=x(()=>d.name&&d.name.toString()==="create_crontab_task"),I=x(()=>d.query.copyid&&d.query.copyid!=="");P.value&&(r.value.id="",r.value.isRunning=-1),oe(()=>t.id,(i,n)=>{var q;(t.id!==((q=l.value)==null?void 0:q.id)||!P.value&&r.value.id===""||r.value.id!==l.value.id)&&(r.value=Object.assign({},l.value||f.value)),r.value.isRunning=-1,l.value&&$(l.value)});const _=x(()=>{var i;return((i=l.value)==null?void 0:i.isRunning)===1?!1:!k(l.value,r.value)}),M=x(()=>{const{name:i,command:n,timeout:q,cronExpr:J}=r.value;return i!==""&&n!==""&&q>0&&J!==""}),O=x(()=>{const{name:i,command:n,timeout:q,cronExpr:J}=r.value;return i===""?"\u4EFB\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A":n===""?"\u6267\u884C\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A":q<=0?"\u8D85\u65F6\u65F6\u95F4\u672A\u6307\u5B9A":J===""?"\u8C03\u5EA6\u8BA1\u5212\u672A\u6307\u5B9A":""});async function b(i){await m.dispatch("Task/fetchTasks",{projectId:i})}const N=Ie(),Q=g(!1);async function a(){if(m.commit("cleanError"),!M.value){m.commit("error",{error:{message:O.value}});return}Q.value=!0,(P.value||I.value)&&(r.value.id="");try{const i=await m.dispatch("saveTask",{task:JSON.parse(JSON.stringify(r.value))});P.value&&(await b(r.value.projectId),N.push({name:"crontab_task",params:{projectId:r.value.projectId,taskId:i.id}}))}catch{}Q.value=!1}function u(){r.value=Object.assign({},l.value||f.value)}const v=g(!1),L=g(!1);async function de(i,n){m.commit("cleanError"),L.value=!0,console.log("delete loading",L.value);try{await m.dispatch("deleteTask",{projectId:i,taskId:n}),m.state.Root.currentError===void 0&&(await b(t.projectId),N.push({name:"crontab_tasks",params:{projectId:t.projectId}}),v.value=!1)}catch(q){console.error(q),m.commit("error",{error:q})}L.value=!1}const K=g(!1),W=g(!1);async function S(i,n){W.value=!1,K.value=!0;try{await et(m.getters.apiv1,i,n)}catch{K.value=!1}}X(()=>{m.watch(i=>[i.Root.eventTask],([i])=>{!i||i.projectId!==t.projectId||i.taskId!==t.id||le.isFinished(i.status)&&(K.value=!1)})});const ve=g(!1),ce=g(!1),Oe=async()=>{ce.value=!1,ve.value=!0;try{await Se({projectId:t.projectId,taskId:t.id}),await b(t.projectId),r.value.status=0}catch(i){console.error(i),m.commit("error",{error:i})}ve.value=!1},we=g(!1);function Me(){var i;N.push({name:"create_crontab_task",query:{copyid:(i=l.value)==null?void 0:i.id}})}return(i,n)=>{var q,J,ge,he,Ce;return w(),U("div",ht,[e(ze,{modelValue:we.value,"onUpdate:modelValue":n[0]||(n[0]=E=>we.value=E),task:B.value,onCreated:p},null,8,["modelValue","task"]),e(ue,{modelValue:v.value,"onUpdate:modelValue":n[1]||(n[1]=E=>v.value=E),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((q=s(l))==null?void 0:q.name)+"?",type:"warning",loading:L.value,onConfirm:n[2]||(n[2]=E=>s(C)&&s(l)&&de(s(C).id,s(l).id))},null,8,["modelValue","content","loading"]),e(ue,{modelValue:ce.value,"onUpdate:modelValue":n[3]||(n[3]=E=>ce.value=E),content:"\u786E\u5B9A\u8981\u7ED3\u675F\u8FDB\u7A0B\u5417\uFF1F\u5F3A\u5236\u7ED3\u675F\u540E\u4EFB\u52A1\u7684\u542F\u7528\u72B6\u6001\u4F1A\u81EA\u52A8\u53D8\u66F4\u4E3A\u505C\u7528\u72B6\u6001\u3002",type:"warning",onConfirm:Oe},null,8,["modelValue"]),e(ue,{modelValue:W.value,"onUpdate:modelValue":n[4]||(n[4]=E=>W.value=E),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:n[5]||(n[5]=E=>s(l)&&S(F.projectId,s(l).id))},null,8,["modelValue"]),s(P)?A("v-if",!0):(w(),U("div",Ct,[e(V,{flat:"",dense:"",class:"tw-w-24 tw-text-red-300 lg:tw-hidden",icon:"delete",onClick:n[6]||(n[6]=E=>v.value=!0)}),((J=s(l))==null?void 0:J.isRunning)===1?(w(),T(V,{key:0,flat:"","text-color":"red",disable:((ge=s(l))==null?void 0:ge.isRunning)!==1,class:"tw-w-24 tw-ml-1",loading:ve.value,onClick:n[7]||(n[7]=E=>ce.value=!0)},{default:o(()=>[xt]),_:1},8,["disable","loading"])):A("v-if",!0),e(V,{color:"primary","text-color":"black",disable:s(_)||((he=s(l))==null?void 0:he.isRunning)===1,class:"tw-w-24",loading:K.value||((Ce=s(l))==null?void 0:Ce.isRunning)===1,onClick:n[8]||(n[8]=E=>W.value=!0)},{default:o(()=>[Vt]),_:1},8,["disable","loading"]),e(V,{color:"warning","text-color":"black",class:"tw-w-24 tw-opacity-90",onClick:n[9]||(n[9]=E=>we.value=!0)},{default:o(()=>[_t,e(Ae,{class:"bg-warning tw-text-black",offset:[10,10]},{default:o(()=>[Dt]),_:1})]),_:1}),e(V,{outline:"",class:"tw-w-24 tw-opacity-90",onClick:Me},{default:o(()=>[At,e(Ae,{class:"bg-warning tw-text-black",offset:[10,10]},{default:o(()=>[Bt]),_:1})]),_:1})])),s(I)?(w(),U("div",Tt," \u590D\u5236\u4EFB\u52A1 ")):A("v-if",!0),e(je,{class:"tw-w-full",onSubmit:a,onReset:u},{default:o(()=>[s(l)&&!s(P)?(w(),T(j,{key:"id","model-value":s(l).id,disable:"",label:"\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),s(P)?(w(),T(Ue,{key:1,modelValue:r.value.projectId,"onUpdate:modelValue":n[10]||(n[10]=E=>r.value.projectId=E),square:"",filled:"",class:"tw-w-full tw-mb-4","emit-value":"","map-options":"",label:"\u6240\u5C5E\u9879\u76EE",placeholder:"\u8BF7\u9009\u62E9\u9879\u76EE",options:y.value},null,8,["modelValue","options"])):(w(),T(j,{key:"project","model-value":s(C)?s(C).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])),e(j,{key:"name",modelValue:r.value.name,"onUpdate:modelValue":n[11]||(n[11]=E=>r.value.name=E),label:"\u4EFB\u52A1\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"cron",modelValue:r.value.cronExpr,"onUpdate:modelValue":n[12]||(n[12]=E=>r.value.cronExpr=E),label:"\u8C03\u5EA6\u8BA1\u5212 (*\u79D2 *\u5206 *\u65F6 *\u65E5 *\u6708 *\u5468 *\u5E74)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout",modelValue:r.value.timeout,"onUpdate:modelValue":n[13]||(n[13]=E=>r.value.timeout=E),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:r.value.command,"onUpdate:modelValue":n[14]||(n[14]=E=>r.value.command=E),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"remark",modelValue:r.value.remark,"onUpdate:modelValue":n[15]||(n[15]=E=>r.value.remark=E),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"noseize",modelValue:r.value.noseize,"onUpdate:modelValue":n[16]||(n[16]=E=>r.value.noseize=E),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"status",modelValue:r.value.status,"onUpdate:modelValue":n[17]||(n[17]=E=>r.value.status=E),"false-value":0,"true-value":1,label:"\u662F\u5426\u542F\u7528",class:"tw-mb-4"},null,8,["modelValue"]),D("div",$t,[e(V,{color:"primary","text-color":"black",type:"submit",label:s(I)?"\u786E\u8BA4\u590D\u5236":"\u4FDD\u5B58",disable:!s(_),loading:Q.value,class:"lg:tw-w-24 tw-w-full lg:tw-mr-4 lg:tw-mb-0 tw-mb-4"},null,8,["label","disable","loading"]),e(V,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",disable:!s(_),class:"lg:tw-w-24 tw-w-full"},null,8,["disable"])])]),_:1})])}}});var Ut=Z(qt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskDetail.vue"]]);const St=h("\u8282\u70B9 IP"),Rt=h("\u5F00\u59CB\u65F6\u95F4"),Pt=h("\u7ED3\u675F\u65F6\u95F4"),Qt=re({props:{id:{type:String,required:!0},projectId:{type:Number,required:!0}},emits:["onpage"],setup(F,{emit:t}){const p=F,f=ee(),k=x(()=>f.state.Root.taskLogs),m=x(()=>f.state.Root.taskLogsTotal),d=x(()=>f.state.Root.loadingTaskLogs),l=g({sortBy:"",descending:!1,page:1,rowsPerPage:5,rowsNumber:0}),B=g();X(()=>{Re(()=>{var C;(C=B.value)==null||C.$el.querySelector("table.q-table").classList.add("tw-table-fixed")})});function $({pagination:{page:C,rowsPerPage:y}}){const c=l.value;c.page=C,c.rowsPerPage=y,t("onpage")}return ke(()=>{const C=l.value;C.rowsNumber=m.value}),X(async()=>{ke(async()=>{const C=l.value;await f.dispatch("fetchTaskLogs",{projectId:p.projectId,taskId:p.id,page:C.page,pageSize:C.rowsPerPage})})}),(C,y)=>(w(),T(s(lt),{ref_key:"logTable",ref:B,pagination:l.value,"onUpdate:pagination":y[0]||(y[0]=c=>l.value=c),class:"tw-w-full tw-h-full tw-bg-[#121212]","rows-per-page-options":[5,10,15],rows:s(k),loading:s(d),"row-key":"id",color:"primary",flat:"","hide-header":"",onRequest:$},{loading:o(()=>[e(tt,{showing:"",color:"primary"})]),body:o(c=>[e(se,{class:"tw-my-4 tw-x-full",flat:"",bordered:""},{default:o(()=>[e(Pe,null,{default:o(()=>[e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[St]),_:1}),e(z,null,{default:o(()=>[h(R(c.row.clientIp),1)]),_:2},1024)]),_:2},1024),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Rt]),_:1}),e(z,null,{default:o(()=>[h(R(s(ie)(c.row.startTime*1e3)),1)]),_:2},1024)]),_:2},1024),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Pt]),_:1}),e(z,null,{default:o(()=>[h(R(s(ie)(c.row.endTime*1e3)),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),e(ye),e(Y,{class:"tw-w-full tw-overflow-x-auto"},{default:o(()=>[e(Ne,{json:c.row.result},null,8,["json"])]),_:2},1024)]),_:2},1024)]),_:1},8,["pagination","rows","loading"]))}});var Nt=Z(Qt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskLogs.vue"]]);const zt=h("\u8282\u70B9 IP"),Ot=h("\u5F00\u59CB\u65F6\u95F4"),Mt=h("\u7ED3\u675F\u65F6\u95F4"),Lt={key:1,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},Yt={key:2,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-2"},Ht=h("\u5220\u9664\u4EFB\u52A1"),Kt=h("\u7ED3\u675F\u8FDB\u7A0B"),Wt=h("\u590D\u5236\u4EFB\u52A1"),Jt={key:3},Gt=re({props:{id:{type:Number,default:0,required:!0},projectId:{type:Number,required:!0}},setup(F){const t=F,p=g(!1),f=g();function k(a){f.value={taskId:a.taskId,projectId:a.projectId,remark:a.remark,command:a.command,timeout:a.timeout,host:a.host,createTime:0,isRunning:0,noseize:0,tmpId:"",scheduleTime:0,userId:0,userName:""}}const m=g(),d=ee(),l=g();function B(){var a;l.value=(a=d.state.Task.temporaryTasks.get(t.projectId))==null?void 0:a.find(u=>u.id===Number(t.id))}oe(()=>t.id,(a,u)=>{console.log("watched",a,u),B()}),oe(l,(a,u)=>{console.log("watched task",a,u),(!m.value||(a==null?void 0:a.tmpId)!==(u==null?void 0:u.tmpId))&&Q()});function $(){l.value?(k(l.value),p.value=!0):console.error("failed to copy task, the task is not found")}const C=x(()=>d.state.Project.projects.find(a=>a.id===t.projectId));async function y(){try{await d.dispatch("Task/fetchTemporaryTasks",{projectId:t.projectId})}catch(a){console.error("failed to dispatch fetchTemporaryTasks",a)}}X(()=>{d.watch(a=>[a.Root.eventTask],async([a])=>{var u;!a||a.projectId!==t.projectId||a.tmpId!==((u=l.value)==null?void 0:u.tmpId)||!m.value&&le.isFinished(a.status)&&Q()}),B()});const c=g(!1),r=g(!1),P=async()=>{if(!!l.value){r.value=!1,c.value=!0;try{await Se({projectId:t.projectId,taskId:l.value.taskId}),await y()}catch(a){console.log(a)}c.value=!1}},I=g(!1),_=g(!1),M=Ie(),O=async()=>{_.value=!1,I.value=!0;try{await at(Number(t.id)),await y(),M.back()}catch(a){console.log(a)}I.value=!1},b=g(!0);function N(a=500){let u=!1,v=!1;return b.value=!0,setTimeout(()=>{v=!0,u&&(b.value=!1)},a),()=>{u=!0,v&&(b.value=!1)}}async function Q(){if(!l.value)return;const a=N(500);m.value=null;try{m.value=await ct({taskId:l.value.taskId,projectId:l.value.projectId,tmpId:l.value.tmpId})}catch(u){console.error(u)}a()}return(a,u)=>{var v,L,de,K,W;return w(),U(te,null,[e(ze,{modelValue:p.value,"onUpdate:modelValue":u[0]||(u[0]=S=>p.value=S),task:f.value,onCreated:y},null,8,["modelValue","task"]),e(ue,{modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=S=>r.value=S),content:"\u786E\u5B9A\u8981\u7ED3\u675F\u8FDB\u7A0B\u5417\uFF1F",type:"warning",onConfirm:P},null,8,["modelValue"]),e(ue,{modelValue:_.value,"onUpdate:modelValue":u[2]||(u[2]=S=>_.value=S),content:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u4E34\u65F6\u4EFB\u52A1\u5417\uFF1F",type:"warning",onConfirm:O},null,8,["modelValue"]),G(e(H,{type:"QInput",class:"tw-h-52 tw-mb-4",animation:"fade"},null,512),[[Qe,b.value]]),!b.value&&m.value?(w(),T(se,{key:0,class:"tw-mb-4",flat:"",bordered:""},{default:o(()=>[e(Pe,null,{default:o(()=>[e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[zt]),_:1}),e(z,null,{default:o(()=>[h(R(m.value.clientIp),1)]),_:1})]),_:1}),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Ot]),_:1}),e(z,null,{default:o(()=>[h(R(s(ie)(m.value.startTime*1e3)),1)]),_:1})]),_:1}),e(ae,null,{default:o(()=>[e(z,{overline:""},{default:o(()=>[Mt]),_:1}),e(z,null,{default:o(()=>[h(R(s(ie)(m.value.endTime*1e3)),1)]),_:1})]),_:1})]),_:1}),e(ye),e(Y,{class:"tw-w-full tw-overflow-x-auto"},{default:o(()=>[e(Ne,{json:m.value.result},null,8,["json"])]),_:1})]),_:1})):A("v-if",!0),b.value?(w(),U("div",Lt,[e(H,{type:"QBtn",animation:"fade"})])):A("v-if",!0),b.value?A("v-if",!0):(w(),U("div",Yt,[(v=l.value)!=null&&v.isRunning?(w(),T(V,{key:0,loading:!0})):A("v-if",!0),((L=l.value)==null?void 0:L.isRunning)!==1&&!((de=m.value)!=null&&de.result)?(w(),T(V,{key:1,"text-color":"red",outline:"",class:"tw-w-24 tw-ml-1",loading:I.value,onClick:u[3]||(u[3]=S=>_.value=!0)},{default:o(()=>[Ht]),_:1},8,["loading"])):A("v-if",!0),((K=l.value)==null?void 0:K.isRunning)===1?(w(),T(V,{key:2,outline:"","text-color":"red",disable:((W=l.value)==null?void 0:W.isRunning)!==1,class:"tw-w-24 tw-ml-1",loading:c.value,onClick:u[4]||(u[4]=S=>r.value=!0)},{default:o(()=>[Kt]),_:1},8,["disable","loading"])):A("v-if",!0),e(V,{outline:"",class:"tw-w-24 tw-ml-1",onClick:$},{default:o(()=>[Wt]),_:1})])),b.value?(w(),U("div",Jt,[e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"}),e(H,{type:"QInput",class:"tw-mb-4",square:"",animation:"fade"})])):A("v-if",!0),!b.value&&l.value?(w(),T(je,{key:4,class:"tw-w-full"},{default:o(()=>[l.value?(w(),T(j,{key:"id","model-value":l.value.taskId+" - "+l.value.tmpId,disable:"",label:"\u4EFB\u52A1 ID\uFF08task_id - tmp_id\uFF09",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"project","model-value":s(C)?s(C).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"remark",modelValue:l.value.remark,"onUpdate:modelValue":u[5]||(u[5]=S=>l.value.remark=S),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"cron","model-value":s(ie)(l.value.scheduleTime*1e3,"YYYY-MM-DD HH:mm"),label:"\u8C03\u5EA6\u65F6\u95F4",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"timeout",modelValue:l.value.timeout,"onUpdate:modelValue":u[6]||(u[6]=S=>l.value.timeout=S),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:l.value.command,"onUpdate:modelValue":u[7]||(u[7]=S=>l.value.command=S),placeholder:'echo "hello word"',type:"textarea",label:"\u6267\u884C\u6307\u4EE4",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout","model-value":l.value.host||"\u968F\u673A",label:"\u6307\u5B9A\u6267\u884C\u8282\u70B9",square:"",disable:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"noseize","model-value":l.value.noseize===1?"\u662F":"\u5426",type:"textarea",label:"\u5E76\u884C\u8C03\u5EA6",autogrow:"",disable:"",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])]),_:1})):A("v-if",!0)],64)}}});var Xt=Z(Gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TemporaryTaskDetail.vue"]]);const Zt={class:"q-ml-sm"},el={key:0,class:"tw-flex tw-flex-row-reverse tw-pb-3 tw-flex-wrap tw-gap-1"},tl=h(" \u6267\u884C "),ll={class:"q-pa-sm"},al=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0}},setup(F){const t=F,p=x(()=>({id:"",name:"",projectId:t.projectId,command:"",remark:"",timeout:300,createTime:0,noseize:0})),f=ee(),k=x(()=>{var a;return(a=f.state.WorkFlowTask.tasks.get(t.projectId))==null?void 0:a.find(u=>u.id===t.id)}),m=x(()=>f.state.Project.projects.find(a=>a.id===t.projectId)),d=g(Object.assign({},k.value||p.value));oe(()=>t.id,(a,u)=>{var v;(t.id!==((v=k.value)==null?void 0:v.id)||!O.value&&d.value.id===""||d.value.id!==k.value.id)&&(d.value=Object.assign({},k.value||p.value))});const l=g(!0);oe(k,()=>{l.value&&(l.value=!1,d.value=Object.assign({},k.value||p.value))});const B=x(()=>JSON.stringify(k.value)!==JSON.stringify(d.value)),$=x(()=>{const{name:a,command:u,timeout:v}=d.value;return a!==""&&u!==""&&v>0}),C=x(()=>{const{name:a,command:u,timeout:v}=d.value;return a===""?"\u4EFB\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A":u===""?"\u6267\u884C\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A":v<=0?"\u8D85\u65F6\u65F6\u95F4\u672A\u6307\u5B9A":""}),y=Ie(),c=g(!1);async function r(){c.value=!0;try{if(f.commit("cleanError"),!$.value){f.commit("error",{error:{message:C.value}});return}if(await f.dispatch("saveWorkFlowTask",{task:d.value}),l.value=!0,await f.dispatch("WorkFlowTask/fetchTasks",{projectId:t.projectId}),O.value){const a=Object.assign([],f.state.WorkFlowTask.tasks.get(t.projectId)||[]);a.sort((v,L)=>v.createTime-L.createTime);const u=a[a.length-1];y.push({name:"workflow_task",params:{projectId:t.projectId,taskId:u.id}})}}catch(a){console.error(a),f.commit("error",{error:a})}c.value=!1}function P(){d.value=Object.assign({},k.value||p.value)}const I=g(!1);async function _(a,u){f.commit("cleanError"),await f.dispatch("deleteWorkFlowTask",{projectId:a,taskId:u}),f.state.Root.currentError===void 0&&(f.dispatch("WorkFlowTask/fetchTasks",_e({},t)),y.push({name:"workflow_tasks"}),I.value=!1)}const M=Ee(),O=x(()=>M.name&&M.name.toString()==="create_workflow_task"),b=g(!1),N=g(!1);async function Q(a,u){N.value=!1,b.value=!0;try{await ot(f.getters.apiv1,a,u)}catch(v){b.value=!0,console.error(v)}}return X(()=>{f.watch(a=>[a.Root.eventWorkFlowTask],([a])=>{var u;console.log(a),!(!a||a.projectId!==t.projectId||a.taskId!==t.id)&&(f.commit("notifySuccess",{message:`\u4EFB\u52A1 ${(u=k.value)==null?void 0:u.name} \u5F53\u524D\u72B6\u6001: ${a.status}`}),le.isRunning(a.status)?b.value=!0:le.isFinished(a.status)&&(b.value=!1))}),f.watch(a=>[a.Root.eventTask],([a])=>{var u;!a||a.projectId!==t.projectId||a.taskId!==t.id||(f.commit("notifySuccess",{message:`\u4EFB\u52A1 ${(u=k.value)==null?void 0:u.name} \u5F53\u524D\u72B6\u6001: ${a.status}`}),le.isRunning(a.status)?b.value=!0:le.isFinished(a.status)&&(b.value=!1))})}),(a,u)=>(w(),U(te,null,[e(Fe,{modelValue:I.value,"onUpdate:modelValue":u[1]||(u[1]=v=>I.value=v)},{default:o(()=>[e(se,null,{default:o(()=>[e(Y,{class:"row items-center"},{default:o(()=>{var v;return[e(ut,{icon:"delete",color:"primary","text-color":"white"}),D("span",Zt," \u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1 "+R((v=s(k))==null?void 0:v.name),1)]}),_:1}),e(be,{align:"right"},{default:o(()=>[G(e(V,{flat:"",label:"\u53D6\u6D88",color:"primary"},null,512),[[ne,!0]]),e(V,{flat:"",label:"\u5220\u9664",color:"red",onClick:u[0]||(u[0]=()=>s(m)&&s(k)&&_(s(m).id,s(k).id))})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(O)?A("v-if",!0):(w(),U("div",el,[e(V,{flat:"",class:"tw-w-24 tw-text-red-300 lg:tw-hidden",icon:"delete",onClick:u[2]||(u[2]=v=>I.value=!0)}),e(V,{color:"primary","text-color":"black",disable:s(B),class:"tw-w-24",loading:b.value,onClick:u[3]||(u[3]=()=>N.value=!0)},{default:o(()=>[tl]),_:1},8,["disable","loading"])])),e(je,{class:"tw-w-full",onSubmit:r,onReset:P},{default:o(()=>[s(k)?(w(),T(j,{key:"id","model-value":s(k).id,disable:"",label:"\u4EFB\u52A1 ID",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"])):A("v-if",!0),e(j,{key:"project","model-value":s(m)?s(m).title:"",disable:"",label:"\u6240\u5C5E\u9879\u76EE",square:"",filled:"",class:"tw-mb-4"},null,8,["model-value"]),e(j,{key:"name",modelValue:d.value.name,"onUpdate:modelValue":u[4]||(u[4]=v=>d.value.name=v),label:"\u4EFB\u52A1\u540D\u79F0",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"timeout",modelValue:d.value.timeout,"onUpdate:modelValue":u[5]||(u[5]=v=>d.value.timeout=v),modelModifiers:{number:!0},type:"number",label:"\u8D85\u65F6\u65F6\u95F4 (\u5355\u4F4D:\u79D2 s)",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"command",modelValue:d.value.command,"onUpdate:modelValue":u[6]||(u[6]=v=>d.value.command=v),type:"textarea",placeholder:'echo "hello word"',label:"\u6267\u884C\u6307\u4EE4",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(j,{key:"remark",modelValue:d.value.remark,"onUpdate:modelValue":u[7]||(u[7]=v=>d.value.remark=v),type:"textarea",label:"\u4EFB\u52A1\u5907\u6CE8",autogrow:"",square:"",filled:"",class:"tw-mb-4"},null,8,["modelValue"]),e(fe,{key:"noseize",modelValue:d.value.noseize,"onUpdate:modelValue":u[8]||(u[8]=v=>d.value.noseize=v),"false-value":0,"true-value":1,label:"\u5E76\u884C\u8C03\u5EA6",class:"tw-mb-4"},null,8,["modelValue"]),D("div",ll,[e(V,{color:"primary","text-color":"black",type:"submit",label:"\u4FDD\u5B58",loading:c.value,disable:!s(B),class:"lg:tw-w-24 tw-w-full lg:tw-mr-4 lg:tw-mb-0 tw-mb-4"},null,8,["loading","disable"]),e(V,{color:"primary",type:"reset",label:"\u91CD\u7F6E",flat:"",disable:!s(B),class:"lg:tw-w-24 tw-w-full"},null,8,["disable"])])]),_:1}),e(ue,{modelValue:N.value,"onUpdate:modelValue":u[9]||(u[9]=v=>N.value=v),content:"\u786E\u5B9A\u8981\u7ACB\u5373\u6267\u884C\u5417\uFF1F",onConfirm:u[10]||(u[10]=v=>s(k)&&Q(F.projectId,s(k).id))},null,8,["modelValue"])],64))}});var ul=Z(al,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowTaskDetail.vue"]]);const ol={class:"tw-px-4 tw-pt-2 tw-w-full tw-h-full tw-flex tw-flex-col"},sl={class:"tw-text-[#7e7e7e] tw-mb-4"},rl={class:"tw-flex tw-items-center tw-justify-start tw-gap-4 tw-text-lg tw-mb-4"},nl={key:0,class:"tw-pb-4"},il={class:"tw-flex tw-gap-2 tw-items-center"},dl=h(" \u5728\u7EBF\u8282\u70B9: "),cl={class:"tw-flex tw-w-full tw-grow"},ml={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},pl={key:0,class:"tw-hidden lg:tw-block"},fl=D("div",{class:"text-h6"},"\u8282\u70B9\u5217\u8868",-1),vl=D("div",{class:"text-base"},"\u4EC5 v2.4.6 \u53CA\u4EE5\u4E0A\u7248\u672C\u652F\u6301\u6743\u91CD\u53D8\u66F4",-1),wl={class:"tw-text-lg"},gl=re({props:{id:{type:String,default:""},projectId:{type:Number,required:!0},type:{type:String,default:"crontab"}},setup(F){const t=F,p=g(!1);function f(){p.value=!0}const k=ee(),m=x(()=>k.state.Project.projects.find(I=>I.id===t.projectId)),d=Ee(),l=g(),B=()=>{Re(()=>{var I;(I=l.value)==null||I.setScrollPosition("vertical",0)})},$=x(()=>d.name&&d.name.toString()===`create_${t.type}_task`),C=x(()=>{var I;if($.value)return"detail";if(d.name){const _=d.name.toString();if(_===`${t.type}_task_logs`)return"logs";if(_===`${t.type}_task`)return"detail"}throw new Error(`Unknown route name ${(I=d.name)==null?void 0:I.toString()}`)}),{width:y}=it();async function c(){await k.dispatch("Project/fetchProjectClients",{projectId:t.projectId})}X(()=>{c()}),st(()=>{k.commit("Project/setProjectClients",{clients:[]})});const r=x(()=>k.state.Project.projectClients.get(t.projectId)),P=x(()=>{const I=new Map;return r.value&&r.value.forEach((_,M,O)=>{let b=I.get(_.region);b||(I.set(_.region,[]),b=I.get(_.region)),b==null||b.push(_)}),I});return(I,_)=>{var M,O;return w(),U(te,null,[D("div",ol,[D("div",sl,[D("div",rl,[D("span",null,[e(pe,{name:"folder"}),h(" "+R((M=s(m))==null?void 0:M.title),1)]),D("span",null," ID: "+R(F.projectId),1)]),s(m)&&s(m).remark.trim()!==""?(w(),U("div",nl,R(s(m).remark),1)):A("v-if",!0),D("div",il,[e(pe,{name:"hive"}),dl,D("span",{class:rt(["tw-font-extrabold",{"tw-text-primary":s(r)&&s(r).length>0,"tw-text-red-500":!s(r)||s(r).length===0}])},R(((O=s(r))==null?void 0:O.length)||0),3),G(D("span",{class:"tw-text-white tw-cursor-pointer",onClick:f},"\u67E5\u770B\u8282\u70B9",512),[[Qe,s(r)&&s(r).length>0]])])]),s($)?A("v-if",!0):(w(),T(Be,{key:0,"model-value":s(C),"active-color":"primary",align:"left",class:"lg:tw-hidden tw-display"},{default:o(()=>[e(me,{name:"detail",label:"\u8BE6\u60C5",to:{name:`${t.type}_task`,params:{taskId:t.id}},replace:""},null,8,["to"]),e(me,{name:"logs",label:"\u65E5\u5FD7",to:{name:`${t.type}_task_logs`,params:{taskId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"])),D("div",cl,[D("div",ml,[e(s(Te),{ref_key:"scroll",ref:l,class:"tw-grow","thumb-style":s(mt),"bar-style":s(pt)},{default:o(()=>[e(nt,{"model-value":s(C),animated:"",vertical:s(y)>=1024,class:"tw-w-full tw-h-full tw-bg-[#121212] tw-p-0 lg:tw-pr-4"},{default:o(()=>[e($e,{name:"detail",class:"tw-px-0"},{default:o(()=>[t.type==="crontab"?(w(),T(Ut,{key:0,id:t.id,"project-id":t.projectId},null,8,["id","project-id"])):t.type==="workflow"?(w(),T(ul,{key:1,id:t.id,"project-id":t.projectId},null,8,["id","project-id"])):A("v-if",!0),t.type==="temporary"?(w(),T(Xt,{key:2,id:Number(t.id),"project-id":t.projectId},null,8,["id","project-id"])):A("v-if",!0)]),_:1}),e($e,{name:"logs",class:"tw-px-0"},{default:o(()=>[e(Nt,{id:t.id,"project-id":t.projectId,onOnpage:B},null,8,["id","project-id"])]),_:1})]),_:1},8,["model-value","vertical"])]),_:1},8,["thumb-style","bar-style"])]),t.type!="temporary"?(w(),U("div",pl,[s($)?A("v-if",!0):(w(),T(Be,{key:0,"model-value":s(C),"active-color":"primary",vertical:"","switch-indicator":"",align:"left"},{default:o(()=>[e(me,{name:"detail",label:"\u8BE6\u60C5",to:{name:`${t.type}_task`,params:{taskId:t.id}},replace:""},null,8,["to"]),e(me,{name:"logs",label:"\u65E5\u5FD7",to:{name:`${t.type}_task_logs`,params:{taskId:t.id}},replace:""},null,8,["to"])]),_:1},8,["model-value"]))])):A("v-if",!0)])]),e(Fe,{modelValue:p.value,"onUpdate:modelValue":_[0]||(_[0]=b=>p.value=b)},{default:o(()=>[e(se,{class:"tw-w-full"},{default:o(()=>[e(Y,null,{default:o(()=>[fl,vl]),_:1}),e(s(Te),{style:{height:"50vh"}},{default:o(()=>[(w(!0),U(te,null,qe(s(P),([b,N])=>(w(),U(te,{key:b},[e(Y,null,{default:o(()=>[D("div",wl,"Region: "+R(b),1)]),_:2},1024),e(Y,{class:"tw-q-pt-none scroll tw-flex tw-items-center tw-justify-center tw-align-middle tw-gap-2 tw-flex-wrap",style:{"max-height":"60vh"}},{default:o(()=>[(w(!0),U(te,null,qe(N,Q=>(w(),U("div",{key:Q.clientIP,class:"md:tw-w-[48%] tw-w-full"},[e(kt,{"client-ip":Q.clientIP,weight:Q.weight,"project-id":F.projectId,version:Q.version,region:Q.region},null,8,["client-ip","weight","project-id","version","region"])]))),128))]),_:2},1024)],64))),128))]),_:1}),e(be,{align:"right",class:"text-teal"},{default:o(()=>[G(e(V,{flat:"",label:"OK"},null,512),[[ne,!0]])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64)}}});var xl=Z(gl,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/TaskDetail.vue"]]);export{xl as default};
diff --git a/dist/assets/TaskList.7fccd2e3.js b/dist/assets/TaskList.51a57257.js
similarity index 99%
rename from dist/assets/TaskList.7fccd2e3.js
rename to dist/assets/TaskList.51a57257.js
index 4a1c96b..4c26296 100644
--- a/dist/assets/TaskList.7fccd2e3.js
+++ b/dist/assets/TaskList.51a57257.js
@@ -1 +1 @@
-var ut=Object.defineProperty;var st=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable;var at=(v,o,e)=>o in v?ut(v,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):v[o]=e,z=(v,o)=>{for(var e in o||(o={}))it.call(o,e)&&at(v,e,o[e]);if(st)for(var e of st(o))ct.call(o,e)&&at(v,e,o[e]);return v};import{_ as D,k as Q,u as H,l as E,H as N,m as J,n as M,r as $,J as ot,ag as U,o as b,K as j,a as t,A as s,b as l,w as n,q as I,f as Y,h as B,al as G,Y as q,a8 as X,c as L,a2 as S,d as x,t as g,aj as lt,ay as rt,p as A,a4 as Z,a3 as dt,a6 as wt,a5 as O,L as W,a7 as P}from"./index.d76e71bf.js";import{C as nt}from"./Confirm.47315734.js";import{T as K}from"./task.f3ffd066.js";import{f as R}from"./datetime.561112b0.js";import{t as tt,b as et}from"./thumbStyle.856de4cb.js";const pt={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},mt={class:"q-pa-md tw-flex tw-justify-around"},ft={class:"tw-w-full tw-grow"},_t={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},vt={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},kt={class:"task__remark"},ht={class:"task__bottom-box"},bt={class:"task__bottom-time"},gt={key:0,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},xt=x(" \u6682\u65E0\u6570\u636E "),yt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=H(),p=E(()=>e.state.Task.loadingTasks),k=N();J(()=>{M(async()=>{e.dispatch("subscribeTopic",["/task/status/project/"+o.projectId]),c.value="",await _(),k.params.taskId&&h(k.params.taskId)}),e.watch(u=>[u.Root.eventTask],([u])=>{if(!u||u.projectId!==o.projectId)return;const a=m.value.find(T=>T.id===u.taskId);a!==void 0&&(e.commit("notifySuccess",{message:`\u4EFB\u52A1 ${a.name} \u5F53\u524D\u72B6\u6001: ${u.status}`}),e.commit("Task/updateTaskStatus",{projectId:a.projectId,taskId:a.id,isRunning:K.isRunning(u.status)}))})});async function _(){await e.dispatch("Task/fetchTasks",z({},o))}const c=$(""),m=E(()=>{var u;return((u=e.state.Task.tasks.get(o.projectId))==null?void 0:u.filter(a=>a.name.indexOf(c.value)>=0||a.id.toString().indexOf(c.value)>=0))||[]}),r=$();function h(u){const a=r.value;if(!a||!m.value)return;const T=m.value.findIndex(C=>C.id===u);setTimeout(()=>{if(T<0)a.setScrollPercentage("vertical",0);else{const C=1*T/m.value.length*a.getScroll().verticalSize-150;a.setScrollPosition("vertical",C)}},100)}function y(u){return k.params.taskId===u.id}const i=E(()=>m.value.filter(y).pop()),V=ot();V.beforeEach((u,a,T)=>{!a.params.taskId&&u.params.taskId&&h(u.params.taskId),T()});const w=$(!1),d=$(!1);async function F(u,a){try{d.value=!0,e.commit("cleanError"),await e.dispatch("deleteTask",{projectId:u,taskId:a}),e.state.Root.currentError===void 0&&(V.push({name:"crontab_tasks",params:{projectId:u}}),w.value=!1,await _())}catch(T){console.error(T),e.commit("error",{error:T})}d.value=!1}return(u,a)=>{var C;const T=U("router-link");return b(),j("div",pt,[t(nt,{modelValue:w.value,"onUpdate:modelValue":a[0]||(a[0]=f=>w.value=f),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((C=s(i))==null?void 0:C.name)+"?",type:"warning",loading:d.value,onConfirm:a[1]||(a[1]=f=>s(i)&&F(s(i).projectId,s(i).id))},null,8,["modelValue","content","loading"]),l("div",mt,[t(Y,{modelValue:c.value,"onUpdate:modelValue":a[2]||(a[2]=f=>c.value=f),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(p),icon:"refresh",onClick:_},null,8,["loading"]),t(B,{flat:"",dense:"",to:{name:"create_crontab_task"},icon:"add"}),t(B,{flat:"",dense:"",class:"tw-text-red-300 lg:tw-flex tw-hidden",icon:"delete",disable:!s(i),onClick:a[3]||(a[3]=f=>w.value=!0)},null,8,["disable"])]),l("div",ft,[t(s(Z),{ref_key:"scrollArea",ref:r,class:"tw-w-full tw-h-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[t(G,{class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4 tw-overflow-hidden tw-relative"},{default:n(()=>[(b(!0),j(q,null,X(s(m),f=>(b(),L(T,{key:f.id,to:{name:"crontab_task",params:{taskId:f.id}}},{default:n(()=>[l("div",{class:S((y(f)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",_t,[l("div",vt,[t(I,{name:"schedule",class:"tw-inline"}),x(" "+g(f.cronExpr),1)]),t(lt),t(rt,{outline:"",color:f.status===1?"green":"red",class:"tw-w-[50px]"},{default:n(()=>[x(g(f.isRunning==1?"\u6267\u884C\u4E2D":f.status==1?"\u8C03\u5EA6\u4E2D":"\u5DF2\u6682\u505C"),1)]),_:2},1032,["color"]),A(` `)]),l("div",{class:S((y(f)?"active ":"")+"task__title tw-flex-col tw-items-center tw-w-full")},[t(I,{name:"numbers"}),x(" "+g(f.name),1)],2),l("div",kt,g(f.remark||"-"),1),l("div",ht,[l("div",bt,g(s(R)(f.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1}),!s(p)&&(!s(m)||s(m).length===0)?(b(),j("div",gt,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),xt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Tt=D(yt,[["__scopeId","data-v-189e9673"],["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskList.vue"]]);const It={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Et={class:"q-pa-md tw-flex tw-justify-around"},jt={class:"tw-w-full tw-grow"},Ft={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},$t={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},St={class:"task__remark"},Bt={class:"task__bottom-box"},Ct={class:"task__bottom-time"},At={key:1,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},Vt=x(" \u6682\u65E0\u6570\u636E "),Lt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=$(""),p=H(),k=E(()=>p.state.Task.loadingTasks);J(async()=>{M(async()=>{await _(),p.dispatch("subscribeTopic",["/task/status/project/"+o.projectId])}),p.state.Task.temporaryTasks||await _(),p.watch(r=>[r.Root.eventTask],async([r])=>{if(!r||r.projectId!==o.projectId)return;const h=c.value.find(y=>y.tmpId===r.tmpId);!h||(p.commit("notifySuccess",{message:`\u4EFB\u52A1 ${h.remark} \u5F53\u524D\u72B6\u6001: ${r.status}`}),p.commit("Task/updateTemporaryTaskStatus",{projectId:o.projectId,tmpId:r.tmpId,isRunning:K.isRunning(r.status),finished:K.isFinished(r.status)}))})});async function _(){try{await p.dispatch("Task/fetchTemporaryTasks",{projectId:o.projectId})}catch(r){console.error("failed to dispatch fetchTemporaryTasks",r)}}const c=E(()=>{var r;return((r=p.state.Task.temporaryTasks.get(o.projectId))==null?void 0:r.filter(h=>h.taskId.toString().indexOf(e.value)>=0))||[]});function m(r){const h=N();return Number(h.params.taskId)===r.id}return(r,h)=>{const y=U("router-link");return b(),j("div",It,[l("div",Et,[t(Y,{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=i=>e.value=i),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(k),icon:"refresh",onClick:_},null,8,["loading"])]),l("div",jt,[t(Z,{class:"tw-w-full tw-h-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[s(c)?(b(),L(G,{key:0,class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:n(()=>[(b(!0),j(q,null,X(s(c),i=>(b(),L(y,{key:i.id,to:{name:"temporary_task",params:{taskId:i.id}}},{default:n(()=>[l("div",{class:S((m(i)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",Ft,[l("div",$t,[t(I,{name:"schedule",class:"tw-inline"}),x(" "+g(s(R)(i.scheduleTime*1e3)),1)]),t(lt),t(rt,{outline:"",color:i.scheduleStatus===1?"green":"red",class:"tw-w-[50px]"},{default:n(()=>[x(g(i.isRunning==1?"\u6267\u884C\u4E2D":i.scheduleStatus==1?"\u7B49\u5F85\u4E2D":"\u5DF2\u5904\u7406"),1)]),_:2},1032,["color"]),A(` `)]),l("div",{class:S((m(i)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[t(I,{name:"numbers"}),x(" "+g(i.remark),1)],2),l("div",St,"\u521B\u5EFA\u4EBA\uFF1A"+g(i.userName||"-"),1),l("div",Bt,[l("div",Ct,g(s(R)(i.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1})):A("v-if",!0),!s(k)&&(!s(c)||s(c).length===0)?(b(),j("div",At,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),Vt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Rt=D(Lt,[["__scopeId","data-v-38f53198"],["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TemporaryTaskList.vue"]]);const Dt={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Qt={class:"q-pa-md tw-flex tw-justify-around"},Nt={class:"tw-w-full tw-grow"},Ut={class:"task__remark"},qt={class:"task__bottom-box"},zt={class:"task__bottom-time"},Ot={key:0,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},Wt=x(" \u6682\u65E0\u6570\u636E "),Pt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=H(),p=E(()=>e.state.WorkFlowTask.loadingTasks);J(()=>{M(async()=>{await k()}),e.dispatch("subscribeTopic",["/task/status/project/"+o.projectId]),e.watch(w=>[w.Root.eventWorkFlowTask],([w])=>{if(!w||w.projectId!==o.projectId)return;const d=c.value.find(F=>F.id===w.taskId);d!==void 0&&e.commit("notifySuccess",{message:`\u4EFB\u52A1 ${d.name} \u5F53\u524D\u72B6\u6001: ${w.status}`}),k()})});async function k(){await e.dispatch("WorkFlowTask/fetchTasks",z({},o))}const _=$(""),c=E(()=>{var w;return((w=e.state.WorkFlowTask.tasks.get(o.projectId))==null?void 0:w.filter(d=>d.name.indexOf(_.value)>=0||d.id.toString().indexOf(_.value)>=0))||[]});function m(w){return N().params.taskId===w.id}const r=E(()=>c.value.filter(m).pop()),h=ot(),y=$(!1),i=$(!1);async function V(w,d){i.value=!0;try{e.commit("cleanError"),await e.dispatch("deleteWorkFlowTask",{projectId:w,taskId:d}),e.state.Root.currentError===void 0&&(h.push({name:"workflow_tasks",params:{projectId:w}}),y.value=!1,await k())}catch(F){console.error(F),e.commit("error",{error:F})}i.value=!1}return(w,d)=>{var u;const F=U("router-link");return b(),j("div",Dt,[t(nt,{modelValue:y.value,"onUpdate:modelValue":d[0]||(d[0]=a=>y.value=a),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((u=s(r))==null?void 0:u.name)+"?",type:"warning",loading:i.value,onConfirm:d[1]||(d[1]=a=>s(r)&&V(s(r).projectId,s(r).id))},null,8,["modelValue","content","loading"]),l("div",Qt,[t(Y,{modelValue:_.value,"onUpdate:modelValue":d[2]||(d[2]=a=>_.value=a),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(p),icon:"refresh",onClick:k},null,8,["loading"]),t(B,{flat:"",dense:"",to:{name:"create_workflow_task"},icon:"add"}),t(B,{flat:"",dense:"",class:"tw-text-red-300 lg:tw-flex tw-hidden",icon:"delete",disable:!s(r),onClick:d[3]||(d[3]=a=>y.value=!0)},null,8,["disable"])]),l("div",Nt,[t(Z,{class:"tw-h-full tw-w-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[t(G,{class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:n(()=>[(b(!0),j(q,null,X(s(c),a=>(b(),L(F,{key:a.id,to:{name:"workflow_task",params:{taskId:a.id}}},{default:n(()=>[l("div",{class:S((m(a)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-py-3 tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",{class:S((m(a)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[t(I,{name:"numbers"}),x(" "+g(a.name),1)],2),l("div",Ut,g(a.remark||"-"),1),l("div",qt,[l("div",zt,g(s(R)(a.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1}),!s(p)&&(!s(c)||s(c).length===0)?(b(),j("div",Ot,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),Wt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Kt=D(Pt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowTaskList.vue"]]);const Ht={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Jt=x(" \u65E5\u5E38\u5468\u671F\u6027\u5B9A\u65F6\u6267\u884C\u7684\u4EFB\u52A1 "),Mt=x(" \u6307\u5B9A\u65F6\u95F4\u8C03\u5EA6\u4E00\u6B21\u7684\u4EFB\u52A1 "),Yt=x(" \u7528\u4E8E\u4EFB\u52A1\u7F16\u6392\u7684\u5B50\u4EFB\u52A1 "),Gt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=N(),p=E(()=>e.name&&!["crontab_tasks","workflow_tasks","temporary_tasks"].includes(e.name.toString())),k=E(()=>{var _;if(e.name){const c=e.name.toString();if(c.search("crontab")>=0)return"normal";if(c.search("workflow")>=0)return"workflow";if(c.search("temporary")>=0)return"temporary"}throw new Error(`Unknown route name ${(_=e.name)==null?void 0:_.toString()}`)});return(_,c)=>{const m=U("router-view");return b(),j(q,null,[l("div",{class:S("xl:tw-basis-1/5 tw-basis-1/4 tw-w-full tw-h-full tw-bg-[#1E1E1E] tw-min-w-[280px]"+(s(p)?" tw-hidden lg:tw-block":""))},[l("div",Ht,[t(dt,{"model-value":s(k),"active-color":"primary"},{default:n(()=>[t(O,{name:"crontab",label:"\u666E\u901A",to:{name:"crontab_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Jt]),_:1})]),_:1},8,["to"]),t(O,{name:"temporary",label:"\u4E34\u65F6",to:{name:"temporary_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Mt]),_:1})]),_:1},8,["to"]),t(O,{name:"workflow",label:"\u4EFB\u52A1\u6D41",to:{name:"workflow_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Yt]),_:1})]),_:1},8,["to"])]),_:1},8,["model-value"]),t(wt,{"model-value":s(k),animated:"",class:"tw-w-full tw-grow"},{default:n(()=>[t(P,{name:"normal",class:"tw-p-0"},{default:n(()=>[t(Tt,{"project-id":o.projectId},null,8,["project-id"])]),_:1}),t(P,{name:"temporary",class:"tw-p-0"},{default:n(()=>[t(Rt,{"project-id":o.projectId},null,8,["project-id"])]),_:1}),t(P,{name:"workflow",class:"tw-p-0"},{default:n(()=>[t(Kt,{"project-id":o.projectId},null,8,["project-id"])]),_:1})]),_:1},8,["model-value"])])],2),l("div",{class:S("xl:tw-basis-3/5 tw-basis-1/2 tw-h-full tw-w-full"+(s(p)?"":" tw-hidden lg:tw-block"))},[t(m)],2)],64)}}});var oe=D(Gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/TaskList.vue"]]);export{oe as default};
+var ut=Object.defineProperty;var st=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable;var at=(v,o,e)=>o in v?ut(v,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):v[o]=e,z=(v,o)=>{for(var e in o||(o={}))it.call(o,e)&&at(v,e,o[e]);if(st)for(var e of st(o))ct.call(o,e)&&at(v,e,o[e]);return v};import{_ as D,k as Q,u as H,l as E,H as N,m as J,n as M,r as $,J as ot,ag as U,o as b,K as j,a as t,A as s,b as l,w as n,q as I,f as Y,h as B,al as G,Y as q,a8 as X,c as L,a2 as S,d as x,t as g,aj as lt,ay as rt,p as A,a4 as Z,a3 as dt,a6 as wt,a5 as O,L as W,a7 as P}from"./index.f89dd3dd.js";import{C as nt}from"./Confirm.4116c3bd.js";import{T as K}from"./task.f3ffd066.js";import{f as R}from"./datetime.561112b0.js";import{t as tt,b as et}from"./thumbStyle.856de4cb.js";const pt={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},mt={class:"q-pa-md tw-flex tw-justify-around"},ft={class:"tw-w-full tw-grow"},_t={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},vt={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},kt={class:"task__remark"},ht={class:"task__bottom-box"},bt={class:"task__bottom-time"},gt={key:0,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},xt=x(" \u6682\u65E0\u6570\u636E "),yt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=H(),p=E(()=>e.state.Task.loadingTasks),k=N();J(()=>{M(async()=>{e.dispatch("subscribeTopic",["/task/status/project/"+o.projectId]),c.value="",await _(),k.params.taskId&&h(k.params.taskId)}),e.watch(u=>[u.Root.eventTask],([u])=>{if(!u||u.projectId!==o.projectId)return;const a=m.value.find(T=>T.id===u.taskId);a!==void 0&&(e.commit("notifySuccess",{message:`\u4EFB\u52A1 ${a.name} \u5F53\u524D\u72B6\u6001: ${u.status}`}),e.commit("Task/updateTaskStatus",{projectId:a.projectId,taskId:a.id,isRunning:K.isRunning(u.status)}))})});async function _(){await e.dispatch("Task/fetchTasks",z({},o))}const c=$(""),m=E(()=>{var u;return((u=e.state.Task.tasks.get(o.projectId))==null?void 0:u.filter(a=>a.name.indexOf(c.value)>=0||a.id.toString().indexOf(c.value)>=0))||[]}),r=$();function h(u){const a=r.value;if(!a||!m.value)return;const T=m.value.findIndex(C=>C.id===u);setTimeout(()=>{if(T<0)a.setScrollPercentage("vertical",0);else{const C=1*T/m.value.length*a.getScroll().verticalSize-150;a.setScrollPosition("vertical",C)}},100)}function y(u){return k.params.taskId===u.id}const i=E(()=>m.value.filter(y).pop()),V=ot();V.beforeEach((u,a,T)=>{!a.params.taskId&&u.params.taskId&&h(u.params.taskId),T()});const w=$(!1),d=$(!1);async function F(u,a){try{d.value=!0,e.commit("cleanError"),await e.dispatch("deleteTask",{projectId:u,taskId:a}),e.state.Root.currentError===void 0&&(V.push({name:"crontab_tasks",params:{projectId:u}}),w.value=!1,await _())}catch(T){console.error(T),e.commit("error",{error:T})}d.value=!1}return(u,a)=>{var C;const T=U("router-link");return b(),j("div",pt,[t(nt,{modelValue:w.value,"onUpdate:modelValue":a[0]||(a[0]=f=>w.value=f),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((C=s(i))==null?void 0:C.name)+"?",type:"warning",loading:d.value,onConfirm:a[1]||(a[1]=f=>s(i)&&F(s(i).projectId,s(i).id))},null,8,["modelValue","content","loading"]),l("div",mt,[t(Y,{modelValue:c.value,"onUpdate:modelValue":a[2]||(a[2]=f=>c.value=f),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(p),icon:"refresh",onClick:_},null,8,["loading"]),t(B,{flat:"",dense:"",to:{name:"create_crontab_task"},icon:"add"}),t(B,{flat:"",dense:"",class:"tw-text-red-300 lg:tw-flex tw-hidden",icon:"delete",disable:!s(i),onClick:a[3]||(a[3]=f=>w.value=!0)},null,8,["disable"])]),l("div",ft,[t(s(Z),{ref_key:"scrollArea",ref:r,class:"tw-w-full tw-h-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[t(G,{class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4 tw-overflow-hidden tw-relative"},{default:n(()=>[(b(!0),j(q,null,X(s(m),f=>(b(),L(T,{key:f.id,to:{name:"crontab_task",params:{taskId:f.id}}},{default:n(()=>[l("div",{class:S((y(f)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",_t,[l("div",vt,[t(I,{name:"schedule",class:"tw-inline"}),x(" "+g(f.cronExpr),1)]),t(lt),t(rt,{outline:"",color:f.status===1?"green":"red",class:"tw-w-[50px]"},{default:n(()=>[x(g(f.isRunning==1?"\u6267\u884C\u4E2D":f.status==1?"\u8C03\u5EA6\u4E2D":"\u5DF2\u6682\u505C"),1)]),_:2},1032,["color"]),A(` `)]),l("div",{class:S((y(f)?"active ":"")+"task__title tw-flex-col tw-items-center tw-w-full")},[t(I,{name:"numbers"}),x(" "+g(f.name),1)],2),l("div",kt,g(f.remark||"-"),1),l("div",ht,[l("div",bt,g(s(R)(f.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1}),!s(p)&&(!s(m)||s(m).length===0)?(b(),j("div",gt,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),xt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Tt=D(yt,[["__scopeId","data-v-189e9673"],["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TaskList.vue"]]);const It={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Et={class:"q-pa-md tw-flex tw-justify-around"},jt={class:"tw-w-full tw-grow"},Ft={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},$t={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},St={class:"task__remark"},Bt={class:"task__bottom-box"},Ct={class:"task__bottom-time"},At={key:1,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},Vt=x(" \u6682\u65E0\u6570\u636E "),Lt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=$(""),p=H(),k=E(()=>p.state.Task.loadingTasks);J(async()=>{M(async()=>{await _(),p.dispatch("subscribeTopic",["/task/status/project/"+o.projectId])}),p.state.Task.temporaryTasks||await _(),p.watch(r=>[r.Root.eventTask],async([r])=>{if(!r||r.projectId!==o.projectId)return;const h=c.value.find(y=>y.tmpId===r.tmpId);!h||(p.commit("notifySuccess",{message:`\u4EFB\u52A1 ${h.remark} \u5F53\u524D\u72B6\u6001: ${r.status}`}),p.commit("Task/updateTemporaryTaskStatus",{projectId:o.projectId,tmpId:r.tmpId,isRunning:K.isRunning(r.status),finished:K.isFinished(r.status)}))})});async function _(){try{await p.dispatch("Task/fetchTemporaryTasks",{projectId:o.projectId})}catch(r){console.error("failed to dispatch fetchTemporaryTasks",r)}}const c=E(()=>{var r;return((r=p.state.Task.temporaryTasks.get(o.projectId))==null?void 0:r.filter(h=>h.taskId.toString().indexOf(e.value)>=0))||[]});function m(r){const h=N();return Number(h.params.taskId)===r.id}return(r,h)=>{const y=U("router-link");return b(),j("div",It,[l("div",Et,[t(Y,{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=i=>e.value=i),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(k),icon:"refresh",onClick:_},null,8,["loading"])]),l("div",jt,[t(Z,{class:"tw-w-full tw-h-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[s(c)?(b(),L(G,{key:0,class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:n(()=>[(b(!0),j(q,null,X(s(c),i=>(b(),L(y,{key:i.id,to:{name:"temporary_task",params:{taskId:i.id}}},{default:n(()=>[l("div",{class:S((m(i)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",Ft,[l("div",$t,[t(I,{name:"schedule",class:"tw-inline"}),x(" "+g(s(R)(i.scheduleTime*1e3)),1)]),t(lt),t(rt,{outline:"",color:i.scheduleStatus===1?"green":"red",class:"tw-w-[50px]"},{default:n(()=>[x(g(i.isRunning==1?"\u6267\u884C\u4E2D":i.scheduleStatus==1?"\u7B49\u5F85\u4E2D":"\u5DF2\u5904\u7406"),1)]),_:2},1032,["color"]),A(` `)]),l("div",{class:S((m(i)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[t(I,{name:"numbers"}),x(" "+g(i.remark),1)],2),l("div",St,"\u521B\u5EFA\u4EBA\uFF1A"+g(i.userName||"-"),1),l("div",Bt,[l("div",Ct,g(s(R)(i.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1})):A("v-if",!0),!s(k)&&(!s(c)||s(c).length===0)?(b(),j("div",At,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),Vt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Rt=D(Lt,[["__scopeId","data-v-38f53198"],["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/TemporaryTaskList.vue"]]);const Dt={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Qt={class:"q-pa-md tw-flex tw-justify-around"},Nt={class:"tw-w-full tw-grow"},Ut={class:"task__remark"},qt={class:"task__bottom-box"},zt={class:"task__bottom-time"},Ot={key:0,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},Wt=x(" \u6682\u65E0\u6570\u636E "),Pt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=H(),p=E(()=>e.state.WorkFlowTask.loadingTasks);J(()=>{M(async()=>{await k()}),e.dispatch("subscribeTopic",["/task/status/project/"+o.projectId]),e.watch(w=>[w.Root.eventWorkFlowTask],([w])=>{if(!w||w.projectId!==o.projectId)return;const d=c.value.find(F=>F.id===w.taskId);d!==void 0&&e.commit("notifySuccess",{message:`\u4EFB\u52A1 ${d.name} \u5F53\u524D\u72B6\u6001: ${w.status}`}),k()})});async function k(){await e.dispatch("WorkFlowTask/fetchTasks",z({},o))}const _=$(""),c=E(()=>{var w;return((w=e.state.WorkFlowTask.tasks.get(o.projectId))==null?void 0:w.filter(d=>d.name.indexOf(_.value)>=0||d.id.toString().indexOf(_.value)>=0))||[]});function m(w){return N().params.taskId===w.id}const r=E(()=>c.value.filter(m).pop()),h=ot(),y=$(!1),i=$(!1);async function V(w,d){i.value=!0;try{e.commit("cleanError"),await e.dispatch("deleteWorkFlowTask",{projectId:w,taskId:d}),e.state.Root.currentError===void 0&&(h.push({name:"workflow_tasks",params:{projectId:w}}),y.value=!1,await k())}catch(F){console.error(F),e.commit("error",{error:F})}i.value=!1}return(w,d)=>{var u;const F=U("router-link");return b(),j("div",Dt,[t(nt,{modelValue:y.value,"onUpdate:modelValue":d[0]||(d[0]=a=>y.value=a),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1"+((u=s(r))==null?void 0:u.name)+"?",type:"warning",loading:i.value,onConfirm:d[1]||(d[1]=a=>s(r)&&V(s(r).projectId,s(r).id))},null,8,["modelValue","content","loading"]),l("div",Qt,[t(Y,{modelValue:_.value,"onUpdate:modelValue":d[2]||(d[2]=a=>_.value=a),borderless:"",dense:"",debounce:"300",placeholder:"Search"},{append:n(()=>[t(I,{name:"search"})]),_:1},8,["modelValue"]),t(B,{flat:"",dense:"",loading:s(p),icon:"refresh",onClick:k},null,8,["loading"]),t(B,{flat:"",dense:"",to:{name:"create_workflow_task"},icon:"add"}),t(B,{flat:"",dense:"",class:"tw-text-red-300 lg:tw-flex tw-hidden",icon:"delete",disable:!s(r),onClick:d[3]||(d[3]=a=>y.value=!0)},null,8,["disable"])]),l("div",Nt,[t(Z,{class:"tw-h-full tw-w-full tw-px-[15px]",visible:"","thumb-style":s(tt),"bar-style":s(et)},{default:n(()=>[t(G,{class:"tw-w-full tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:n(()=>[(b(!0),j(q,null,X(s(c),a=>(b(),L(F,{key:a.id,to:{name:"workflow_task",params:{taskId:a.id}}},{default:n(()=>[l("div",{class:S((m(a)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-py-3 tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[l("div",{class:S((m(a)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[t(I,{name:"numbers"}),x(" "+g(a.name),1)],2),l("div",Ut,g(a.remark||"-"),1),l("div",qt,[l("div",zt,g(s(R)(a.createTime*1e3)),1)])],2)]),_:2},1032,["to"]))),128))]),_:1}),!s(p)&&(!s(c)||s(c).length===0)?(b(),j("div",Ot,[t(I,{name:"outlet",style:{"font-size":"3rem"}}),Wt])):A("v-if",!0)]),_:1},8,["thumb-style","bar-style"])])])}}});var Kt=D(Pt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowTaskList.vue"]]);const Ht={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},Jt=x(" \u65E5\u5E38\u5468\u671F\u6027\u5B9A\u65F6\u6267\u884C\u7684\u4EFB\u52A1 "),Mt=x(" \u6307\u5B9A\u65F6\u95F4\u8C03\u5EA6\u4E00\u6B21\u7684\u4EFB\u52A1 "),Yt=x(" \u7528\u4E8E\u4EFB\u52A1\u7F16\u6392\u7684\u5B50\u4EFB\u52A1 "),Gt=Q({props:{projectId:{type:Number,required:!0}},setup(v){const o=v,e=N(),p=E(()=>e.name&&!["crontab_tasks","workflow_tasks","temporary_tasks"].includes(e.name.toString())),k=E(()=>{var _;if(e.name){const c=e.name.toString();if(c.search("crontab")>=0)return"normal";if(c.search("workflow")>=0)return"workflow";if(c.search("temporary")>=0)return"temporary"}throw new Error(`Unknown route name ${(_=e.name)==null?void 0:_.toString()}`)});return(_,c)=>{const m=U("router-view");return b(),j(q,null,[l("div",{class:S("xl:tw-basis-1/5 tw-basis-1/4 tw-w-full tw-h-full tw-bg-[#1E1E1E] tw-min-w-[280px]"+(s(p)?" tw-hidden lg:tw-block":""))},[l("div",Ht,[t(dt,{"model-value":s(k),"active-color":"primary"},{default:n(()=>[t(O,{name:"crontab",label:"\u666E\u901A",to:{name:"crontab_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Jt]),_:1})]),_:1},8,["to"]),t(O,{name:"temporary",label:"\u4E34\u65F6",to:{name:"temporary_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Mt]),_:1})]),_:1},8,["to"]),t(O,{name:"workflow",label:"\u4EFB\u52A1\u6D41",to:{name:"workflow_tasks",params:{projectId:o.projectId}},replace:""},{default:n(()=>[t(W,{class:"bg-warning tw-text-black",offset:[10,10]},{default:n(()=>[Yt]),_:1})]),_:1},8,["to"])]),_:1},8,["model-value"]),t(wt,{"model-value":s(k),animated:"",class:"tw-w-full tw-grow"},{default:n(()=>[t(P,{name:"normal",class:"tw-p-0"},{default:n(()=>[t(Tt,{"project-id":o.projectId},null,8,["project-id"])]),_:1}),t(P,{name:"temporary",class:"tw-p-0"},{default:n(()=>[t(Rt,{"project-id":o.projectId},null,8,["project-id"])]),_:1}),t(P,{name:"workflow",class:"tw-p-0"},{default:n(()=>[t(Kt,{"project-id":o.projectId},null,8,["project-id"])]),_:1})]),_:1},8,["model-value"])])],2),l("div",{class:S("xl:tw-basis-3/5 tw-basis-1/2 tw-h-full tw-w-full"+(s(p)?"":" tw-hidden lg:tw-block"))},[t(m)],2)],64)}}});var oe=D(Gt,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/TaskList.vue"]]);export{oe as default};
diff --git a/dist/assets/UserListAdmin.74b6349a.js b/dist/assets/UserListAdmin.54159650.js
similarity index 97%
rename from dist/assets/UserListAdmin.74b6349a.js
rename to dist/assets/UserListAdmin.54159650.js
index 4e3ba20..f4c01b0 100644
--- a/dist/assets/UserListAdmin.74b6349a.js
+++ b/dist/assets/UserListAdmin.54159650.js
@@ -1 +1 @@
-import{_ as $,k as C,u as U,ae as L,r as c,o as _,K as y,b as t,t as d,A as h,a as s,w as u,h as p,i as Q,Q as F,$ as B,D,x as I,C as M,F as q,Y as V,d as k,aN as N,l as b,I as j,a8 as E,R as S,aO as T,c as z}from"./index.d76e71bf.js";import{M as A}from"./ModifyBox.88f33ebb.js";import{f as P}from"./datetime.561112b0.js";const R={tabindex:"0",class:"focus:tw-outline-none tw-text-sm tw-leading-none tw-text-gray-600 tw-h-16"},O={class:"tw-w-1/3 tw-px-4"},K={class:"tw-flex tw-items-center"},Y={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},G={class:"tw-text-xs tw-font-bold tw-leading-3 tw-text-white"},H={class:"tw-pl-2"},J={class:"tw-text-sm tw-font-medium tw-leading-none dark:tw-text-white"},W={class:"tw-text-xs tw-leading-3 tw-text-gray-400 tw-mt-2"},X={class:"tw-w-1/4 tw-px-4"},Z={class:"tw-flex tw-items-center tw-text-gray-400"},tt={class:"tw-w-1/4 tw-px-4"},et={class:"tw-flex tw-items-center tw-text-gray-400"},st={class:"tw-px-4"},ot={class:"tw-w-min tw-flex tw-scale-75 md:tw-scale-100"},at=k("\u7F16\u8F91"),lt=k("\u5220\u9664\u7528\u6237"),nt={class:"q-ml-sm"},it=C({props:{user:{type:Object,default:null}},emits:["modify"],setup(a,{emit:x}){const n=a,v=U(),w=L(n.user.name),m=()=>{x("modify",{})},g=async()=>{(await N({id:n.user.id})).meta.code===0&&(v.commit("success",{message:"\u5220\u9664\u6210\u529F"}),l.value=!1,x("modify",{}))},f=c(!1),l=c(!1);return(r,e)=>(_(),y(V,null,[t("tr",R,[t("td",O,[t("div",K,[t("div",Y,[t("p",G,d(h(w)),1)]),t("div",H,[t("p",J,d(a.user.name),1),t("p",W,d(a.user.permissions.join(", ")||"-"),1)])])]),t("td",X,[t("div",Z,d(a.user.account),1)]),t("td",tt,[t("div",et,d(h(P)(a.user.createTime*1e3)),1)]),t("td",st,[t("div",ot,[s(p,{color:"primary",class:"tw-mr-2 md:tw-mr-4","text-color":"black",onClick:e[0]||(e[0]=o=>f.value=!0)},{default:u(()=>[at]),_:1}),s(p,{disable:a.user.id===1,flat:"",class:"tw-text-red-300",onClick:e[1]||(e[1]=o=>l.value=!0)},{default:u(()=>[lt]),_:1},8,["disable"])])])]),s(q,{modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=o=>l.value=o)},{default:u(()=>[s(Q,null,{default:u(()=>[s(F,{class:"row items-center"},{default:u(()=>[s(B,{icon:"delete",color:"red","text-color":"white"}),t("span",nt,"\u662F\u5426\u8981\u5220\u9664\u7528\u6237 "+d(a.user.name),1)]),_:1}),s(D,{align:"right"},{default:u(()=>[I(s(p,{flat:"",label:"\u53D6\u6D88"},null,512),[[M,!0]]),s(p,{flat:"",label:"\u5220\u9664",color:"red",onClick:g})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(A,{modelValue:f.value,"onUpdate:modelValue":e[3]||(e[3]=o=>f.value=o),user:a.user,onModify:m},null,8,["modelValue","user"])],64))}});var rt=$(it,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/UserListItem.vue"]]);const dt={class:"tw-w-full tw-p-4"},ut={class:"q-dark tw-w-full tw-rounded tw-overflow-hidden"},ct={class:"tw-px-4 tw-py-4"},wt={class:"tw-flex tw-items-center tw-justify-between"},mt=t("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-primary"}," \u7528\u6237\u7BA1\u7406 ",-1),ft={class:"tw-mt-0"},pt={class:"q-dark tw-px-4 tw-pb-5 tw-min-h-50 tw-relative"},xt={class:"tw-overflow-x-auto"},vt={class:"tw-w-full tw-whitespace-nowrap"},_t={class:"q-pa-lg flex flex-center"},ht=C({props:{orgId:{type:String,required:!0}},setup(a){const x=a,n=c(1),v=c(10),w=c(!1),m=U(),g=b(()=>m.state.Root.users),f=b(()=>{const e=m.state.Root.userTotal||0;return Math.ceil(e/v.value)}),l=c(!1),r=async()=>{l.value=!0;try{await m.dispatch("fetchUsers",{oid:x.orgId,page:n.value,pagesize:v.value})}catch(e){console.log(e)}l.value=!1};return r(),j(n,(e,o)=>{r()}),(e,o)=>(_(),y("div",dt,[t("div",ut,[t("div",ct,[t("div",wt,[mt,t("div",ft,[s(p,{flat:"",class:"tw-text-white",icon:"add",onClick:o[0]||(o[0]=i=>w.value=!0)})])])]),t("div",pt,[t("div",xt,[t("table",vt,[t("tbody",null,[(_(!0),y(V,null,E(h(g),i=>(_(),z(rt,{key:i.id,user:i,onModify:r},null,8,["user"]))),128))])])]),s(S,{size:"md",showing:l.value},null,8,["showing"])]),t("div",_t,[s(T,{modelValue:n.value,"onUpdate:modelValue":o[1]||(o[1]=i=>n.value=i),color:"grey-4","active-color":"black",max:h(f),"boundary-numbers":!1},null,8,["modelValue","max"])]),s(A,{modelValue:w.value,"onUpdate:modelValue":o[2]||(o[2]=i=>w.value=i),onModify:r},null,8,["modelValue"])])]))}});var $t=$(ht,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/UserListAdmin.vue"]]);export{$t as default};
+import{_ as $,k as C,u as U,ae as L,r as c,o as _,K as y,b as t,t as d,A as h,a as s,w as u,h as p,i as Q,Q as F,$ as B,D,x as I,C as M,F as q,Y as V,d as k,aN as N,l as b,I as j,a8 as E,R as S,aO as T,c as z}from"./index.f89dd3dd.js";import{M as A}from"./ModifyBox.25d0a805.js";import{f as P}from"./datetime.561112b0.js";const R={tabindex:"0",class:"focus:tw-outline-none tw-text-sm tw-leading-none tw-text-gray-600 tw-h-16"},O={class:"tw-w-1/3 tw-px-4"},K={class:"tw-flex tw-items-center"},Y={class:"tw-w-10 tw-h-10 tw-bg-gray-700 tw-rounded-sm tw-flex tw-items-center tw-justify-center"},G={class:"tw-text-xs tw-font-bold tw-leading-3 tw-text-white"},H={class:"tw-pl-2"},J={class:"tw-text-sm tw-font-medium tw-leading-none dark:tw-text-white"},W={class:"tw-text-xs tw-leading-3 tw-text-gray-400 tw-mt-2"},X={class:"tw-w-1/4 tw-px-4"},Z={class:"tw-flex tw-items-center tw-text-gray-400"},tt={class:"tw-w-1/4 tw-px-4"},et={class:"tw-flex tw-items-center tw-text-gray-400"},st={class:"tw-px-4"},ot={class:"tw-w-min tw-flex tw-scale-75 md:tw-scale-100"},at=k("\u7F16\u8F91"),lt=k("\u5220\u9664\u7528\u6237"),nt={class:"q-ml-sm"},it=C({props:{user:{type:Object,default:null}},emits:["modify"],setup(a,{emit:x}){const n=a,v=U(),w=L(n.user.name),m=()=>{x("modify",{})},g=async()=>{(await N({id:n.user.id})).meta.code===0&&(v.commit("success",{message:"\u5220\u9664\u6210\u529F"}),l.value=!1,x("modify",{}))},f=c(!1),l=c(!1);return(r,e)=>(_(),y(V,null,[t("tr",R,[t("td",O,[t("div",K,[t("div",Y,[t("p",G,d(h(w)),1)]),t("div",H,[t("p",J,d(a.user.name),1),t("p",W,d(a.user.permissions.join(", ")||"-"),1)])])]),t("td",X,[t("div",Z,d(a.user.account),1)]),t("td",tt,[t("div",et,d(h(P)(a.user.createTime*1e3)),1)]),t("td",st,[t("div",ot,[s(p,{color:"primary",class:"tw-mr-2 md:tw-mr-4","text-color":"black",onClick:e[0]||(e[0]=o=>f.value=!0)},{default:u(()=>[at]),_:1}),s(p,{disable:a.user.id===1,flat:"",class:"tw-text-red-300",onClick:e[1]||(e[1]=o=>l.value=!0)},{default:u(()=>[lt]),_:1},8,["disable"])])])]),s(q,{modelValue:l.value,"onUpdate:modelValue":e[2]||(e[2]=o=>l.value=o)},{default:u(()=>[s(Q,null,{default:u(()=>[s(F,{class:"row items-center"},{default:u(()=>[s(B,{icon:"delete",color:"red","text-color":"white"}),t("span",nt,"\u662F\u5426\u8981\u5220\u9664\u7528\u6237 "+d(a.user.name),1)]),_:1}),s(D,{align:"right"},{default:u(()=>[I(s(p,{flat:"",label:"\u53D6\u6D88"},null,512),[[M,!0]]),s(p,{flat:"",label:"\u5220\u9664",color:"red",onClick:g})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(A,{modelValue:f.value,"onUpdate:modelValue":e[3]||(e[3]=o=>f.value=o),user:a.user,onModify:m},null,8,["modelValue","user"])],64))}});var rt=$(it,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/UserListItem.vue"]]);const dt={class:"tw-w-full tw-p-4"},ut={class:"q-dark tw-w-full tw-rounded tw-overflow-hidden"},ct={class:"tw-px-4 tw-py-4"},wt={class:"tw-flex tw-items-center tw-justify-between"},mt=t("p",{tabindex:"0",class:"focus:tw-outline-none tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-primary"}," \u7528\u6237\u7BA1\u7406 ",-1),ft={class:"tw-mt-0"},pt={class:"q-dark tw-px-4 tw-pb-5 tw-min-h-50 tw-relative"},xt={class:"tw-overflow-x-auto"},vt={class:"tw-w-full tw-whitespace-nowrap"},_t={class:"q-pa-lg flex flex-center"},ht=C({props:{orgId:{type:String,required:!0}},setup(a){const x=a,n=c(1),v=c(10),w=c(!1),m=U(),g=b(()=>m.state.Root.users),f=b(()=>{const e=m.state.Root.userTotal||0;return Math.ceil(e/v.value)}),l=c(!1),r=async()=>{l.value=!0;try{await m.dispatch("fetchUsers",{oid:x.orgId,page:n.value,pagesize:v.value})}catch(e){console.log(e)}l.value=!1};return r(),j(n,(e,o)=>{r()}),(e,o)=>(_(),y("div",dt,[t("div",ut,[t("div",ct,[t("div",wt,[mt,t("div",ft,[s(p,{flat:"",class:"tw-text-white",icon:"add",onClick:o[0]||(o[0]=i=>w.value=!0)})])])]),t("div",pt,[t("div",xt,[t("table",vt,[t("tbody",null,[(_(!0),y(V,null,E(h(g),i=>(_(),z(rt,{key:i.id,user:i,onModify:r},null,8,["user"]))),128))])])]),s(S,{size:"md",showing:l.value},null,8,["showing"])]),t("div",_t,[s(T,{modelValue:n.value,"onUpdate:modelValue":o[1]||(o[1]=i=>n.value=i),color:"grey-4","active-color":"black",max:h(f),"boundary-numbers":!1},null,8,["modelValue","max"])]),s(A,{modelValue:w.value,"onUpdate:modelValue":o[2]||(o[2]=i=>w.value=i),onModify:r},null,8,["modelValue"])])]))}});var $t=$(ht,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/UserListAdmin/UserListAdmin.vue"]]);export{$t as default};
diff --git a/dist/assets/UserProfile.ab80fd42.js b/dist/assets/UserProfile.3ae9d6ce.js
similarity index 96%
rename from dist/assets/UserProfile.ab80fd42.js
rename to dist/assets/UserProfile.3ae9d6ce.js
index 8f4c501..f95b245 100644
--- a/dist/assets/UserProfile.ab80fd42.js
+++ b/dist/assets/UserProfile.3ae9d6ce.js
@@ -1,4 +1,4 @@
-import{_ as n,k as i,u as c,r as u,K as x,b as t,t as l,A as e,ae as m,p,a as d,h as _,Y as f,d as r,o as h}from"./index.d76e71bf.js";import{M as v}from"./ModifyBox.88f33ebb.js";const b={class:"tw-bg-gradient-to-r tw-from-primary tw-to-purple-500"},g={class:"tw-mx-auto tw-container tw-px-6"},y={class:"xl:tw-flex tw-items-center tw-flex-wrap"},F=t("div",{class:"xl:tw-w-3/4 2xl:tw-w-4/5"},null,-1),B={class:"xl:tw-w-1/4 2xl:tw-w-1/5 tw-flex tw-flex-col tw-items-center xl:tw-pl-8 tw-py-12 md:tw-pt-12 md:tw-pb-12 xl:tw-pb-6"},E={class:"tw-w-full tw-flex tw-items-center tw-justify-center"},k={class:"tw-flex tw-flex-col tw-items-center"},V={class:"tw-w-20 tw-h-20 tw-bg-gray-700 tw-rounded-full tw-flex tw-items-center tw-justify-center"},j={class:"tw-text-lg tw-font-bold tw-rounded tw-leading-3 tw-text-white"},D={class:"tw-mt-2 tw-text-xs sm:tw-text-sm md:tw-text-base tw-font-semibold tw-text-center tw-text-white"},U={class:"tw-px-4 xl:tw-px-0"},q={class:"tw-mx-auto tw-container"},A={class:"xl:tw-flex"},C=t("div",{class:"xl:tw-w-3/4 2xl:tw-w-4/5 tw--mt-8 xl:tw--mt-36"},[t("div",{class:"tw-pl-4 md:tw-pl-10 tw-py-4 md:tw-py-7 tw-bg-gray-100 tw-rounded-tl-lg tw-rounded-tr-lg tw-shadow"},[t("p",{class:"tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-gray-800"}," \u66F4\u65B0\u65E5\u5FD7 ")]),t("div",{class:"q-dark tw-shadow-lg tw-pb-8 tw-px-4 md:tw-px-8 xl:tw-px-10 tw-h-5/6 tw-py-6"},[r(" V2.0.0-Beta"),t("br"),r(" \u589E\u52A0 workflow \u529F\u80FD ")])],-1),N={class:"xl:tw-w-1/4 2xl:tw-w-1/5 tw-pt-7 xl:tw-pl-8 tw-pb-7"},M=t("p",{class:"tw-text-base tw-font-semibold tw-text-gray-100"}," \u8D26\u53F7\u4FE1\u606F ",-1),P={class:"tw-mt-4"},S={class:"tw-flex tw-box-border tw-px-2 q-dark tw-h-10 tw-border-dashed tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},K={class:"tw-flex tw-box-border tw-px-2 tw-mt-4 q-dark tw-h-10 tw-border-dashed tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},Q={class:"tw-mt-7"},T=t("p",{class:"tw-text-base tw-font-semibold tw-text-gray-100"}," \u4E2A\u4EBA\u8BBE\u7F6E ",-1),Y={class:"tw-flex tw-mt-4 q-dark tw-h-12 tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},$=i({setup(z){const s=c().getters.currentUser,o=u(!1);return(H,w)=>(h(),x(f,null,[t("div",null,[t("div",b,[t("div",g,[t("div",y,[F,t("div",B,[t("div",E,[t("div",k,[t("div",V,[t("p",j,l(e(m)(e(s).name)),1)]),t("p",D,l(e(s).name),1)])]),p(`
+import{_ as n,k as i,u as c,r as u,K as x,b as t,t as l,A as e,ae as m,p,a as d,h as _,Y as f,d as r,o as h}from"./index.f89dd3dd.js";import{M as v}from"./ModifyBox.25d0a805.js";const b={class:"tw-bg-gradient-to-r tw-from-primary tw-to-purple-500"},g={class:"tw-mx-auto tw-container tw-px-6"},y={class:"xl:tw-flex tw-items-center tw-flex-wrap"},F=t("div",{class:"xl:tw-w-3/4 2xl:tw-w-4/5"},null,-1),B={class:"xl:tw-w-1/4 2xl:tw-w-1/5 tw-flex tw-flex-col tw-items-center xl:tw-pl-8 tw-py-12 md:tw-pt-12 md:tw-pb-12 xl:tw-pb-6"},E={class:"tw-w-full tw-flex tw-items-center tw-justify-center"},k={class:"tw-flex tw-flex-col tw-items-center"},V={class:"tw-w-20 tw-h-20 tw-bg-gray-700 tw-rounded-full tw-flex tw-items-center tw-justify-center"},j={class:"tw-text-lg tw-font-bold tw-rounded tw-leading-3 tw-text-white"},D={class:"tw-mt-2 tw-text-xs sm:tw-text-sm md:tw-text-base tw-font-semibold tw-text-center tw-text-white"},U={class:"tw-px-4 xl:tw-px-0"},q={class:"tw-mx-auto tw-container"},A={class:"xl:tw-flex"},C=t("div",{class:"xl:tw-w-3/4 2xl:tw-w-4/5 tw--mt-8 xl:tw--mt-36"},[t("div",{class:"tw-pl-4 md:tw-pl-10 tw-py-4 md:tw-py-7 tw-bg-gray-100 tw-rounded-tl-lg tw-rounded-tr-lg tw-shadow"},[t("p",{class:"tw-text-base sm:tw-text-lg md:tw-text-xl lg:tw-text-2xl tw-font-bold tw-leading-normal tw-text-gray-800"}," \u66F4\u65B0\u65E5\u5FD7 ")]),t("div",{class:"q-dark tw-shadow-lg tw-pb-8 tw-px-4 md:tw-px-8 xl:tw-px-10 tw-h-5/6 tw-py-6"},[r(" V2.0.0-Beta"),t("br"),r(" \u589E\u52A0 workflow \u529F\u80FD ")])],-1),N={class:"xl:tw-w-1/4 2xl:tw-w-1/5 tw-pt-7 xl:tw-pl-8 tw-pb-7"},M=t("p",{class:"tw-text-base tw-font-semibold tw-text-gray-100"}," \u8D26\u53F7\u4FE1\u606F ",-1),P={class:"tw-mt-4"},S={class:"tw-flex tw-box-border tw-px-2 q-dark tw-h-10 tw-border-dashed tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},K={class:"tw-flex tw-box-border tw-px-2 tw-mt-4 q-dark tw-h-10 tw-border-dashed tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},Q={class:"tw-mt-7"},T=t("p",{class:"tw-text-base tw-font-semibold tw-text-gray-100"}," \u4E2A\u4EBA\u8BBE\u7F6E ",-1),Y={class:"tw-flex tw-mt-4 q-dark tw-h-12 tw-shadow tw-items-center tw-w-full tw-justify-between tw-rounded"},$=i({setup(z){const s=c().getters.currentUser,o=u(!1);return(H,w)=>(h(),x(f,null,[t("div",null,[t("div",b,[t("div",g,[t("div",y,[F,t("div",B,[t("div",E,[t("div",k,[t("div",V,[t("p",j,l(e(m)(e(s).name)),1)]),t("p",D,l(e(s).name),1)])]),p(`
\u8D26\u53F7
diff --git a/dist/assets/WorkflowList.bd34351b.js b/dist/assets/WorkflowList.56e40ec4.js
similarity index 98%
rename from dist/assets/WorkflowList.bd34351b.js
rename to dist/assets/WorkflowList.56e40ec4.js
index 6cccb20..ab50525 100644
--- a/dist/assets/WorkflowList.bd34351b.js
+++ b/dist/assets/WorkflowList.56e40ec4.js
@@ -1 +1 @@
-var ee=Object.defineProperty;var R=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var q=(i,n,e)=>n in i?ee(i,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[n]=e,L=(i,n)=>{for(var e in n||(n={}))te.call(n,e)&&q(i,e,n[e]);if(R)for(var e of R(n))oe.call(n,e)&&q(i,e,n[e]);return i};import{_ as U,k as E,l as I,J as le,u as J,r as k,o as v,c as b,A as c,E as K,I as $,w as u,a as l,Q as z,K as V,a8 as Y,az as ae,d as y,t as C,Y as N,D as se,f as re,h as Q,i as ne,F as ue,b as g,aA as ie,aB as de,aC as we,al as G,x as M,C as T,T as P,U as j,ac as S,S as H,au as ce,H as O,m as fe,aD as me,ag as X,aq as pe,a2 as A,q as D,aj as ve,ay as _e,p as B,a4 as ge}from"./index.d76e71bf.js";import{C as Z}from"./Confirm.47315734.js";import{f as ke}from"./datetime.561112b0.js";import{t as he,b as ye}from"./thumbStyle.856de4cb.js";const be=E({props:{workflowId:{type:Number,required:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:n}){const e=i,d=I({get:()=>e.modelValue,set:p=>n("update:modelValue",p)}),_=le(),m=J(),a=I(()=>m.state.WorkFlow.workflows.get(e.workflowId)),o=k(!1);async function W(p){o.value=!0;try{m.commit("cleanError"),await m.dispatch("WorkFlow/deleteWorkFlow",{id:p}),m.state.Root.currentError===void 0&&(_.push({name:"workflows"}),d.value=!1)}catch(w){console.error(w),m.commit("error",{error:w})}o.value=!1}return(p,w)=>{var x;return v(),b(Z,{modelValue:c(d),"onUpdate:modelValue":w[0]||(w[0]=F=>K(d)?d.value=F:null),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1\u7F16\u6392 "+((x=c(a))==null?void 0:x.title)+" ?",type:"warning",loading:o.value,onConfirm:w[1]||(w[1]=F=>c(a)&&W(c(a).id))},null,8,["modelValue","content","loading"])}}});var xe=U(be,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogWorkFlowDeleteConfirm.vue"]]);const Fe=g("div",{class:"text-h6"},"\u4EFB\u52A1\u7F16\u6392\u4EBA\u5458\u7BA1\u7406",-1),Ce=y(" \u6DFB\u52A0 "),Ve=E({props:{workflowId:{type:Number,default:0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:n}){const e=i,d=I({get:()=>e.modelValue,set:s=>n("update:modelValue",s)}),_=k([]);async function m(){_.value=await ie(e.workflowId)}$(()=>[e.workflowId,d.value],async([,s])=>{s&&m(),a.value=""});const a=k(""),o=k(!1);async function W(){o.value=!0;try{await de(e.workflowId,a.value),a.value="",await m()}finally{o.value=!1}}const p=k(),w=k(!1);function x(s){p.value=s,w.value=!0}function F(){p.value=void 0,w.value=!1}async function t(s){o.value=!0;try{await we(e.workflowId,s.id),await m()}finally{o.value=!1}}return(s,f)=>(v(),b(ue,{modelValue:c(d),"onUpdate:modelValue":f[3]||(f[3]=r=>K(d)?d.value=r:null)},{default:u(()=>{var r;return[l(Z,{modelValue:w.value,"onUpdate:modelValue":f[0]||(f[0]=h=>w.value=h),type:"warning",content:`\u786E\u5B9A\u8981\u79FB\u9664\u7528\u6237 ${(r=p.value)==null?void 0:r.name} \u5417\uFF1F`,onConfirm:f[1]||(f[1]=h=>p.value&&t(p.value).then(F))},null,8,["modelValue","content"]),l(ne,{class:"tw-w-96 q-pa-sm"},{default:u(()=>[l(z,null,{default:u(()=>[Fe]),_:1}),l(z,null,{default:u(()=>[(v(!0),V(N,null,Y(_.value,h=>(v(),b(ae,{key:h.id,removable:"",color:"primary","text-color":"black",onRemove:Je=>x(h)},{default:u(()=>[y(C(h.name),1)]),_:2},1032,["onRemove"]))),128))]),_:1}),l(se,null,{default:u(()=>[l(re,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=h=>a.value=h),class:"tw-w-full",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u5E10\u53F7"},{append:u(()=>[l(Q,{loading:o.value,flat:"",icon:"add","text-color":"primary",onClick:W},{default:u(()=>[Ce]),_:1},8,["loading"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]}),_:1},8,["modelValue"]))}});var Ie=U(Ve,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogWorkFlowUsersManage.vue"]]);const We=y("\u4EBA\u5458\u7BA1\u7406"),Ue=y("\u5220\u9664"),Ee=E({props:{workflowId:{type:Number,required:!0}},setup(i){const n=i,e=k(!1),d=k(!1),_=k(!1);return(m,a)=>(v(),V(N,null,[l(xe,{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=o=>d.value=o),"workflow-id":n.workflowId},null,8,["modelValue","workflow-id"]),l(Ie,{modelValue:_.value,"onUpdate:modelValue":a[1]||(a[1]=o=>_.value=o),"workflow-id":n.workflowId},null,8,["modelValue","workflow-id"]),l(ce,{modelValue:e.value,"onUpdate:modelValue":a[4]||(a[4]=o=>e.value=o),dense:"",flat:"","dropdown-icon":"more_horiz","no-icon-animation":"",onClick:a[5]||(a[5]=S(()=>{},["stop","prevent"]))},{default:u(()=>[l(G,{dense:""},{default:u(()=>[M((v(),b(H,{clickable:"",class:"hover:tw-bg-primary hover:tw-text-black",onClick:a[2]||(a[2]=S(o=>_.value=!0,["stop"]))},{default:u(()=>[l(P,null,{default:u(()=>[l(j,null,{default:u(()=>[We]),_:1})]),_:1})]),_:1})),[[T,!0]]),M((v(),b(H,{clickable:"",class:"hover:tw-bg-primary hover:tw-text-black",onClick:a[3]||(a[3]=S(o=>d.value=!0,["stop"]))},{default:u(()=>[l(P,null,{default:u(()=>[l(j,null,{default:u(()=>[Ue]),_:1})]),_:1})]),_:1})),[[T,!0]])]),_:1})]),_:1},8,["modelValue"])],64))}});var Be=U(Ee,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DropdownWorkFlowManage.vue"]]);const Se={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},De={class:"q-pa-md tw-flex tw-flex-row-reverse tw-gap-4"},$e={class:"tw-w-full tw-grow tw-overflow-hidden tw-min-w-[280px]"},Qe={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},Ae={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},Ne={class:"task__remark"},Re={class:"task__bottom-box"},qe={class:"task__bottom-time"},Le={key:1,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},ze=y(" \u6682\u65E0\u6570\u636E "),Me=E({props:{orgId:{type:String,required:!0}},setup(i){const n=i,e=J(),d=O(),_=k(),m=I(()=>e.state.WorkFlow.loadingWorkflows);e.commit("WorkFlow/clearWorkFlows"),$(()=>d.name,t=>{(t==null?void 0:t.toString())==="workflows"&&w()});function a(t){const s=_.value;if(s===void 0)throw new Error("scroll-area instance is missing");if(!o.value)return;const f=o.value.findIndex(r=>r.id===t);setTimeout(()=>{if(f<0)s.setScrollPercentage("vertical",0);else{const r=1*f/o.value.length*s.getScroll().verticalSize-50;s.setScrollPosition("vertical",r)}},100)}fe(async()=>{e.watch(t=>[t.Root.eventWorkFlow],([t])=>{if(!t)return;const s=e.state.WorkFlow.workflows.get(t.workFlowId);s!==void 0&&e.commit("notifySuccess",{message:`\u4EFB\u52A1\u7F16\u6392 ${s.title} \u5F53\u524D\u72B6\u6001: ${t.status}`}),w()}),$(()=>[o.value],()=>{const t=Number(d.params.workflowId);t!==0&&!isNaN(t)&&a(t)},{deep:!0}),w()});const o=I(()=>{const t=e.state.WorkFlow.workflows,s=Array.from(t.values());return s.sort((f,r)=>r.id-f.id),s});async function W(t,s){if(t===1)return;p.page=t,(await w()).length{const f=X("router-link");return v(),V("div",Se,[g("div",De,[l(Q,{flat:"",loading:c(m),icon:"refresh",onClick:w},null,8,["loading"]),l(Q,{flat:"",icon:"add",to:{name:"create_workflow"}})]),g("div",$e,[l(c(ge),{ref_key:"scrollArea",ref:_,visible:"","thumb-style":c(he),"bar-style":c(ye),class:"tw-w-full tw-h-full tw-px-[15px]"},{default:u(()=>[l(c(pe),{class:"tw-w-full tw-h-full",offset:100,onLoad:W},{default:u(()=>[c(o)&&c(o).length>0?(v(),b(G,{key:0,class:"tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:u(()=>[(v(!0),V(N,null,Y(c(o),r=>(v(),b(f,{key:r.id,to:{name:"workflow",params:{workflowId:r.id}}},{default:u(()=>[g("div",{class:A((x(r)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[g("div",Qe,[g("div",Ae,[l(D,{name:"schedule",class:"tw-inline"}),y(" "+C(r.cronExpr),1)]),l(ve),l(_e,{outline:"",color:r.status===1?"green":"red",class:"tw-w-[50px]"},{default:u(()=>[y(C(F(r)?"\u6267\u884C\u4E2D":r.status==1?"\u8C03\u5EA6\u4E2D":"\u5DF2\u6682\u505C"),1)]),_:2},1032,["color"]),B(` `)]),g("div",{class:A((x(r)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[l(D,{name:"numbers"}),y(" "+C(r.title),1)],2),g("div",Ne,C(r.remark||"-"),1),g("div",Re,[g("div",qe,C(c(ke)(r.createTime*1e3)),1),l(Be,{"workflow-id":r.id},null,8,["workflow-id"])])],2)]),_:2},1032,["to"]))),128))]),_:1})):B("v-if",!0),!c(m)&&(!c(o)||c(o).length===0)?(v(),V("div",Le,[l(D,{name:"outlet",style:{"font-size":"3rem"}}),ze])):B("v-if",!0)]),_:1})]),_:1},8,["thumb-style","bar-style"])])])}}});var Te=U(Me,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowList.vue"]]);const Pe={class:"lg:q-pa-md tw-box-border tw-flex tw-flex-row tw-gap-4 tw-h-full tw-w-full"},je={class:"tw-w-full tw-h-full tw-grow tw-overflow-hidden"},He=E({props:{orgId:{type:String,required:!0}},setup(i){const n=O(),e=I(()=>n.name&&n.name.toString()!=="workflows"?"tw-hidden lg:tw-block":"");return(d,_)=>{const m=X("router-view");return v(),V("div",Pe,[g("div",{class:A("xl:tw-basis-1/5 lg:tw-basis-1/4 tw-h-full tw-w-full tw-shrink-0 "+c(e))},[i.orgId?(v(),b(Te,{key:0,"org-id":i.orgId},null,8,["org-id"])):B("v-if",!0)],2),g("div",je,[l(m)])])}}});var Ze=U(He,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/WorkflowList.vue"]]);export{Ze as default};
+var ee=Object.defineProperty;var R=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var q=(i,n,e)=>n in i?ee(i,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[n]=e,L=(i,n)=>{for(var e in n||(n={}))te.call(n,e)&&q(i,e,n[e]);if(R)for(var e of R(n))oe.call(n,e)&&q(i,e,n[e]);return i};import{_ as U,k as E,l as I,J as le,u as J,r as k,o as v,c as b,A as c,E as K,I as $,w as u,a as l,Q as z,K as V,a8 as Y,az as ae,d as y,t as C,Y as N,D as se,f as re,h as Q,i as ne,F as ue,b as g,aA as ie,aB as de,aC as we,al as G,x as M,C as T,T as P,U as j,ac as S,S as H,au as ce,H as O,m as fe,aD as me,ag as X,aq as pe,a2 as A,q as D,aj as ve,ay as _e,p as B,a4 as ge}from"./index.f89dd3dd.js";import{C as Z}from"./Confirm.4116c3bd.js";import{f as ke}from"./datetime.561112b0.js";import{t as he,b as ye}from"./thumbStyle.856de4cb.js";const be=E({props:{workflowId:{type:Number,required:!0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:n}){const e=i,d=I({get:()=>e.modelValue,set:p=>n("update:modelValue",p)}),_=le(),m=J(),a=I(()=>m.state.WorkFlow.workflows.get(e.workflowId)),o=k(!1);async function W(p){o.value=!0;try{m.commit("cleanError"),await m.dispatch("WorkFlow/deleteWorkFlow",{id:p}),m.state.Root.currentError===void 0&&(_.push({name:"workflows"}),d.value=!1)}catch(w){console.error(w),m.commit("error",{error:w})}o.value=!1}return(p,w)=>{var x;return v(),b(Z,{modelValue:c(d),"onUpdate:modelValue":w[0]||(w[0]=F=>K(d)?d.value=F:null),content:"\u662F\u5426\u8981\u5220\u9664\u4EFB\u52A1\u7F16\u6392 "+((x=c(a))==null?void 0:x.title)+" ?",type:"warning",loading:o.value,onConfirm:w[1]||(w[1]=F=>c(a)&&W(c(a).id))},null,8,["modelValue","content","loading"])}}});var xe=U(be,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogWorkFlowDeleteConfirm.vue"]]);const Fe=g("div",{class:"text-h6"},"\u4EFB\u52A1\u7F16\u6392\u4EBA\u5458\u7BA1\u7406",-1),Ce=y(" \u6DFB\u52A0 "),Ve=E({props:{workflowId:{type:Number,default:0},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{emit:n}){const e=i,d=I({get:()=>e.modelValue,set:s=>n("update:modelValue",s)}),_=k([]);async function m(){_.value=await ie(e.workflowId)}$(()=>[e.workflowId,d.value],async([,s])=>{s&&m(),a.value=""});const a=k(""),o=k(!1);async function W(){o.value=!0;try{await de(e.workflowId,a.value),a.value="",await m()}finally{o.value=!1}}const p=k(),w=k(!1);function x(s){p.value=s,w.value=!0}function F(){p.value=void 0,w.value=!1}async function t(s){o.value=!0;try{await we(e.workflowId,s.id),await m()}finally{o.value=!1}}return(s,f)=>(v(),b(ue,{modelValue:c(d),"onUpdate:modelValue":f[3]||(f[3]=r=>K(d)?d.value=r:null)},{default:u(()=>{var r;return[l(Z,{modelValue:w.value,"onUpdate:modelValue":f[0]||(f[0]=h=>w.value=h),type:"warning",content:`\u786E\u5B9A\u8981\u79FB\u9664\u7528\u6237 ${(r=p.value)==null?void 0:r.name} \u5417\uFF1F`,onConfirm:f[1]||(f[1]=h=>p.value&&t(p.value).then(F))},null,8,["modelValue","content"]),l(ne,{class:"tw-w-96 q-pa-sm"},{default:u(()=>[l(z,null,{default:u(()=>[Fe]),_:1}),l(z,null,{default:u(()=>[(v(!0),V(N,null,Y(_.value,h=>(v(),b(ae,{key:h.id,removable:"",color:"primary","text-color":"black",onRemove:Je=>x(h)},{default:u(()=>[y(C(h.name),1)]),_:2},1032,["onRemove"]))),128))]),_:1}),l(se,null,{default:u(()=>[l(re,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=h=>a.value=h),class:"tw-w-full",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u5E10\u53F7"},{append:u(()=>[l(Q,{loading:o.value,flat:"",icon:"add","text-color":"primary",onClick:W},{default:u(()=>[Ce]),_:1},8,["loading"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]}),_:1},8,["modelValue"]))}});var Ie=U(Ve,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DialogWorkFlowUsersManage.vue"]]);const We=y("\u4EBA\u5458\u7BA1\u7406"),Ue=y("\u5220\u9664"),Ee=E({props:{workflowId:{type:Number,required:!0}},setup(i){const n=i,e=k(!1),d=k(!1),_=k(!1);return(m,a)=>(v(),V(N,null,[l(xe,{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=o=>d.value=o),"workflow-id":n.workflowId},null,8,["modelValue","workflow-id"]),l(Ie,{modelValue:_.value,"onUpdate:modelValue":a[1]||(a[1]=o=>_.value=o),"workflow-id":n.workflowId},null,8,["modelValue","workflow-id"]),l(ce,{modelValue:e.value,"onUpdate:modelValue":a[4]||(a[4]=o=>e.value=o),dense:"",flat:"","dropdown-icon":"more_horiz","no-icon-animation":"",onClick:a[5]||(a[5]=S(()=>{},["stop","prevent"]))},{default:u(()=>[l(G,{dense:""},{default:u(()=>[M((v(),b(H,{clickable:"",class:"hover:tw-bg-primary hover:tw-text-black",onClick:a[2]||(a[2]=S(o=>_.value=!0,["stop"]))},{default:u(()=>[l(P,null,{default:u(()=>[l(j,null,{default:u(()=>[We]),_:1})]),_:1})]),_:1})),[[T,!0]]),M((v(),b(H,{clickable:"",class:"hover:tw-bg-primary hover:tw-text-black",onClick:a[3]||(a[3]=S(o=>d.value=!0,["stop"]))},{default:u(()=>[l(P,null,{default:u(()=>[l(j,null,{default:u(()=>[Ue]),_:1})]),_:1})]),_:1})),[[T,!0]])]),_:1})]),_:1},8,["modelValue"])],64))}});var Be=U(Ee,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/DropdownWorkFlowManage.vue"]]);const Se={class:"tw-h-full tw-w-full tw-flex tw-flex-col"},De={class:"q-pa-md tw-flex tw-flex-row-reverse tw-gap-4"},$e={class:"tw-w-full tw-grow tw-overflow-hidden tw-min-w-[280px]"},Qe={class:"tw-w-full tw-flex tw-gap-4 tw-overflow-hidden tw-px-[10px] tw-pt-[10px]"},Ae={class:"tw-text-ellipsis tw-w-auto tw-truncate tw-gap-1"},Ne={class:"task__remark"},Re={class:"task__bottom-box"},qe={class:"task__bottom-time"},Le={key:1,class:"tw-w-full tw-text-center tw-m-auto tw-text-gray-500"},ze=y(" \u6682\u65E0\u6570\u636E "),Me=E({props:{orgId:{type:String,required:!0}},setup(i){const n=i,e=J(),d=O(),_=k(),m=I(()=>e.state.WorkFlow.loadingWorkflows);e.commit("WorkFlow/clearWorkFlows"),$(()=>d.name,t=>{(t==null?void 0:t.toString())==="workflows"&&w()});function a(t){const s=_.value;if(s===void 0)throw new Error("scroll-area instance is missing");if(!o.value)return;const f=o.value.findIndex(r=>r.id===t);setTimeout(()=>{if(f<0)s.setScrollPercentage("vertical",0);else{const r=1*f/o.value.length*s.getScroll().verticalSize-50;s.setScrollPosition("vertical",r)}},100)}fe(async()=>{e.watch(t=>[t.Root.eventWorkFlow],([t])=>{if(!t)return;const s=e.state.WorkFlow.workflows.get(t.workFlowId);s!==void 0&&e.commit("notifySuccess",{message:`\u4EFB\u52A1\u7F16\u6392 ${s.title} \u5F53\u524D\u72B6\u6001: ${t.status}`}),w()}),$(()=>[o.value],()=>{const t=Number(d.params.workflowId);t!==0&&!isNaN(t)&&a(t)},{deep:!0}),w()});const o=I(()=>{const t=e.state.WorkFlow.workflows,s=Array.from(t.values());return s.sort((f,r)=>r.id-f.id),s});async function W(t,s){if(t===1)return;p.page=t,(await w()).length{const f=X("router-link");return v(),V("div",Se,[g("div",De,[l(Q,{flat:"",loading:c(m),icon:"refresh",onClick:w},null,8,["loading"]),l(Q,{flat:"",icon:"add",to:{name:"create_workflow"}})]),g("div",$e,[l(c(ge),{ref_key:"scrollArea",ref:_,visible:"","thumb-style":c(he),"bar-style":c(ye),class:"tw-w-full tw-h-full tw-px-[15px]"},{default:u(()=>[l(c(pe),{class:"tw-w-full tw-h-full",offset:100,onLoad:W},{default:u(()=>[c(o)&&c(o).length>0?(v(),b(G,{key:0,class:"tw-flex tw-flex-col tw-gap-2 tw-pb-4"},{default:u(()=>[(v(!0),V(N,null,Y(c(o),r=>(v(),b(f,{key:r.id,to:{name:"workflow",params:{workflowId:r.id}}},{default:u(()=>[g("div",{class:A((x(r)?"tw-bg-primary tw-text-black ":"tw-bg-[#27272a] ")+"tw-w-full tw-min-h-[130px] tw-rounded-lg tw-box-border tw-relative tw-overflow-hidden tw-block hover:tw-bg-primary hover:tw-text-black")},[g("div",Qe,[g("div",Ae,[l(D,{name:"schedule",class:"tw-inline"}),y(" "+C(r.cronExpr),1)]),l(ve),l(_e,{outline:"",color:r.status===1?"green":"red",class:"tw-w-[50px]"},{default:u(()=>[y(C(F(r)?"\u6267\u884C\u4E2D":r.status==1?"\u8C03\u5EA6\u4E2D":"\u5DF2\u6682\u505C"),1)]),_:2},1032,["color"]),B(` `)]),g("div",{class:A((x(r)?"active ":"")+"task__title tw-inline-flex tw-items-center")},[l(D,{name:"numbers"}),y(" "+C(r.title),1)],2),g("div",Ne,C(r.remark||"-"),1),g("div",Re,[g("div",qe,C(c(ke)(r.createTime*1e3)),1),l(Be,{"workflow-id":r.id},null,8,["workflow-id"])])],2)]),_:2},1032,["to"]))),128))]),_:1})):B("v-if",!0),!c(m)&&(!c(o)||c(o).length===0)?(v(),V("div",Le,[l(D,{name:"outlet",style:{"font-size":"3rem"}}),ze])):B("v-if",!0)]),_:1})]),_:1},8,["thumb-style","bar-style"])])])}}});var Te=U(Me,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/components/WorkFlowList.vue"]]);const Pe={class:"lg:q-pa-md tw-box-border tw-flex tw-flex-row tw-gap-4 tw-h-full tw-w-full"},je={class:"tw-w-full tw-h-full tw-grow tw-overflow-hidden"},He=E({props:{orgId:{type:String,required:!0}},setup(i){const n=O(),e=I(()=>n.name&&n.name.toString()!=="workflows"?"tw-hidden lg:tw-block":"");return(d,_)=>{const m=X("router-view");return v(),V("div",Pe,[g("div",{class:A("xl:tw-basis-1/5 lg:tw-basis-1/4 tw-h-full tw-w-full tw-shrink-0 "+c(e))},[i.orgId?(v(),b(Te,{key:0,"org-id":i.orgId},null,8,["org-id"])):B("v-if",!0)],2),g("div",je,[l(m)])])}}});var Ze=U(He,[["__file","/Users/boyan/development/opensource/gopherCronFE/src/pages/WorkflowList.vue"]]);export{Ze as default};
diff --git a/dist/assets/WorkflowTabs.36c12950.js b/dist/assets/WorkflowTabs.9cd7e98f.js
similarity index 99%
rename from dist/assets/WorkflowTabs.36c12950.js
rename to dist/assets/WorkflowTabs.9cd7e98f.js
index ae39dbf..cacd464 100644
--- a/dist/assets/WorkflowTabs.36c12950.js
+++ b/dist/assets/WorkflowTabs.9cd7e98f.js
@@ -1 +1 @@
-var St=Object.defineProperty,Vt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var ze=Object.getOwnPropertySymbols;var Tt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable;var Qe=(e,t,o)=>t in e?St(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,qe=(e,t)=>{for(var o in t||(t={}))Tt.call(t,o)&&Qe(e,o,t[o]);if(ze)for(var o of ze(t))Bt.call(t,o)&&Qe(e,o,t[o]);return e},Je=(e,t)=>Vt(e,Ot(t));import{I as Y,aE as Mt,_ as oe,k as ne,l as D,r as B,u as me,o as M,c as $,w as F,a as b,T as K,S as H,A as N,E as at,z as lt,d as P,m as ie,aF as Dt,aD as Ke,P as Ae,ap as Pt,ag as $t,K as ge,a2 as Lt,p as J,F as Wt,aG as Rt,Y as Ut,n as Se,i as st,Q as se,b as ue,D as zt,h as q,al as Qt,x as re,t as he,e as it,C as ae,aH as qt,aI as Jt,aJ as Kt,aK as Ht,J as Gt,H as ut,f as Ee,B as Yt,M as Xt,aL as Zt,aM as eo,R as to,U as ke,V as oo,a3 as He,a6 as no,a5 as le,a7 as Ie}from"./index.d76e71bf.js";import{u as ft}from"./index.650f2770.js";import{C as Ge}from"./Confirm.47315734.js";import{J as ro}from"./JSONViewer.6dded83c.js";import{f as Ye}from"./datetime.561112b0.js";var ao=Object.defineProperty,lo=Object.defineProperties,so=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,io=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,Ze=(e,t,o)=>t in e?ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,je=(e,t)=>{for(var o in t||(t={}))io.call(t,o)&&Ze(e,o,t[o]);if(Xe)for(var o of Xe(t))uo.call(t,o)&&Ze(e,o,t[o]);return e},fo=(e,t)=>lo(e,so(t));function dt(e,t){var o,n=1;e==null&&(e=0),t==null&&(t=0);function r(){var s,i=o.length,l,u=0,a=0;for(s=0;s=(m=(l+a)/2))?l=m:a=m,(f=o>=(w=(u+d)/2))?u=w:d=w,r=s,!(s=s[c=f<<1|p]))return r[c]=i,e;if(h=+e._x.call(null,s.data),x=+e._y.call(null,s.data),t===h&&o===x)return i.next=s,r?r[c]=i:e._root=i,e;do r=r?r[c]=new Array(4):e._root=new Array(4),(p=t>=(m=(l+a)/2))?l=m:a=m,(f=o>=(w=(u+d)/2))?u=w:d=w;while((c=f<<1|p)===(v=(x>=w)<<1|h>=m));return r[v]=s,r[c]=i,e}function po(e){var t,o,n=e.length,r,s,i=new Array(n),l=new Array(n),u=1/0,a=1/0,d=-1/0,m=-1/0;for(o=0;od&&(d=r),sm&&(m=s));if(u>d||a>m)return this;for(this.cover(u,a).cover(d,m),o=0;oe||e>=r||n>t||t>=s;)switch(a=(td||(l=x.y0)>m||(u=x.x1)=c)<<1|e>=f)&&(x=w[w.length-1],w[w.length-1]=w[w.length-1-p],w[w.length-1-p]=x)}else{var v=e-+this._x.call(null,h.data),C=t-+this._y.call(null,h.data),k=v*v+C*C;if(k=(w=(i+u)/2))?i=w:u=w,(p=m>=(h=(l+a)/2))?l=h:a=h,t=o,!(o=o[f=p<<1|x]))return this;if(!o.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,c=f)}for(;o.data!==e;)if(r=o,!(o=o.next))return this;return(s=o.next)&&delete o.next,r?(s?r.next=s:delete r.next,this):t?(s?t[f]=s:delete t[f],(o=t[0]||t[1]||t[2]||t[3])&&o===(t[3]||t[2]||t[1]||t[0])&&!o.length&&(n?n[c]=o:this._root=o),this):(this._root=s,this)}function yo(e){for(var t=0,o=e.length;tw.index){var R=h-I.x-I.vx,W=x-I.y-I.vy,U=R*R+W*W;Uh+V||_x+V||Sa.r&&(a.r=a[d].r)}function u(){if(!!t){var a,d=t.length,m;for(o=new Array(d),a=0;a[t(j,_,i),j])),k;for(f=0,l=new Array(c);f{}};function ht(){for(var e=0,t=arguments.length,o={},n;e=0&&(n=o.slice(r+1),o=o.slice(0,r)),o&&!t.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:n}})}_e.prototype=ht.prototype={constructor:_e,on:function(e,t){var o=this._,n=Vo(e+"",o),r,s=-1,i=n.length;if(arguments.length<2){for(;++s0)for(var o=new Array(r),n=0,r,s;n=0&&e._call.call(void 0,t),e=e._next;--fe}function nt(){te=(be=we.now())+Ne,fe=pe=0;try{Bo()}finally{fe=0,Do(),te=0}}function Mo(){var e=we.now(),t=e-be;t>gt&&(Ne-=t,be=e)}function Do(){for(var e,t=xe,o,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(o=t._next,t._next=null,t=e?e._next=o:xe=o);ve=e,Oe(n)}function Oe(e){if(!fe){pe&&(pe=clearTimeout(pe));var t=e-te;t>24?(e<1/0&&(pe=setTimeout(nt,e-we.now()-Ne)),ce&&(ce=clearInterval(ce))):(ce||(be=we.now(),ce=setInterval(Mo,gt)),fe=1,wt(nt))}}const Po=1664525,$o=1013904223,rt=4294967296;function Lo(){let e=1;return()=>(e=(Po*e+$o)%rt)/rt}function Wo(e){return e.x}function Ro(e){return e.y}var Uo=10,zo=Math.PI*(3-Math.sqrt(5));function kt(e){var t,o=1,n=.001,r=1-Math.pow(n,1/300),s=0,i=.6,l=new Map,u=yt(m),a=ht("tick","end"),d=Lo();e==null&&(e=[]);function m(){w(),a.call("tick",t),o1?(f==null?l.delete(p):l.set(p,x(f)),t):l.get(p)},find:function(p,f,c){var v=0,C=e.length,k,j,_,S,I;for(c==null?c=1/0:c*=c,v=0;v1?(a.on(p,f),t):a.on(p)}}}function _t(){var e,t,o,n,r=L(-30),s,i=1,l=1/0,u=.81;function a(h){var x,p=e.length,f=Te(e,Wo,Ro).visitAfter(m);for(n=h,x=0;x