import{u as c,t as n,r as i,j as e}from"./index-B-YXshIJ.js";const x=()=>{var a;const s=c(),d=n.cronStatusOverview.useQuery();return i.useEffect(()=>{s({title:"Cron status"})},[s]),e.jsx("div",{className:"mx-32 bg-gray-50 p-8 rounded-lg",style:{marginTop:"-3.25rem"},children:e.jsxs("table",{className:"table-auto text-center divide-y divide-gray-200 w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 text-xs font-medium text-gray-800 uppercase tracking-wider w-3/5 text-left",children:" "}),e.jsx("th",{className:"px-6 py-3 text-xs font-medium text-gray-800 uppercase tracking-wider text-left",children:"Frequency"}),e.jsx("th",{className:"px-6 py-3 text-xs font-medium text-gray-800 uppercase tracking-wider text-right",children:"status"})]})}),e.jsx("tbody",{className:"text-base text-gray-600 bg-white divide-y divide-gray-200",children:(a=d.data)==null?void 0:a.map(t=>{var r;return e.jsxs("tr",{children:[e.jsx("td",{className:"pl-6 py-4 whitespace-nowrap text-left",children:t.name}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-left",children:t.frequency}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right",children:t.status?e.jsxs(e.Fragment,{children:[e.jsx("time",{dateTime:(r=t.date)==null?void 0:r.toISOString(),children:new Intl.DateTimeFormat("en-IN",{dateStyle:"medium",timeStyle:"short"}).format(t.date)}),e.jsx("span",{className:"w-2 h-2 ml-2 inline-block rounded-full ".concat(t.status==="succeeded"?"bg-green-500":"bg-red-500")})]}):e.jsxs("span",{className:"text-gray-700",children:["Unknown",e.jsx("span",{className:"w-2 h-2 ml-2 inline-block rounded-full bg-gray-300"})]})})]},t.name)})})]})})};export{x as default};
