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

web-interface.assets.1255d548-1899.03b849c2ae164739c73a.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([["1255d548-1899"],{z8feUxhx:(te,k,a)=>{a.r(k),a.d(k,{default:()=>Y});var e=a("Z7aTuO5B"),f=a("vtWR08zs"),ne=a("UHXfBu6b"),s=a("uZqmR+ju"),o=a("/GOzvPf6"),P=a("E+CaPsQD"),u=a("J6y4/h8P"),g=a("kbpndUm2"),b=a("Lu0NTOJv"),w=a("rVdVsuGH");const C=e.createElement(s.Popover,{id:"user-search-query-help",title:"Search Syntax Help"},e.createElement("p",null,e.createElement("strong",null,"Available search fields")),e.createElement(s.Table,{condensed:!0},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Field"),e.createElement("th",null,"Description"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"The title of a backend")),e.createElement("tr",null,e.createElement("td",null,"description"),e.createElement("td",null,"The description of a backends.")))),e.createElement("p",null,e.createElement("strong",null,"Examples")),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))),N=()=>e.createElement(o.Ox,{overlay:C,placement:"right",rootClose:!0,trigger:"click"},e.createElement(s.Button,{bsStyle:"link"},e.createElement(o.JO,{name:"question-circle"}))),T=u.default.div`
  margin-bottom: 10px;
`,R=({onSearch:t})=>e.createElement(T,null,e.createElement(o.UI,{onReset:()=>t(""),onSearch:t,queryHelpComponent:e.createElement(N,null),topMargin:0,useLoadingState:!0}));var A=a("ty2gyrHp"),x=a("TJOheZRu"),h=a("d4kzUuQm");const D=(0,u.default)(s.ButtonToolbar)`
  display: flex;
  justify-content: flex-end;
`,L=u.default.td`
  max-width: 300px;
`,Z=(t,n)=>t.map(c=>{var r,i;return(i=(r=n.find(d=>d.id===c))==null?void 0:r.name)!=null?i:"Role not found"}).join(", "),S=({authenticationBackend:t})=>{const n=h.ZP.SYSTEM.AUTHENTICATION.BACKENDS.edit(t.id);return e.createElement(A.J,{to:n},e.createElement(s.Button,{bsSize:"xs",type:"button"},"Edit"))},B=(t,n)=>`Do you really want to ${n} the authentication service "${x.Z.truncateWithEllipses(t,30)}"`,H=({isActive:t,authenticationBackend:n})=>{const{title:l,id:c}=n,r=v=>g.Z.setActiveBackend(v,l),i=()=>{window.confirm(B(l,"deactivate"))&&r(null)},d=()=>{window.confirm(B(l,"activate"))&&r(c)},m=()=>{window.confirm(B(l,"delete"))&&g.Z.delete(c,l)};return e.createElement("td",{className:"limited"},e.createElement(D,null,t?e.createElement(e.Fragment,null,e.createElement(S,{authenticationBackend:n}),e.createElement(s.Button,{onClick:i,bsStyle:"warning",bsSize:"xs",type:"button"},"Deactivate")):e.createElement(e.Fragment,null,e.createElement(S,{authenticationBackend:n}),e.createElement(s.Button,{onClick:d,bsStyle:"warning",bsSize:"xs",type:"button"},"Activate"),e.createElement(s.Button,{onClick:m,bsStyle:"danger",bsSize:"xs",type:"button"},"Delete"))))},F=({authenticationBackend:t,isActive:n,roles:l})=>{const{title:c,description:r,defaultRoles:i,id:d}=t,m=n?h.ZP.SYSTEM.AUTHENTICATION.BACKENDS.ACTIVE:h.ZP.SYSTEM.AUTHENTICATION.BACKENDS.show(d);return e.createElement("tr",{key:d,className:n?"active":""},e.createElement("td",{className:"limited"},e.createElement(A.r,{to:m},c)),e.createElement(L,null,e.createElement(o.iI,null,r)),e.createElement("td",{className:"limited"},Z(i,l)),e.createElement(H,{authenticationBackend:t,isActive:n}))},I=["Title","Description","Default Roles","Actions"],z=u.default.div`
  display: flex;
  align-items: center;
`,U=(0,u.default)(o.$j)(({theme:t})=>(0,u.css)`
  margin-left: 10px;
  font-size: ${t.fonts.size.h3};
`),Q=t=>{switch(t.toLowerCase()){case"actions":return e.createElement("th",{className:"actions text-right"},t);default:return e.createElement("th",null,t)}},K=t=>{const n={page:1,perPage:0,query:""};b.Z.loadRolesPaginated(n).then(t)},y=(t,n,l)=>{n(!0),g.Z.loadBackendsPaginated(t).then(c=>{l(c),n(!1)})},G=(t,n,l,c)=>f.K.delete.completed.listen(()=>{y(t,n,l),c()}),J=(t,n,l,c)=>f.K.setActiveBackend.completed.listen(()=>{y(t,n,l),c()}),$=(t,n,l)=>{var c;return e.createElement(F,{authenticationBackend:t,isActive:t.id===((c=n==null?void 0:n.activeBackend)==null?void 0:c.id),roles:l.list})},j=()=>{const{page:t,pageSize:n,resetPage:l}=(0,w.ZP)(),[c,r]=(0,e.useState)(),[i,d]=(0,e.useState)(),[m,v]=(0,e.useState)(),[E,X]=(0,e.useState)(""),{list:q,context:_}=m||{};(0,e.useEffect)(()=>K(d),[]),(0,e.useEffect)(()=>y({query:E,page:t,perPage:n},r,v),[E,t,n]),(0,e.useEffect)(()=>G({query:E,page:t,perPage:n},r,v,l),[E,t,n,l]),(0,e.useEffect)(()=>J({query:E,page:t,perPage:n},r,v,l),[E,t,n,l]);const ee=(p,O)=>{l(),X(p),!c&&O&&O()};return!m||!i?e.createElement(o.$j,null):e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{xs:12},e.createElement("h2",null,"Configured Authentication Services"),e.createElement(z,null,c&&e.createElement(U,{text:"",delay:0})),e.createElement("p",{className:"description"},"Found ",m.pagination.total," configured authentication services on the system."),e.createElement(o.l9,{totalItems:m.pagination.total},e.createElement(o.wQ,{className:"table-hover",customFilter:e.createElement(R,{onSearch:ee}),dataRowFormatter:p=>$(p,_,i),filterKeys:[],filterLabel:"Filter services",headerCellFormatter:Q,headers:I,id:"auth-backends-overview",rowClassName:"no-bm",rows:q.toJS(),sortByKey:"title"}))))};var M=a("s1byLS3P"),V=a("ezgdc3VG"),W=a("WPUkC7Fx");const Y=()=>{const{finishedLoading:t,activeBackend:n,backendsTotal:l}=(0,W.Z)([f.K.setActiveBackend]);return e.createElement(o.$4,{title:"All Authentication Services"},e.createElement(M.Z,null),e.createElement(o.mr,{title:"All Authentication Services",actions:e.createElement(V.Z,{activeBackend:n,finishedLoading:t}),documentationLink:{title:"Authentication documentation",path:P.Z.PAGES.USERS_ROLES}},e.createElement("span",null,"Configure Graylog's authentication services of this Graylog cluster.")),!!(l&&l>=1&&!n)&&e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{xs:12},e.createElement(s.Alert,{bsStyle:"warning"},"None of the configured authentication services is currently active."))),e.createElement(j,null))}}}]);})();

//# sourceMappingURL=1255d548-1899.03b849c2ae164739c73a.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy