1import{j as e,a$ as h,b0 as m,B as b,C as a,dE as u,aS as j,v as i,A as n,r as g}from"./root-Bfop0rm5.js";import{u as c}from"./useSuspenseQuery-BQhhhUjQ.js";import{H as f,b6 as w,b7 as y,b8 as v}from"./index-C97ZXgRl.js";import"./RouterProvider-BbsgWugL.js";import"./queryOptions-BQvTFV_-.js";import"./useMutation-DrGfYVG5.js";import"./hooks-BJhLWX9Q.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"distillery-frontend"};var t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="866b7b50-2383-41e0-819d-2c1d7f45ab31",s._sentryDebugIdIdentifier="sentry-dbid-866b7b50-2383-41e0-819d-2c1d7f45ab31")}catch{}})();const l=({jobID:s,children:t})=>e.jsx("a",{href:`https://eu-west-1.console.aws.amazon.com/batch/home?region=eu-west-1#jobs/fargate/detail/${s}`,target:"_blank",rel:"noopener noreferrer",className:"text-purple-700",children:t}),N=({date:s})=>{const{data:t}=c(y(s));return e.jsxs("div",{className:"bg-sp-neutral-50 border-sp-neutral-50 h-fit max-h-64 w-full overflow-scroll border-b px-8 py-8",children:[e.jsx("h3",{children:"Failed Batch Jobs"}),e.jsxs("div",{className:"bg-sp-neutral-100 text-sp-neutral-500 grid grid-cols-3 text-left dark:bg-gray-300",children:[e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:p-3",children:"Job ID"}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:p-3",children:"Job Name"}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:block sm:p-3",children:"Status"})]}),t&&t.results.length!==0?t.results.map(r=>e.jsxs("div",{className:"border-sp-neutral-25 grid grid-cols-3 border-b bg-white",children:[e.jsx("div",{className:"col-span-1 px-2 py-3 sm:p-3",children:e.jsx(l,{jobID:r.job_id,children:r.job_id})}),e.jsx("div",{className:"col-span-1 px-2 py-3 sm:p-3",children:e.jsx(l,{jobID:r.job_id,children:r.job_name})}),e.jsxs("div",{className:"col-span-1 px-2 py-3 sm:p-3",children:[r.status," ",e.jsxs("span",{className:"text-xs",children:["(",r.error_message||"Error is None",")"]})]})]},r.job_id)):e.jsx(e.Fragment,{children:e.jsx("div",{className:"m-4",children:e.jsx(n,{variant:"success",children:e.jsx(n.Header,{children:"No data to show here"})})})})]})},_=({date:s})=>{const{data:t}=c(v(s));return e.jsxs("div",{className:"bg-sp-neutral-50 border-sp-neutral-50 h-fit max-h-64 w-full overflow-scroll border-b px-8 py-8",children:[e.jsx("h3",{children:"Slow Batch Jobs"}),e.jsxs("div",{className:"bg-sp-neutral-100 text-sp-neutral-500 grid grid-cols-3 text-left dark:bg-gray-300",children:[e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:p-3",children:"Job ID"}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:p-3",children:"Job Name"}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:block sm:p-3",children:"Status"})]}),t&&t.results.length!==0?t.results.map(r=>e.jsxs("div",{className:"border-sp-neutral-25 grid grid-cols-3 border-b bg-white",children:[e.jsx("div",{className:"col-span-1 px-2 py-3 text-center sm:p-3",children:e.jsx(l,{jobID:r.job_id,children:r.job_id})}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center sm:p-3",children:e.jsx(l,{jobID:r.job_id,children:r.job_name})}),e.jsxs("div",{className:"col-span-1 px-2 py-3 text-center sm:p-3",children:[" ",r.status]})]},r.job_id)):e.jsx(e.Fragment,{children:e.jsx("div",{className:"m-4",children:e.jsx(n,{variant:"success",children:e.jsx(n.Header,{children:"No data to show here"})})})})]})},D=({data:s})=>{const[t,r]=g.useState({expanded:null,detailedView:"",type:""}),d=(o,p,x)=>{t.expanded===o?r({expanded:null,detailedView:x,type:p}):r({expanded:o,detailedView:x,type:p})};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"border-sp-neutral-50 grid grid-cols-5 border-b border-opacity-20 bg-white",children:[e.jsx("div",{className:"col-span-1 items-center justify-center px-2 py-3 sm:p-3",children:u.format(new Date(s.date))}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center sm:p-3",children:s.succeeded_count+s.failed_count}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center sm:p-3",children:s.succeeded_count}),e.jsxs("div",{className:`col-span-1 flex items-center justify-center px-2 py-3 text-center sm:p-3 ${t.expanded&&t.type==="failed"?"bg-sp-neutral-50":"bg-white"} ${s.failed_count!==0&&"hover:bg-sp-neutral-25 cursor-pointer "}`,onClick:()=>
1{if(s.failed_count===0)return null;d(`${s.date}-failed`,"failed",s.date)},children:[s.failed_count,s.failed_count!==0?e.jsx(i,{name:t.expanded===`${s.date}-failed`?"chevronUp":"chevronDown"}):null]},`${s.date}-failed`),e.jsxs("div",{className:` col-span-1 flex items-center justify-center px-2 py-3 text-center sm:p-3 ${t.expanded&&t.type==="slow"?"bg-sp-neutral-50":"bg-white"} ${s.slow_count!==0&&"hover:bg-sp-neutral-25 cursor-pointer "}`,onClick:()=>{if(s.slow_count===0)return null;d(`${s.date}-slow`,"slow",s.date)},children:[s.slow_count,s.slow_count!==0?e.jsx(i,{name:t.expanded===`${s.date}-slow`?"chevronUp":"chevronDown"}):null]},`${s.date}-slow`)]}),t.expanded&&t.type==="failed"&&e.jsx(N,{date:s.date}),t.expanded&&t.type==="slow"&&e.jsx(_,{date:s.date})]})},F=()=>{const{data:s}=c(w());return e.jsxs(e.Fragment,{children:[e.jsx(f,{children:e.jsx("title",{children:"Batch Job Insights Dashboard| Searchpilot"})}),e.jsxs(h,{children:[e.jsx(m,{label:"Management",href:"/management"}),e.jsx(m,{label:"Batch Job Insights Dashboard",href:"",currentCrumb:!0})]}),e.jsx("main",{className:"ml-auto w-full grow",children:e.jsxs(b,{className:"mx-4",children:[e.jsx(a,{children:e.jsxs(a.Content,{children:[e.jsx(a.Title,{children:"Batch Job Insights Dashboard"}),e.jsxs(a.Description,{children:["Date: ",u.format(new Date)," | Batch Job Insights Overview in the last 20 days"]})]})}),e.jsxs("div",{className:"bg-sp-neutral-50 w-full overflow-x-auto",children:[e.jsxs("div",{className:"bg-sp-neutral-100 text-sp-neutral-500 grid grid-cols-5 text-left dark:bg-gray-300",children:[e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:p-3"}),e.jsxs("div",{className:"col-span-1 flex items-center justify-center px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:p-3",children:[e.jsx("span",{className:"mr-2",children:"Total Jobs "}),e.jsx(j,{tooltipPosition:"right",message:"Total count of successful and failed jobs",children:e.jsx(i,{name:"question"})})]}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:p-3",children:"Success"}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider transition-all duration-300 ease-in-out sm:p-3",children:"Failed"}),e.jsx("div",{className:"col-span-1 px-2 py-3 text-center text-xs font-medium uppercase leading-4 tracking-wider sm:block sm:p-3",children:"Slow"})]}),s&&s.results.length!==0?s.results.map(t=>e.jsx(D,{data:t},`${t.date}`)):e.jsx(e.Fragment,{children:e.jsx("div",{className:"m-4",children:e.jsx(n,{variant:"success",children:e.jsx(n.Header,{children:"No data to show here"})})})})]})]})})]})};export{F as default}; 2//# sourceMappingURL=BatchJobInsightsDashboard-BD_ye8Jy.js.map
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.