web-interface.assets.1255d548-8956.1e63d766fb5fd3de4fbf.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-8956"],{"dan3/ZI+":(f,d,n)=>{n.d(d,{Z:()=>m,_:()=>e._});var e=n("xfUIbHjs");const m=e.Z},P7lYJiUi:(f,d,n)=>{n.d(d,{Z:()=>c});var e=n("Z7aTuO5B"),m=n("E+CaPsQD"),s=n("7dh0vSOR"),E=n("uZqmR+ju"),S=n("/GOzvPf6");const c=()=>e.createElement(E.Row,{className:"content"},e.createElement(E.Col,{xs:12},e.createElement(E.Alert,{bsStyle:"info",title:"Granting Permissions"},"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 ",e.createElement("b",null,e.createElement(S.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 ",e.createElement(s.Z,{page:m.Z.PAGES.PERMISSIONS,text:"documentation"}),".")))},OC6EEUte:(f,d,n)=>{n.d(d,{Z:()=>u});var e=n("Z7aTuO5B"),m=n("/GOzvPf6"),s=n("uZqmR+ju");const E=e.createElement(s.Popover,{id:"role-search-query-help",title:"Search Syntax Help"},e.createElement("p",null,e.createElement("strong",null,"Available search fields")),e.createElement(s.Table,{condensed:!0},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Field"),e.createElement("th",null,"Description"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"name"),e.createElement("td",null,"Role name")),e.createElement("tr",null,e.createElement("td",null,"description"),e.createElement("td",null,"Description of the Role")))),e.createElement("p",null,e.createElement("strong",null,"Examples")),e.createElement("p",null,"Find roles with a description containing creator:",e.createElement("br",null),e.createElement("kbd",null,"description:creator"),e.createElement("br",null))),u=()=>e.createElement(m.Ox,{trigger:"click",rootClose:!0,placement:"right",overlay:E},e.createElement(s.Button,{bsStyle:"link"},e.createElement(m.JO,{name:"question-circle"})))},ynz3ptM5:(f,d,n)=>{n.d(d,{Z:()=>u});var e=n("Z7aTuO5B"),m=n("ty2gyrHp"),s=n("d4kzUuQm"),E=n("uZqmR+ju");const u=({userId:c,userIsReadOnly:T})=>e.createElement(E.ButtonToolbar,null,e.createElement(m.J,{to:s.ZP.SYSTEM.USERS.show(c)},e.createElement(E.Button,{bsStyle:"success"},"View Details")),!T&&e.createElement(m.J,{to:s.ZP.SYSTEM.USERS.edit(c)},e.createElement(E.Button,{bsStyle:"success"},"Edit User")),e.createElement(m.J,{to:s.ZP.SYSTEM.USERS.TOKENS.edit(c)},e.createElement(E.Button,{bsStyle:"success"},"Edit Tokens")))},"5tMkU7QT":(f,d,n)=>{n.d(d,{Z:()=>I});var e=n("Z7aTuO5B"),m=n("UiXZqrDE"),s=n("2dBXfbRP"),E=n("QBkUz07U"),S=n("/GOzvPf6"),u=n("uZqmR+ju"),c=n("2aaiYHqX"),T=n("RCNj0OY4"),A=n("Vmfu2XtV");const I=()=>{const[g,M]=(0,e.useState)(void 0),{enabled:y}=T.Z.telemetry()||{},p=(0,s.U0)();if((0,e.useEffect)(()=>{c.W.get().then(h=>{M(h)})},[]),(0,e.useEffect)(()=>{y&&(g!=null&&g.telemetry_enabled)&&(p!=null&&p.has_opted_out_capturing())&&p.opt_in_capturing()},[y,p,g==null?void 0:g.telemetry_enabled]),!g)return e.createElement(S.$j,null);const Z=h=>{p&&y&&!h.telemetry_enabled&&(p.capture("$opt_out"),p.opt_out_capturing())},N=(h,{setSubmitting:U})=>{Z(h),c.W.update(h).then(()=>{U(!1),window.location.reload()})};return e.createElement(E.Z,{title:"Telemetry"},e.createElement(A.Z,null),e.createElement(m.Formik,{onSubmit:N,initialValues:g},({isSubmitting:h,isValid:U})=>e.createElement(m.Form,{className:"form form-horizontal"},e.createElement(u.Input,{id:"timeout-controls",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",label:"Enable telemetry"},e.createElement(S.Fe,{label:"enabled",name:"telemetry_enabled",disabled:!y,formGroupClassName:"form-group no-bm",type:"checkbox"})),e.createElement(u.Row,{className:"no-bm"},e.createElement(u.Col,{xs:12},e.createElement("div",{className:"pull-right"},e.createElement(u.Button,{bsStyle:"success",disabled:h||!U||!y,title:"Update Preferences",type:"submit"},"Update telemetry")))))))}},"aXQp/Ie7":(f,d,n)=>{n.r(d),n.d(d,{default:()=>Be});var e=n("Z7aTuO5B"),m=n("c9JM82dZ"),s=n("/GOzvPf6"),E=n("E+CaPsQD"),S=n("92lPlKXC"),u=n("3yfJIRSb"),c=n("QBkUz07U"),T=n("2aaiYHqX"),A=n("Vmfu2XtV");const I=()=>{var t;const[l,a]=(0,e.useState)(void 0);return(0,e.useEffect)(()=>{T.W.get().then(r=>{a(r)})},[]),l?e.createElement(c.Z,{title:"Telemetry"},e.createElement(A.Z,null),e.createElement(s.mv,{label:"Telemetry",value:(t=l.telemetry_enabled)!=null?t:!1})):e.createElement(s.$j,null)};var g=n("q2j1bVbz"),M=n("5tMkU7QT"),y=n("CCNXj2ra"),p=n("7GNmVOX8");const Z={enableSmartSearch:!1,updateUnfocussed:!1,searchSidebarIsPinned:!1,dashboardSidebarIsPinned:!1},h=({user:{preferences:t,readOnly:l}})=>{var a;let r=t||Z;if(l){const b={searchSidebarIsPinned:p.Z.get("searchSidebarIsPinned"),dashboardSidebarIsPinned:p.Z.get("dashboardSidebarIsPinned"),[y.eb]:p.Z.get(y.eb)};r={...r,...b}}const{enableSmartSearch:o,updateUnfocussed:i,searchSidebarIsPinned:v,dashboardSidebarIsPinned:O}=r;return e.createElement(c.Z,{title:"Preferences"},e.createElement(s.mv,{label:"Search autocompletion",value:o!=null?o:!1}),e.createElement(s.mv,{label:"Update unfocused",value:i!=null?i:!1}),e.createElement(s.mv,{label:"Pin search sidebar",value:v!=null?v:!1}),e.createElement(s.mv,{label:"Pin dashboard sidebar",value:O!=null?O:!1}),e.createElement(s.mv,{label:"Theme mode",value:(a=r==null?void 0:r[y.eb])!=null?a:"Not configured"}))},X=({user:{username:t,fullName:l,firstName:a,lastName:r,email:o,clientAddress:i,lastActivity:v,sessionActive:O,accountStatus:b,authServiceEnabled:R}})=>{const W=()=>l&&!a&&!r;return e.createElement(c.Z,{title:"Profile"},e.createElement(s.mv,{label:"Username",value:t}),W()&&e.createElement(s.mv,{label:"Full name",value:l}),e.createElement(s.mv,{label:"First Name",value:a}),e.createElement(s.mv,{label:"Last Name",value:r}),e.createElement(s.mv,{label:"E-Mail Address",value:o}),e.createElement(s.mv,{label:"Client Address",value:i}),e.createElement(s.mv,{label:"Last Activity",value:v}),e.createElement(s.mv,{label:"Logged In",value:O}),e.createElement(s.mv,{label:"Enabled",value:b==="enabled",help:!R&&b==="enabled"?"Authentication service is disabled, user cannot log in":""}))};var z=n("Lu0NTOJv"),J=n("dan3/ZI+"),V=n("OC6EEUte");const $=({user:{username:t}})=>{const[l,a]=(0,e.useState)(!1),r=(0,e.useCallback)((o,i)=>(a(!0),z.Z.loadRolesForUser(t,o).then(v=>(i&&a(!1),v))),[t]);return e.createElement(c.Z,{title:"Roles",showLoading:l},e.createElement(J.Z,{noDataText:"No selected roles have been found.",onLoad:r,queryHelper:e.createElement(V.Z,null)}))};var Y=n("Dg7SLLbb"),k=n.n(Y),L=n("d4kzUuQm"),C=n("ty2gyrHp"),q=n("pUKP3+Pg"),ee=n("iSSis/Yq"),te=n("MLDs3jaY");const ne=(t,l)=>{if(t){const a=e.createElement(s.AE,{permissions:["clusterconfigentry:read"]},"(",e.createElement(C.r,{to:L.ZP.SYSTEM.CONFIGURATIONS},"globally set"),")");return e.createElement(e.Fragment,null,t.value," ",t.unitString," ",l&&a)}return"Sessions do not timeout"},le=({type:t,id:l})=>{const[a,r]=(0,e.useState)();if((0,e.useEffect)(()=>{!t||!l||(t==="stream"?q.s3.get(l).then(({title:i})=>r(i)):ee.T.get(l).then(({title:i})=>r(i)))},[l,t]),!t||!l)return e.createElement("span",null,"No start page set");const o=t==="stream"?L.ZP.stream_search(l):L.ZP.dashboard_show(l);return e.createElement(C.r,{to:o},e.createElement("b",null,k()(t)),": ",a)},ae=({user:{timezone:t,serviceAccount:l,sessionTimeout:a,startpage:r}})=>{const o=(0,te.Z)();return e.createElement(c.Z,{title:"Settings"},e.createElement(s.mv,{label:"Sessions Timeout",value:ne(a,o)}),e.createElement(s.mv,{label:"Service Account",value:l}),e.createElement(s.mv,{label:"Timezone",value:t}),e.createElement(s.mv,{label:"Startpage",value:e.createElement(le,{type:r==null?void 0:r.type,id:r==null?void 0:r.id})}))};var D=n("J6y4/h8P"),re=n("VPaD/Np4"),se=n("EregcbZy");const B={searchPaginatedEntitySharesResponse:(t,l,a,r)=>{const o=new Array(l).fill({id:"grn::::stream:57bc9188e62a2373778d9e03",type:"stream",title:"Security Data",owners:[{id:"grn::::user:jane",type:"user",title:"Jane Doe"}]}),i={additionalQueries:r,total:230,count:Math.round(230/l),page:t||1,per_page:l||10,query:a||"",entities:o,context:{grantee_capabilities:{"grn::::stream:57bc9188e62a2373778d9e03":"view"}}};return Promise.resolve({list:re.List(i.entities.map(v=>se.Z.fromJSON(v))),context:{granteeCapabilities:i.context.grantee_capabilities},pagination:{additionalQueries:i.additionalQueries,count:i.count,total:i.total,page:i.page,perPage:i.per_page,query:i.query}})},availableEntityTypes:{stream:"Stream",dashboard:"Dashboard",search:"Saved Search",event_definition:"Event Definition"},availableCapabilities:{own:"Owner",view:"Viewer",manage:"Manager"}};var F=n("uZqmR+ju");const ie=e.createElement(F.Popover,{id:"shared-entities-search-query-help",title:"Search Syntax Help"},e.createElement("p",null,e.createElement("strong",null,"Available search fields")),e.createElement(F.Table,{condensed:!0},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Field"),e.createElement("th",null,"Description"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"Title of a shared entity.")))),e.createElement("p",null,e.createElement("strong",null,"Examples")),e.createElement("p",null,"Find shared entities with a title containing security:",e.createElement("br",null),e.createElement("kbd",null,"title:security"),e.createElement("br",null))),oe=()=>e.createElement(s.Ox,{trigger:"click",rootClose:!0,placement:"right",overlay:ie},e.createElement(F.Button,{bsStyle:"link"},e.createElement(s.JO,{name:"question-circle"}))),ce=(0,D.default)(s.UI)`
display: inline-block;
margin-bottom: 10px;
margin-right: 15px;
`,me=D.default.div`
display: inline-block;
vertical-align: top;
margin-right: 15px;
margin-bottom: 10px;
`,x=D.default.div`
display: inline-flex;
align-items: center;
vertical-align: top;
width: 260px;
margin-left: 10px;
margin-right: 10px;
white-space: nowrap;
`,_=(0,D.default)(s.Ph)`
width: 300px;
margin-left: 10px;
`,Ee=Object.entries(B.availableEntityTypes).map(([t,l])=>({label:l,value:t})),de=Object.entries(B.availableCapabilities).map(([t,l])=>({label:l,value:t})),ue=({onSearch:t,onFilter:l})=>e.createElement(e.Fragment,null,e.createElement(ce,{onReset:()=>t(""),onSearch:t,queryHelpComponent:e.createElement(oe,null),topMargin:0}),e.createElement(me,null,e.createElement(x,null,e.createElement("label",{htmlFor:"entity-type-select"},"Entity Type"),e.createElement(_,{inputId:"entity-type-select",onChange:a=>l("entity_type",a),options:Ee,placeholder:"Filter entity types"})),e.createElement(x,null,e.createElement("label",{htmlFor:"capability-select"},"Capability"),e.createElement(_,{inputId:"capability-select",onChange:a=>l("capability",a),options:de,placeholder:"Filter capabilities"}))));var Q=n("tz1fbBRX"),w=n("0TVxnHwi"),H=n("4E3oowBb");const j=({title:t,entityId:l})=>{const a=(0,Q.Z)(l);return e.createElement(C.r,{to:a},t)},ve=t=>{throw new Error(`Owner of entity has not supported type: ${t}`)},pe=({owner:{type:t,id:l,title:a}})=>{const r=(0,g.Z)();switch(t){case"user":return(0,w.rq)(r.permissions,"users:list")?e.createElement(j,{entityId:l,title:a}):e.createElement("span",null,a);case"team":return(0,w.rq)(r.permissions,"teams:list")?e.createElement(j,{entityId:l,title:a}):e.createElement("span",null,a);case"global":return e.createElement("span",null,"Everyone");default:return ve(t)}},Se=({owners:t})=>{const l=t.sort((a,r)=>(0,H.S)(a.type,r.type)||(0,H.S)(a.title,r.title));return e.createElement("td",{className:"limited"},l.map((a,r)=>{const o=r>=t.size-1;return e.createElement(e.Fragment,{key:a.id},e.createElement(pe,{owner:a}),!o&&", ")}).toArray())},he=({capabilityTitle:t,sharedEntity:{owners:l,title:a,type:r,id:o}})=>{const i=(0,Q.Z)(o);return e.createElement("tr",{key:a+r},e.createElement("td",{className:"limited"},e.createElement(C.r,{to:i},a)),e.createElement("td",{className:"limited"},r),e.createElement(Se,{owners:l}),e.createElement("td",{className:"limited"},t))},ge=["Entity Name","Entity Type","Owner","Capability"],ye={page:1,perPage:10,query:""},Pe=(0,D.default)(s.l9)`
.pagination {
margin: 0;
}
`,fe=(t,{granteeCapabilities:l}={granteeCapabilities:void 0})=>{const a=l==null?void 0:l[t.id],r=B.availableCapabilities[a];return e.createElement(he,{sharedEntity:t,capabilityTitle:r})},Oe=(t,l,a,r)=>{r(!0),l(t).then(o=>{r(!1),a(o)})},be=({entityType:t,searchPaginated:l,setLoading:a})=>{const[r,o]=(0,e.useState)(),[i,v]=(0,e.useState)(ye),{list:O,context:b,pagination:{total:R}={total:0}}=r||{},{page:W,query:Fe,additionalQueries:We}=i;(0,e.useEffect)(()=>Oe(i,l,o,a),[i,l,a]);const Ke=P=>v({...i,query:P}),Ne=(P,K)=>v({...i,query:Fe,additionalQueries:{...We,[P]:K}});return r?e.createElement(e.Fragment,null,e.createElement("p",{className:"description"},"Found ",R," entities which are shared with the ",t,"."),e.createElement(Pe,{activePage:W,totalItems:R,onChange:(P,K)=>v({...i,page:P,perPage:K}),useQueryParameter:!1},e.createElement(s.wQ,{className:"table-hover",customFilter:e.createElement(ue,{onSearch:Ke,onFilter:Ne}),dataRowFormatter:P=>fe(P,b),filterKeys:[],noDataText:e.createElement(s.pJ,null,"No shared entities have been found."),headers:ge,id:"shared-entities",rowClassName:"no-bm",rows:O.toJS(),sortByKey:"type"}))):e.createElement(s.$j,null)};var Te=n("5W3DTPWj");const De=({userId:t})=>{const[l,a]=(0,e.useState)(!1),r=(0,e.useCallback)(o=>Te.Z.loadUserSharesPaginated(t,o),[t]);return e.createElement(c.Z,{title:"Shared Entities",showLoading:l},e.createElement(be,{setLoading:a,entityType:"user",searchPaginated:r}))};var Ue=n("QL8i6bcz");const Ce=({user:t})=>{var l;const a=Ue.G.exports("teams"),r=(l=a==null?void 0:a[0])==null?void 0:l.UserTeamsAssignment;return e.createElement(c.Z,{title:"Teams"},r?e.createElement(r,{user:t,readOnly:!0}):e.createElement(s.VL,{featureName:"teams"}))};var Re=n("P7lYJiUi");const Ae=({user:t})=>{const l=(0,g.Z)(),a=l.id==="local:admin";return t?e.createElement(e.Fragment,null,e.createElement(u.Z,null,e.createElement(s.AE,{permissions:`users:edit:${t.username}`},e.createElement("div",null,e.createElement(X,{user:t}),e.createElement(s.AE,{permissions:"*"},e.createElement(ae,{user:t})),e.createElement(h,{user:t})),e.createElement("div",null,e.createElement(Re.Z,null),e.createElement(s.AE,{permissions:`users:rolesedit:${t.username}`},e.createElement($,{user:t})),e.createElement(s.AE,{permissions:`teams:edit:${t.username}`},e.createElement(Ce,{user:t})),l.id===t.id&&!a&&e.createElement(s.AE,{permissions:`users:edit:${t.username}`},e.createElement(I,null)),l.id===t.id&&a&&e.createElement(s.AE,{permissions:`users:edit:${t.username}`},e.createElement(M.Z,null))))),e.createElement(De,{userId:t.id})):e.createElement(s.$j,null)};var Ie=n("WqhT36Vr"),Me=n("ynz3ptM5");const Ze=({fullName:t})=>e.createElement(e.Fragment,null,"User Details ",t&&e.createElement(e.Fragment,null,"- ",e.createElement("i",null,t))),Le=({params:t})=>{var l,a;const[r,o]=(0,e.useState)(),i=t==null?void 0:t.userId;return(0,e.useEffect)(()=>{S.Z.load(i).then(o)},[i]),e.createElement(s.$4,{title:`User Details ${(l=r==null?void 0:r.fullName)!=null?l:""}`},e.createElement(Ie.Z,null),e.createElement(s.mr,{title:e.createElement(Ze,{fullName:r==null?void 0:r.fullName}),actions:e.createElement(Me.Z,{userId:i,userIsReadOnly:(a=r==null?void 0:r.readOnly)!=null?a:!1}),documentationLink:{title:"Permissions documentation",path:E.Z.PAGES.USERS_ROLES}},e.createElement("span",null,"Overview of details like profile information, settings, teams and roles.")),e.createElement(Ae,{user:i===(r==null?void 0:r.id)?r:void 0}))},Be=(0,m.Z)(Le)},c9JM82dZ:(f,d,n)=>{n.d(d,{Z:()=>E});var e=n("Z7aTuO5B"),m=n("yAXMqwrl");const E=S=>u=>{const c=(0,m.useParams)();return e.createElement(S,{...u,params:c})}}}]);})();
//# sourceMappingURL=1255d548-8956.1e63d766fb5fd3de4fbf.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy