import{_ as A,a as E}from"./CQblF2yi.js";import{_ as F}from"./C-XkP9tB.js";import{_ as R}from"./BKofJQ5v.js";import{_ as j}from"./BbCYHBXa.js";import{_ as B}from"./BXyDg5m4.js";import{d as H,N as M,a4 as P,i as I,ch as K,a5 as O,e as c,o as s,a as i,l as m,c as f,w as h,m as r,F as y,r as T}from"./Dk4AzF7j.js";import"./C_tXuDKt.js";import"./CR2z6V-x.js";import"./D7D5X_-3.js";import"./DgCXB7yu.js";import"./CJbRX-Xv.js";import"./BnFHREeV.js";import"./BOMWTB7S.js";import"./D5F0NbWF.js";import"./88opOQSr.js";import"./BJxNwbOK.js";import"./BTe-eGo6.js";import"./DXyvFCCy.js";import"./PJSlhYeJ.js";import"./NkNhW2e0.js";import"./Dptbt2z6.js";const V={key:0,class:"flex flex-col o_gap-6 @container/simpleresult"},q="certs",lt=H({__name:"certs-[pid]-[sid]",setup(L){const{kapi:g}=M(),{setCachedData:k,addTimeToProcessedData:l}=P(),x=I(),{sid:o,pid:C}=x.params;if(!o)throw new Error("sid is required");const{setFirstSeenData:D}=K(),{data:n,error:_,status:W,refresh:b}=O(`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));const p={results:Object.values(t.results).map(({component:e,result:{attributes:d,...u}})=>({component:e,result:u}))};return l(p)},getCachedData:(t,p,e)=>{if(!(e.cause==="refresh:manual"||e.cause==="refresh:hook"))return k(t)}});return(t,p)=>{const e=A,d=F,u=E,N=R,S=j,w=B;return s(),c("div",null,[i(d,{"page-key":"pMonitoringSecurityCerts"},{title:h(()=>[i(e,{title:"pMonitoringSecurityCerts","info-type":q})]),_:1}),r(n)?.results?(s(),c(y,{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(y,null,T(r(n).results,(a,v)=>(s(),f(S,{key:v,"component-info":a.component},{default:h(()=>[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(_)?(s(),f(w,{key:1,error:r(_),refresh:r(b)},null,8,["error","refresh"])):m("",!0)])}}});export{lt as default};
