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

web-interface.assets.1255d548-3521.d1b3693e3651623483d5.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"1255d548-3521.d1b3693e3651623483d5.js","mappings":"uXAkBA,IAAIA,EAAmB,GAEhB,MAAMC,UAA+B,IAAI,QAAQ,+BAA+B,EAAE,kBAAmB,CAC1G,aAAc,CACZ,MAAM,EACN,MAAMC,EAAW,yBAEXC,EAAmB,oBAEnBC,EAAgB,KAAK,oBAAoB,CAC7C,oBAAqB,QACrB,eAAgB,WAChB,mBAAoBJ,EACpB,QAASE,EACT,oBAAqBC,CACvB,EAAG,YAAY,EAEf,KAAK,OAAS,CACZ,MAAO,CACL,CACE,MAAO,UACP,MAAO,WACT,EACA,CACE,MAAO,UACP,MAAO,SACP,KAAM,SACR,EACA,CACE,MAAO,SACP,MAAO,oCACT,EACA,CACE,MAAO,SACP,MAAO,oCACT,EACA,CACE,MAAO,mBACP,MAAO,iEACT,EACA,CACE,MAAO,mBACP,MAAO,oEACT,EACA,CACE,MAAO,4BACP,MAAO,mBACT,EACA,CACE,MAAO,yBACP,MAAO,IACT,EACA,CACE,MAAOC,EACP,MAAO,6BACT,EACA,CACE,MAAO,OACP,MAAO,MACT,CACF,EACA,QAAS,CACP,CACE,MAAO,UACP,MAAO,SACP,KAAM,OACR,EAAG,CACD,aAAc,SAChB,CACF,CACF,CACF,CACF,CAEe,MAAMC,UAA0B,IAAI,QAAQ,eAAe,EAAE,IAAK,CAC/E,YAAYC,EAAM,CAChB,MAAMA,CAAI,EAEVN,EAAmBM,EACnB,KAAK,eAAiBL,CACxB,CACF,C,sLC3DA,MAAMM,EAAsB,UAAO,IAAoB,CAAC,CAAE,WAAAC,EAAY,MAAAC,CAAM,OAAM;AAAA;AAAA;AAAA,eAGnED,EAAa,QAAU,MAAM;AAAA;AAAA;AAAA,IAGxCC,EAAM,WAAW,SAAS;AAAA,CAC7B,EAEKC,KAAgB,WAAO,S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AQ,YAAY,EAC5B,gBAAgBC,EAAQ,QAASA,EAAQ,QAAQ,CACvD,CAAC,EAEA,UAAY,CACX,IAAI,QAAQ,CAAC,mBAAmB,EAAIC,GAAM,CACyBC,IAC/DA,EAAO,QAAUD,EAErB,CAAC,CACH,EAAE,C","sources":["webpack://graylog-web-interface/./src/components/rules/mode-pipeline.js","webpack://graylog-web-interface/./src/components/common/SourceCodeEditor.tsx","webpack://graylog-web-interface/./src/components/common/ace/theme-graylog.js"],"sourcesContent":["/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n/* global ace */\n\nlet builtinFunctions = '';\n\nexport class PipelineHighlightRules extends ace.require('ace/mode/text_highlight_rules').TextHighlightRules {\n  constructor() {\n    super();\n    const keywords = 'let|when|then|rule|end';\n\n    const builtinConstants = 'and|or|not|during';\n\n    const keywordMapper = this.createKeywordMapper({\n      'variable.language': 'stage',\n      'support.type': '$message',\n      'support.function': builtinFunctions,\n      keyword: keywords,\n      'constant.language': builtinConstants,\n    }, 'identifier');\n\n    this.$rules = {\n      start: [\n        {\n          token: 'comment',\n          regex: '\\\\/\\\\/.*$',\n        },\n        {\n          token: 'comment', // multi line comment\n          regex: '\\\\/\\\\*',\n          next: 'comment',\n        },\n        {\n          token: 'string', // single line\n          regex: '[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]',\n        },\n        {\n          token: 'string', // single line\n          regex: \"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\",\n        },\n        {\n          token: 'constant.numeric', // hex\n          regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\\b/,\n        },\n        {\n          token: 'constant.numeric', // float\n          regex: /[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?[LlSsDdFfYy]?\\b/,\n        },\n        {\n          token: 'constant.language.boolean',\n          regex: '(?:true|false)\\\\b',\n        },\n        {\n          token: 'language.support.class',\n          regex: '&&',\n        },\n        {\n          token: keywordMapper,\n          regex: '[a-zA-Z_$][a-zA-Z0-9_$]*\\\\b',\n        },\n        {\n          token: 'text',\n          regex: '\\\\s+',\n        },\n      ],\n      comment: [\n        {\n          token: 'comment', // closing comment\n          regex: '\\\\*\\\\/',\n          next: 'start',\n        }, {\n          defaultToken: 'comment',\n        },\n      ],\n    };\n  }\n}\n\nexport default class PipelineRulesMode extends ace.require('ace/mode/text').Mode {\n  constructor(args) {\n    super(args);\n\n    builtinFunctions = args;\n    this.HighlightRules = PipelineHighlightRules;\n  }\n}\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport React from 'react';\nimport isFinite from 'lodash/isFinite';\nimport PropTypes from 'prop-types';\nimport { Resizable } from 'react-resizable';\nimport AceEditor from 'react-ace';\nimport styled, { css } from 'styled-components';\nimport type { IAnnotation } from 'react-ace';\n\nimport { qualifyUrl } from 'util/URLUtils';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport fetch from 'logic/rest/FetchProvider';\nimport OverlayTrigger from 'components/common/OverlayTrigger';\nimport { Button, ButtonGroup, ButtonToolbar, Tooltip } from 'components/bootstrap';\nimport PipelineRulesMode from 'components/rules/mode-pipeline';\n\nimport ClipboardButton from './ClipboardButton';\nimport Icon from './Icon';\n\nimport './webpack-resolver';\nimport './ace/theme-graylog';\n\ntype ContainerProps = {\n  $resizable: boolean\n}\nconst SourceCodeContainer = styled.div(({ $resizable, theme }) => css`\n  .react-resizable-handle {\n    z-index: 100; /* Ensure resize handle is over text editor */\n    display: ${$resizable ? 'block' : 'none'};\n  }\n\n  ${theme.components.aceEditor}\n`);\n\nconst StyledTooltip = styled(Tooltip)`\n  width: 250px;\n`;\n\nconst Toolbar = styled.div(({ theme }) => css`\n  background: ${theme.colors.global.contentBackground};\n  border: 1px solid ${theme.colors.gray[80]};\n  border-bottom: 0;\n  border-radius: 5px 5px 0 0;\n\n  .btn-link {\n    color: ${theme.colors.variant.dark.info};\n    \n    &:hover {\n      color: ${theme.colors.variant.darkest.info};\n      background-color: ${theme.colors.variant.lightest.info};\n    }\n\n    &.disabled,\n    &[disabled] {\n      color: ${theme.colors.variant.light.default};\n      \n      &:hover {\n        color: ${theme.colors.variant.light.default};\n      }\n    }\n  }\n\n  & + ${SourceCodeContainer} {\n    /* Do not add border radius if code editor comes after toolbar */\n    .ace_editor {\n      border-radius: 0 0 5px 5px;\n    }\n  }\n`);\n\nconst availableModes = ['json', 'lua', 'markdown', 'text', 'yaml', 'pipeline'] as const;\n\n/**\n * Component that renders a source code editor input. This is what powers the pipeline rules and collector\n * editors.\n *\n * **Note:** The component needs to be used in a [controlled way](https://reactjs.org/docs/forms.html#controlled-components).\n * Letting the component handle its own internal state may lead to weird errors while typing.\n */\ntype Props = {\n  annotations: Array,\n  focus?: boolean,\n  fontSize?: number,\n  height?: number,\n  width?: number,\n  id: string,\n  innerRef?: React.MutableRefObject,\n  mode: typeof availableModes[number],\n  onLoad: () => void,\n  onChange: () => void,\n  onBlur: () => void,\n  readOnly?: boolean,\n  resizable?: boolean,\n  toolbar?: boolean,\n  value?: string,\n}\n\ntype State = {\n  height?: number,\n  width?: number,\n  selectedText?: string,\n}\n\nclass SourceCodeEditor extends React.Component {\n  static propTypes = {\n    /**\n     * Annotations to show in the editor's gutter. The format should be:\n     * `[{ row: 0, column: 2, type: 'error', text: 'Some error.'}]`\n     * The type value must be one of `error`, `warning`, or `info`.\n     */\n    annotations: PropTypes.array,\n    /** Specifies if the source code editor should have the input focus or not. */\n    focus: PropTypes.bool,\n    /** Specifies the font size in pixels to use in the text editor. */\n    fontSize: PropTypes.number,\n    /** Editor height in pixels. */\n    height: PropTypes.number,\n    /** Specifies a unique ID for the source code editor. */\n    id: PropTypes.string.isRequired,\n    /** Provides a ref associated to AceEditor component */\n    innerRef: PropTypes.oneOfType([\n      PropTypes.func,\n      PropTypes.shape({ current: PropTypes.any }),\n    ]),\n    /** Specifies the mode to use in the editor. This is used for highlighting and auto-completion. */\n    mode: PropTypes.oneOf(availableModes),\n    /** Function called on editor load. The first argument is the instance of the editor. */\n    onLoad: PropTypes.func,\n    /** Function called when the value of the text changes. It receives the new value and an event as arguments. */\n    onChange: PropTypes.func,\n    /** Function called when the editor loses focus. */\n    onBlur: PropTypes.func,\n    /** Specifies if the editor should be in read-only mode. */\n    readOnly: PropTypes.bool,\n    /** Specifies if the editor should be resizable by the user. */\n    resizable: PropTypes.bool,\n    /** Specifies if the editor should also include a toolbar. */\n    toolbar: PropTypes.bool,\n    /** Text to use in the editor. */\n    value: PropTypes.string,\n    /** Editor width in pixels. Use `Infinity` to indicate the editor should use 100% of its container's width. */\n    width: PropTypes.number,\n  };\n\n  static defaultProps = {\n    annotations: [],\n    focus: false,\n    fontSize: 13,\n    height: 200,\n    innerRef: undefined,\n    mode: 'text',\n    onChange: () => {},\n    onBlur: () => {},\n    onLoad: () => {},\n    readOnly: false,\n    resizable: true,\n    toolbar: true,\n    value: undefined,\n    width: Infinity,\n  };\n\n  private reactAce: AceEditor;\n\n  private readonly overlayContainerRef: React.RefObject;\n\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      height: props.height,\n      width: props.width,\n      selectedText: '',\n    };\n\n    this.overlayContainerRef = React.createRef();\n  }\n\n  componentDidMount() {\n    const { mode } = this.props;\n\n    if (mode === 'pipeline') {\n      const url = qualifyUrl(ApiRoutes.RulesController.functions().url);\n\n      fetch('GET', url).then((response) => {\n        if (!Array.isArray(response)) return '';\n\n        const functions = response.map((res) => res.name).join('|');\n        const pipelineRulesMode = new PipelineRulesMode(functions);\n\n        this.reactAce.editor.getSession().setMode(pipelineRulesMode);\n\n        return functions;\n      });\n    }\n  }\n\n  componentDidUpdate(prevProps) {\n    const { height, width } = this.props;\n\n    if (height !== prevProps.height || width !== prevProps.width) {\n      this.reloadEditor();\n    }\n  }\n\n  handleResize = (_event: React.ChangeEvent, { size }) => {\n    const { height, width } = size;\n\n    this.setState({ height: height, width: width }, this.reloadEditor);\n  };\n\n  reloadEditor = () => {\n    const { resizable } = this.props;\n\n    if (resizable) {\n      this.reactAce.editor.resize();\n    }\n  };\n\n  isCopyDisabled = () => this.props.readOnly || this.state.selectedText === '';\n\n  isPasteDisabled = () => this.props.readOnly;\n\n  isRedoDisabled = () => this.props.readOnly || !this.reactAce || !this.reactAce.editor.getSession().getUndoManager().hasRedo();\n\n  isUndoDisabled = () => this.props.readOnly || !this.reactAce || !this.reactAce.editor.getSession().getUndoManager().hasUndo();\n\n  handleRedo = () => {\n    this.reactAce.editor.redo();\n    this.focusEditor();\n  };\n\n  handleUndo = () => {\n    this.reactAce.editor.undo();\n    this.focusEditor();\n  };\n\n  handleSelectionChange = (selection) => {\n    const { toolbar, readOnly } = this.props;\n\n    if (!this.reactAce || !toolbar || readOnly) {\n      return;\n    }\n\n    const selectedText = this.reactAce.editor.getSession().getTextRange(selection.getRange());\n\n    this.setState({ selectedText: selectedText });\n  };\n\n  focusEditor = () => {\n    this.reactAce.editor.focus();\n  };\n\n  render() {\n    const { height, width, selectedText } = this.state;\n    const {\n      resizable,\n      toolbar,\n      annotations,\n      focus,\n      fontSize,\n      mode,\n      id,\n      innerRef,\n      onLoad,\n      onChange,\n      onBlur,\n      readOnly,\n      value,\n    } = this.props;\n    const validCssWidth = isFinite(width) ? width : '100%';\n    const overlay = Press Ctrl+V (⌘V in macOS) or select Edit → Paste to paste from clipboard.;\n\n    return (\n      
\n {toolbar\n && (\n \n \n \n }\n bsStyle=\"link\"\n bsSize=\"sm\"\n onSuccess={this.focusEditor}\n text={selectedText}\n buttonTitle=\"Copy (Ctrl+C / ⌘C)\"\n disabled={this.isCopyDisabled()} />\n \n \n \n \n \n \n \n \n \n \n )}\n \n \n {\n this.reactAce = c;\n if (innerRef) { innerRef.current = c; }\n }}\n annotations={annotations}\n // Convert Windows line breaks to Unix. See issue #7889\n // @ts-expect-error\n setOptions={{ newLineMode: 'unix' }}\n focus={focus}\n fontSize={fontSize}\n mode={mode}\n theme=\"graylog\"\n name={id}\n height=\"100%\"\n onLoad={onLoad}\n onChange={onChange}\n onBlur={onBlur}\n onSelectionChange={this.handleSelectionChange}\n readOnly={readOnly}\n value={value}\n width=\"100%\" />\n \n \n
\n );\n }\n}\n\nexport default SourceCodeEditor;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n/* global ace */\n\nace.define('ace/theme/graylog', ['require', 'exports', 'module', 'ace/lib/dom'], (require, exports) => {\n // CSS found in `components/common/SourceCodeEditor.jsx`\n exports.cssText = ''; // eslint-disable-line no-param-reassign\n\n exports.cssClass = 'ace-graylog'; // eslint-disable-line no-param-reassign\n\n const dom = require('../lib/dom');\n dom.importCssString(exports.cssText, exports.cssClass);\n});\n\n(function () { // eslint-disable-line func-names\n ace.require(['ace/theme/graylog'], (m) => {\n if (typeof module === 'object' && typeof exports === 'object' && module) {\n module.exports = m;\n }\n });\n}());\n"],"names":["builtinFunctions","PipelineHighlightRules","keywords","builtinConstants","keywordMapper","PipelineRulesMode","args","SourceCodeContainer","$resizable","theme","StyledTooltip","Toolbar","availableModes","SourceCodeEditor","props","_event","size","height","width","resizable","selection","toolbar","readOnly","selectedText","mode","url","ApiRoutes","response","functions","res","pipelineRulesMode","prevProps","annotations","focus","fontSize","id","innerRef","onLoad","onChange","onBlur","value","validCssWidth","overlay","ClipboardButton","Icon","OverlayTrigger","c","require","exports","m","module"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy