web-interface.assets.1255d548-6712.23ecb7d70611713d3e76.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-6712"],{"tJ+zurXu":(M,f,n)=>{n.d(f,{Z:()=>P});var t=n("Z7aTuO5B"),S=n("QBkUz07U"),R=n("/GOzvPf6");const P=({role:{name:e,description:d}})=>t.createElement(S.Z,{title:"Profile"},t.createElement(R.mv,{label:"Name",value:e}),t.createElement(R.mv,{label:"Description",value:d}))},QFEPqbjA:(M,f,n)=>{n.d(f,{Z:()=>e});var t=n("Z7aTuO5B"),S=n("ty2gyrHp"),R=n("d4kzUuQm"),r=n("uZqmR+ju");const e=({roleId:d})=>t.createElement(r.ButtonToolbar,null,t.createElement(S.J,{to:R.ZP.SYSTEM.AUTHZROLES.show(d)},t.createElement(r.Button,{bsStyle:"success"},"View Details")),t.createElement(S.J,{to:R.ZP.SYSTEM.AUTHZROLES.edit(d)},t.createElement(r.Button,{bsStyle:"success"},"Edit Role")))},Lu0NTOJv:(M,f,n)=>{n.d(f,{Z:()=>m});var t=n("KOKBnITH"),S=n("lDGobrly");const R=(0,S.Z)({action:t.p.load,error:(u,l)=>({message:`Loading role with id "${l}" failed with status: ${u}`}),notFoundRedirect:!0}),r=(0,S.Z)({action:t.p.delete,success:(u,l)=>({message:`Role "${l}" was deleted successfully`}),error:(u,l,v)=>({message:`Deleting role "${v}" failed with status: ${u}`})}),P=(0,S.Z)({action:t.p.addMembers,success:(u,l)=>({message:`Users:"${l.join(", ")}" were assigned successfully`}),error:(u,l,v)=>({message:`Assigning users "${v.join(", ")}" failed with status: ${u}`})}),e=(0,S.Z)({action:t.p.removeMember,success:(u,l)=>({message:`User "${l}" was unassigned successfully`}),error:(u,l,v)=>({message:`Unassign user "${v}" failed with status: ${u}`})}),d=(0,S.Z)({action:t.p.loadUsersForRole,error:(u,l,v)=>({message:`Loading users for role "${v}" failed with status: ${u}`})}),O=(0,S.Z)({action:t.p.loadRolesForUser,error:(u,l)=>({message:`Loading roles for user "${l}" failed with status: ${u}`})}),A=(0,S.Z)({action:t.p.loadRolesPaginated,error:u=>({message:`Loading roles failed with status: ${u}`})}),m={load:R,delete:r,addMembers:P,removeMember:e,loadUsersForRole:d,loadRolesForUser:O,loadRolesPaginated:A}},"nmSm+aR9":(M,f,n)=>{n.d(f,{Z:()=>R});var t=n("VPaD/Np4"),S=n.n(t);class R{constructor(e,d,O,A,m,u,l,v,U,D,g,y,o,s,a){this._value={id:e,username:d,fullName:O,email:A,roles:m,readOnly:u,external:l,sessionActive:v,clientAddress:U,lastActivity:D,enabled:g,authServiceId:y,authServiceUid:o,authServiceEnabled:s,accountStatus:a}}get id(){return this._value.id}get username(){return this._value.username}get name(){return this._value.username}get fullName(){return this._value.fullName}get description(){return this._value.fullName}get email(){return this._value.email}get roles(){return this._value.roles}get readOnly(){return this._value.readOnly}get external(){return this._value.external}get sessionActive(){return this._value.sessionActive}get clientAddress(){return this._value.clientAddress}get lastActivity(){return this._value.lastActivity}get enabled(){return this._value.enabled}get authServiceId(){return this._value.authServiceId}get authServiceUid(){return this._value.authServiceUid}get authServiceEnabled(){return this._value.authServiceEnabled}get accountStatus(){return this._value.accountStatus}toBuilder(){const{id:e,username:d,fullName:O,email:A,roles:m,readOnly:u,external:l,sessionActive:v,clientAddress:U,lastActivity:D,enabled:g,authServiceId:y,authServiceUid:o,authServiceEnabled:s,accountStatus:a}=this._value;return new r(t.Map({id:e,username:d,fullName:O,email:A,roles:m,readOnly:u,external:l,sessionActive:v,clientAddress:U,lastActivity:D,enabled:g,authServiceId:y,authServiceUid:o,authServiceEnabled:s,accountStatus:a}))}static create(e,d,O,A,m,u,l,v,U,D,g,y,o,s,a){return new R(e,d,O,A,m,u,l,v,U,D,g,y,o,s,a)}toJSON(){const{id:e,username:d,fullName:O,email:A,roles:m,readOnly:u,external:l,sessionActive:v,clientAddress:U,lastActivity:D,enabled:g,authServiceId:y,authServiceUid:o,authServiceEnabled:s,accountStatus:a}=this._value;return{id:e,username:d,full_name:O,email:A,roles:m.toArray(),read_only:u,external_user:l,session_active:v,client_address:U,last_activity:D,enabled:g,auth_service_id:y,auth_service_uid:o,auth_service_enabled:s,account_status:a}}static fromJSON(e){const{id:d,username:O,full_name:A,email:m,roles:u,read_only:l,external_user:v,session_active:U,client_address:D,last_activity:g,enabled:y,auth_service_id:o,auth_service_uid:s,auth_service_enabled:a,account_status:i}=e;return R.create(d,O,A,m,t.Set(u),l!=null?l:!1,v!=null?v:!1,U!=null?U:!1,D,g,y,o,s,a,i)}static builder(){return new r}}class r{constructor(e=t.Map()){this.value=e}id(e){return new r(this.value.set("id",e))}username(e){return new r(this.value.set("username",e))}fullName(e){return new r(this.value.set("fullName",e))}email(e){return new r(this.value.set("email",e))}roles(e){return new r(this.value.set("roles",e))}readOnly(e){return new r(this.value.set("readOnly",e))}external(e){return new r(this.value.set("external",e))}sessionActive(e){return new r(this.value.set("sessionActive",e))}clientAddress(e){return new r(this.value.set("clientAddress",e))}lastActivity(e){return new r(this.value.set("lastActivity",e))}enabled(e){return new r(this.value.set("enabled",e))}authServiceId(e){return new r(this.value.set("authServiceId",e))}authServiceUid(e){return new r(this.value.set("authServiceUid",e))}authServiceEnabled(e){return new r(this.value.set("authServiceEnabled",e))}accountStatus(e){return new r(this.value.set("accountStatus",e))}build(){const{id:e,username:d,fullName:O,email:A,roles:m,readOnly:u,external:l,sessionActive:v,clientAddress:U,lastActivity:D,enabled:g,authServiceId:y,authServiceUid:o,authServiceEnabled:s,accountStatus:a}=this.value.toObject();return new R(e,d,O,A,m,u,l,v,U,D,g,y,o,s,a)}}},h9dXfBVx:(M,f,n)=>{n.r(f),n.d(f,{default:()=>h});var t=n("Z7aTuO5B"),S=n("c9JM82dZ"),R=n("ty2gyrHp"),r=n("Lu0NTOJv"),P=n("/GOzvPf6"),e=n("3yfJIRSb"),d=n("QL8i6bcz"),O=n("QBkUz07U");const m=({role:c})=>{var T;const Z=d.G.exports("teams"),p=(T=Z==null?void 0:Z[0])==null?void 0:T.RoleTeamsAssignment;return t.createElement(O.Z,{title:"Teams"},p?t.createElement(p,{role:c,readOnly:!0}):t.createElement(P.VL,{featureName:"teams"}))};var u=n("tJ+zurXu");const v=({role:{id:c,name:T}})=>{const[Z,p]=(0,t.useState)(!1),L=(0,t.useCallback)(_=>(p(!0),r.Z.loadUsersForRole(c,T,_).then(C=>(p(!1),C))),[c,T]);return t.createElement(O.Z,{title:"Users",showLoading:Z},t.createElement(P.BN,{noDataText:"No selected users have been found.",onLoad:L}))},g=({role:c})=>c?t.createElement(e.Z,null,t.createElement("div",null,t.createElement(u.Z,{role:c})),t.createElement("div",null,t.createElement(v,{role:c}),t.createElement(m,{role:c}))):t.createElement(P.$j,null);var y=n("QFEPqbjA"),o=n("E+CaPsQD"),s=n("uZqmR+ju"),a=n("d4kzUuQm");const i=({fullName:c})=>t.createElement(t.Fragment,null,"Role Details ",c&&t.createElement(t.Fragment,null,"- ",t.createElement("i",null,c))),E=({params:c})=>{var T;const[Z,p]=(0,t.useState)(),L=c==null?void 0:c.roleId;return(0,t.useEffect)(()=>{r.Z.load(L).then(p)},[L]),t.createElement(P.$4,{title:`Role Details ${(T=Z==null?void 0:Z.name)!=null?T:""}`},t.createElement(P.mr,{title:t.createElement(i,{fullName:Z==null?void 0:Z.name}),actions:t.createElement(y.Z,{roleId:L}),documentationLink:{title:"Permissions documentation",path:o.Z.PAGES.USERS_ROLES},topActions:t.createElement(R.J,{to:a.ZP.SYSTEM.AUTHZROLES.OVERVIEW},t.createElement(s.Button,{bsStyle:"info"},"Roles Overview"))},t.createElement("span",null,"Overview of details like name, description and assigned users.")),t.createElement(g,{role:L===(Z==null?void 0:Z.id)?Z:void 0}))},h=(0,S.Z)(E)},c9JM82dZ:(M,f,n)=>{n.d(f,{Z:()=>r});var t=n("Z7aTuO5B"),S=n("yAXMqwrl");const r=P=>e=>{const d=(0,S.useParams)();return t.createElement(P,{...e,params:d})}},KOKBnITH:(M,f,n)=>{n.d(f,{p:()=>l});var t=n("JnTtTRmZ"),S=n.n(t),R=n("VPaD/Np4"),r=n("eFxcQyPT"),P=n("U1Iufsob"),e=n("MdYBRjRJ"),d=n("IA3Ku5lS"),O=n("gyRmhZSW");class A{constructor(s,a,i,E,h){this._value={id:s,name:a,description:i,permissions:E,readOnly:h}}get id(){return this._value.id}get name(){return this._value.name}get description(){return this._value.description}get permissions(){return this._value.permissions}get readOnly(){return this._value.readOnly}toBuilder(){const{id:s,name:a,description:i,permissions:E,readOnly:h}=this._value;return new m(R.Map({id:s,name:a,description:i,permissions:E,readOnly:h}))}static create(s,a,i,E,h){return new A(s,a,i,E,h)}toJSON(){const{id:s,name:a,description:i,permissions:E,readOnly:h}=this._value;return{id:s,name:a,description:i,permissions:E,read_only:h}}static fromJSON(s){const{id:a,name:i,description:E,permissions:h,read_only:c}=s;return A.create(a,i,E,h,c)}static builder(){return new m}}class m{constructor(s=R.Map()){this.value=s}id(s){return new m(this.value.set("id",s))}name(s){return new m(this.value.set("name",s))}description(s){return new m(this.value.set("description",s))}permissions(s){return new m(this.value.set("permissions",s))}readOnly(s){return new m(this.value.set("readOnly",s))}build(){const{id:s,name:a,description:i,permissions:E,readOnly:h}=this.value.toObject();return new A(s,a,i,E,h)}}const l=(0,d.ei)("AuthzRoles",()=>S().createActions({load:{asyncResult:!0},delete:{asyncResult:!0},addMembers:{asyncResult:!0},removeMember:{asyncResult:!0},loadUsersForRole:{asyncResult:!0},loadRolesForUser:{asyncResult:!0},loadRolesPaginated:{asyncResult:!0}}));var v=n("nmSm+aR9");const U=({count:o,total:s,page:a,per_page:i,query:E,roles:h=[],context:c={users:void 0}})=>({list:R.List(h.map(T=>A.fromJSON(T))),pagination:{query:E,page:a,perPage:i,count:o,total:s},context:c}),D=({count:o,total:s,page:a,per_page:i,query:E,users:h})=>({list:R.List(h.map(c=>v.Z.fromJSON(c))),pagination:{page:a,perPage:i,query:E,count:o,total:s}}),g=(o,s=[])=>{const a=s.map(i=>encodeURIComponent(i));return o(...a).url},y=(0,d.dS)("AuthzRoles",()=>S().createStore({listenables:[l],load(o){const s=(0,e.DC)(g(P.Z.AuthzRolesController.load,[o])),a=(0,r.ZP)("GET",s).then(A.fromJSON);return l.load.promise(a),a},delete(o){const s=(0,e.DC)(g(P.Z.AuthzRolesController.delete,[o])),a=(0,r.ZP)("DELETE",s);return l.delete.promise(a),a},addMembers(o,s){const a=g(P.Z.AuthzRolesController.addMembers,[o]),i=(0,r.ZP)("PUT",(0,e.DC)(a),s.toArray());return l.addMembers.promise(i),i},removeMember(o,s){const a=g(P.Z.AuthzRolesController.removeMember,[o,s]),i=(0,r.ZP)("DELETE",(0,e.DC)(a));return l.removeMember.promise(i),i},loadUsersForRole(o,s,{page:a,perPage:i,query:E}){const h=g(P.Z.AuthzRolesController.loadUsersForRole,[o]),c=(0,O.Z)(h,a,i,E),T=(0,r.ZP)("GET",(0,e.DC)(c)).then(D);return l.loadUsersForRole.promise(T),T},loadRolesForUser(o,{page:s,perPage:a,query:i}){const E=g(P.Z.AuthzRolesController.loadRolesForUser,[o]),h=(0,O.Z)(E,s,a,i),c=(0,r.ZP)("GET",(0,e.DC)(h)).then(U);return l.loadRolesForUser.promise(c),c},loadRolesPaginated({page:o,perPage:s,query:a}){const i=g(P.Z.AuthzRolesController.list),E=(0,O.Z)(i,o,s,a),h=(0,r.ZP)("GET",(0,e.DC)(E)).then(U);return l.loadRolesPaginated.promise(h),h}}))}}]);})();
//# sourceMappingURL=1255d548-6712.23ecb7d70611713d3e76.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy