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

web-interface.assets.325e2d4b-8443.670dde2f7a8998f0ccb7.js Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["325e2d4b-8443"],{Yh9BWrWE:(e,t,l)=>{l.d(t,{Z:()=>n,_:()=>a._});var a=l("WPWybqGi");const n=a.Z},"1qPKgs3m":(e,t,l)=>{l.d(t,{Z:()=>n});var a=l("J6y4/h8P");const n=a.default.div.withConfig({displayName:"SectionGrid",componentId:"sc-1xfwao3-0"})((e=>{let{$columns:t,theme:l}=e;return(0,a.css)(["display:grid;grid-template-columns:",";grid-column-gap:40px;@media (max-width:","){grid-template-columns:1fr;}"],null!=t?t:"1fr 1fr",l.breakpoints.max.md)}))},r1b5BoLa:(e,t,l)=>{l.d(t,{Z:()=>m});var a=l("Z7aTuO5B"),n=l("4Js8dUPg"),r=l("G9VqAO1I"),s=l("F9olzlTR"),o=l("0zTRKSqx");const m=()=>a.createElement(s.X2,{className:"content"},a.createElement(s.JX,{xs:12},a.createElement(s.bZ,{bsStyle:"info"},a.createElement(o.JO,{name:"info-circle"})," ",a.createElement("b",null,"Granting Permissions"),a.createElement("br",null),"With Graylog 4.0, we've updated the permissions system. Granting permissions for an entity like streams and dashboards is no longer part of the user edit page. It can now be configured using the ",a.createElement("b",null,a.createElement(o.JO,{name:"user-plus"})," Share")," button of an entity. You can find the button e.g. on the entities overview page. Learn more in the ",a.createElement(r.Z,{page:n.Z.PAGES.PERMISSIONS,text:"documentation"}),".")))},"5F+DeP4Z":(e,t,l)=>{l.d(t,{Z:()=>o});var a=l("Z7aTuO5B"),n=l("0zTRKSqx"),r=l("F9olzlTR");const s=a.createElement(r.J2,{id:"role-search-query-help",title:"Search Syntax Help"},a.createElement("p",null,a.createElement("strong",null,"Available search fields")),a.createElement(r.iA,{condensed:!0},a.createElement("thead",null,a.createElement("tr",null,a.createElement("th",null,"Field"),a.createElement("th",null,"Description"))),a.createElement("tbody",null,a.createElement("tr",null,a.createElement("td",null,"name"),a.createElement("td",null,"Role name")),a.createElement("tr",null,a.createElement("td",null,"description"),a.createElement("td",null,"Description of the Role")))),a.createElement("p",null,a.createElement("strong",null,"Examples")),a.createElement("p",null,"Find roles with a description containing creator:",a.createElement("br",null),a.createElement("kbd",null,"description:creator"),a.createElement("br",null))),o=()=>a.createElement(n.Ox,{trigger:"click",rootClose:!0,placement:"right",overlay:s},a.createElement(r.zx,{bsStyle:"link"},a.createElement(n.JO,{name:"question-circle"})))},bG1UaFot:(e,t,l)=>{l.d(t,{Z:()=>o});var a=l("Z7aTuO5B"),n=l("EeAwn/0x"),r=l("DeVaSktS"),s=l("F9olzlTR");const o=e=>{let{userId:t,userIsReadOnly:l}=e;return a.createElement(s.Si,null,a.createElement(n.J,{to:r.ZP.SYSTEM.USERS.show(t)},a.createElement(s.zx,{bsStyle:"success"},"View Details")),!l&&a.createElement(n.J,{to:r.ZP.SYSTEM.USERS.edit(t)},a.createElement(s.zx,{bsStyle:"success"},"Edit User")),a.createElement(n.J,{to:r.ZP.SYSTEM.USERS.TOKENS.edit(t)},a.createElement(s.zx,{bsStyle:"success"},"Edit Tokens")))}},e7CMv98P:(e,t,l)=>{l.r(t),l.d(t,{default:()=>be});var a=l("Z7aTuO5B"),n=l("q/NP8wy0"),r=l("CfS4XPvw"),s=l("4Js8dUPg"),o=l("F95zaCK8"),m=l("0zTRKSqx"),i=l("j7/yTk5n"),c=l("F9olzlTR"),u=l("5sZKlkP8"),d=l("6WrsI6bg");const p=e=>{let{fullName:t}=e;return a.createElement(c.X2,{className:"content"},a.createElement(c.JX,{xs:12},a.createElement(c.bZ,{bsStyle:"danger"},"The selected user ",t," can't be edited.")))};var E=l("UiXZqrDE"),b=l("Z/VRZyyK"),h=l("oLQvydmD"),g=l("ciwMbbCo"),f=l("J6y4/h8P"),v=l("IO2wNQgE"),S=l("OM0gibYa"),y=l("8pZttqbT"),w=l("NxQnyiWl"),N=l("m4MSdocP"),Z=l("xxwliabF");const x=f.default.div.withConfig({displayName:"StartpageFormGroup__Container",componentId:"sc-xve0-0"})(["display:flex;align-items:center;"]),C=(0,f.default)(w.Z).withConfig({displayName:"StartpageFormGroup__TypeSelect",componentId:"sc-xve0-1"})(["width:200px;margin-right:3px;"]),P=(0,f.default)(w.Z).withConfig({displayName:"StartpageFormGroup__ValueSelect",componentId:"sc-xve0-2"})(["width:400px;"]),F=(0,f.default)(c.zx).withConfig({displayName:"StartpageFormGroup__ResetBtn",componentId:"sc-xve0-3"})(["margin-left:5px;"]),I={page:1,perPage:1e4,query:""},U=e=>{let{id:t,title:l}=e;return{value:(a=t,(0,v.CG)(a).id),label:l};var a},R=[{value:"dashboard",label:"Dashboard"},{value:"stream",label:"Stream"}],_=e=>{let{userId:t,permissions:l}=e;const[n,r]=(0,a.useState)(),[s,o]=(0,a.useState)();return(0,a.useEffect)((()=>{l.includes("*")?(N.V.search("",1,0).then((e=>{let{list:t}=e;return r(t.map((e=>{let{id:t,title:l}=e;return{value:t,label:l}})))})),Z.s3.searchPaginated(1,0,"").then((e=>{let{streams:t}=e;return o(t.map((e=>{let{id:t,title:l}=e;return{value:t,label:l}})))}))):S.Z.loadUserSharesPaginated(t,{...I,additionalQueries:{entity_type:"dashboard"}}).then((e=>{let{list:t}=e;return r(t.map(U).toArray())})).then((()=>S.Z.loadUserSharesPaginated(t,{...I,additionalQueries:{entity_type:"stream"}}).then((e=>{let{list:t}=e;return o(t.map(U).toArray())}))))}),[l,t]),s&&n?a.createElement(E.Field,{name:"startpage"},(e=>{var t,l;let{field:{name:r,value:o,onChange:m}}=e;const i=null!==(t=null==o?void 0:o.type)&&void 0!==t?t:"dashboard",u="dashboard"===i?n:s,d=null!=o&&o.id&&u.findIndex((e=>{let{value:t}=e;return t===o.id}))<0?a.createElement(c.bZ,{bsStyle:"warning"},"User is missing permission for the configured page"):null,p=null!=o&&o.type?a.createElement(F,{onClick:()=>m({target:{name:r,value:{}}})},"Reset"):null;return a.createElement(c.II,{id:"startpage",label:"Start page",help:"Select the page the user sees right after log in. Only entities are selectable which the user has permissions for.",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"},a.createElement(a.Fragment,null,a.createElement(x,null,a.createElement(C,{options:R,placeholder:"Select type",onChange:e=>m({target:{name:r,value:{type:e,id:void 0}}}),value:null==o?void 0:o.type}),a.createElement(P,{options:u,placeholder:`Select ${null!==(l=null==o?void 0:o.type)&&void 0!==l?l:"entity"}`,onChange:e=>m({target:{name:r,value:{type:i,id:e}}}),value:null==o?void 0:o.id}),p),d))})):a.createElement(y.Z,null)},T=e=>{let{user:{id:t,timezone:l,sessionTimeoutMs:n,startpage:r,permissions:s,serviceAccount:o},onSubmit:i}=e;return a.createElement(u.Z,{title:"Settings"},a.createElement(E.Formik,{onSubmit:i,initialValues:{timezone:l,session_timeout_ms:n,startpage:r,service_account:o}},(e=>{let{isSubmitting:l,isValid:n}=e;return a.createElement(E.Form,{className:"form form-horizontal"},a.createElement(m.AE,{permissions:"*"},a.createElement(h.Z,null)),a.createElement(b.Z,null),a.createElement(m.AE,{permissions:"user:edit"},a.createElement(g.Z,null)),a.createElement(_,{userId:t,permissions:s}),a.createElement(c.X2,{className:"no-bm"},a.createElement(c.JX,{xs:12},a.createElement("div",{className:"pull-right"},a.createElement(c.zx,{bsStyle:"success",disabled:l||!n,title:"Update Settings",type:"submit"},"Update Settings")))))})))};var z=l("AztyBNMT"),k=l("v4zvXTw+"),J=l("EUJYvlA3"),O=l("bnXosvNb");const A=k.Z.isCloud(),G=A?z.PluginStore.exports("cloud")[0].oktaUserForm:null,q=e=>{let t={};const{password:l,password_repeat:a}=e;if(A&&G){const{validations:{password:e}}=G;t=e(t,l,a)}else t=(0,O.jy)(t,l,a);return t},X=()=>{if(A&&G){const{fields:{password:e}}=G;return a.createElement(e,null)}return a.createElement(a.Fragment,null,a.createElement(m.Fe,{label:"New Password",name:"password",type:"password",help:"Passwords must be at least 6 characters long. We recommend using a strong password.",maxLength:100,minLength:6,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",required:!0}),a.createElement(m.Fe,{label:"Repeat Password",name:"password_repeat",type:"password",minLength:6,maxLength:100,required:!0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}))},V=e=>{let{user:{id:t}}=e;const l=(0,i.Z)();let n=!0;return(0,J.rq)(null==l?void 0:l.permissions,"users:passwordchange:*")&&(n=t===(null==l?void 0:l.id)),a.createElement(u.Z,{title:"Password"},a.createElement(E.Formik,{onSubmit:e=>((e,t)=>{const l={...e};return delete l.password_repeat,o.Z.changePassword(t,l)})(e,t),validate:q,initialValues:{}},(e=>{let{isSubmitting:t,isValid:l}=e;return a.createElement(E.Form,{className:"form form-horizontal"},n&&a.createElement(m.Fe,{label:"Old Password",name:"old_password",type:"password",maxLength:100,required:!0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9"}),a.createElement(X,null),a.createElement(c.X2,{className:"no-bm"},a.createElement(c.JX,{xs:12},a.createElement("div",{className:"pull-right"},a.createElement(c.zx,{bsStyle:"success",disabled:t||!l,title:"Change Password",type:"submit"},"Change Password")))))})))},L=()=>a.createElement(c.bZ,{bsStyle:"info"},a.createElement(m.JO,{name:"info-circle"})," ",a.createElement("b",null," First and Last Name"),a.createElement("br",null),"With Graylog 4.1, we've added distinct first and last name fields. These must be provided before the user’s profile can be saved.");var D=l("hC5fDjBV"),W=l("/xNfZHq7"),B=l("e3NVjFU6");const M=k.Z.isCloud(),K=(0,f.default)(m.mv).withConfig({displayName:"ProfileSection__StyledReadOnlyFormGroup",componentId:"sc-1ppm9ry-0"})(["padding-bottom:15px;"]),Y=e=>{let{user:t,onSubmit:l}=e;const{username:n,fullName:r,firstName:s,lastName:o,email:i}=t,d=()=>r&&!s&&!o;return a.createElement(u.Z,{title:"Profile"},d()&&a.createElement(L,null),a.createElement(E.Formik,{onSubmit:l,initialValues:{email:i,first_name:s,last_name:o}},(e=>{let{isSubmitting:t,isValid:l}=e;return a.createElement(E.Form,{className:"form form-horizontal"},d()&&a.createElement(K,{label:"Full Name",value:r}),a.createElement(D.Z,null),a.createElement(W.Z,null),M?a.createElement(m.mv,{label:"Email",value:i}):a.createElement(m.mv,{label:"Username",value:n}),M?null:a.createElement(B.Z,null),a.createElement(c.X2,{className:"no-bm"},a.createElement(c.JX,{xs:12},a.createElement("div",{className:"pull-right"},a.createElement(c.zx,{bsStyle:"success",disabled:t||!l,title:"Update Profile",type:"submit"},"Update Profile")))))})))};var Q=l("WIRd/2L/"),j=l("fgB0pQcU");const H=e=>{let{user:t}=e;return a.createElement(u.Z,{title:"Preferences"},a.createElement(E.Formik,{onSubmit:e=>j.p.saveUserPreferences(t.username,e),initialValues:t.preferences},(e=>{var l,n;let{isSubmitting:r,isValid:s}=e;return a.createElement(E.Form,{className:"form form-horizontal"},a.createElement(c.II,{id:"timeout-controls",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",label:"Search autocompletion"},a.createElement(m.Fe,{label:"Enable autocompletion",name:"enableSmartSearch",formGroupClassName:"form-group no-bm",type:"checkbox"})),a.createElement(c.II,{id:"update-unfocused-controls",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",label:"Update unfocused"},a.createElement(m.Fe,{label:"Update unfocused",name:"updateUnfocussed",formGroupClassName:"form-group no-bm",type:"checkbox"})),a.createElement(c.II,{id:"search-sidebar-controls",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",label:"Search sidebar"},a.createElement(m.Fe,{label:"Is pinned",name:"searchSidebarIsPinned",formGroupClassName:"form-group no-bm",type:"checkbox",help:"Can also be changed by using the search sidebar pin icon"})),a.createElement(c.II,{id:"dashboard-sidebar-controls",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",label:"Dashboard sidebar"},a.createElement(m.Fe,{label:"Is pinned",name:"dashboardSidebarIsPinned",formGroupClassName:"form-group no-bm",type:"checkbox",help:"Can also be changed by using the dashboard sidebar pin icon"})),a.createElement(m.mv,{label:"Theme mode",value:null!==(l=null===(n=t.preferences)||void 0===n?void 0:n[Q.eb])&&void 0!==l?l:"Not configured",help:"Can be changed by using the toggle in the user dropdown"}),a.createElement(c.X2,{className:"no-bm"},a.createElement(c.JX,{xs:12},a.createElement("div",{className:"pull-right"},a.createElement(c.zx,{bsStyle:"success",disabled:r||!s,title:"Update Preferences",type:"submit"},"Update Preferences")))))})))};var ee=l("VPaD/Np4"),te=l("oyaholW7"),le=l("Yh9BWrWE"),ae=l("DMX9zsXw"),ne=l("5F+DeP4Z");const re=f.default.div.withConfig({displayName:"RolesSection__Container",componentId:"sc-pwhn1b-0"})(["margin-top:15px;margin-bottom:15px;"]),se=e=>{let{user:t,onSubmit:l}=e;const{username:n,id:r}=t,[s,i]=(0,a.useState)(!1),[c,d]=(0,a.useState)(),[p,E]=(0,a.useState)(),b=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le._;return i(!0),te.Z.loadRolesForUser(n,e).then((e=>(i(!1),e)))}),[n]),h=e=>l(e).then((()=>{b().then(d),o.Z.load(r)}));return a.createElement(u.Z,{title:"Roles",showLoading:s},a.createElement("h3",null,"Assign Roles"),a.createElement(re,null,a.createElement(ae.Z,{onSubmit:e=>{const l=t.roles,a=e.map((e=>e.name)),n=l.union(a).toJS();return E(void 0),h({roles:n})},assignedRolesIds:t.roles,identifier:e=>e.name})),a.createElement(m.hW,{onClose:E},p),a.createElement("h3",null,"Selected Roles"),a.createElement(re,null,a.createElement(le.Z,{noDataText:"No selected roles have been found.",onLoad:b,overrideList:c,onDeleteItem:e=>{const l=ee.Set(t.roles.toJS()).remove(e.name).toJS();var a;(a=l).includes("Reader")||a.includes("Admin")?(h({roles:l}),E(void 0)):(E("Roles must at least contain Admin or Reader role."),b().then(d))},queryHelper:a.createElement(ne.Z,null)})))},oe=e=>{var t;let{user:l}=e;const n=z.PluginStore.exports("teams"),r=null==n||null===(t=n[0])||void 0===t?void 0:t.UserTeamsAssignment;return a.createElement(u.Z,{title:"Teams"},r?a.createElement(r,{user:l}):a.createElement(m.VL,{featureName:"teams"}))};var me=l("r1b5BoLa"),ie=l("1qPKgs3m");const ce=(e,t,l,a)=>o.Z.update(l,e,a).then((()=>{l===(null==t?void 0:t.id)&&d.D.reload()})),ue=e=>{let{user:t}=e;const l=(0,i.Z)();return t?t.readOnly?a.createElement(p,{fullName:t.fullName}):a.createElement(ie.Z,null,a.createElement(m.AE,{permissions:`users:edit:${t.username}`},a.createElement("div",null,t.external&&a.createElement(u.Z,{title:"External User"},a.createElement(c.bZ,{bsStyle:"warning"},"This user was synced from an external server, therefore neither the profile nor the password can be changed. Please contact your administrator for more information.")),!t.external&&a.createElement(Y,{user:t,onSubmit:e=>ce(e,l,t.id,t.fullName)}),a.createElement(T,{user:t,onSubmit:e=>ce(e,l,t.id,t.fullName)}),a.createElement(m.AE,{permissions:`users:passwordchange:${t.username}`},!t.external&&a.createElement(V,{user:t})),a.createElement(H,{user:t})),a.createElement("div",null,a.createElement(me.Z,null),a.createElement(m.AE,{permissions:"users:rolesedit"},a.createElement(se,{user:t,onSubmit:e=>ce(e,l,t.id,t.fullName)})),a.createElement(m.AE,{permissions:"teams:edit"},a.createElement(oe,{user:t}))))):a.createElement(m.$j,null)};var de=l("w27weBg9"),pe=l("bG1UaFot");const Ee=e=>{let{fullName:t}=e;return a.createElement(a.Fragment,null,"Edit User ",t&&a.createElement(a.Fragment,null,"- ",a.createElement("i",null,t)))},be=(0,r.Z)((e=>{var t,l;let{params:r}=e;const[i,c]=(0,a.useState)(),u=null==r?void 0:r.userId;(0,a.useEffect)((()=>(e=>n.X.load.completed.listen(e))(c)),[]),(0,a.useEffect)((()=>{o.Z.load(u)}),[u]);const d=null!==(t=null==i?void 0:i.fullName)&&void 0!==t?t:"",p=null!==(l=null==i?void 0:i.readOnly)&&void 0!==l&&l,E=u===(null==i?void 0:i.id)?i:void 0;return a.createElement(m.$4,{title:`Edit User ${d}`},a.createElement(de.Z,null),a.createElement(m.mr,{title:a.createElement(Ee,{fullName:d}),actions:a.createElement(pe.Z,{userId:u,userIsReadOnly:p}),documentationLink:{title:"Permissions documentation",path:s.Z.PAGES.USERS_ROLES}},a.createElement("span",null,"You can change the user details and password here and assign roles and teams.")),a.createElement(ue,{user:E}))}))}}]);
//# sourceMappingURL=325e2d4b-8443.670dde2f7a8998f0ccb7.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy