All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.bb8c8232-8961.bc90b204fa01a67751af.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-8961"],{z8feUxhx:(ne,k,l)=>{l.r(k),l.d(k,{default:()=>X});var e=l("Z7aTuO5B"),f=l("vtWR08zs"),ae=l("UHXfBu6b"),o=l("rIl5IEuP"),r=l("IOI9nV80"),N=l("E+CaPsQD"),u=l("J6y4/h8P"),g=l("kbpndUm2"),w=l("Lu0NTOJv"),C=l("rVdVsuGH"),b=l("rlwexfKi");const P=e.createElement("p",null,"Find backends with a title containing LDAP:",e.createElement("br",null),e.createElement("kbd",null,"title:LDAP"),e.createElement("br",null)),T=()=>e.createElement(b.A,{entityName:"backend",example:P,commonFields:["title","description"]}),x=u.default.div`
  margin-bottom: 10px;
`,R=({onSearch:t})=>e.createElement(x,null,e.createElement(r.B9,{onReset:()=>t(""),onSearch:t,queryHelpComponent:e.createElement(T,null),topMargin:0,useLoadingState:!0}));var S=l("ty2gyrHp"),D=l("TJOheZRu"),A=l("d4kzUuQm");const I=(0,u.default)(o.ButtonToolbar)`
  display: flex;
  justify-content: flex-end;
`,L=u.default.td`
  max-width: 300px;
`,F=(t,n)=>t.map(s=>{var c,i;return(i=(c=n.find(d=>d.id===s))==null?void 0:c.name)!=null?i:"Role not found"}).join(", "),p=({authenticationBackend:t})=>{const n=A.Ay.SYSTEM.AUTHENTICATION.BACKENDS.edit(t.id);return e.createElement(S.m,{to:n},e.createElement(o.Button,{bsSize:"xs",type:"button"},"Edit"))},y=(t,n)=>`Do you really want to ${n} the authentication service "${D.A.truncateWithEllipses(t,30)}"`,H=({isActive:t,authenticationBackend:n})=>{const{title:a,id:s}=n,c=E=>g.A.setActiveBackend(E,a),i=()=>{window.confirm(y(a,"deactivate"))&&c(null)},d=()=>{window.confirm(y(a,"activate"))&&c(s)},m=()=>{window.confirm(y(a,"delete"))&&g.A.delete(s,a)};return e.createElement("td",{className:"limited"},e.createElement(I,null,t?e.createElement(e.Fragment,null,e.createElement(p,{authenticationBackend:n}),e.createElement(o.Button,{onClick:i,bsStyle:"warning",bsSize:"xs",type:"button"},"Deactivate")):e.createElement(e.Fragment,null,e.createElement(p,{authenticationBackend:n}),e.createElement(o.Button,{onClick:d,bsStyle:"warning",bsSize:"xs",type:"button"},"Activate"),e.createElement(o.Button,{onClick:m,bsStyle:"danger",bsSize:"xs",type:"button"},"Delete"))))},z=({authenticationBackend:t,isActive:n,roles:a})=>{const{title:s,description:c,defaultRoles:i,id:d}=t,m=n?A.Ay.SYSTEM.AUTHENTICATION.BACKENDS.ACTIVE:A.Ay.SYSTEM.AUTHENTICATION.BACKENDS.show(d);return e.createElement("tr",{key:d,className:n?"active":""},e.createElement("td",{className:"limited"},e.createElement(S.N,{to:m},s)),e.createElement(L,null,e.createElement(r.tJ,null,c)),e.createElement("td",{className:"limited"},F(i,a)),e.createElement(H,{authenticationBackend:t,isActive:n}))},U=["Title","Description","Default Roles","Actions"],Q=u.default.div`
  display: flex;
  align-items: center;
`,K=(0,u.default)(r.y$)(({theme:t})=>(0,u.css)`
  margin-left: 10px;
  font-size: ${t.fonts.size.h3};
`),G=t=>{switch(t.toLowerCase()){case"actions":return e.createElement("th",{className:"actions text-right"},t);default:return e.createElement("th",null,t)}},J=t=>{const n={page:1,perPage:0,query:""};w.A.loadRolesPaginated(n).then(t)},B=(t,n,a)=>{n(!0),g.A.loadBackendsPaginated(t).then(s=>{a(s),n(!1)})},M=(t,n,a,s)=>f.u.delete.completed.listen(()=>{B(t,n,a),s()}),V=(t,n,a,s)=>f.u.setActiveBackend.completed.listen(()=>{B(t,n,a),s()}),$=(t,n,a)=>{var s;return e.createElement(z,{authenticationBackend:t,isActive:t.id===((s=n==null?void 0:n.activeBackend)==null?void 0:s.id),roles:a.list})},W=()=>{const{page:t,pageSize:n,resetPage:a}=(0,C.Ay)(),[s,c]=(0,e.useState)(),[i,d]=(0,e.useState)(),[m,E]=(0,e.useState)(),[v,q]=(0,e.useState)(""),{list:_,context:ee}=m||{};(0,e.useEffect)(()=>J(d),[]),(0,e.useEffect)(()=>B({query:v,page:t,perPage:n},c,E),[v,t,n]),(0,e.useEffect)(()=>M({query:v,page:t,perPage:n},c,E,a),[v,t,n,a]),(0,e.useEffect)(()=>V({query:v,page:t,perPage:n},c,E,a),[v,t,n,a]);const te=(h,O)=>{a(),q(h),!s&&O&&O()};return!m||!i?e.createElement(r.y$,null):e.createElement(o.Row,{className:"content"},e.createElement(o.Col,{xs:12},e.createElement("h2",null,"Configured Authentication Services"),e.createElement(Q,null,s&&e.createElement(K,{text:"",delay:0})),e.createElement("p",{className:"description"},"Found ",m.pagination.total," configured authentication services on the system."),e.createElement(r.OW,{totalItems:m.pagination.total},e.createElement(r.bQ,{className:"table-hover",customFilter:e.createElement(R,{onSearch:te}),dataRowFormatter:h=>$(h,ee,i),filterKeys:[],filterLabel:"Filter services",headerCellFormatter:G,headers:U,id:"auth-backends-overview",rowClassName:"no-bm",rows:_.toJS(),sortByKey:"title"}))))};var Y=l("s1byLS3P"),j=l("ezgdc3VG"),Z=l("WPUkC7Fx");const X=()=>{const{finishedLoading:t,activeBackend:n,backendsTotal:a}=(0,Z.A)([f.u.setActiveBackend]);return e.createElement(r.Qc,{title:"All Authentication Services"},e.createElement(Y.A,null),e.createElement(r.zY,{title:"All Authentication Services",actions:e.createElement(j.A,{activeBackend:n,finishedLoading:t}),documentationLink:{title:"Authentication documentation",path:N.A.PAGES.USERS_ROLES}},e.createElement("span",null,"Configure Graylog's authentication services of this Graylog cluster.")),!!(a&&a>=1&&!n)&&e.createElement(o.Row,{className:"content"},e.createElement(o.Col,{xs:12},e.createElement(o.Alert,{bsStyle:"warning"},"None of the configured authentication services is currently active."))),e.createElement(W,null))}}}]);})();

//# sourceMappingURL=bb8c8232-8961.bc90b204fa01a67751af.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy