PageSourceSearch

https://app.snapto.ai/assets/PatternMatchLogDetail-DaENF23S.js

js snapto.ai collected 2026-10-05 15:08:46 UTC 7,074 bytes, 1 lines download raw bytes

1import{J as Q,br as Y,C as X,r as m,p as e,L as a,ak as Z,a_ as y,T as ee,b9 as v,b1 as p,x as se,b4 as te}from"./index-C9IH3k-2.js";import{I as x,W as g,g as E,c as re,T as c,af as b}from"./TemplateUtil-D1DzmWLm.js";import{S as w,a as k,b as C,c as N,d as z,e as G,f as j,h as M,i as I,j as F,k as $,l as ae,m as le,n as O,R as ne,p as P}from"./PatternMatchLogConstants-DSrDmlTN.js";import{R as ie}from"./ArrowLeftOutlined-Bixtqyn1.js";import{R as oe}from"./ClockCircleOutlined-Cym7vptW.js";import{R as ce}from"./MessageOutlined-CMAbaZyT.js";import{R as B}from"./InfoCircleOutlined-B7sKwm1k.js";import{S as de}from"./index-DcM_eZHc.js";import{T as q}from"./Timeline-CXpydECD.js";import"./Wrapper-ChjuDa3w.js";import"./HelperMethods-C-ewwU_x.js";const{Title:ge,Text:l,Paragraph:ue}=ee,Te=()=>{const{token:f}=Q.useToken(),{logId:u}=Y(),H=X(),[o,U]=m.useState(null),[V,T]=m.useState(!0),[L,A]=m.useState(null);m.useEffect(()=>{(async()=>{if(u){T(!0),A(null);try{const t=await se(`${le}/${u}`);t&&t.status===200&&U(t.data)}catch(t){console.error("Error fetching pattern match log detail:",t),A(t.response?.data?.message||"Failed to fetch log details")}finally{T(!1)}}})()},[u]);const W=()=>{H("/PatternMatchLogs")},R=s=>{switch(s){case P:return e.jsx(v,{style:{color:"#52c41a"}});case j:return e.jsx(te,{style:{color:"#ff4d4f"}});case I:return e.jsx(ne,{style:{color:"#faad14"}});case O:default:return e.jsx(B,{style:{color:"#1890ff"}})}},_=s=>{switch(s){case P:return"green";case j:return"red";case I:return"orange";case O:default:return"blue"}},D=s=>s?typeof s=="string"?e.jsx(l,{children:s}):Array.isArray(s)?s.length===0?e.jsx(l,{type:"secondary",children:"Empty array"}):e.jsx("ul",{style:{margin:0,paddingLeft:20},children:s.map((t,r)=>e.jsx("li",{children:typeof t=="object"?e.jsx("pre",{style:{margin:0,fontSize:12},children:JSON.stringify(t,null,2)}):e.jsx(l,{children:String(t)})},r))}):typeof s=="object"?e.jsx("pre",{style:{margin:0,padding:8,background:f.colorBgLayout,borderRadius:4,fontSize:12,overflow:"auto",maxHeight:200},children:JSON.stringify(s,null,2)}):e.jsx(l,{children:String(s)}):null,J=s=>{if(!s||s.length===0)return{};const t={},r=[k,C,N,z,G];return r.forEach(i=>{const n=s.filter(S=>S.stage===i);n.length>0&&(t[i]=n)}),s.forEach(i=>{r.includes(i.stage)||(t[i.stage]||(t[i.stage]=[]),t[i.stage].push(i))}),t};if(V)return e.jsx(a,{justify:"center",align:"center",style:{minHeight:400},children:e.jsx(Z,{size:"large"})});if(L)return e.jsx(a,{vertical:!0,gap:"large",children:e.jsx(x,{children:e.jsx(y,{description:e.jsx(l,{type:"danger",children:L})})})});if(!o)return e.jsxs(a,{vertical:!0,gap:"large",children:[e.jsx(Button,{icon:e.jsx(ie,{}),onClick:W,children:"Back to List"}),e.jsx(x,{children:e.jsx(y,{description:"Log not found"})})]});const d=J(o.logEntries),h=[k,C,N,z,G];d[w]?.length>0&&h.push(w);const K=h.map(s=>{const t=d[s];let r="wait";return t&&t.length>0&&(r=t.some(n=>n.status===j)?"error":"finish"),{title:M(s),status:r,description:t?`${t.length} entries`:null}});return e.jsxs(a,{vertical:!0,gap:"middle",children:[e.jsxs(a,{justify:"space-between",align:"center",children:[e.jsx(a,{align:"center",gap:"middle",children:e.jsx(ge,{level:4,style:{margin:0},children:"Template Match Log Details"})}),e.jsxs(l,{type:"secondary",children:["ID: ",e.jsx(l,{copyable:{text:u},children:u})]})]}),e.jsx(x,{title:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(B,{}),e.jsx(l,{strong:!0,children:"Request Information"})]}),size:"small",children:e.jsxs(g,{column:{xs:1,sm:2,md:3},bordered:!0,size:"small",children:[e.jsx(g.Item,{label:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(oe,{})," Creation Time"]}),children:o.creationTime?E(o.creationTime):"-"}),e.jsx(g.Item,{label:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(re,{})," Receiver Mobile No"]}),children:o.requestInfo?.receiverMobileNo?e.jsx(l,{copyable:!0,children:o.requestInfo.receiverMobileNo}):"-"}),e.jsx(g.Item,{label:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(b,{})," Has File"]}),children:o.requestInfo?.hasFile?e.jsx(c,{color:"blue",children:"Yes"}):e.jsx(c,{color:"default",children:"No"})}),o.requestInfo?.hasFile&&o.requestInfo?.fileDetail&&e.jsx(g.Item,{label:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(b,{})," File Detail"]}),span:3,children:e.jsx(l,{children:o.requestInfo.fileDetail})}),e.jsx(g.Item,{label:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(ce,{})," Message"]}),span:3,children:e.jsx(ue,{style:{margin:0,whiteSpace:"pre-wrap"},ellipsis:{rows:3,expandable:!0,symbol:"more"},copyable:!0,children:o.requestInfo?.message||"-"})})]})}),e.jsx(x,{title:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(v,{}),e.jsx(l,{strong:!0,children:"Processing Stages Overview"})]}),size:"small",children:e.jsx(de,{items:K,size:"small",current:null})}),e.jsx(p,{defaultActiveKey:["log-entries"],items:[{key:"log-entries",label:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(b,{}),e.jsx(l,{strong:!0,children:"Log Entries"}),e.jsxs(c,{children:[o.logEntries?.length||0," entries"]})]}),children:Object.keys(d).length===0?e.jsx(y,{description:"No log entries found"}):e.jsx(p,{defaultActiveKey:h.filter(s=>d[s]),items:[...h.filter(s=>d[s]).map(s=>{const t=d[s],r=t.some(n=>n.status===j),i=t.some(n=>n.status===I);return{key:s,label:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(c,{color:ae(s),children:M(s)}),e.jsxs(l,{type:"secondary",children:["(",t.length," entries)"]}
1),r&&e.jsx(c,{color:"red",children:"Has Errors"}),!r&&i&&e.jsx(c,{color:"orange",children:"Has Warnings"})]}),children:e.jsx(q,{items:t.map((n,S)=>({color:_(n.status),dot:R(n.status),children:e.jsxs(a,{vertical:!0,gap:"small",children:[e.jsxs(a,{justify:"space-between",align:"center",wrap:"wrap",gap:"small",children:[e.jsx(c,{color:$(n.status),children:F(n.status)}),n.timestamp&&e.jsx(l,{type:"secondary",style:{fontSize:12},children:E(n.timestamp)})]}),e.jsx(l,{strong:!0,children:n.message}),n.data&&e.jsx(p,{size:"small",items:[{key:"data",label:e.jsx(l,{type:"secondary",style:{fontSize:12},children:"View Data"}),children:e.jsx("div",{style:{background:f.colorBgLayout,padding:8,borderRadius:4},children:D(n.data)})}]})]},S)}))})}}),...Object.keys(d).filter(s=>!h.includes(s)).map(s=>{const t=d[s];return{key:s,label:e.jsxs(a,{align:"center",gap:"small",children:[e.jsx(c,{color:"default",children:s}),e.jsxs(l,{type:"secondary",children:["(",t.length," entries)"]})]}),children:e.jsx(q,{items:t.map((r,i)=>({color:_(r.status),dot:R(r.status),children:e.jsxs(a,{vertical:!0,gap:"small",children:[e.jsxs(a,{justify:"space-between",align:"center",wrap:"wrap",gap:"small",children:[e.jsx(c,{color:$(r.status),children:F(r.status)}),r.timestamp&&e.jsx(l,{type:"secondary",style:{fontSize:12},children:E(r.timestamp)})]}),e.jsx(l,{strong:!0,children:r.message}),r.data&&e.jsx(p,{size:"small",items:[{key:"data",label:e.jsx(l,{type:"secondary",style:{fontSize:12},children:"View Data"}),children:e.jsx("div",{style:{background:f.colorBgLayout,padding:8,borderRadius:4},children:D(r.data)})}]})]},i)}))})}})]})}]})]})};export{Te as default};

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.