import{_ as A,a as E}from"./DCtuMFER.js";import{_ as F}from"./DXaD0OjS.js";import{_ as H}from"./CyO5g1gb.js";import{_ as B}from"./DPmE0egs.js";import{_ as M}from"./BY0xeA_q.js";import{d as P,N as R,a3 as T,i as j,P as I,a4 as K,e as c,o as s,a as i,l as m,c as h,w as y,m as r,F as k,r as O}from"./B08CJtNn.js";import"./laKVya4-.js";import"./MxJSE5eV.js";import"./BTwP6ady.js";import"./BXavTXDM.js";import"./CqE4Z78-.js";import"./fTZc3uM5.js";import"./88opOQSr.js";import"./DbksU3dH.js";import"./eHv8qUqa.js";import"./rOCSnSVW.js";import"./CUy7HhdT.js";import"./CRXJzjwR.js";import"./xjUEazAQ.js";import"./aIDcP5lR.js";import"./NkNhW2e0.js";import"./BmXXXyAy.js";const V={key:0,class:"flex flex-col o_gap-6 @container/simpleresult"},q="certs",_t=P({__name:"certs-[pid]-[sid]",setup(L){const{kapi:g}=R(),{setCachedData:x,addTimeToProcessedData:l}=T(),_=j(),{sid:o,pid:C}=_.params;if(!o)throw new Error("sid is required");const{trackFirstSeen:D}=I(),{data:n,error:d,status:W,refresh:b}=K(`metrics-certs-${o||0}`,async()=>await g("CheckCertificate").then(t=>t.getExpirationResults(Number(o))),{transform:t=>{if(Object.keys(t.results).length===0)return l({results:[]},0);D(Number(C),Number(o),_.name);const p={results:Object.values(t.results).map(({component:e,result:{attributes:f,...u}})=>({component:e,result:u}))};return l(p)},getCachedData:(t,p,e)=>{if(!(e.cause==="refresh:manual"||e.cause==="refresh:hook"))return x(t)}});return(t,p)=>{const e=A,f=F,u=E,N=H,S=B,w=M;return s(),c("div",null,[i(f,{"page-key":"pMonitoringSecurityCerts"},{title:y(()=>[i(e,{title:"pMonitoringSecurityCerts","info-type":q})]),_:1}),r(n)?.results?(s(),c(k,{key:0},[i(u,{"data-count":r(n).results.length,class:"o_mb-6"},null,8,["data-count"]),r(n).results.length?(s(),c("div",V,[(s(!0),c(k,null,O(r(n).results,(a,v)=>(s(),h(S,{key:v,"component-info":a.component},{default:y(()=>[i(N,{status:a.result.status==="success"?"success":"danger",title:a.result.title,description:a.result.message,class:"o_mb-2"},null,8,["status","title","description"])]),_:2},1032,["component-info"]))),128))])):m("",!0)],64)):m("",!0),r(d)?(s(),h(w,{key:1,error:r(d),refresh:r(b)},null,8,["error","refresh"])):m("",!0)])}}});export{_t as default};
