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

web-interface.assets.bb8c8232-2653.64f8374e77d029fe71d5.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-2653"],{"tJ+zurXu":(L,P,t)=>{t.d(P,{A:()=>d});var e=t("Z7aTuO5B"),u=t("QBkUz07U"),R=t("IOI9nV80");const d=({role:{name:A,description:v}})=>e.createElement(u.A,{title:"Profile"},e.createElement(R.WY,{label:"Name",value:A}),e.createElement(R.WY,{label:"Description",value:v}))},QFEPqbjA:(L,P,t)=>{t.d(P,{A:()=>A});var e=t("Z7aTuO5B"),u=t("ty2gyrHp"),R=t("d4kzUuQm"),m=t("rIl5IEuP");const A=({roleId:v})=>e.createElement(m.ButtonToolbar,null,e.createElement(u.m,{to:R.Ay.SYSTEM.AUTHZROLES.show(v)},e.createElement(m.Button,{bsStyle:"success"},"View Details")),e.createElement(u.m,{to:R.Ay.SYSTEM.AUTHZROLES.edit(v)},e.createElement(m.Button,{bsStyle:"success"},"Edit Role")))},Lu0NTOJv:(L,P,t)=>{t.d(P,{A:()=>O});var e=t("KOKBnITH"),u=t("lDGobrly");const R=(0,u.A)({action:e.v.load,error:(E,l)=>({message:`Loading role with id "${l}" failed with status: ${E}`}),notFoundRedirect:!0}),m=(0,u.A)({action:e.v.delete,success:(E,l)=>({message:`Role "${l}" was deleted successfully`}),error:(E,l,h)=>({message:`Deleting role "${h}" failed with status: ${E}`})}),d=(0,u.A)({action:e.v.addMembers,success:(E,l)=>({message:`Users:"${l.join(", ")}" were assigned successfully`}),error:(E,l,h)=>({message:`Assigning users "${h.join(", ")}" failed with status: ${E}`})}),A=(0,u.A)({action:e.v.removeMember,success:(E,l)=>({message:`User "${l}" was unassigned successfully`}),error:(E,l,h)=>({message:`Unassign user "${h}" failed with status: ${E}`})}),v=(0,u.A)({action:e.v.loadUsersForRole,error:(E,l,h)=>({message:`Loading users for role "${h}" failed with status: ${E}`})}),y=(0,u.A)({action:e.v.loadRolesForUser,error:(E,l)=>({message:`Loading roles for user "${l}" failed with status: ${E}`})}),T=(0,u.A)({action:e.v.loadRolesPaginated,error:E=>({message:`Loading roles failed with status: ${E}`})}),O={load:R,delete:m,addMembers:d,removeMember:A,loadUsersForRole:v,loadRolesForUser:y,loadRolesPaginated:T}},h9dXfBVx:(L,P,t)=>{t.r(P),t.d(P,{default:()=>a});var e=t("Z7aTuO5B"),u=t("c9JM82dZ"),R=t("ty2gyrHp"),m=t("Lu0NTOJv"),d=t("IOI9nV80"),A=t("3yfJIRSb"),v=t("QL8i6bcz"),y=t("QBkUz07U");const O=({role:r})=>{var g;const U=v.d.exports("teams"),f=(g=U==null?void 0:U[0])==null?void 0:g.RoleTeamsAssignment;return e.createElement(y.A,{title:"Teams"},f?e.createElement(f,{role:r,readOnly:!0}):e.createElement(d.Uk,{featureName:"teams"}))};var E=t("tJ+zurXu");const h=({role:{id:r,name:g}})=>{const[U,f]=(0,e.useState)(!1),M=(0,e.useCallback)(C=>(f(!0),m.A.loadUsersForRole(r,g,C).then(B=>(f(!1),B))),[r,g]);return e.createElement(y.A,{title:"Users",showLoading:U},e.createElement(d.Md,{noDataText:"No selected users have been found.",onLoad:M}))},D=({role:r})=>r?e.createElement(A.A,null,e.createElement("div",null,e.createElement(E.A,{role:r})),e.createElement("div",null,e.createElement(h,{role:r}),e.createElement(O,{role:r}))):e.createElement(d.y$,null);var I=t("QFEPqbjA"),c=t("E+CaPsQD"),s=t("rIl5IEuP"),o=t("d4kzUuQm");const n=({fullName:r})=>e.createElement(e.Fragment,null,"Role Details ",r&&e.createElement(e.Fragment,null,"- ",e.createElement("i",null,r))),i=({params:r})=>{var g;const[U,f]=(0,e.useState)(),M=r==null?void 0:r.roleId;return(0,e.useEffect)(()=>{m.A.load(M).then(f)},[M]),e.createElement(d.Qc,{title:`Role Details ${(g=U==null?void 0:U.name)!=null?g:""}`},e.createElement(d.zY,{title:e.createElement(n,{fullName:U==null?void 0:U.name}),actions:e.createElement(I.A,{roleId:M}),documentationLink:{title:"Permissions documentation",path:c.A.PAGES.USERS_ROLES},topActions:e.createElement(R.m,{to:o.Ay.SYSTEM.AUTHZROLES.OVERVIEW},e.createElement(s.Button,{bsStyle:"info"},"Roles Overview"))},e.createElement("span",null,"Overview of details like name, description and assigned users.")),e.createElement(D,{role:M===(U==null?void 0:U.id)?U:void 0}))},a=(0,u.A)(i)},c9JM82dZ:(L,P,t)=>{t.d(P,{A:()=>m});var e=t("Z7aTuO5B"),u=t("yAXMqwrl");const m=d=>A=>{const v=(0,u.useParams)();return e.createElement(d,{...A,params:v})}},KOKBnITH:(L,P,t)=>{t.d(P,{v:()=>l});var e=t("JnTtTRmZ"),u=t.n(e),R=t("VPaD/Np4"),m=t("eFxcQyPT"),d=t("U1Iufsob"),A=t("MdYBRjRJ"),v=t("IA3Ku5lS"),y=t("gyRmhZSW");class T{constructor(s,o,n,i,a){this._value={id:s,name:o,description:n,permissions:i,readOnly:a}}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:o,description:n,permissions:i,readOnly:a}=this._value;return new O(R.Map({id:s,name:o,description:n,permissions:i,readOnly:a}))}static create(s,o,n,i,a){return new T(s,o,n,i,a)}toJSON(){const{id:s,name:o,description:n,permissions:i,readOnly:a}=this._value;return{id:s,name:o,description:n,permissions:i,read_only:a}}static fromJSON(s){const{id:o,name:n,description:i,permissions:a,read_only:r}=s;return T.create(o,n,i,a,r)}static builder(){return new O}}class O{constructor(s=R.Map()){this.value=s}id(s){return new O(this.value.set("id",s))}name(s){return new O(this.value.set("name",s))}description(s){return new O(this.value.set("description",s))}permissions(s){return new O(this.value.set("permissions",s))}readOnly(s){return new O(this.value.set("readOnly",s))}build(){const{id:s,name:o,description:n,permissions:i,readOnly:a}=this.value.toObject();return new T(s,o,n,i,a)}}const l=(0,v.rN)("AuthzRoles",()=>u().createActions({load:{asyncResult:!0},delete:{asyncResult:!0},addMembers:{asyncResult:!0},removeMember:{asyncResult:!0},loadUsersForRole:{asyncResult:!0},loadRolesForUser:{asyncResult:!0},loadRolesPaginated:{asyncResult:!0}}));var h=t("nmSm+aR9");const S=({count:c,total:s,page:o,per_page:n,query:i,roles:a=[],context:r={users:void 0}})=>({list:R.List(a.map(g=>T.fromJSON(g))),pagination:{query:i,page:o,perPage:n,count:c,total:s},context:r}),p=({count:c,total:s,page:o,per_page:n,query:i,users:a})=>({list:R.List(a.map(r=>h.A.fromJSON(r))),pagination:{page:o,perPage:n,query:i,count:c,total:s}}),D=(c,s=[])=>{const o=s.map(n=>encodeURIComponent(n));return c(...o).url},I=(0,v.Bv)("AuthzRoles",()=>u().createStore({listenables:[l],load(c){const s=(0,A.H3)(D(d.A.AuthzRolesController.load,[c])),o=(0,m.Ay)("GET",s).then(T.fromJSON);return l.load.promise(o),o},delete(c){const s=(0,A.H3)(D(d.A.AuthzRolesController.delete,[c])),o=(0,m.Ay)("DELETE",s);return l.delete.promise(o),o},addMembers(c,s){const o=D(d.A.AuthzRolesController.addMembers,[c]),n=(0,m.Ay)("PUT",(0,A.H3)(o),s.toArray());return l.addMembers.promise(n),n},removeMember(c,s){const o=D(d.A.AuthzRolesController.removeMember,[c,s]),n=(0,m.Ay)("DELETE",(0,A.H3)(o));return l.removeMember.promise(n),n},loadUsersForRole(c,s,{page:o,perPage:n,query:i}){const a=D(d.A.AuthzRolesController.loadUsersForRole,[c]),r=(0,y.A)(a,o,n,i),g=(0,m.Ay)("GET",(0,A.H3)(r)).then(p);return l.loadUsersForRole.promise(g),g},loadRolesForUser(c,{page:s,perPage:o,query:n}){const i=D(d.A.AuthzRolesController.loadRolesForUser,[c]),a=(0,y.A)(i,s,o,n),r=(0,m.Ay)("GET",(0,A.H3)(a)).then(S);return l.loadRolesForUser.promise(r),r},loadRolesPaginated({page:c,perPage:s,query:o}){const n=D(d.A.AuthzRolesController.list),i=(0,y.A)(n,c,s,o),a=(0,m.Ay)("GET",(0,A.H3)(i)).then(S);return l.loadRolesPaginated.promise(a),a}}))}}]);})();

//# sourceMappingURL=bb8c8232-2653.64f8374e77d029fe71d5.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy