PageSourceSearch

https://vomoda.dz/assets/route-CayYSF86.js

js vomoda.dz collected 2026-10-05 23:13:01 UTC 4,020 bytes, 1 lines download raw bytes

1import{j as e,bi as u,bm as c,bq as N,br as v,F as b,fW as C,bt as I,hg as p,gJ as h,e2 as x,bz as P,am as A,gh as g,jh as w,bf as U,bg as O,bh as D,bj as m,bk as B,bl as E,it as T,d as $,B as z,bT as F,aI as K,Q as k,H as S}from"./index-YNsGwUAq.js";import{P as q}from"./PageHeader-Bi4cCaHa.js";import{u as G,P as H}from"./PkiAlertModal-Cl0Hoghk.js";import{E as J}from"./EmptyState-UgnfbzEj.js";import{a as R}from"./PkiCollectionModal-1K9jlLYU.js";import{u as W}from"./useTranslation-B41oWJHe.js";const L=({alert:r,handlePopUpOpen:s})=>{const{data:i}=R(r.pkiCollectionId||"");return e.jsxs(u,{className:"h-10",children:[e.jsx(c,{children:r.name}),e.jsx(c,{children:r.alertBeforeDays}),e.jsx(c,{children:i?i.name:"-"}),e.jsx(c,{children:e.jsxs(N,{children:[e.jsx(v,{asChild:!0,className:"rounded-lg",children:e.jsx("div",{className:"hover:text-primary-400 data-[state=open]:text-primary-400",children:e.jsx(b,{size:"sm",icon:C})})}),e.jsxs(I,{align:"start",className:"p-1",children:[e.jsx(p,{I:h.Edit,a:x.PkiAlerts,children:t=>e.jsx(P,{className:A(!t&&"pointer-events-none cursor-not-allowed opacity-50"),onClick:a=>{a.stopPropagation(),s("pkiAlert",{alertId:r.id})},disabled:!t,children:"Edit Alert"})}),e.jsx(p,{I:h.Delete,a:x.PkiAlerts,children:t=>e.jsx(P,{className:A(t?"hover:!bg-red-500 hover:!text-white":"pointer-events-none cursor-not-allowed opacity-50"),onClick:a=>{a.stopPropagation(),s("deletePkiAlert",{alertId:r.id,name:r.name})},disabled:!t,children:"Delete Alert"})})]})]})})]},`pki-alert-${r.id}`)},M=({handlePopUpOpen:r})=>{var o;const{currentProject:s}=g(),i=(s==null?void 0:s.id)||"",{data:t,isPending:a}=w({projectId:i});return e.jsxs(U,{children:[e.jsxs(O,{children:[e.jsx(D,{children:e.jsxs(u,{children:[e.jsx(m,{children:"Alert Name"}),e.jsx(m,{children:"Alert Before Days"}),e.jsx(m,{children:"Certificate Collection"}),e.jsx(m,{className:"w-5"})]})}),e.jsxs(B,{children:[a&&e.jsx(E,{columns:4,innerKey:"project-pki-alerts"}),!a&&(t==null?void 0:t.alerts.map(n=>e.jsx(L,{alert:n,handlePopUpOpen:r},`alert-${n.id}`)))]})]}),!a&&!((o=t==null?void 0:t.alerts)!=null&&o.length)&&e.jsx(J,{title:"No alerts have been created for any certificate collections",icon:T})]})},Q=()=>{var j,f;const{currentProject:r}=g(),s=(r==null?void 0:r.id)||"",{mutateAsync:i}=G(),{popUp:t,handlePopUpOpen:a,handlePopUpClose:o,handlePopUpToggle:n}=$(["pkiAlert","deletePkiAlert"]),y=async l=>{try{if(!s)return;await i({alertId:l,projectId:s}),k({text:"Successfully deleted alert",type:"success"}),o("deletePkiAlert")}catch(d){console.error(d),k({text:"Failed to delete alert",type:"error"})}};return e.jsxs("div",{className:"mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4",children:[e.jsxs("div",{className:"mb-4 flex justify-between",children:[e.jsx("p",{className:"text-xl font-semibold text-mineshaft-100",children:"Alerts"}),e.jsx(p,{I:h.Create,a:x.PkiAlerts,children:l=>e.jsx(z,{colorSchema:"primary",type:"submit",leftIcon:e.jsx(b,{icon:F}),onClick:()=>a("pkiAlert"),isDisabled:!l,children:"Create"})})]}),e.jsx(M,{handlePopUpOpen:a}),e.jsx(H,{popUp:t,handlePopUpToggle:n}),e.jsx(K,{isOpen:t.deletePkiAlert.isOpen,title:`Are you sure you want to remove the alert ${((f=(j=t==null?void 0:t.deletePkiAlert)==null?void 0:j.data)==null?void 0:f.name)||""} from the project?`,onChange:l=>n("deletePkiAlert",l),deleteKey:"confirm",onDeleteApproved:()=>{var l,d;return y((d=(l=t==null?void 0:t.deletePkiAlert)==null?void 0:l.data)==null?void 0:d.alertId)}})]})},V=()=>{const{t:r}=W();return e.jsxs("div",{className:"container mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white",children:[e.jsx(S,{children:e.jsx("title",{children:r("common.head-title",{title:"Alerting"})})}),e.jsxs("div",{className:"mx-auto mb-6 w-full max-w-7xl",children:[e.jsx(q,{title:"Alerting",description:"Configure alerts for expiring certificates and CAs to maintain security and compliance."}),e.jsx(p,{renderGuardBanner:!0,I:h.Read,a:x.PkiAlerts,children:e.jsx(Q,{})})]})]})},X=V;export{X as component};

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.