PageSourceSearch

https://intentional-app.com/_next/static/chunks/pages/dashboard/schedules-d570928192e1787c.js

js intentional-app.com collected 2026-10-06 04:48:50 UTC 12,331 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6379],{2238:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSP:()=>n,default:()=>o});var l=a(65321),r=a(52822),t=a(66977),d=a(37401),i=a(89366);function c(){return(0,l.jsx)(d.C,{children:e=>(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(i.Zp,{className:"h-full bg-sidebar p-2.5 rounded-xl w-full min-h-[45vh]",children:(0,l.jsx)("div",{className:"rounded-xl bg-background shadow-md h-full",children:(0,l.jsx)(r.Y,{scheduleType:e?"server":"dokploy-server",id:e??"dokploy-server"})})})})})}var n=!0;let o=c;c.getLayout=e=>(0,l.jsx)(t.N,{children:e})},7760:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(34480).A)("DatabaseZap",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 15 21.84",key:"14ibmq"}],["path",{d:"M21 5V8",key:"1marbg"}],["path",{d:"M21 12L18 17H22L19 22",key:"zafso"}],["path",{d:"M3 12A9 3 0 0 0 14.59 14.87",key:"1y4wr8"}]])},10379:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(34480).A)("Paintbrush",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]])},18358:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(34480).A)("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]])},19680:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(34480).A)("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]])},37401:(e,s,a)=>{"use strict";a.d(s,{C:()=>g});var l=a(65321),r=a(55155),t=a(4284),d=a(44359),i=a(27412),c=a.n(i),n=a(67901),o=a(97109),u=a(97301),x=a(9800),h=a(89366),m=a(19850),p=a(59736),y=a(85642);let f="dokploy-server",g=({children:e})=>{let s=(0,n.useRouter)(),{data:a,isLoading:i}=y.F.server.withSSHKey.useQuery(),{data:g,isLoading:j}=y.F.settings.isCloud.useQuery(),{data:v}=y.F.user.getPermissions.useQuery(),N="string"==typeof s.query.serverId?s.query.serverId:void 0,w=a?.find(e=>e.serverId===N),k=w?w.serverId:g?a?.[0]?.serverId:void 0;return i||j?(0,l.jsx)(h.Zp,{className:"bg-sidebar p-2.5 rounded-xl w-full",children:(0,l.jsxs)("div",{className:"rounded-xl bg-background shadow-md flex flex-col gap-2 items-center justify-center min-h-[60vh]",children:[(0,l.jsx)("span",{className:"text-muted-foreground text-lg font-medium",children:"Loading..."}),(0,l.jsx)(r.A,{className:"animate-spin size-8 text-muted-foreground"})]})}):g&&!a?.length?(0,l.jsx)(h.Zp,{className:"bg-sidebar p-2.5 rounded-xl w-full",children:(0,l.jsxs)("div",{className:"rounded-xl bg-background shadow-md flex flex-col items-center justify-center gap-5 min-h-[60vh] border border-dashed px-4",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-16 rounded-full bg-muted",children:(0,l.jsx)(t.A,{className:"size-8 text-muted-foreground"})}),(0,l.jsxs)("div",{className:"flex flex-col items-center gap-1.5 text-center max-w-md",children:[(0,l.jsx)("span",{className:"text-lg font-medium",children:"No servers yet"}),(0,l.jsx)("span",{className:"text-sm text-muted-foreground",children:v?.server.create?"This section works on your remote servers. Add your first server to start managing it from here.":"This section works on your remote servers. Ask an administrator to add a server to your organization."})]}),v?.server.create&&(0,l.jsx)(x.$,{asChild:!0,children:(0,l.jsxs)(c(),{href:"/dashboard/settings/servers",children:[(0,l.jsx)(d.A,{className:"size-4"}),"Add Server"]})})]})}):(0,l.jsxs)("div",{className:"flex flex-col gap-4 w-full",children:[!!a?.length&&(0,l.jsxs)("div",{className:"flex w-full items-center justify-end gap-3",children:[(0,l.jsx)(m.J,{htmlFor:"server-filter",className:"text-sm text-muted-foreground whitespace-nowrap",children:"Viewing server"}),(0,l.jsxs)(p.l6,{value:k??f,onValueChange:e=>{let{serverId:a,...l}=s.query;s.replace({pathname:s.pathname,query:e===f?l:{...l,serverId:e}},void 0,{shallow:!0})},children:[(0,l.jsx)(p.bq,{id:"server-filter",className:"w-fit min-w-[220px]",children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(t.A,{className:"size-4 text-muted-foreground"}),(0,l.jsx)(p.yv,{placeholder:"Select a server"})]})}),(0,l.jsx)(p.gC,{children:(0,l.jsxs)(p.s3,{children:[(0,l.jsx)(p.TR,{children:"Servers"}),!g&&(0,l.jsx)(p.eb,{value:f,children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{children:"Dokploy Server"}),(0,l.jsx)(u.E,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:"Local"})]})}),a.map(e=>(0,l.jsx)(p.eb,{value:e.serverId,children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{children:e.name}),(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:e.ipAddress})]})},e.serverId))]})})]})]}),(0,l.jsx)(o.Fragment,{children:e(k)},k??f)]})}},43386:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(34480).A)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},49243:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(34480).A)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},52822:(e,s,a)=>{"use strict";a.d(s,{Y:()=>v});var l=a(65321),r=a(55155),t=a(33799),d=a(49243),i=a(79366),c=a(83853),n=a(58248),o=a(97109),u=a(5137),x=a(17622),h=a(97301),m=a(9800),p=a(89366),y=a(2501),f=a(85642),g=a(62778),j=a(57149);let v=({id:e,scheduleType:s="application"})=>{let[a,v]=(0,o.useState)(new Set),{data:N,isLoading:w,refetch:k}=f.F.schedule.list.useQuery({id:e||"",scheduleType:s},{enabled:!!e}),b=f.F.useUtils(),{mutateAsync:A,isPending:z}=f.F.schedule.delete.useMutation(),{mutateAsync:I}=f.F.schedule.runManually.useMutation(),S=async e=>{v(s=>new Set(s).add(e));try{await I({scheduleId:e}),u.oR.success("Schedule run successfully"),await k()}catch{u.oR.error("Error running schedule")}finally{v(s=>{let a=new Set(s);return a.delete(e),a})}};
1return(0,l.jsxs)(p.Zp,{className:" px-6 shadow-none bg-transparent h-full min-h-[50vh]",children:[(0,l.jsx)(p.aR,{className:"px-0",children:(0,l.jsxs)("div",{className:"flex justify-between items-center gap-y-2 flex-wrap",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)(p.ZB,{className:"text-xl font-bold flex items-center gap-2",children:"Scheduled Tasks"}),(0,l.jsx)(p.BT,{children:"Schedule tasks to run automatically at specified intervals."})]}),N&&N.length>0&&(0,l.jsx)(j.JD,{id:e,scheduleType:s})]})}),(0,l.jsx)(p.Wu,{className:"px-0",children:w?(0,l.jsxs)("div",{className:"flex gap-4 w-full items-center justify-center text-center mx-auto min-h-[45vh]",children:[(0,l.jsx)(r.A,{className:"size-4 text-muted-foreground/70 transition-colors animate-spin self-center"}),(0,l.jsx)("span",{className:"text-sm text-muted-foreground/70",children:"Loading scheduled tasks..."})]}):N&&N.length>0?(0,l.jsx)("div",{className:"grid xl:grid-cols-2 gap-4 grid-cols-1 h-full",children:N.map(o=>{let p=o.serverId||o.application?.serverId||o.compose?.serverId;return(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center flex-wrap sm:flex-nowrap gap-y-2 justify-between rounded-lg border p-3 transition-colors bg-muted/50 w-full",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 w-full sm:w-auto",children:[(0,l.jsx)("div",{className:"flex shrink-0 h-9 w-9 items-center justify-center rounded-full bg-primary/5",children:(0,l.jsx)(t.A,{className:"size-4 text-primary/70"})}),(0,l.jsxs)("div",{className:"space-y-1.5 w-full sm:w-auto",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)("h3",{className:"text-sm font-medium leading-none wrap-anywhere line-clamp-3",children:o.name}),(0,l.jsx)(h.E,{variant:o.enabled?"default":"secondary",className:"text-[10px] px-1 py-0",children:o.enabled?"Enabled":"Disabled"})]}),o.description&&(0,l.jsx)("p",{className:"text-xs text-muted-foreground/70 wrap-anywhere line-clamp-2",children:o.description}),(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground flex-wrap",children:[(0,l.jsxs)(h.E,{variant:"outline",className:"font-mono text-[10px] bg-transparent",children:["Cron: ",o.cronExpression]}),"server"!==o.scheduleType&&"dokploy-server"!==o.scheduleType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"text-xs text-muted-foreground/50",children:"•"}),(0,l.jsx)(h.E,{variant:"outline",className:"font-mono text-[10px] bg-transparent",children:o.shellType})]})]}),o.command&&(0,l.jsxs)("div",{className:"flex items-start gap-2 max-w-full",children:[(0,l.jsx)(d.A,{className:"size-3.5 text-muted-foreground/70 shrink-0 mt-0.5"}),(0,l.jsx)("code",{className:"font-mono text-[10px] text-muted-foreground/70 break-all max-w-[calc(100%-20px)]",children:o.command})]})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-0.5 md:gap-1.5",children:[(0,l.jsx)(g.f,{id:o.scheduleId,type:"schedule",serverId:p||void 0,children:(0,l.jsx)(m.$,{variant:"ghost",size:"icon",children:(0,l.jsx)(i.A,{className:"size-4 transition-colors"})})}),(0,l.jsx)(y.Bc,{delayDuration:0,children:(0,l.jsxs)(y.m_,{children:[(0,l.jsx)(y.k$,{asChild:!0,children:(0,l.jsx)(m.$,{type:"button",variant:"ghost",size:"icon",disabled:a.has(o.scheduleId),onClick:()=>S(o.scheduleId),children:a.has(o.scheduleId)?(0,l.jsx)(r.A,{className:"size-4 animate-spin"}):(0,l.jsx)(c.A,{className:"size-4 transition-colors"})})}),(0,l.jsx)(y.ZI,{children:"Run Manual Schedule"})]})}),(0,l.jsx)(j.JD,{scheduleId:o.scheduleId,id:e,scheduleType:s}),(0,l.jsx)(x.p,{title:"Delete Schedule",description:"Are you sure you want to delete this schedule?",type:"destructive",onClick:async()=>{await A({scheduleId:o.scheduleId}).then(()=>{b.schedule.list.invalidate({id:e,scheduleType:s}),u.oR.success("Schedule deleted successfully")}).catch(()=>{u.oR.error("Error deleting schedule")})},children:(0,l.jsx)(m.$,{variant:"ghost",size:"icon",className:"group hover:bg-red-500/10",disabled:z,children:(0,l.jsx)(n.A,{className:"size-4 text-primary group-hover:text-red-500"})})})]})]},o.scheduleId)})}):(0,l.jsxs)("div",{className:"flex flex-col gap-2 items-center justify-center py-12 rounded-lg",children:[(0,l.jsx)(t.A,{className:"size-8 mb-4 text-muted-foreground"}),(0,l.jsx)("p",{className:"text-lg font-medium text-muted-foreground",children:"No scheduled tasks"}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Create your first scheduled task to automate your workflows"}),(0,l.jsx)(j.JD,{id:e,scheduleType:s})]})})]})}},59608:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(34480).A)("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]])}
1,70222:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/schedules",function(){return a(2238)}])},77046:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(34480).A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},83853:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(34480).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])}},e=>{e.O(0,[9674,6318,6337,7070,7357,631,9837,9096,1193,6977,3033,8400,636,6593,8792],()=>e(e.s=70222)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.