web-interface.assets.07ba022f-5716.064068770ab1cb53c732.js Maven / Gradle / Ivy
(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["07ba022f-5716","07ba022f-1247"],{"BaXPld/A":(x,m,t)=>{"use strict";t.r(m),t.d(m,{default:()=>U});var a=t("Z7aTuO5B"),h=t("ii0bleBb"),o=t.n(h),p=t("J6y4/h8P"),v=t("CCNXj2ra"),f=t("M41Hih61"),ee=t("6BFHGt46"),te=t("fdJGtgle"),Z=t("lt5fqG4I"),Q=t("v2kDoRGM");const D=f.ZP,G=(0,p.default)(D)(({$scTheme:e,$height:k,disabled:A})=>(0,p.css)`
&.ace-queryinput {
${k?`height: ${k}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.variant.light.default};
border-radius: ${v.L$};
&.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: ${A?"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};
}
}
`),H="ace-queryinput",z=e=>!e.disabled,K=e=>e.disabled,J=(e,k)=>{const A="ace_marker",E=(w=[],S="")=>w.map(({beginLine:R,beginColumn:F,endLine:N,endColumn:L})=>({startRow:R,startCol:F,endRow:N,endCol:L,type:"text",className:S}));return[...E(e==null?void 0:e.explanations,`${A} ace_validation_error`),...E(k==null?void 0:k.explanations,`${A} ace_validation_warning`)]},M=(0,a.forwardRef)((e,k)=>{const{className:A,disabled:E,error:w,height:S,maxLines:R,placeholder:F,value:N,warning:L,wrapEnabled:j,onLoad:B,inputId:$}=e,n=(0,p.useTheme)(),r=(0,a.useMemo)(()=>J(w,L),[w,L]),s=(0,a.useCallback)(i=>{i&&(i.renderer.setScrollMargin(7,6),i.renderer.setPadding(12),$&&i.textInput.getElement().setAttribute("id",$),B==null||B(i))},[$,B]),l=(0,a.useMemo)(()=>({$blockScrolling:1/0,selectionStyle:"line"}),[]),c=(0,a.useMemo)(()=>({indentedSoftWrap:!1}),[]),d={$height:S,$scTheme:n,theme:H,className:`${A} ${H}`,disabled:E,editorProps:l,fontSize:n.fonts.size.small,highlightActiveLine:!1,markers:r,maxLines:R,minLines:1,mode:"lucene",name:"QueryEditor",placeholder:F,readOnly:E,ref:k,setOptions:c,showGutter:!1,showPrintMargin:!1,value:N,wrapEnabled:j,onLoad:s};if(K(e))return a.createElement(G,{...d,disabled:!0});if(z(e)){const{onBlur:i,onChange:u,enableAutocompletion:g}=e;return a.createElement(G,{...d,enableBasicAutocompletion:g,enableLiveAutocompletion:g,onBlur:i,onChange:u})}return null});M.propTypes={className:o().string,disabled:o().bool,enableAutocompletion:o().bool,error:o().any,height:o().number,inputId:o().string,maxLines:o().number,onBlur:o().func,onChange:o().func,onLoad:o().func,placeholder:o().string,value:o().string,warning:o().any,wrapEnabled:o().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 U=a.memo(M)},myDR0xOD:(x,m,t)=>{"use strict";t.r(m),t.d(m,{default:()=>$});var a=t("Z7aTuO5B"),h=t("ii0bleBb"),o=t.n(h),p=t("oc9db6Tt"),v=t.n(p),f=t("J6y4/h8P"),ee=t("lN93Sbbu"),te=t("baf4E2h0"),Z=t("9kZNWwre"),Q=t("nxMFMmDQ"),D=t("PwTFiGSp"),oe=t("0hhBr0/b"),G=t("O/XpfGnR"),H=t("n6M7NB8F"),z=t("BaXPld/A"),K=t("PpCK0BgN"),J=t.n(K),M=t("93hVSLoV"),U=t.n(M);const e=n=>{console.warn("Exception thrown in completer: ",n)},k=(n,r)=>{let s=0;for(let l=0;l<=r.row;l+=1){const c=n.getTokens(l);if(l===r.row){const d=n.getTokenAt(r.row,r.column),i=c.findIndex(u=>u===d);s+=i}else s+=c.length}return s},A=(n,r)=>{var s;const l=n.getLength(),c=[...Array(l).keys()].map((g,y)=>n.getTokens(y)).filter(g=>!!(g!=null&&g.length)).flat(),d=k(n,r),i=c[d],u=(s=c[d-1])!=null?s:null;return{tokens:c,currentTokenIdx:d,currentToken:i,prevToken:u}};class E{constructor(r,s,l,c,d,i){this.getCompletions=async(u,g,y,P,b)=>{const{tokens:X,currentToken:T,currentTokenIdx:W,prevToken:I}=A(u.session,y),O=await Promise.all(this.completers.map(async Y=>{try{return await Y.getCompletions({currentToken:T,prevToken:I,prefix:P,tokens:X,currentTokenIdx:W,timeRange:this.timeRange,streams:this.streams,fieldTypes:this.fieldTypes,userTimezone:this.userTimezone,view:this.view})}catch(V){e(V)}return[]})),_=U()(J()(O.flat(),["score","name"]),"name");b(null,_)},this.completers=r,this.timeRange=s,this.streams=l,this.fieldTypes=c,this.userTimezone=d,this.view=i}get identifierRegexps(){return this.completers.map(r=>{var s;return(s=r.identifierRegexps)!=null?s:[]}).flat()}}const w=(...n)=>new E(...n),S=f.default.div(({$hasValue:n})=>(0,f.css)`
width: 100%;
.ace_hidden-cursors {
display: ${n?"block":"none"};
}
`),R=()=>{te.Z.displayValidationErrors()},F=({editor:n,onExecute:r,value:s,error:l,disableExecution:c,isValidating:d,validate:i})=>{const u=()=>{n!=null&&n.completer&&n.completer.popup&&n.completer.detach(),r(s)};if(d){i().then(g=>{v()(g)?u():R()});return}l&&R(),!(c||l)&&u()},N=(n,r)=>{n&&(n.commands.removeCommands(["find","indent","outdent"]),n.session.on("tokenizerUpdate",()=>{var s;n.isFocused()&&!((s=n.completer)!=null&&s.activated)&&!r.current&&n.execCommand("startAutocomplete"),r.current&&(r.current=!1)}))},L=(n,r,s)=>{const l=n&&n.editor;l&&(l.commands.on("afterExec",()=>{var c,d,i;(c=l.completer)!=null&&c.autoSelect&&(l.completer.autoSelect=!1);const u=(i=(d=l.completer)==null?void 0:d.keyboardHandler)==null?void 0:i.commandKeyBinding;u!=null&&u.tab&&u.tab.name!=="improved-tab"&&l.completer.keyboardHandler.addCommand({name:"improved-tab",bindKey:{win:"Tab",mac:"Tab"},exec:g=>{const y=g.completer.insertMatch();return!y&&!g.tabstopManager?(g.completer.goTo("down"),g.completer.insertMatch()):y}})}),s.forEach(c=>l.commands.addCommand(c)),l.completers=[r])},j=({streams:n,timeRange:r,completerFactory:s,userTimezone:l})=>{const c=(0,oe.Z)("views.completers"),{data:d}=(0,Z.Z)(n,(0,D.j9)(r)?Q.nn:r),{data:i}=(0,Z.Z)([],Q.nn),u=(0,a.useMemo)(()=>{const y=Object.fromEntries((d!=null?d:[]).map(b=>[b.name,b]));return{all:Object.fromEntries((i!=null?i:[]).map(b=>[b.name,b])),query:y}},[i,d]),g=(0,H.Z)();return(0,a.useMemo)(()=>s(c!=null?c:[],r,n,u,l,g),[s,c,r,n,u,l,g])},B=({className:n,commands:r,completerFactory:s=w,disableExecution:l,error:c,height:d,inputId:i,isValidating:u,maxLines:g,onBlur:y,onChange:P,onExecute:b,placeholder:X,streams:T,timeRange:W,value:I,validate:O,warning:_,wrapEnabled:Y,name:V})=>{const{userTimezone:re}=(0,G.Z)(),le=(0,a.useRef)(!0),{enableSmartSearch:se}=(0,a.useContext)(ee.Z),ne=j({streams:T,timeRange:W,completerFactory:s,userTimezone:re}),ce=(0,a.useCallback)(C=>N(C,le),[]),q=(0,a.useCallback)(C=>F({editor:C,onExecute:b,value:I,error:c,disableExecution:l,isValidating:u,validate:O}),[b,I,c,l,u,O]),ae=(0,a.useMemo)(()=>[...r,{name:"Execute",bindKey:{win:"Enter",mac:"Enter"},exec:q}],[r,q]),ie=(0,a.useCallback)(C=>L(C,ne,ae),[ae,ne]),de=(0,a.useCallback)(C=>(P({target:{value:C,name:V}}),Promise.resolve(C)),[V,P]);return a.createElement(S,{$hasValue:!!I},a.createElement(z.default,{height:d,className:n,disabled:!1,enableAutocompletion:se,error:c,inputId:i,warning:_,maxLines:g,onBlur:y,onExecute:q,onChange:de,onLoad:ce,placeholder:X,ref:ie,value:I,wrapEnabled:Y}))};B.propTypes={className:o().string,completerFactory:o().func,disableExecution:o().bool,error:o().any,inputId:o().string,height:o().number,isValidating:o().bool.isRequired,maxLines:o().number,onBlur:o().func,onChange:o().func.isRequired,onExecute:o().func.isRequired,placeholder:o().string,streams:o().array,timeRange:o().object,value:o().string,warning:o().any,wrapEnabled:o().bool,validate:o().func.isRequired},B.defaultProps={className:"",commands:[],completerFactory:w,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};const $=B},"6BFHGt46":()=>{ace.define("ace/theme/ace-queryinput",["require","exports","module","ace/lib/dom"],(x,m)=>{m.isDark=!1,m.cssClass="ace-queryinput",x("../lib/dom").importCssString(m.cssText,m.cssClass)})},lt5fqG4I:(x,m,t)=>{x=t.nmd(x),ace.define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(a,h)=>{const o=a("../lib/oop"),{TextHighlightRules:p}=a("./text_highlight_rules"),v=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"}]}};o.inherits(v,p),h.LuceneHighlightRules=v}),ace.define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"],(a,h)=>{const o=a("../lib/oop"),p=a("./text").Mode,{LuceneHighlightRules:v}=a("./lucene_highlight_rules"),f=function(){this.HighlightRules=v,this.$behaviour=this.$defaultBehaviour};o.inherits(f,p),(function(){this.$id="ace/mode/lucene"}).call(f.prototype),h.Mode=f}),function(){ace.require(["ace/mode/lucene"],a=>{x&&(x.exports=a)})}()},"93hVSLoV":(x,m,t)=>{var a=t("JF7TaIvC"),h=t("VHLeKS5G");function o(p,v){return p&&p.length?h(p,a(v,2)):[]}x.exports=o}}]);})();
//# sourceMappingURL=07ba022f-5716.064068770ab1cb53c732.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy