"use strict";(self.webpackChunk_kb_labs_workflow_entry=self.webpackChunk_kb_labs_workflow_entry||[]).push([["772"],{6026(e,t){var n=Symbol.for("react.transitional.element");function a(e,t,a){var r=null;if(void 0!==a&&(r=""+a),void 0!==t.key&&(r=""+t.key),"key"in t)for(var l in a={},t)"key"!==l&&(a[l]=t[l]);else a=t;return{$$typeof:n,type:e,key:r,ref:void 0!==(t=a.ref)?t:null,props:a}}t.Fragment=Symbol.for("react.fragment"),t.jsx=a,t.jsxs=a},4552(e,t,n){e.exports=n(6026)},1597(e,t,n){n.r(t),n.d(t,{default:()=>s});var a=n(4552);n(2913);var r=n(1349),l=n(2383);function s(){var e,t,n,s=(0,l.useData)("/exec/api/v1/crons"),i=s.data,o=s.isLoading,c=function(e){return e?new Date(e).toLocaleString():"-"},d=[{title:"Cron ID",dataIndex:"id",key:"id",render:function(e){return(0,a.jsx)(r.UITypographyText,{className:"typo-body",strong:!0,children:e})}},{title:"Schedule",dataIndex:"schedule",key:"schedule",render:function(e){return(0,a.jsxs)(r.UISpace,{className:"gap-tight",children:[(0,a.jsx)(r.UIIcon,{name:"ClockCircleOutlined",className:"text-secondary"}),(0,a.jsx)(r.UITypographyText,{className:"typo-caption",code:!0,children:e})]})}},{title:"Job Type",dataIndex:"jobType",key:"jobType",render:function(e){return(0,a.jsx)(r.UITypographyText,{className:"typo-body",children:e})}},{title:"Timezone",dataIndex:"timezone",key:"timezone",render:function(e){return(0,a.jsx)(r.UITypographyText,{className:"typo-caption",children:e||"UTC"})}},{title:"Status",dataIndex:"enabled",key:"enabled",render:function(e){return(0,a.jsx)(r.UIBadge,{variant:e?"success":"default",children:e?"Enabled":"Disabled"})}},{title:"Last Run",dataIndex:"lastRun",key:"lastRun",render:function(e){return(0,a.jsxs)(r.UISpace,{className:"gap-tight",children:[(0,a.jsx)(r.UIIcon,{name:"CalendarOutlined",className:"text-secondary"}),(0,a.jsx)(r.UITypographyText,{className:"typo-caption",children:c(e)})]})}},{title:"Next Run",dataIndex:"nextRun",key:"nextRun",render:function(e){return e?(0,a.jsxs)(r.UISpace,{className:"gap-tight",children:[(0,a.jsx)(r.UIIcon,{name:"CalendarOutlined",className:"text-info"}),(0,a.jsx)(r.UITypographyText,{className:"typo-caption",children:c(e)})]}):(0,a.jsx)(r.UITypographyText,{className:"typo-caption text-tertiary",children:"-"})}},{title:"Plugin",dataIndex:"pluginId",key:"pluginId",render:function(e){return e?(0,a.jsx)(r.UITag,{color:"blue",children:e}):(0,a.jsx)(r.UITypographyText,{className:"typo-caption text-tertiary",children:"-"})}}],y=(null==i||null==(e=i.crons)?void 0:e.filter(function(e){return e.enabled}).length)||0,p=(null==i||null==(t=i.crons)?void 0:t.filter(function(e){return!e.enabled}).length)||0;return(0,a.jsxs)(r.UIPage,{width:"full",children:[(0,a.jsx)(r.UIPageHeader,{title:"Cron Jobs",description:"Scheduled recurring tasks",breadcrumbs:[{title:"Home",href:"/"},{title:"Workflows",href:"/workflows"},{title:"Crons"}]}),(0,a.jsx)(r.UICard,{style:{marginBottom:"var(--spacing-section)"},children:(0,a.jsxs)(r.UISpace,{className:"gap-section",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(r.UITypographyText,{className:"typo-label text-secondary",children:"Total Cron Jobs"}),(0,a.jsx)("div",{children:(0,a.jsx)(r.UITypographyText,{className:"typo-section-title",children:(null==i||null==(n=i.crons)?void 0:n.length)||0})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(r.UITypographyText,{className:"typo-label text-secondary",children:"Enabled"}),(0,a.jsx)("div",{children:(0,a.jsx)(r.UITypographyText,{className:"typo-section-title text-success",children:y})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(r.UITypographyText,{className:"typo-label text-secondary",children:"Disabled"}),(0,a.jsx)("div",{children:(0,a.jsx)(r.UITypographyText,{className:"typo-section-title",children:p})})]})]})}),(0,a.jsx)(r.UICard,{children:(0,a.jsx)(r.UITable,{dataSource:(null==i?void 0:i.crons)||[],columns:d,loading:o,rowKey:"id",pagination:{pageSize:20}})})]})}}}]);
//# sourceMappingURL=__federation_expose_Crons.js.map