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

web-interface.assets.1255d548-3601.f0e8d7b3f57ded6a2ae6.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-3601"],{SfPIQIJE:(T,p,n)=>{n.d(p,{Z:()=>h});var u=n("Z7aTuO5B"),m=n("J6y4/h8P"),R=n("uZqmR+ju"),d=n("ty2gyrHp"),f=n("/GOzvPf6"),r=n("NV1/EHMi");const g=(0,m.default)(R.ButtonToolbar)`
  margin-bottom: 10px;
`,_=(0,m.default)(R.Button)(({theme:a})=>(0,m.css)`
  font-family: ${a.fonts.family.navigation};
  font-size: ${a.fonts.size.navigation};

  &&&& {
    color: ${a.colors.variant.darker.default};
    
    &:hover,
    &:focus {
      text-decoration: none;
    }

    > div {
      &:hover,
      &:focus {
        color: ${a.colors.variant.darker.default};
      }
    }

    &:hover {
      ${(0,r.RF)(a)}
    }

    &.active {
      color: ${a.colors.global.textDefault};

      ${(0,r.A7)(a)}

      &:hover,
      &:focus {
        ${(0,r.A7)(a)}
      }
    }
  }
`);_.displayName="Button";const h=({items:a})=>u.createElement(g,null,a.map(({path:i,title:U,permissions:O,exactPathMatch:E})=>i?u.createElement(f.AE,{permissions:O!=null?O:[],key:i},u.createElement(d.J,{to:i,relativeActive:!E},u.createElement(_,{bsStyle:"link"},u.createElement(r.ZP,null,U)))):null))},WqhT36Vr:(T,p,n)=>{n.d(p,{Z:()=>r});var u=n("Z7aTuO5B"),m=n("d4kzUuQm"),R=n("SfPIQIJE"),d=n("uZqmR+ju");const r=()=>{const g=[{title:"Users Overview",path:m.ZP.SYSTEM.USERS.OVERVIEW,permissions:"users:list"},{title:"Teams Overview",path:m.ZP.getPluginRoute("SYSTEM_TEAMS"),permissions:"teams:list"}];return u.createElement(d.Row,null,u.createElement(R.Z,{items:g}))}},Lu0NTOJv:(T,p,n)=>{n.d(p,{Z:()=>h});var u=n("KOKBnITH"),m=n("lDGobrly");const R=(0,m.Z)({action:u.p.load,error:(a,i)=>({message:`Loading role with id "${i}" failed with status: ${a}`}),notFoundRedirect:!0}),d=(0,m.Z)({action:u.p.delete,success:(a,i)=>({message:`Role "${i}" was deleted successfully`}),error:(a,i,U)=>({message:`Deleting role "${U}" failed with status: ${a}`})}),f=(0,m.Z)({action:u.p.addMembers,success:(a,i)=>({message:`Users:"${i.join(", ")}" were assigned successfully`}),error:(a,i,U)=>({message:`Assigning users "${U.join(", ")}" failed with status: ${a}`})}),r=(0,m.Z)({action:u.p.removeMember,success:(a,i)=>({message:`User "${i}" was unassigned successfully`}),error:(a,i,U)=>({message:`Unassign user "${U}" failed with status: ${a}`})}),g=(0,m.Z)({action:u.p.loadUsersForRole,error:(a,i,U)=>({message:`Loading users for role "${U}" failed with status: ${a}`})}),_=(0,m.Z)({action:u.p.loadRolesForUser,error:(a,i)=>({message:`Loading roles for user "${i}" failed with status: ${a}`})}),c=(0,m.Z)({action:u.p.loadRolesPaginated,error:a=>({message:`Loading roles failed with status: ${a}`})}),h={load:R,delete:d,addMembers:f,removeMember:r,loadUsersForRole:g,loadRolesForUser:_,loadRolesPaginated:c}},"92lPlKXC":(T,p,n)=>{n.d(p,{Z:()=>E});var u=n("cSDA0Pof"),m=n("lDGobrly");const R=(0,m.Z)({action:u.X.create,success:l=>({message:`User "${l==null?void 0:l.first_name} ${l==null?void 0:l.last_name}" was created successfully`}),error:(l,s)=>({message:`Creating user "${s==null?void 0:s.first_name} ${s==null?void 0:s.last_name}" failed with status: ${l}`})}),d=(0,m.Z)({action:u.X.load,error:(l,s)=>({message:`Loading user with id "${s}" failed with status: ${l}`}),notFoundRedirect:!0}),f=(0,m.Z)({action:u.X.loadByUsername,error:(l,s)=>({message:`Loading user with username "${s}" failed with status: ${l}`}),notFoundRedirect:!0}),r=(0,m.Z)({action:u.X.update,success:(l,s,t)=>({message:`User "${t}" was updated successfully`}),error:(l,s,t,e)=>({message:`Updating user "${e}" failed with status: ${l}`})}),g=(0,m.Z)({action:u.X.delete,success:(l,s)=>({message:`User "${s}" was deleted successfully`}),error:(l,s,t)=>({message:`Deleting user "${t}" failed with status: ${l}`})}),_=(0,m.Z)({action:u.X.changePassword,success:()=>({message:"Password was changed successfully "}),error:(l,s)=>({message:`Changing password for user with id "${s}" failed with status: ${l}`})}),c=(0,m.Z)({action:u.X.createToken,success:(l,s)=>({message:`Token "${s}" created successfully`}),error:(l,s,t)=>({message:`Creating token "${t}" for user with id "${s}" failed with status: ${l}`})}),h=(0,m.Z)({action:u.X.loadTokens,error:(l,s)=>({message:`Loading tokens for user with id "${s}" failed with status: ${l}`})}),a=(0,m.Z)({action:u.X.deleteToken,success:(l,s,t)=>({message:`Token "${t}" deleted successfully`}),error:(l,s,t,e)=>({message:`Deleting token "${e}" for user with id "${s}" failed with status: ${l}`})}),i=(0,m.Z)({action:u.X.loadUsers,error:l=>({message:`Loading users failed with status: ${l}`})}),U=(0,m.Z)({action:u.X.loadUsersPaginated,error:l=>({message:`Loading users failed with status: ${l}`})}),O=(0,m.Z)({action:u.X.setStatus,success:(l,s)=>({message:`User "${l}" was set to ${s}`}),error:(l,s,t)=>({message:`Updating user ("${s}") to ${t} failed with status: ${l}`})}),E={create:R,load:d,loadByUsername:f,update:r,delete:g,changePassword:_,createToken:c,loadTokens:h,deleteToken:a,loadUsers:i,loadUsersPaginated:U,setStatus:O}},MLDs3jaY:(T,p,n)=>{n.d(p,{Z:()=>r});var u=n("Z7aTuO5B"),m=n("ibdPvtmL"),R=n("8fnsnG21");const d="org.graylog2.users.UserConfiguration",r=()=>{const g=(0,R.o)(m.i,c=>c==null?void 0:c.configuration[d]),_=(g==null?void 0:g.enable_global_session_timeout)||!1;return(0,u.useEffect)(()=>(m.h.list(d),()=>{}),[]),_}},"nmSm+aR9":(T,p,n)=>{n.d(p,{Z:()=>R});var u=n("VPaD/Np4"),m=n.n(u);class R{constructor(r,g,_,c,h,a,i,U,O,E,l,s,t,e,o){this._value={id:r,username:g,fullName:_,email:c,roles:h,readOnly:a,external:i,sessionActive:U,clientAddress:O,lastActivity:E,enabled:l,authServiceId:s,authServiceUid:t,authServiceEnabled:e,accountStatus:o}}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:r,username:g,fullName:_,email:c,roles:h,readOnly:a,external:i,sessionActive:U,clientAddress:O,lastActivity:E,enabled:l,authServiceId:s,authServiceUid:t,authServiceEnabled:e,accountStatus:o}=this._value;return new d(u.Map({id:r,username:g,fullName:_,email:c,roles:h,readOnly:a,external:i,sessionActive:U,clientAddress:O,lastActivity:E,enabled:l,authServiceId:s,authServiceUid:t,authServiceEnabled:e,accountStatus:o}))}static create(r,g,_,c,h,a,i,U,O,E,l,s,t,e,o){return new R(r,g,_,c,h,a,i,U,O,E,l,s,t,e,o)}toJSON(){const{id:r,username:g,fullName:_,email:c,roles:h,readOnly:a,external:i,sessionActive:U,clientAddress:O,lastActivity:E,enabled:l,authServiceId:s,authServiceUid:t,authServiceEnabled:e,accountStatus:o}=this._value;return{id:r,username:g,full_name:_,email:c,roles:h.toArray(),read_only:a,external_user:i,session_active:U,client_address:O,last_activity:E,enabled:l,auth_service_id:s,auth_service_uid:t,auth_service_enabled:e,account_status:o}}static fromJSON(r){const{id:g,username:_,full_name:c,email:h,roles:a,read_only:i,external_user:U,session_active:O,client_address:E,last_activity:l,enabled:s,auth_service_id:t,auth_service_uid:e,auth_service_enabled:o,account_status:v}=r;return R.create(g,_,c,h,u.Set(a),i!=null?i:!1,U!=null?U:!1,O!=null?O:!1,E,l,s,t,e,o,v)}static builder(){return new d}}class d{constructor(r=u.Map()){this.value=r}id(r){return new d(this.value.set("id",r))}username(r){return new d(this.value.set("username",r))}fullName(r){return new d(this.value.set("fullName",r))}email(r){return new d(this.value.set("email",r))}roles(r){return new d(this.value.set("roles",r))}readOnly(r){return new d(this.value.set("readOnly",r))}external(r){return new d(this.value.set("external",r))}sessionActive(r){return new d(this.value.set("sessionActive",r))}clientAddress(r){return new d(this.value.set("clientAddress",r))}lastActivity(r){return new d(this.value.set("lastActivity",r))}enabled(r){return new d(this.value.set("enabled",r))}authServiceId(r){return new d(this.value.set("authServiceId",r))}authServiceUid(r){return new d(this.value.set("authServiceUid",r))}authServiceEnabled(r){return new d(this.value.set("authServiceEnabled",r))}accountStatus(r){return new d(this.value.set("accountStatus",r))}build(){const{id:r,username:g,fullName:_,email:c,roles:h,readOnly:a,external:i,sessionActive:U,clientAddress:O,lastActivity:E,enabled:l,authServiceId:s,authServiceUid:t,authServiceEnabled:e,accountStatus:o}=this.value.toObject();return new R(r,g,_,c,h,a,i,U,O,E,l,s,t,e,o)}}},KOKBnITH:(T,p,n)=>{n.d(p,{p:()=>i});var u=n("JnTtTRmZ"),m=n.n(u),R=n("VPaD/Np4"),d=n("eFxcQyPT"),f=n("U1Iufsob"),r=n("MdYBRjRJ"),g=n("IA3Ku5lS"),_=n("gyRmhZSW");class c{constructor(e,o,v,P,A){this._value={id:e,name:o,description:v,permissions:P,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:e,name:o,description:v,permissions:P,readOnly:A}=this._value;return new h(R.Map({id:e,name:o,description:v,permissions:P,readOnly:A}))}static create(e,o,v,P,A){return new c(e,o,v,P,A)}toJSON(){const{id:e,name:o,description:v,permissions:P,readOnly:A}=this._value;return{id:e,name:o,description:v,permissions:P,read_only:A}}static fromJSON(e){const{id:o,name:v,description:P,permissions:A,read_only:D}=e;return c.create(o,v,P,A,D)}static builder(){return new h}}class h{constructor(e=R.Map()){this.value=e}id(e){return new h(this.value.set("id",e))}name(e){return new h(this.value.set("name",e))}description(e){return new h(this.value.set("description",e))}permissions(e){return new h(this.value.set("permissions",e))}readOnly(e){return new h(this.value.set("readOnly",e))}build(){const{id:e,name:o,description:v,permissions:P,readOnly:A}=this.value.toObject();return new c(e,o,v,P,A)}}const i=(0,g.ei)("AuthzRoles",()=>m().createActions({load:{asyncResult:!0},delete:{asyncResult:!0},addMembers:{asyncResult:!0},removeMember:{asyncResult:!0},loadUsersForRole:{asyncResult:!0},loadRolesForUser:{asyncResult:!0},loadRolesPaginated:{asyncResult:!0}}));var U=n("nmSm+aR9");const O=({count:t,total:e,page:o,per_page:v,query:P,roles:A=[],context:D={users:void 0}})=>({list:R.List(A.map(C=>c.fromJSON(C))),pagination:{query:P,page:o,perPage:v,count:t,total:e},context:D}),E=({count:t,total:e,page:o,per_page:v,query:P,users:A})=>({list:R.List(A.map(D=>U.Z.fromJSON(D))),pagination:{page:o,perPage:v,query:P,count:t,total:e}}),l=(t,e=[])=>{const o=e.map(v=>encodeURIComponent(v));return t(...o).url},s=(0,g.dS)("AuthzRoles",()=>m().createStore({listenables:[i],load(t){const e=(0,r.DC)(l(f.Z.AuthzRolesController.load,[t])),o=(0,d.ZP)("GET",e).then(c.fromJSON);return i.load.promise(o),o},delete(t){const e=(0,r.DC)(l(f.Z.AuthzRolesController.delete,[t])),o=(0,d.ZP)("DELETE",e);return i.delete.promise(o),o},addMembers(t,e){const o=l(f.Z.AuthzRolesController.addMembers,[t]),v=(0,d.ZP)("PUT",(0,r.DC)(o),e.toArray());return i.addMembers.promise(v),v},removeMember(t,e){const o=l(f.Z.AuthzRolesController.removeMember,[t,e]),v=(0,d.ZP)("DELETE",(0,r.DC)(o));return i.removeMember.promise(v),v},loadUsersForRole(t,e,{page:o,perPage:v,query:P}){const A=l(f.Z.AuthzRolesController.loadUsersForRole,[t]),D=(0,_.Z)(A,o,v,P),C=(0,d.ZP)("GET",(0,r.DC)(D)).then(E);return i.loadUsersForRole.promise(C),C},loadRolesForUser(t,{page:e,perPage:o,query:v}){const P=l(f.Z.AuthzRolesController.loadRolesForUser,[t]),A=(0,_.Z)(P,e,o,v),D=(0,d.ZP)("GET",(0,r.DC)(A)).then(O);return i.loadRolesForUser.promise(D),D},loadRolesPaginated({page:t,perPage:e,query:o}){const v=l(f.Z.AuthzRolesController.list),P=(0,_.Z)(v,t,e,o),A=(0,d.ZP)("GET",(0,r.DC)(P)).then(O);return i.loadRolesPaginated.promise(A),A}}))},cSDA0Pof:(T,p,n)=>{n.d(p,{X:()=>E});var u=n("JnTtTRmZ"),m=n.n(u),R=n("VPaD/Np4"),d=n.n(R),f=n("oCSEoDew"),r=n.n(f),g=n("nmSm+aR9"),_=n("eFxcQyPT"),c=n("U1Iufsob"),h=n("IA3Ku5lS"),a=n("MdYBRjRJ"),i=n("gyRmhZSW"),U=n("vMorKP/N");const O=({url:s="",query:t={}})=>{const e=new(r())(s);return e.query(t),(0,a.DC)(e.resource())},E=(0,h.ei)("core.Users",()=>m().createActions({create:{asyncResult:!0},load:{asyncResult:!0},loadByUsername:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0},changePassword:{asyncResult:!0},createToken:{asyncResult:!0},loadTokens:{asyncResult:!0},deleteToken:{asyncResult:!0},loadUsersPaginated:{asyncResult:!0},loadUsers:{asyncResult:!0},setStatus:{asyncResult:!0}})),l=(0,h.dS)("core.Users",()=>m().createStore({listenables:[E],create(s){const t=(0,a.DC)(c.Z.UsersApiController.create().url),e=(0,_.ZP)("POST",t,s);return E.create.promise(e),e},load(s){const t=(0,a.DC)(c.Z.UsersApiController.load(encodeURIComponent(s)).url),e=(0,_.ZP)("GET",t).then(U.Z.fromJSON);return E.load.promise(e),e},loadByUsername(s){const t=(0,a.DC)(c.Z.UsersApiController.loadByUsername(encodeURIComponent(s)).url),e=(0,_.ZP)("GET",t).then(U.Z.fromJSON);return E.loadByUsername.promise(e),e},update(s,t){const e=(0,a.DC)(c.Z.UsersApiController.update(encodeURIComponent(s)).url),o=(0,_.ZP)("PUT",e,t);return E.update.promise(o),o},delete(s){const t=(0,a.DC)(c.Z.UsersApiController.delete(encodeURIComponent(s)).url),e=(0,_.ZP)("DELETE",t);return E.delete.promise(e),e},changePassword(s,t){const e=(0,a.DC)(c.Z.UsersApiController.changePassword(encodeURIComponent(s)).url),o=(0,_.ZP)("PUT",e,t);return E.changePassword.promise(o),o},createToken(s,t){const e=(0,a.DC)(c.Z.UsersApiController.create_token(encodeURIComponent(s),encodeURIComponent(t)).url),o=(0,_.ZP)("POST",e);return E.createToken.promise(o),o},loadTokens(s){const t=(0,a.DC)(c.Z.UsersApiController.list_tokens(encodeURIComponent(s)).url),e=(0,_.ZP)("GET",t).then(o=>o.tokens);return E.loadTokens.promise(e),e},deleteToken(s,t){const e=(0,a.DC)(c.Z.UsersApiController.delete_token(encodeURIComponent(s),encodeURIComponent(t)).url),o=(0,_.ZP)("DELETE",e);return E.deleteToken.promise(o),o},loadUsers(s={}){const t=O({url:c.Z.UsersApiController.list().url,query:s}),e=(0,_.ZP)("GET",t).then(({users:o})=>R.List(o.map(v=>g.Z.fromJSON(v))));return E.loadUsers.promise(e),e},loadUsersPaginated({page:s,perPage:t,query:e}){const o=(0,i.Z)(c.Z.UsersApiController.paginated().url,s,t,e),v=(0,_.ZP)("GET",(0,a.DC)(o)).then(P=>({adminUser:P.context.admin_user?g.Z.fromJSON(P.context.admin_user):void 0,list:R.List(P.users.map(A=>g.Z.fromJSON(A))),pagination:{page:P.page,perPage:P.per_page,query:P.query,count:P.count,total:P.total}}));return E.loadUsersPaginated.promise(v),v},setStatus(s,t){const e=(0,a.DC)(c.Z.UsersApiController.setStatus(s,t).url),o=(0,_.ZP)("PUT",e);return E.setStatus.promise(o),o}}))}}]);})();

//# sourceMappingURL=1255d548-3601.f0e8d7b3f57ded6a2ae6.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy