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

web-interface.assets.bb8c8232-9791.eb2bc37d57a3a959072f.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-9791","bb8c8232-3161"],{"BaXPld/A":(x,y,n)=>{"use strict";n.r(y),n.d(y,{default:()=>W});var r=n("Z7aTuO5B"),k=n("ii0bleBb"),a=n.n(k),m=n("J6y4/h8P"),h=n("CCNXj2ra"),f=n("M41Hih61"),se=n("6BFHGt46"),ie=n("fdJGtgle"),X=n("lt5fqG4I"),j=n("v2kDoRGM");const T=f.Ay,O=(0,m.default)(T)(({$scTheme:e,$height:A,disabled:C})=>(0,m.css)`
  &.ace-queryinput {
    ${A?`height: ${A}px !important`:""}
    min-height: 34px;
    width: 100% !important;
    background-color: ${e.colors.input.background};
    color: ${e.utils.contrastingColor(e.colors.input.background,"AAA")};
    border: 1px solid ${e.colors.input.border};
    border-radius: ${h.Jk};

    &.ace_multiselect .ace_selection.ace_start {
      box-shadow: 0 0 3px 0 ${e.colors.input.background};
    }

    .ace_gutter {
      background: ${e.colors.input.background};
      color: ${e.utils.contrastingColor(e.colors.input.background,"AAA")};
    }

    .ace_print-margin {
      width: 1px;
      background: ${e.colors.input.background};
    }

    .ace_cursor {
      color: ${e.colors.gray[50]};
      display: ${C?"none":"block"} !important;
    }

    .ace_marker-layer .ace_selection {
      background: ${e.colors.variant.lightest.default};
    }

    .ace_marker-layer .ace_step {
      background: ${e.colors.variant.warning};
    }

    .ace_marker-layer .ace_bracket {
      margin: -1px 0 0 -1px;
      border: none;
    }

    .ace_marker-layer .ace_active-line {
      background: ${e.colors.input.background};
    }

    .ace_gutter-active-line {
      background-color: ${e.colors.input.background};
    }

    .ace_marker-layer .ace_selected-word {
      border: 1px solid ${e.colors.gray[80]};
    }

    .ace_invisible {
      color: ${e.colors.input.background};
    }

    .ace_keyword,
    .ace_meta,
    .ace_storage,
    .ace_storage.ace_type,
    .ace_support.ace_type {
      color: ${e.colors.variant.info};
    }

    .ace_keyword.ace_operator {
      color: ${e.colors.global.textDefault};
    }

    .ace_constant.ace_character,
    .ace_constant.ace_language,
    .ace_constant.ace_numeric,
    .ace_keyword.ace_other.ace_unit,
    .ace_support.ace_constant,
    .ace_variable.ace_parameter {
      color: ${e.colors.variant.dark.danger};
    }

    .ace_constant.ace_other {
      color: ${e.colors.variant.default};
    }

    .ace_invalid {
      color: ${e.utils.readableColor(e.colors.brand.primary)};
      background-color: ${e.colors.brand.primary};
    }

    .ace_invalid.ace_deprecated {
      color: ${e.utils.readableColor(e.colors.brand.primary)};
      background-color: ${e.colors.variant.dark.primary};
    }

    .ace_fold {
      background-color: ${e.colors.variant.info};
      border-color: ${e.utils.contrastingColor(e.colors.input.background,"AAA")};
    }

    .ace_entity.ace_name.ace_function,
    .ace_support.ace_function,
    .ace_variable,
    .ace_term {
      color: ${e.colors.variant.darker.info};
    }

    .ace_support.ace_class,
    .ace_support.ace_type {
      color: ${e.colors.variant.dark.warning};
    }

    .ace_heading,
    .ace_markup.ace_heading,
    .ace_string {
      color: ${e.colors.variant.dark.success};
    }

    .ace_entity.ace_name.ace_tag,
    .ace_entity.ace_other.ace_attribute-name,
    .ace_meta.ace_tag,
    .ace_string.ace_regexp,
    .ace_variable {
      color: ${e.colors.brand.primary};
    }

    .ace_comment {
      color: ${e.colors.gray[60]};
    }

    .ace_indent-guide {
      background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==') right repeat-y;
    }

    .ace_placeholder {
      left: 0;
      right: 0;
      padding: 0;
      margin-top: 6px;
      margin-left: 4px;
      margin-right: 4px;
      transform: none;
      opacity: 1;
      z-index: auto !important;
      font-family: ${e.fonts.family.monospace} !important;
      font-size: ${e.fonts.size.body};
      color: ${e.colors.input.placeholder};
      text-overflow: ellipsis;
      max-width: 100%;
      overflow: hidden;
    }

    .ace_marker {
      border-bottom: 2px dashed;
      position: absolute;
      border-radius: 0;
      margin-top: 1px;
    }

    .ace_marker.ace_validation_error {
      border-color: ${e.colors.variant.danger};
    }

    .ace_marker.ace_validation_warning {
      border-color: ${e.colors.variant.dark.warning};
    }
  }
`),V="ace-queryinput",D=e=>!e.disabled,Q=e=>e.disabled,w=(e,A)=>{const C="ace_marker",B=(S=[],$="")=>S.map(({beginLine:H,beginColumn:R,endLine:F,endColumn:L})=>({startRow:H,startCol:R,endRow:F,endCol:L,type:"text",className:$}));return[...B(e==null?void 0:e.explanations,`${C} ace_validation_error`),...B(A==null?void 0:A.explanations,`${C} ace_validation_warning`)]},M=(0,r.forwardRef)((e,A)=>{const{className:C,disabled:B,error:S,height:$,maxLines:H,placeholder:R,value:F,warning:L,wrapEnabled:z,onLoad:N,inputId:P}=e,Z=(0,m.useTheme)(),Y=(0,r.useMemo)(()=>w(S,L),[S,L]),q=(0,r.useCallback)(o=>{o&&(o.renderer.setScrollMargin(7,6),o.renderer.setPadding(12),P&&o.textInput.getElement().setAttribute("id",P),N==null||N(o))},[P,N]),K=(0,r.useMemo)(()=>({$blockScrolling:1/0,selectionStyle:"line"}),[]),_=(0,r.useMemo)(()=>({indentedSoftWrap:!1}),[]),t={$height:$,$scTheme:Z,theme:V,className:`${C} ${V}`,disabled:B,editorProps:K,fontSize:Z.fonts.size.small,highlightActiveLine:!1,markers:Y,maxLines:H,minLines:1,mode:"lucene",name:"QueryEditor",placeholder:R,readOnly:B,ref:A,setOptions:_,showGutter:!1,showPrintMargin:!1,value:F,wrapEnabled:z,onLoad:q};if(Q(e))return r.createElement(O,{...t,disabled:!0});if(D(e)){const{onBlur:o,onChange:c,enableAutocompletion:s}=e;return r.createElement(O,{...t,enableBasicAutocompletion:s,enableLiveAutocompletion:s,onBlur:o,onChange:c})}return null});M.propTypes={className:a().string,disabled:a().bool,enableAutocompletion:a().bool,error:a().any,height:a().number,inputId:a().string,maxLines:a().number,onBlur:a().func,onChange:a().func,onLoad:a().func,placeholder:a().string,value:a().string,warning:a().any,wrapEnabled:a().bool},M.defaultProps={className:"",disabled:!1,enableAutocompletion:!1,error:void 0,height:void 0,inputId:void 0,maxLines:4,onBlur:void 0,onChange:void 0,onLoad:void 0,placeholder:"",value:"",warning:void 0,wrapEnabled:!0};const W=r.memo(M)},myDR0xOD:(x,y,n)=>{"use strict";n.r(y),n.d(y,{default:()=>_});var r=n("Z7aTuO5B"),k=n("ii0bleBb"),a=n.n(k),m=n("oc9db6Tt"),h=n.n(m),f=n("J6y4/h8P"),se=n("lN93Sbbu"),ie=n("baf4E2h0"),X=n("9kZNWwre"),j=n("nxMFMmDQ"),T=n("PwTFiGSp"),de=n("0hhBr0/b"),O=n("O/XpfGnR"),V=n("a5C0HdYb"),D=n("nUqpNf+1"),Q=n("ZgnHE8Va"),w=n("D/X+X5ed"),M=n("BaXPld/A"),W=n("PpCK0BgN"),e=n.n(W),A=n("93hVSLoV"),C=n.n(A);const B=t=>{console.warn("Exception thrown in completer: ",t)},S=(t,o)=>{let c=0;for(let s=0;s<=o.row;s+=1){const l=t.getTokens(s);if(s===o.row){const i=t.getTokenAt(o.row,o.column),p=l.findIndex(d=>d===i);c+=p}else c+=l.length}return c},$=(t,o)=>{var c;const s=t.getLength(),l=[...Array(s).keys()].map((u,v)=>t.getTokens(v)).filter(u=>!!(u!=null&&u.length)).flat(),i=S(t,o),p=l[i],d=(c=l[i-1])!=null?c:null;return{tokens:l,currentTokenIdx:i,currentToken:p,prevToken:d}};class H{constructor(o,c,s,l,i,p){this.getCompletions=async(d,u,v,E,b)=>{const{tokens:ee,currentToken:te,currentTokenIdx:ne,prevToken:I}=$(d.session,v),J=await Promise.all(this.completers.map(async ae=>{var G;try{return await ae.getCompletions({currentToken:te,prevToken:I,prefix:E,tokens:ee,currentTokenIdx:ne,commandArgs:(G=u==null?void 0:u.curOp)==null?void 0:G.args,timeRange:this.timeRange,streams:this.streams,fieldTypes:this.fieldTypes,userTimezone:this.userTimezone,view:this.view})}catch(re){B(re)}return[]})),oe=C()(e()(J.flat(),["score","name"]),"name");b(null,oe)},this.completers=o,this.timeRange=c,this.streams=s,this.fieldTypes=l,this.userTimezone=i,this.view=p}get identifierRegexps(){return this.completers.map(o=>{var c;return(c=o.identifierRegexps)!=null?c:[]}).flat()}}const R=(...t)=>new H(...t),F=(0,f.createGlobalStyle)`
  .ace_editor.ace_autocomplete {
    width: ${t=>{var o;return((o=t.$width)!=null?o:600)-12}}px !important;
    left: ${t=>{var o;return((o=t.$offsetLeft)!=null?o:143)+7}}px !important;
  }
`,L=f.default.div(({$hasValue:t})=>(0,f.css)`
  width: 100%;

  .ace_hidden-cursors {
    display: ${t?"block":"none"};
  }
`),z=()=>{ie.A.displayValidationErrors()},N=({editor:t,onExecute:o,value:c,error:s,disableExecution:l,isValidating:i,validate:p})=>{const d=()=>{t!=null&&t.completer&&t.completer.popup&&t.completer.detach(),o(c)};if(i){p().then(u=>{h()(u)?d():z()});return}s&&z(),!(l||s)&&d()},P=(t,o)=>{t&&(t.commands.removeCommands(["find","indent","outdent"]),t.session.on("tokenizerUpdate",()=>{var c;t.isFocused()&&!((c=t.completer)!=null&&c.activated)&&t.getValue()&&!o.current&&(0,Q.R)(t),o.current&&(o.current=!1)}))},Z=(t,o,c,s)=>{const l=t==null?void 0:t.editor;s&&l&&(s.current=l),l&&(l.commands.on("afterExec",()=>{var i,p,d;(i=l.completer)!=null&&i.autoSelect&&(l.completer.autoSelect=!1);const u=(d=(p=l.completer)==null?void 0:p.keyboardHandler)==null?void 0:d.commandKeyBinding;u!=null&&u.tab&&u.tab.name!=="improved-tab"&&l.completer.keyboardHandler.addCommand({name:"improved-tab",bindKey:{win:"Tab",mac:"Tab"},exec:v=>{const E=v.completer.insertMatch();return!E&&!v.tabstopManager?(v.completer.goTo("down"),v.completer.insertMatch()):E}})}),c.forEach(i=>l.commands.addCommand(i)),l.completers=[o])},Y=({streams:t,timeRange:o,completerFactory:c,view:s})=>{const{userTimezone:l}=(0,O.A)(),i=(0,de.A)("views.completers"),{data:p}=(0,X.A)(t,(0,T.EZ)(o)?j.Zl:o),{data:d}=(0,X.A)([],j.Zl),u=(0,r.useMemo)(()=>{const v=Object.fromEntries((p!=null?p:[]).map(b=>[b.name,b]));return{all:Object.fromEntries((d!=null?d:[]).map(b=>[b.name,b])),query:v}},[d,p]);return(0,r.useMemo)(()=>c(i!=null?i:[],o,t,u,l,s),[c,i,o,t,u,l,s])},q=()=>{const t={enabled:!1};(0,w.Ay)({scope:"query-input",actionKey:"submit-search",options:t}),(0,w.Ay)({scope:"query-input",actionKey:"insert-newline",options:t}),(0,w.Ay)({scope:"query-input",actionKey:"create-search-filter",options:t}),(0,w.Ay)({scope:"query-input",actionKey:"show-suggestions",options:t}),(0,w.Ay)({scope:"query-input",actionKey:"show-history",options:t})},K=r.forwardRef(({className:t,commands:o,completerFactory:c=R,disableExecution:s,error:l,height:i,inputId:p,isValidating:d,maxLines:u,onBlur:v,onChange:E,onExecute:b,placeholder:ee,streams:te,timeRange:ne,value:I,validate:J,warning:oe,wrapEnabled:ae,name:G,view:re},me)=>{var ue;const le=(0,r.useRef)(null),U=(ue=le.current)==null?void 0:ue.container,{width:fe}=(0,V.A)(U),ye=(0,r.useRef)(!0),{enableSmartSearch:ve}=(0,r.useContext)(se.A),ge=Y({streams:te,timeRange:ne,completerFactory:c,view:re}),xe=(0,r.useCallback)(g=>P(g,ye),[]),ce=(0,r.useCallback)(g=>N({editor:g,onExecute:b,value:I,error:l,disableExecution:s,isValidating:d,validate:J}),[b,I,l,s,d,J]),pe=(0,r.useMemo)(()=>[...o,{name:"Execute",bindKey:{win:"Enter",mac:"Enter"},exec:ce},{name:"Show completions",bindKey:{win:"Alt-Space",mac:"Alt-Space"},exec:async g=>{if(g.getValue()){(0,Q.R)(g);return}await(0,D.C)(g)}},{name:"Show query history",bindKey:{win:"Alt-Shift-H",mac:"Alt-Shift-H"},exec:async g=>{(0,D.C)(g)}},{name:"Do nothing",bindKey:{win:"Ctrl-Space|Ctrl-Shift-Space",mac:"Ctrl-Space|Ctrl-Shift-Space"},exec:()=>{}}],[o,ce]),he=(0,r.useCallback)(g=>Z(g,ge,pe,le),[pe,ge]),be=(0,r.useCallback)(g=>(E({target:{value:g,name:G}}),Promise.resolve(g)),[G,E]);q(),(0,r.useImperativeHandle)(me,()=>le.current,[]);const ke=(0,r.useMemo)(()=>{var g;return(g=U==null?void 0:U.getBoundingClientRect())==null?void 0:g.left},[U]);return r.createElement(L,{$hasValue:!!I},r.createElement(F,{$width:fe,$offsetLeft:ke}),r.createElement(M.default,{height:i,className:t,disabled:!1,enableAutocompletion:ve,error:l,inputId:p,warning:oe,maxLines:u,onBlur:v,onExecute:ce,onChange:be,onLoad:xe,placeholder:ee,ref:he,value:I,wrapEnabled:ae}))});K.propTypes={className:a().string,completerFactory:a().func,disableExecution:a().bool,error:a().any,inputId:a().string,height:a().number,isValidating:a().bool.isRequired,maxLines:a().number,onBlur:a().func,onChange:a().func.isRequired,onExecute:a().func.isRequired,placeholder:a().string,streams:a().array,timeRange:a().object,value:a().string,warning:a().any,wrapEnabled:a().bool,validate:a().func.isRequired},K.defaultProps={className:"",commands:[],completerFactory:R,disableExecution:!1,error:void 0,height:void 0,inputId:void 0,maxLines:void 0,onBlur:void 0,placeholder:"",streams:void 0,timeRange:void 0,value:"",warning:void 0,wrapEnabled:void 0,view:void 0};const _=K},"6BFHGt46":()=>{ace.define("ace/theme/ace-queryinput",["require","exports","module","ace/lib/dom"],(x,y)=>{y.isDark=!1,y.cssClass="ace-queryinput",x("../lib/dom").importCssString(y.cssText,y.cssClass)})},lt5fqG4I:(x,y,n)=>{x=n.nmd(x),ace.define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(r,k)=>{const a=r("../lib/oop"),{TextHighlightRules:m}=r("./text_highlight_rules"),h=function(){this.$rules={start:[{token:"constant.language.escape",regex:/\\[-+&|!(){}[\]^"~*?:\\]/},{token:"constant.character.negation",regex:"\\-"},{token:"constant.character.interro",regex:"\\?"},{token:"constant.character.required",regex:"\\+"},{token:"constant.character.asterisk",regex:"\\*"},{token:"constant.character.proximity",regex:"~(?:0\\.[0-9]+|[0-9]+)?"},{token:"keyword.operator",regex:"(AND|OR|NOT|TO)\\b"},{token:f=>[{type:"paren.lparen",value:f}],regex:"[\\(\\{\\[]"},{token:f=>[{type:"paren.rparen",value:f}],regex:"[\\)\\}\\]]"},{token:"keyword.operator",regex:/[><=^]/},{token:"constant.numeric",regex:/\d[\d.-]*/},{token:"string",regex:/"(?:\\"|[^"])*"/},{token:"keyword",regex:/(?:\\.|[^\s\-+&|!(){}[\]^"~*?:\\])+:/,next:"maybeRegex"},{token:"term",regex:/[\w\\/]+/},{token:"text",regex:/\s+/}],maybeRegex:[{token:"text",regex:/\s+/},{token:"string.regexp.start",regex:"/",next:"regex"},{regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp.end",regex:"/[sxngimy]*",next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.escape",regex:"|[~&@]"},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"start"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"start"},{defaultToken:"string.regexp.charachterclass"}]}};a.inherits(h,m),k.LuceneHighlightRules=h}),ace.define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"],(r,k)=>{const a=r("../lib/oop"),m=r("./text").Mode,{LuceneHighlightRules:h}=r("./lucene_highlight_rules"),f=function(){this.HighlightRules=h,this.$behaviour=this.$defaultBehaviour};a.inherits(f,m),function(){this.$id="ace/mode/lucene"}.call(f.prototype),k.Mode=f}),function(){ace.require(["ace/mode/lucene"],r=>{x&&(x.exports=r)})}()},"93hVSLoV":(x,y,n)=>{var r=n("JF7TaIvC"),k=n("VHLeKS5G");function a(m,h){return m&&m.length?k(m,r(h,2)):[]}x.exports=a}}]);})();

//# sourceMappingURL=bb8c8232-9791.eb2bc37d57a3a959072f.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy