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

web-interface.assets.d5f85445-56.a49ba8ace624afae35ed.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.6
Show newest version
{"version":3,"sources":["webpack:///./src/components/event-definitions/event-definitions/EventDefinitions.css","webpack:///./src/components/event-definitions/event-definitions/EventDefinitionDescription.jsx","webpack:///./src/components/event-definitions/event-definitions/EventDefinitions.jsx","webpack:///./src/components/event-definitions/event-definitions/EventDefinitionsContainer.jsx","webpack:///./src/pages/EventDefinitionsPage.jsx","webpack:///./src/components/event-definitions/event-definitions/EventDefinitions.css?49c3"],"names":["exports","module","push","i","locals","DetailsList","styled","dl","DetailTitle","dt","DetailValue","dd","EventDefinitionDescription","definition","schedulingInformation","config","search_within_ms","execute_every_ms","executeEveryFormatted","moment","duration","format","trim","usePlural","searchWithinFormatted","notificationsInformation","notifications","length","singular","plural","value","context","state","showDetails","scheduleCtx","lodash","get","id","is_scheduled","timerange","from","data","timerange_from","to","timerange_to","dateTime","name","md","status","triggered_at","next_time","setState","this","props","description","renderSchedulingInformation","renderNotificationsInformation","bsStyle","bsSize","onClick","handleDetailsToggle","renderDetails","React","Component","PropTypes","object","isRequired","EventDefinitions","type","undefined","PluginStore","find","edt","mdOffset","lg","lgOffset","permissions","Routes","ALERTS","DEFINITIONS","CREATE","eventDefinitions","pagination","query","onPageChange","onQueryChange","onDelete","onEnable","onDisable","grandTotal","renderEmptyContent","items","map","isScheduled","toggle","actions","Fragment","key","edit","title","pullRight","divider","titleSuffix","getConditionPlugin","displayName","renderDescription","noItemsText","onSearch","onReset","searchButtonLabel","placeholder","wrapperClass","styles","inline","queryWidth","topMargin","useLoadingState","className","createButton","activePage","page","pageSize","pageSizes","totalItems","total","onChange","definitionList","array","string","func","CombinedProvider","EventDefinitionsStore","EventDefinitionsActions","EventDefinitionsContainer","listPaginated","nextPage","nextPageSize","fetchData","nextQuery","callback","promise","window","confirm","enable","disable","handlePageChange","handleQueryChange","handleDelete","handleEnable","handleDisable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F,EAASC,GAEtFD,EAAQ1J,SAAQH,EAAOD,QAAU8J,EAAQ1J","file":"d5f85445-56.a49ba8ace624afae35ed.js","sourcesContent":["exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"._33qtm3mlHu5cLe6BOZd8w4{margin-top:10px}._1v9PbSzhbjHTZDpvJDbDgj{display:inline-block}._31SNrW59si6OQsdgCfcbkf{margin-left:5px}\", \"\"]);\n\n// exports\nexports.locals = {\n\t\"definitionList\": \"_33qtm3mlHu5cLe6BOZd8w4\",\n\t\"inline\": \"_1v9PbSzhbjHTZDpvJDbDgj\",\n\t\"createButton\": \"_31SNrW59si6OQsdgCfcbkf\"\n};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport {} from 'moment-duration-format';\nimport lodash from 'lodash';\nimport styled from 'styled-components';\n\nimport { Button, Col, Row } from 'components/graylog';\nimport { Icon, Pluralize, Timestamp } from 'components/common';\n\nconst DetailsList = styled.dl`\n`;\n\nconst DetailTitle = styled.dt`\n  float: left;\n  clear: left;\n`;\n\nconst DetailValue = styled.dd`\n  margin-left: 150px;\n  word-wrap: break-word;\n  &:not(:last-child) {\n    border-bottom: 1px solid #ececec;\n    margin-bottom: 5px;\n    padding-bottom: 5px;\n }\n`;\n\nclass EventDefinitionDescription extends React.Component {\n  static propTypes = {\n    definition: PropTypes.object.isRequired,\n    context: PropTypes.object,\n  };\n\n  static defaultProps = {\n    context: {},\n  };\n\n  constructor() {\n    super();\n    this.state = {\n      showDetails: false,\n    };\n  }\n\n  renderSchedulingInformation = (definition) => {\n    let schedulingInformation = 'Not scheduled.';\n    if (definition.config.search_within_ms && definition.config.execute_every_ms) {\n      const executeEveryFormatted = moment.duration(definition.config.execute_every_ms)\n        .format('d [days] h [hours] m [minutes] s [seconds]', { trim: 'all', usePlural: false });\n      const searchWithinFormatted = moment.duration(definition.config.search_within_ms)\n        .format('d [days] h [hours] m [minutes] s [seconds]', { trim: 'all' });\n      schedulingInformation = `Runs every ${executeEveryFormatted}, searching within the last ${searchWithinFormatted}.`;\n    }\n    return schedulingInformation;\n  };\n\n  renderNotificationsInformation = (definition) => {\n    let notificationsInformation = Does not trigger any Notifications.;\n    if (definition.notifications.length > 0) {\n      notificationsInformation = (\n        \n          Triggers {definition.notifications.length}{' '}\n          .\n        \n      );\n    }\n    return notificationsInformation;\n  };\n\n  renderDetails = (definition, context) => {\n    const { showDetails } = this.state;\n\n    if (!showDetails) {\n      return null;\n    }\n\n    const scheduleCtx = lodash.get(context, `scheduler.${definition.id}`, null);\n\n    if (!scheduleCtx.is_scheduled) {\n      return (

Event definition is not scheduled, no details available.

);\n }\n\n let timerange = null;\n if (lodash.get(scheduleCtx, 'data.type', null) === 'event-processor-execution-v1') {\n const from = scheduleCtx.data.timerange_from;\n const to = scheduleCtx.data.timerange_to;\n timerange = (\n <>\n Next timerange:\n \n \n );\n }\n\n return (\n \n \n \n Status:\n {scheduleCtx.status}\n {scheduleCtx.triggered_at && (\n <>\n Last execution:\n \n \n )}\n {scheduleCtx.next_time && (\n <>\n Next execution:\n \n \n )}\n {timerange}\n \n \n \n );\n };\n\n handleDetailsToggle = () => {\n const { showDetails } = this.state;\n this.setState({ showDetails: !showDetails });\n };\n\n render() {\n const { definition, context } = this.props;\n const { showDetails } = this.state;\n\n return (\n <>\n

{definition.description}

\n

\n {this.renderSchedulingInformation(definition)} {this.renderNotificationsInformation(definition)}\n \n

\n {this.renderDetails(definition, context)}\n \n );\n }\n}\n\nexport default EventDefinitionDescription;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { LinkContainer } from 'react-router-bootstrap';\nimport { PluginStore } from 'graylog-web-plugin/plugin';\n\nimport lodash from 'lodash';\n\nimport { Button, Col, DropdownButton, Label, MenuItem, Row } from 'components/graylog';\nimport Routes from 'routing/Routes';\n\nimport {\n EmptyEntity,\n EntityList,\n EntityListItem,\n IfPermitted,\n PaginatedList,\n SearchForm,\n} from 'components/common';\n\nimport EventDefinitionDescription from './EventDefinitionDescription';\nimport styles from './EventDefinitions.css';\n\nclass EventDefinitions extends React.Component {\n static propTypes = {\n eventDefinitions: PropTypes.array.isRequired,\n context: PropTypes.object,\n pagination: PropTypes.object.isRequired,\n query: PropTypes.string.isRequired,\n onPageChange: PropTypes.func.isRequired,\n onQueryChange: PropTypes.func.isRequired,\n onDelete: PropTypes.func.isRequired,\n onEnable: PropTypes.func.isRequired,\n onDisable: PropTypes.func.isRequired,\n };\n\n static defaultProps = {\n context: {},\n };\n\n getConditionPlugin = (type) => {\n if (type === undefined) {\n return {};\n }\n return PluginStore.exports('eventDefinitionTypes').find((edt) => edt.type === type) || {};\n };\n\n renderEmptyContent = () => {\n return (\n \n \n \n

\n Create Event Definitions that are able to search, aggregate or correlate Messages and other\n Events, allowing you to record significant Events in Graylog and alert on them.\n

\n \n \n \n \n \n
\n \n
\n );\n };\n\n renderDescription = (definition, context) => {\n return ;\n };\n\n render() {\n const { eventDefinitions, context, pagination, query, onPageChange, onQueryChange, onDelete, onEnable, onDisable } = this.props;\n\n if (pagination.grandTotal === 0) {\n return this.renderEmptyContent();\n }\n\n const items = eventDefinitions.map((definition) => {\n const isScheduled = lodash.get(context, `scheduler.${definition.id}.is_scheduled`, true);\n\n let toggle = Disable;\n if (!isScheduled) {\n toggle = Enable;\n }\n const actions = (\n \n \n \n \n \n \n \n \n {toggle}\n \n Delete\n \n \n \n );\n\n const plugin = this.getConditionPlugin(definition.config.type);\n let titleSuffix = plugin.displayName || definition.config.type;\n\n if (!isScheduled) {\n titleSuffix = ({titleSuffix} );\n }\n\n return (\n \n );\n });\n\n return (\n \n \n \n \n \n \n \n \n \n\n \n
\n \n
\n
\n \n
\n );\n }\n}\n\nexport default EventDefinitions;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Spinner } from 'components/common';\n\nimport connect from 'stores/connect';\nimport CombinedProvider from 'injection/CombinedProvider';\n\nimport {} from 'components/event-definitions/event-definition-types';\n\nimport EventDefinitions from './EventDefinitions';\n\nconst { EventDefinitionsStore, EventDefinitionsActions } = CombinedProvider.get('EventDefinitions');\n\nclass EventDefinitionsContainer extends React.Component {\n static propTypes = {\n eventDefinitions: PropTypes.object.isRequired,\n };\n\n componentDidMount() {\n this.fetchData({});\n }\n\n fetchData = ({ page, pageSize, query }) => {\n return EventDefinitionsActions.listPaginated({\n query: query,\n page: page,\n pageSize: pageSize,\n });\n };\n\n handlePageChange = (nextPage, nextPageSize) => {\n const { eventDefinitions } = this.props;\n this.fetchData({ page: nextPage, pageSize: nextPageSize, query: eventDefinitions.query });\n };\n\n handleQueryChange = (nextQuery, callback = () => {}) => {\n const { eventDefinitions } = this.props;\n const promise = this.fetchData({ query: nextQuery, pageSize: eventDefinitions.pagination.pageSize });\n promise.finally(callback);\n };\n\n handleDelete = (definition) => {\n return () => {\n if (window.confirm(`Are you sure you want to delete \"${definition.title}\"?`)) {\n EventDefinitionsActions.delete(definition);\n }\n };\n };\n\n handleEnable = (definition) => {\n return () => {\n if (window.confirm(`Are you sure you want to enable \"${definition.title}\"?`)) {\n EventDefinitionsActions.enable(definition);\n }\n };\n };\n\n handleDisable = (definition) => {\n return () => {\n if (window.confirm(`Are you sure you want to disable \"${definition.title}\"?`)) {\n EventDefinitionsActions.disable(definition);\n }\n };\n };\n\n render() {\n const { eventDefinitions } = this.props;\n\n if (!eventDefinitions.eventDefinitions) {\n return ;\n }\n\n return (\n \n );\n }\n}\n\nexport default connect(EventDefinitionsContainer, { eventDefinitions: EventDefinitionsStore });\n","import React from 'react';\nimport { LinkContainer } from 'react-router-bootstrap';\n\nimport { Button, ButtonToolbar, Col, Row } from 'components/graylog';\nimport { DocumentTitle, IfPermitted, PageHeader } from 'components/common';\nimport DocumentationLink from 'components/support/DocumentationLink';\nimport EventDefinitionsContainer from 'components/event-definitions/event-definitions/EventDefinitionsContainer';\nimport Routes from 'routing/Routes';\nimport DocsHelper from 'util/DocsHelper';\n\nconst EventDefinitionsPage = () => {\n return (\n \n \n \n \n Create new Event Definitions that will allow you to search for different Conditions and alert on them.\n \n\n \n Graylog's new Alerting system let you define more flexible and powerful rules. Learn more in the{' '}\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n );\n};\n\nexport default EventDefinitionsPage;\n","\nvar content = require(\"!!../../../../node_modules/css-loader/index.js??ref--10-1!./EventDefinitions.css\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/index.js??ref--10-1!./EventDefinitions.css\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/index.js??ref--10-1!./EventDefinitions.css\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy