Files
openmaxio-object-browser/web-app/build/static/js/5699.7bb3293b.chunk.js

2 lines
13 KiB
JavaScript
Raw Normal View History

2025-02-10 19:41:20 -08:00
"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[5699],{38392:(e,i,t)=>{t.d(i,{A:()=>a});var r=t(65043),n=t(89923),o=t(70579);const l=e=>{let{icon:i,description:t}=e;return(0,o.jsxs)(n.azJ,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[i," ",(0,o.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:t})]})},a=e=>{let{helpText:i,docLink:t,docText:a,contents:s}=e;return(0,o.jsxs)(n.azJ,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px"},children:[(0,o.jsxs)(n.azJ,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px",paddingBottom:"20px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,o.jsx)(n.nag,{}),(0,o.jsx)("div",{children:i})]}),(0,o.jsxs)(n.azJ,{sx:{fontSize:"14px",marginBottom:"15px"},children:[s.map(((e,i)=>(0,o.jsxs)(r.Fragment,{children:[e.icon&&(0,o.jsx)(n.azJ,{sx:{paddingBottom:"20px"},children:(0,o.jsx)(l,{icon:e.icon,description:e.iconDescription})}),(0,o.jsx)(n.azJ,{sx:{paddingBottom:"20px"},children:e.text})]},`feature-item-${i}`))),(0,o.jsx)(n.azJ,{sx:{paddingBottom:"20px"},children:(0,o.jsx)("a",{href:t,target:"_blank",rel:"noopener",children:a})})]})]})}},79313:(e,i,t)=>{t.d(i,{A:()=>p});var r=t(65043),n=t(89923),o=t(64159),l=t(21383),a=t(58661),s=t(56629),d=t(53518),c=t(70579);const p=e=>{let{closeDeleteModalAndRefresh:i,deleteOpen:t,idp:p,idpType:u}=e;const h=(0,l.jL)(),[x,m]=(0,r.useState)(!1);if(!p)return null;const f="_"===p?"Default":p;return(0,c.jsx)(a.A,{title:`Delete ${f}`,confirmText:"Delete",isOpen:t,titleIcon:(0,c.jsx)(n.xWY,{}),isLoading:x,onConfirm:()=>{m(!0),s.F.idp.deleteConfiguration(p,u).then((e=>{(e=>{i(!0),h((0,o.YR)(!0===e.restart))})(e.data)})).catch((e=>h((0,o.C9)((0,d.S)(e.error))))).finally((()=>m(!1)))},onClose:()=>i(!1),confirmButtonProps:{disabled:x},confirmationContent:(0,c.jsxs)(r.Fragment,{children:["Are you sure you want to delete IDP ",(0,c.jsx)("b",{children:f})," ","configuration? ",(0,c.jsx)("br",{})]})})}},65699:(e,i,t)=>{t.r(i),t.d(i,{default:()=>b});var r=t(65043),n=t(99161),o=t(89923),l=t(42349),a=t(73216),s=t(77403),d=t(21383),c=t(64159),p=t(79313),u=t(48793),h=t(88617),x=t(56629),m=t(53518),f=t(70579);const g=e=>{let{formFields:i,endpoint:t,backLink:n,header:l,idpType:g,icon:y,helpBox:b}=e;const D=(0,d.jL)(),j=(0,a.Zp)(),C=(0,a.g)().idpName,[v,O]=(0,r.useState)(!0),[I,_]=(0,r.useState)(!1),[S,k]=(0,r.useState)(!1),[E,w]=(0,r.useState)(!1),[A,q]=(0,r.useState)({}),[L,B]=(0,r.useState)({}),[N,P]=(0,r.useState)({}),[M,R]=(0,r.useState)({}),[T,F]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[z,J]=(0,r.useState)(!1),G=(0,r.useCallback)((e=>{let i={},t={},r=0;e.info&&(e.info.forEach((e=>{"enable"===e.key&&w("on"===e.value),e.isEnv&&(t[e.key]=`MINIO_IDENTITY_OPENID_${e.key.toUpperCase()}${"_"!==C?`_${C}`:""}`,r++),i[e.key]=e.value})),r>0&&J(!0)),q(i),B(t)}),[C]),Y=()=>{T&&G(M),F(!T)};(0,r.useEffect)((()=>{const e=()=>{x.F.idp.getConfiguration(C||"","openid").then((e=>{e.data&&(R(e.data),G(e.data),(e=>{let i={};e.info&&e.info.forEach((e=>{i[e.key]=e.value})),P(i)})(e.data))})).catch((e=>{D((0,c.C9)((0,m.S)(e.error)))})).finally((()=>O(!1)))};v&&e()}),[D,v,C,t,G]);const V=()=>{for(const[e,t]of Object.entries(i))if(t.required&&(void 0===A[e]||null===A[e]||""===A[e]))return!1;return!0},K=()=>{q({})};return(0,r.useEffect)((()=>{D((0,c.ph)("idp_config"))}),[D]),(0,f.jsxs)(r.Fragment,{children:[U&&C&&(0,f.jsx)(p.A,{deleteOpen:U,idp:C,idpType:g,closeDeleteModalAndRefresh:async e=>{$(!1),e&&j(n)}}),(0,f.jsxs)(o.xA9,{item:!0,xs:12,children:[(0,f.jsx)(u.A,{label:(0,f.jsx)(o.EGL,{onClick:()=>j(n),label:l}),actions:(0,f.jsx)(h.A,{})}),(0,f.jsxs)(o.Mxu,{children:[(0,f.jsx)(o.lcx,{icon:y,title:"_"===C?"Default":C||"",subTitle:null,actions:(0,f.jsxs)(r.Fragment,{children:["_"!==C&&(0,f.jsx)(o.m_M,{tooltip:z?"This configuration cannot be deleted using this module as this was set using OpenID environment variables.":"",children:(0,f.jsx)(o.$nd,{id:"delet
//# sourceMappingURL=5699.7bb3293b.chunk.js.map