Signed-off-by: Benjamin Perez <benjamin@bexsoft.net> Signed-off-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2 lines
4.0 KiB
JavaScript
2 lines
4.0 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1377],{51270:function(e,n,t){var i=t(29439),r=(t(72791),t(51691)),o=t(9505),a=t(23508),c=t(75952),s=t(87995),l=t(25469),u=t(80184);n.Z=function(e){var n=e.closeDeleteModalAndRefresh,t=e.deleteOpen,d=e.idp,f=e.idpType,p=(0,l.TL)(),x=(0,o.Z)((function(e){n(!0),p((0,s.cN)(!0===e.restart))}),(function(e){return p((0,s.Ih)(e))})),C=(0,i.Z)(x,2),m=C[0],Z=C[1];if(!d)return null;var h="_"===d?"Default":d;return(0,u.jsx)(a.Z,{title:"Delete ".concat(h),confirmText:"Delete",isOpen:t,titleIcon:(0,u.jsx)(c.NvT,{}),isLoading:m,onConfirm:function(){Z("DELETE","/api/v1/idp/".concat(f,"/").concat(d))},onClose:function(){return n(!1)},confirmButtonProps:{disabled:m},confirmationContent:(0,u.jsxs)(r.Z,{children:["Are you sure you want to delete IDP ",(0,u.jsx)("b",{children:h})," ","configuration? ",(0,u.jsx)("br",{})]})})}},44959:function(e,n,t){var i=t(74165),r=t(15861),o=t(29439),a=t(1413),c=t(72791),s=t(11135),l=t(25787),u=t(25469),d=t(57689),f=t(56087),p=t(38442),x=t(81207),C=t(87995),m=t(74794),Z=t(23814),h=t(61889),D=t(27454),j=t(75952),b=t(92983),y=t(51270),F=t(47974),I=t(80184);n.Z=(0,l.Z)((function(e){return(0,s.Z)((0,a.Z)({},Z.Bz))}))((function(e){var n=e.classes,t=e.idpType,a=(0,u.TL)(),s=(0,d.s0)(),l=(0,c.useState)(!1),Z=(0,o.Z)(l,2),N=Z[0],_=Z[1],v=(0,c.useState)(""),A=(0,o.Z)(v,2),T=A[0],P=A[1],g=(0,c.useState)(!1),k=(0,o.Z)(g,2),E=k[0],O=k[1],M=(0,c.useState)([]),G=(0,o.Z)(M,2),U=G[0],w=G[1],L=(0,p.F)(f.C3,[f.Ft.ADMIN_CONFIG_UPDATE]),B=(0,p.F)(f.C3,[f.Ft.ADMIN_CONFIG_UPDATE]),K=(0,p.F)(f.C3,[f.Ft.ADMIN_CONFIG_UPDATE]);(0,c.useEffect)((function(){S()}),[]),(0,c.useEffect)((function(){E&&(K?x.Z.invoke("GET","/api/v1/idp/".concat(t)).then((function(e){O(!1),w(e.results.map((function(e){return e.name="_"===e.name?"Default":e.name,e.enabled=!0===e.enabled?"Enabled":"Disabled",e})))})).catch((function(e){O(!1),a((0,C.Ih)(e))})):O(!1))}),[E,O,w,a,K,t]);var S=function(){O(!0)},z=function(){var e=(0,r.Z)((0,i.Z)().mark((function e(n){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_(!1),n&&S();case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=[{type:"view",onClick:function(e){var n="Default"===e.name?"_":e.name;s("/identity/idp/".concat(t,"/configurations/").concat(n))},disableButtonFunction:function(){return!B}},{type:"delete",onClick:function(e){_(!0),P(e="Default"===e?"_":e)},sendOnlyId:!0,disableButtonFunction:function(e){return!L||"Default"===e}}];return(0,I.jsxs)(c.Fragment,{children:[N&&(0,I.jsx)(y.Z,{deleteOpen:N,idp:T,idpType:t,closeDeleteModalAndRefresh:z}),(0,I.jsx)(F.Z,{label:"".concat(t.toUpperCase()," Configurations")}),(0,I.jsx)(m.Z,{className:n.pageContainer,children:(0,I.jsxs)(h.ZP,{container:!0,spacing:1,children:[(0,I.jsxs)(h.ZP,{item:!0,xs:12,display:"flex",alignItems:"center",justifyContent:"flex-end",sx:{"& button":{marginLeft:"8px"}},children:[(0,I.jsx)(p.s,{scopes:[f.Ft.ADMIN_CONFIG_UPDATE],resource:f.C3,errorProps:{disabled:!0},children:(0,I.jsx)(D.Z,{tooltip:"Refresh",children:(0,I.jsx)(j.zxk,{id:"refresh-keys",variant:"regular",icon:(0,I.jsx)(j.DuK,{}),onClick:function(){return O(!0)}})})}),(0,I.jsx)(p.s,{scopes:[f.Ft.ADMIN_CONFIG_UPDATE],resource:f.C3,errorProps:{disabled:!0},children:(0,I.jsx)(D.Z,{tooltip:"Create ".concat(t," configuration"),children:(0,I.jsx)(j.zxk,{id:"create-idp",label:"Create Configuration",variant:"callAction",icon:(0,I.jsx)(j.dtP,{}),onClick:function(){return s("/identity/idp/".concat(t,"/configurations/add-idp"))}})})})]}),(0,I.jsx)(h.ZP,{item:!0,xs:12,className:n.tableBlock,children:(0,I.jsx)(p.s,{scopes:[f.Ft.ADMIN_CONFIG_UPDATE],resource:f.C3,errorProps:{disabled:!0},children:(0,I.jsx)(b.Z,{itemActions:R,columns:[{label:"Name",elementKey:"name"},{label:"Type",elementKey:"type"},{label:"Enabled",elementKey:"enabled"}],isLoading:E,records:U,entityName:"Keys",idField:"name"})})})]})})]})}))},81377:function(e,n,t){t.r(n);t(72791);var i=t(44959),r=t(80184);n.default=function(){return(0,r.jsx)(i.Z,{idpType:"openid"})}}}]);
|
|
//# sourceMappingURL=1377.70064217.chunk.js.map
|