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

web-interface.assets.1255d548-9821.88760b2430a04099d965.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-9821"],{SfPIQIJE:(_,T,e)=>{e.d(T,{Z:()=>P});var t=e("Z7aTuO5B"),a=e("J6y4/h8P"),o=e("uZqmR+ju"),u=e("ty2gyrHp"),r=e("/GOzvPf6"),d=e("NV1/EHMi");const E=(0,a.default)(o.ButtonToolbar)`
  margin-bottom: 10px;
`,m=(0,a.default)(o.Button)(({theme:i})=>(0,a.css)`
  font-family: ${i.fonts.family.navigation};
  font-size: ${i.fonts.size.navigation};

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

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

    &:hover {
      ${(0,d.RF)(i)}
    }

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

      ${(0,d.A7)(i)}

      &:hover,
      &:focus {
        ${(0,d.A7)(i)}
      }
    }
  }
`);m.displayName="Button";const P=({items:i})=>t.createElement(E,null,i.map(({path:v,title:c,permissions:n,exactPathMatch:s})=>v?t.createElement(r.AE,{permissions:n!=null?n:[],key:v},t.createElement(u.J,{to:v,relativeActive:!s},t.createElement(m,{bsStyle:"link"},t.createElement(d.ZP,null,c)))):null))},"1f+2RmbX":(_,T,e)=>{e.d(T,{Z:()=>d});var t=e("ii0bleBb"),a=e.n(t),o=e("Z7aTuO5B"),u=e("4E3oowBb");const r=({pipeline:E,connections:m,streams:O,streamsFormatter:P,noConnectionsMessage:i})=>{const v=m.filter(c=>c.pipeline_ids&&c.pipeline_ids.includes(E.id)).filter(c=>O.some(n=>n.id===c.stream_id)).map(c=>O.find(n=>n.id===c.stream_id)).sort((c,n)=>(0,u.S)(c.title,n.title));return o.createElement("span",null,v.length===0?i:P(v))};r.propTypes={pipeline:a().object.isRequired,connections:a().array.isRequired,streams:a().array.isRequired,streamsFormatter:a().func.isRequired,noConnectionsMessage:a().node},r.defaultProps={noConnectionsMessage:"Pipeline not connected to any streams"};const d=r},ZspbpBGx:(_,T,e)=>{e.d(T,{Z:()=>E});var t=e("Z7aTuO5B"),a=e("SfPIQIJE"),o=e("d4kzUuQm"),u=e("uZqmR+ju");const r=[{title:"Manage pipelines",path:o.ZP.SYSTEM.PIPELINES.OVERVIEW,exactPathMatch:!0},{title:"Manage rules",path:o.ZP.SYSTEM.PIPELINES.RULES},{title:"Simulator",path:o.ZP.SYSTEM.PIPELINES.SIMULATOR}],E=()=>t.createElement(u.Row,null,t.createElement(a.Z,{items:r}))},rwPgmTJe:(_,T,e)=>{e.r(T),e.d(T,{default:()=>w});var t=e("Z7aTuO5B"),a=e("uZqmR+ju"),o=e("/GOzvPf6"),u=e("J6y4/h8P"),r=e("VPaD/Np4"),d=e.n(r),E=e("4E3oowBb"),m=e("ty2gyrHp"),O=e("nKnTKuph"),P=e("d4kzUuQm"),i=e("8fnsnG21"),v=e("pUKP3+Pg"),c=e("RU4i+ZYB"),n=e("ij/cnY+3"),s=e("rVdVsuGH"),l=e("3ndo/hra"),C=e("q2j1bVbz"),p=e("0TVxnHwi"),g=e("CrIFpfDF"),$=e("1f+2RmbX");const F=(0,u.default)(o.l9)`
  .pagination {
    margin: 0;
  }
`,b=u.default.div(({theme:f})=>(0,u.css)`
  font-size: ${f.fonts.size.h3};
  padding: ${f.spacings.xxs} ${f.spacings.sm};
`),j=u.default.div`
  display: flex;
`,A=u.default.div(({$idle:f,theme:h})=>(0,u.css)`
  border: 1px solid ${h.colors.gray[f?"50px":"70px"]};
  border-radius: 4px;
  display: inline-block;
  margin-right: 15px;
  padding: 20px;
  text-align: center;
  width: 120px;
  background-color: ${f?h.utils.colorLevel(h.colors.global.contentBackground,10):h.colors.global.contentBackground};
`),G=u.default.td`
  max-width: 300px;
  overflow-x: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 300px;
`,Y=u.default.td`
  max-width: 150px;
  width: 150px;
  word-wrap: break-word;
`,J=({query:f,onSearch:h})=>t.createElement(o.UI,{query:f,onSearch:h,queryHelpComponent:t.createElement(o.y8,{entityName:"Pipeline"}),wrapperClass:"has-bm",onReset:()=>h(""),topMargin:0}),z=f=>f.map(h=>h.title).join(", "),B=(f,h,S)=>{h(!0),c.o.listPaginated(f).then(y=>{S(y),h(!1)})},x=()=>{const f=(0,C.Z)(),{connections:h}=(0,i.o)(l.V),{page:S,pageSize:y,resetPage:k,setPagination:q}=(0,s.ZP)(),[Z,ee]=(0,t.useState)(""),[K,te]=(0,t.useState)(),[ne,W]=(0,t.useState)(),[se,N]=(0,t.useState)(!1),{list:U=d().List(),pagination:{total:ie=0}={}}=ne||{};if((0,t.useEffect)(()=>{B({page:S,perPage:y,query:Z},N,W),l.q.list(),v.ZP.listStreams().then(te)},[S,y,Z]),!U||!K||!h)return t.createElement(o.$j,null);const oe=D=>{k(),ee(D)},le=t.createElement(j,null,t.createElement(J,{query:Z,onSearch:oe}),se&&t.createElement(b,null,t.createElement(o.$j,{text:"",delay:0}))),ae=D=>{let R;return D==="Actions"&&(R="actions"),t.createElement("th",{className:R},D)},re=(D,R)=>{const L=R.map(M=>M.stage);return U.map(({stages:M})=>M.map(({stage:I})=>I)).reduce((M,I)=>Array.from(new Set([...M,...I])),[]).sort(E.S).map(M=>L.indexOf(M)===-1?t.createElement(A,{key:`${D.id}-stage${M}`,$idle:!0},"Idle"):t.createElement(A,{key:`${D.id}-stage${M}`},"Stage ",M))},ce=D=>()=>{window.confirm(`Do you really want to delete pipeline "${D.title}"? This action cannot be undone.`)&&c.o.delete(D.id).then(()=>{B({page:S,perPage:y,query:Z},N,W),q({page:Math.max(n._.page,S-1)})})},pe=D=>{const{id:R,title:L,description:M,stages:I}=D;return t.createElement("tr",{key:R},t.createElement(G,null,t.createElement(m.r,{to:P.ZP.SYSTEM.PIPELINES.PIPELINE(R),title:L},L),t.createElement("br",null),M,t.createElement("br",null),t.createElement(O.CL,{name:`org.graylog.plugins.pipelineprocessor.ast.Pipeline.${R}.executed`},t.createElement(O.qb,{prefix:"Throughput:",suffix:"msg/s"}))),t.createElement(Y,null,t.createElement($.Z,{pipeline:D,connections:h,streams:K,streamsFormatter:z,noConnectionsMessage:t.createElement("em",null,"Not connected")})),t.createElement("td",null,re(D,I)),t.createElement("td",null,t.createElement(g.Z,null,t.createElement(m.J,{to:P.ZP.SYSTEM.PIPELINES.PIPELINE(R)},t.createElement(a.Button,{disabled:!(0,p.rq)(f.permissions,"pipeline:edit"),bsSize:"xsmall"},"Edit")),t.createElement(a.Button,{disabled:!(0,p.rq)(f.permissions,"pipeline:delete"),bsStyle:"danger",bsSize:"xsmall",onClick:ce(D)},"Delete"))))},de=["Pipeline","Connected to Streams","Processing Timeline","Actions"];return t.createElement("div",null,t.createElement(F,{totalItems:ie},t.createElement(o.wQ,{id:"processing-timeline",className:"table-hover",headers:de,headerCellFormatter:ae,rows:U.toJS(),customFilter:le,filterKeys:[],filterLabel:"Filter Pipelines",noDataText:"No pipelines have been found",dataRowFormatter:pe})))};x.propTypes={};const V=x;var Q=e("E+CaPsQD");const H=()=>{const f=(0,C.Z)();return t.createElement("div",{className:"pull-right"},t.createElement(m.J,{to:P.ZP.SYSTEM.PIPELINES.PIPELINE("new")},t.createElement(a.Button,{disabled:!(0,p.rq)(f.permissions,"pipeline:create"),bsStyle:"success"},"Add new pipeline")))};var X=e("ZspbpBGx");const w=()=>t.createElement(o.$4,{title:"Pipelines"},t.createElement(X.Z,null),t.createElement(o.mr,{title:"Pipelines overview",actions:t.createElement(H,null),documentationLink:{title:"Pipelines documentation",path:Q.Z.PAGES.PIPELINES}},t.createElement("span",null,"Pipelines let you transform and process messages coming from streams. Pipelines consist of stages where rules are evaluated and applied. Messages can go through one or more stages.")),t.createElement(a.Row,{className:"content"},t.createElement(a.Col,{md:12},t.createElement(V,null))))},"ij/cnY+3":(_,T,e)=>{e.d(T,{_:()=>t});const t={page:1,perPage:10,query:""}},"3ndo/hra":(_,T,e)=>{e.d(T,{V:()=>O,q:()=>m});var t=e("JnTtTRmZ"),a=e.n(t),o=e("jAGDuYSC"),u=e("U1Iufsob"),r=e("MdYBRjRJ"),d=e("eFxcQyPT"),E=e("IA3Ku5lS");const m=(0,E.ei)("core.PipelineConnections",()=>a().createActions({list:{asyncResult:!0},connectToStream:{asyncResult:!0},connectToPipeline:{asyncResult:!0}})),O=(0,E.dS)("core.PipelineConnections",()=>a().createStore({listenables:[m],connections:void 0,getInitialState(){return{connections:this.connections}},list(){const P=c=>{o.Z.error(`Fetching pipeline connections failed with status: ${c.message}`,"Could not retrieve pipeline connections")},i=(0,r.DC)(u.Z.ConnectionsController.list().url);(0,d.ZP)("GET",i).then(c=>{this.connections=c,this.trigger({connections:c})},P)},connectToStream(P){const i=(0,r.DC)(u.Z.ConnectionsController.to_stream().url),v={stream_id:P.stream,pipeline_ids:P.pipelines};(0,d.ZP)("POST",i,v).then(n=>{this.connections.filter(s=>s.stream_id===n.stream_id)[0]?this.connections=this.connections.map(s=>s.stream_id===n.stream_id?n:s):this.connections.push(n),this.trigger({connections:this.connections}),o.Z.success("Pipeline connections updated successfully")},this._failUpdateCallback)},connectToPipeline(P){const i=(0,r.DC)(u.Z.ConnectionsController.to_pipeline().url),v={pipeline_id:P.pipeline,stream_ids:P.streams};(0,d.ZP)("POST",i,v).then(n=>{n.forEach(s=>{this.connections.filter(l=>l.stream_id===s.stream_id)[0]?this.connections=this.connections.map(l=>l.stream_id===s.stream_id?s:l):this.connections.push(s)}),this.trigger({connections:this.connections}),o.Z.success("Pipeline connections updated successfully")},this._failUpdateCallback)},_failUpdateCallback(P){o.Z.error(`Updating pipeline connections failed with status: ${P.message}`,"Could not update pipeline connections")}}))},"RU4i+ZYB":(_,T,e)=>{e.d(T,{X:()=>c,o:()=>i});var t=e("JnTtTRmZ"),a=e.n(t),o=e("VPaD/Np4"),u=e.n(o),r=e("jAGDuYSC"),d=e("MdYBRjRJ"),E=e("U1Iufsob"),m=e("eFxcQyPT"),O=e("gyRmhZSW"),P=e("IA3Ku5lS");const i=(0,P.ei)("core.Pipelines",()=>a().createActions({delete:{asyncResult:!0},list:{asyncResult:!0},listPaginated:{asyncResult:!0},get:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},parse:{asyncResult:!0}})),v=n=>{r.Z.error(`Fetching pipelines failed with status: ${n.message}`,"Could not retrieve processing pipelines")},c=(0,P.dS)("core.Pipelines",()=>a().createStore({listenables:[i],pipelines:void 0,getInitialState(){return{pipelines:this.pipelines}},_updatePipelinesState(n){this.pipelines?this.pipelines.some(l=>l.id===n.id)?this.pipelines=this.pipelines.map(l=>l.id===n.id?n:l):this.pipelines.push(n):this.pipelines=[n],this.trigger({pipelines:this.pipelines})},list(){const n=(0,d.DC)(E.Z.PipelinesController.list().url);return(0,m.ZP)("GET",n).then(s=>{this.pipelines=s,this.trigger({pipelines:s})},v)},listPaginated({page:n,perPage:s,query:l}){const C=(0,O.Z)(E.Z.PipelinesController.paginatedList().url,n,s,l),p=(0,m.ZP)("GET",(0,d.DC)(C)).then(g=>({list:u().List(g.pipelines),pagination:{page:g.page,perPage:g.per_page,query:g.query,count:g.count,total:g.total}}));return p.catch(v),i.listPaginated.promise(p),p},get(n){const s=p=>{r.Z.error(`Fetching pipeline failed with status: ${p.message}`,`Could not retrieve processing pipeline "${n}"`)},l=(0,d.DC)(E.Z.PipelinesController.get(n).url);(0,m.ZP)("GET",l).then(this._updatePipelinesState,s)},save(n){const s=g=>{r.Z.error(`Saving pipeline failed with status: ${g.message}`,"Could not save processing pipeline")},l=(0,d.DC)(E.Z.PipelinesController.create().url),C={title:n.title,description:n.description,source:n.source},p=(0,m.ZP)("POST",l,C);p.then(g=>{this._updatePipelinesState(g),r.Z.success(`Pipeline "${C.title}" created successfully`)},s),i.save.promise(p)},update(n){const s=g=>{r.Z.error(`Updating pipeline failed with status: ${g.message}`,"Could not update processing pipeline")},l=(0,d.DC)(E.Z.PipelinesController.update(n.id).url),C={id:n.id,title:n.title,description:n.description,source:n.source},p=(0,m.ZP)("PUT",l,C);p.then(g=>{this._updatePipelinesState(g),r.Z.success(`Pipeline "${C.title}" updated successfully`)},s),i.update.promise(p)},delete(n){const s=p=>{r.Z.error(`Deleting pipeline failed with status: ${p.message}`,`Could not delete processing pipeline "${n}"`)},l=(0,d.DC)(E.Z.PipelinesController.delete(n).url),C=(0,m.ZP)("DELETE",l).then(()=>{const p=this.pipelines||[];this.pipelines=p.filter(g=>g.id!==n),this.trigger({pipelines:this.pipelines}),r.Z.success(`Pipeline "${n}" deleted successfully`)},s);return i.delete.promise(C),C},parse(n,s){const l=(0,d.DC)(E.Z.PipelinesController.parse().url),C={title:n.title,description:n.description,source:n.source};return(0,m.ZP)("POST",l,C).then(()=>{s([])},p=>{p.status===400&&s(p.additional.body)})}}))}}]);})();

//# sourceMappingURL=1255d548-9821.88760b2430a04099d965.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy