import{_ as E,a as F}from"./DR96n_VU.js";import{_ as H}from"./gQe2oyAA.js";import{_ as M}from"./CS_MeOS_.js";import{_ as B}from"./DWMTOSv8.js";import{_ as R}from"./DvpWg0hF.js";import{d as T,M as j,a2 as q,k as I,N as K,a3 as O,f as c,b as s,q as i,a as m,c as k,w as y,u as r,F as g,g as P}from"./B2UyoCas.js";import"./8cAMPTBV.js";import"./BGYJXalu.js";import"./CsNNGtvO.js";import"./DeNTsafF.js";import"./BhXuhlb7.js";import"./Bw4qhTdR.js";import"./88opOQSr.js";import"./C9KnTrrC.js";import"./CVosDfjh.js";import"./ABctaOB9.js";import"./CB3BcoM2.js";import"./DaLgO_IH.js";import"./Cy--ZdFw.js";import"./NkNhW2e0.js";const V={key:0,class:"flex flex-col o_gap-6 @container/simpleresult"},L="certs",lt=T({__name:"certs-[pid]-[sid]",setup(W){const{kapi:x}=j(),{setCachedData:C,addTimeToProcessedData:l}=q(),_=I(),{sid:o,pid:b}=_.params;if(!o)throw new Error("sid is required");const{trackFirstSeen:D}=K(),{data:n,error:d,status:$,refresh:N}=O(`metrics-certs-${o||0}`,async()=>await x("CheckCertificate").then(t=>t.getExpirationResults(Number(o))),{transform:t=>{if(Object.keys(t.results).length===0)return l({results:[]},0);D(Number(b),Number(o),_.name);const u={results:Object.values(t.results).map(({component:e,result:{attributes:f,...p}})=>({component:e,result:p}))};return l(u)},getCachedData:(t,u,e)=>{if(!(e.cause==="refresh:manual"||e.cause==="refresh:hook"))return C(t)}});return(t,u)=>{var h;const e=E,f=H,p=F,S=M,w=B,v=R;return s(),c("div",null,[i(f,{"page-key":"pMonitoringSecurityCerts"},{title:y(()=>[i(e,{title:"pMonitoringSecurityCerts","info-type":L})]),_:1}),(h=r(n))!=null&&h.results?(s(),c(g,{key:0},[i(p,{"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(g,null,P(r(n).results,(a,A)=>(s(),k(w,{key:A,"component-info":a.component},{default:y(()=>[i(S,{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(),k(v,{key:1,error:r(d),refresh:r(N)},null,8,["error","refresh"])):m("",!0)])}}});export{lt as default};
