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

web-interface.assets.bb8c8232-4297.f2158f4c3614289dc175.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-4297"],{SfPIQIJE:(T,u,n)=>{n.d(u,{A:()=>h});var e=n("Z7aTuO5B"),c=n("J6y4/h8P"),m=n("rIl5IEuP"),v=n("ty2gyrHp"),a=n("IOI9nV80"),r=n("NV1/EHMi");const o=(0,c.default)(m.ButtonToolbar)`
  margin-bottom: 10px;
`,g=(0,c.default)(m.Button)(({theme:d})=>(0,c.css)`
  font-family: ${d.fonts.family.navigation};
  font-size: ${d.fonts.size.navigation};
  color: ${d.colors.variant.darker.default};
  
  &:hover,
  &:focus {
    background: inherit;
    text-decoration: none;
  }

  &:hover {
    color: inherit;
    ${(0,r.WS)(d)}
  }

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

    ${(0,r.at)(d)}

    &:hover,
    &:focus {
      ${(0,r.at)(d)}
    }
`);g.displayName="Button";const h=({items:d})=>e.createElement(o,null,d.map(({path:P,title:I,permissions:D,exactPathMatch:M})=>P?e.createElement(a.Wj,{permissions:D!=null?D:[],key:P},e.createElement(v.m,{to:P,relativeActive:!M},e.createElement(g,{bsStyle:"link"},e.createElement(r.Ay,null,I)))):null))},"1VlHrt00":(T,u,n)=>{n.d(u,{A:()=>o});var e=n("Z7aTuO5B"),c=n("J6y4/h8P"),m=n("rIl5IEuP");const v=c.default.td`
  max-width: 300px;
`,a=(0,c.default)(m.Label)`
  margin-right: 5px;
  margin-bottom: 5px;
  display: inline-block;
  padding: 4px 6px;
`,o=({roles:g})=>e.createElement(v,null,g.map(p=>e.createElement(a,{key:p,bsStyle:p==="Admin"?"info":"default"},p)).toArray())},"4APrn2Dx":(T,u,n)=>{n.d(u,{A:()=>r});var e=n("Z7aTuO5B"),c=n("rlwexfKi");const m=e.createElement("p",null,"Find users with a email containing example.com:",e.createElement("br",null),e.createElement("kbd",null,"email:example.com"),e.createElement("br",null)),v={full_name:"The full name of a user",username:"The users login username.",email:"The users email."},r=()=>e.createElement(c.A,{example:m,commonFields:[],fieldMap:v,entityName:"user"})},WqhT36Vr:(T,u,n)=>{n.d(u,{A:()=>r});var e=n("Z7aTuO5B"),c=n("d4kzUuQm"),m=n("SfPIQIJE"),v=n("rIl5IEuP");const r=()=>{const o=[{title:"Users Overview",path:c.Ay.SYSTEM.USERS.OVERVIEW,permissions:"users:list"},{title:"Teams Overview",path:c.Ay.getPluginRoute("SYSTEM_TEAMS"),permissions:"teams:list"}];return e.createElement(v.Row,null,e.createElement(m.A,{items:o}))}},"+3+DnmaH":(T,u,n)=>{n.r(u),n.d(u,{default:()=>me});var e=n("Z7aTuO5B"),c=n("ty2gyrHp"),m=n("d4kzUuQm"),v=n("E+CaPsQD"),a=n("rIl5IEuP"),r=n("IOI9nV80"),o=n("J6y4/h8P"),g=n("92lPlKXC"),p=n("cSDA0Pof"),h=n("q2j1bVbz"),d=n("rVdVsuGH"),P=n("1VlHrt00"),I=n("MdYBRjRJ"),D=n("8OvTct/Z"),M=n("0t7Ye+61"),L=n("v4GbOr/o");const W=(0,o.default)(a.ButtonToolbar)`
  display: flex;
  justify-content: flex-end;
`,B=({user:{fullName:t,id:s},wrapperComponent:l})=>e.createElement(c.m,{to:m.Ay.SYSTEM.USERS.TOKENS.edit(s)},e.createElement(l,{id:`edit-tokens-${s}`,bsSize:"xs",title:`Edit tokens of user ${t}`},"Edit tokens")),N=({user:t})=>{const s=e.createElement(e.Fragment,null,"System users can only be modified in the Graylog configuration file.");return e.createElement(e.Fragment,null,e.createElement(r.N,{placement:"left",overlay:s,trigger:["hover"]},e.createElement(a.Button,{bsSize:"xs",bsStyle:"info",disabled:!0},"System user")),e.createElement(B,{user:t,wrapperComponent:a.Button}))},$=({user:t,user:{username:s,id:l,fullName:i,accountStatus:y,external:O,readOnly:C}})=>{const U=(0,h.A)(),E=(0,D.A)(),{pathname:f}=(0,M.A)(),A=()=>{if(y==="enabled"){E(L.g.USERS.USER_DISABLED,{app_pathname:(0,I.i)(f),app_action_value:"user-item-disable"}),window.confirm(`Do you really want to disable user ${i}? All current sessions will be terminated.`)&&g.A.setStatus(l,"disabled");return}g.A.setStatus(l,"enabled"),E(L.g.USERS.USER_ENABLED,{app_pathname:(0,I.i)(f),app_action_value:"user-item-enable"})},S=()=>{E(L.g.USERS.USER_DELETED,{app_pathname:(0,I.i)(f),app_action_value:"user-item-delete"}),window.confirm(`Do you really want to delete user ${i}?`)&&g.A.delete(l,i)},R=!O&&!C&&(U==null?void 0:U.id)!==l;return e.createElement(e.Fragment,null,e.createElement(r.Wj,{permissions:[`users:edit:${s}`]},e.createElement(c.m,{to:m.Ay.SYSTEM.USERS.edit(l)},e.createElement(a.Button,{id:`edit-user-${l}`,bsSize:"xs",title:`Edit user ${i}`},"Edit"))),e.createElement(a.DropdownButton,{bsSize:"xs",title:"More actions",pullRight:!0,id:`delete-user-${l}`},e.createElement(B,{user:t,wrapperComponent:a.MenuItem}),e.createElement(r.Wj,{permissions:[`users:edit:${s}`]},R&&e.createElement(a.MenuItem,{id:`set-status-user-${l}`,onClick:A,title:`Set new account status for ${i}`},y==="enabled"?"Disable":"Enable"),e.createElement(a.MenuItem,{id:`delete-user-${l}`,title:`Delete user ${i}`,onClick:S},"Delete"))))},K=({user:t})=>e.createElement("td",null,e.createElement(W,null,t.readOnly?e.createElement(N,{user:t}):e.createElement($,{user:t}))),F=o.default.div(({theme:t,$active:s})=>(0,o.css)`
  color: ${s?t.colors.variant.success:t.colors.variant.default};
`),H=({active:t,...s})=>e.createElement(F,{$active:t},e.createElement(r.In,{...s,name:t?"check_circle":"cancel"})),Q=o.default.td`
  width: 35px;
  text-align: right;
  position: relative;
`,z=({lastActivity:t,sessionActive:s,clientAddress:l})=>e.createElement(Q,null,e.createElement(r.N,{trigger:["hover","focus"],placement:"right",title:s?"Logged in":void 0,overlay:s?e.createElement(e.Fragment,null,e.createElement("div",null,"Last activity: ",t?e.createElement(r.sR,{dateTime:t}):"-"),e.createElement("div",null,"Client address: ",l!=null?l:"-")):e.createElement(e.Fragment,null,"Not logged in"),rootClose:!0},e.createElement(H,{active:s})));var V=n("N1QxzyxS");const Y=o.default.div(({theme:t,$enabled:s})=>(0,o.css)`
  color: ${s?t.colors.variant.success:t.colors.variant.default};
`),j=o.default.td`
  width: 35px;
  text-align: center;
`,G=({accountStatus:t,authServiceEnabled:s})=>e.createElement(j,null,e.createElement(V.A,{withArrow:!0,position:"right",label:e.createElement(e.Fragment,null,`User is ${t}`,s?"":" (authentication service is disabled)")},e.createElement(Y,{$enabled:s&&t==="enabled"},e.createElement(r.In,{name:t==="enabled"?"check_circle":"cancel"})))),J=({user:t,user:{id:s,clientAddress:l,email:i,fullName:y,lastActivity:O,sessionActive:C,username:U,roles:E,accountStatus:f,authServiceEnabled:A},isActive:S})=>e.createElement("tr",{key:U,className:S?"active":""},e.createElement(z,{lastActivity:O,sessionActive:C,clientAddress:l}),e.createElement("td",{className:"limited"},e.createElement(c.N,{to:m.Ay.SYSTEM.USERS.show(s)},y)),e.createElement("td",{className:"limited"},U),e.createElement("td",{className:"limited"},i),e.createElement("td",{className:"limited"},l),e.createElement(G,{accountStatus:f,authServiceEnabled:A}),e.createElement(P.A,{roles:E}),e.createElement(K,{user:t}));var Z=n("4APrn2Dx");const X=({onSearch:t})=>e.createElement(r.B9,{onSearch:t,wrapperClass:"has-bm",onReset:()=>t(""),queryHelpComponent:e.createElement(Z.A,null),topMargin:0});var k=n("eGqpLdeU");const q=(0,o.default)(r.In)`
  cursor: help;
`,ee=({title:t})=>{const[s,{toggle:l}]=(0,k.j)(!1);return e.createElement("th",null,t,e.createElement(r.m_,{opened:s,withArrow:!0,label:"The address of the client used to initially establish the session, not necessarily its current address."},e.createElement(a.Button,{bsStyle:"link",onClick:l},e.createElement(q,{name:"help"}))))},te=({adminUser:t,dataRowFormatter:s,headers:l,headerCellFormatter:i})=>e.createElement(a.Row,{className:"content"},e.createElement(a.Col,{xs:12},e.createElement("h2",null,"System Administrator"),e.createElement("p",{className:"description"},"The system administrator can only be edited in the Graylog configuration file."),e.createElement(r.bQ,{id:"users-overview",className:"table-hover",headers:l,headerCellFormatter:i,sortByKey:"fullName",rows:[t],dataRowFormatter:s,filterKeys:[]}))),b=["","Full name","Username","E-Mail Address","Client Address","Enabled","Role","Actions"],ne=o.default.div`
  .data-table {
    overflow-x: visible;
  }
`,se=o.default.div`
  display: flex;
  align-items: center;
`,le=(0,o.default)(r.y$)(({theme:t})=>(0,o.css)`
  margin-left: 10px;
  font-size: ${t.fonts.size.h3};
`),re=(0,o.default)(r.OW)`
  .pagination {
    margin: 0;
  }
`,x=t=>{switch(t.toLowerCase()){case"client address":return e.createElement(ee,{title:t});case"actions":return e.createElement("th",{className:"actions text-right"},t);default:return e.createElement("th",null,t)}},w=(t,s,l)=>{s(!0),g.A.loadUsersPaginated(t).then(i=>{l(i),s(!1)})},ae=(t,s,l,i)=>p.M.delete.completed.listen(()=>{w(t,s,l),i()}),oe=(t,s,l)=>p.M.setStatus.completed.listen(()=>w(t,s,l)),_=t=>s=>{const{id:l}=s;return e.createElement(J,{user:s,isActive:(t==null?void 0:t.id)===l})},ie=()=>{const{page:t,pageSize:s,resetPage:l}=(0,d.Ay)(),i=(0,h.A)(),[y,O]=(0,e.useState)(),[C,U]=(0,e.useState)(!1),[E,f]=(0,e.useState)(""),{list:A,adminUser:S,pagination:{total:R=0}={}}=y||{};if((0,e.useEffect)(()=>w({page:t,perPage:s,query:E},U,O),[t,s,E]),(0,e.useEffect)(()=>ae({page:t,perPage:s,query:E},U,O,l),[t,s,E,l]),(0,e.useEffect)(()=>oe({page:t,perPage:s,query:E},U,O),[t,s,E]),!A)return e.createElement(r.y$,null);const Ee=ue=>{l(),f(ue)},de=e.createElement(X,{onSearch:Ee});return e.createElement(ne,null,S&&e.createElement(te,{adminUser:S,dataRowFormatter:_(i),headerCellFormatter:x,headers:b}),e.createElement(a.Row,{className:"content"},e.createElement(a.Col,{xs:12},e.createElement(se,null,e.createElement("h2",null,"Users"),C&&e.createElement(le,{text:"",delay:0})),e.createElement("p",{className:"description"},"Found ",R," registered users on the system."),e.createElement(re,{totalItems:R},e.createElement(r.bQ,{id:"users-overview",className:"table-hover",rowClassName:"no-bm",headers:b,headerCellFormatter:x,sortByKey:"fullName",noDataText:e.createElement(r.EO,null,"No users have been found."),rows:A.toJS(),customFilter:de,dataRowFormatter:_(i),filterKeys:[],filterLabel:"Filter Users"})))))};var ce=n("WqhT36Vr");const me=()=>e.createElement(r.Qc,{title:"Users Overview"},e.createElement(ce.A,null),e.createElement(r.zY,{title:"Users Overview",actions:e.createElement(c.m,{to:m.Ay.SYSTEM.USERS.CREATE},e.createElement(a.Button,{bsStyle:"success"},"Create user")),documentationLink:{title:"Permissions documentation",path:v.A.PAGES.USERS_ROLES}},e.createElement("span",null,"Overview of Graylog's registered users.")),e.createElement(ie,null))}}]);})();

//# sourceMappingURL=bb8c8232-4297.f2158f4c3614289dc175.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy