Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
{"version":3,"sources":["webpack:///./src/pages/ShowAlertPage.css?a1a8","webpack:///./src/pages/ShowAlertPage.jsx","webpack:///./src/pages/ShowAlertPage.css"],"names":["options","locals","CombinedProvider","get","AlertsStore","AlertsActions","AlertConditionsStore","AlertConditionsActions","StreamsStore","ShowAlertPage","createReactClass","displayName","propTypes","params","PropTypes","object","isRequired","mixins","Reflux","connect","getInitialState","stream","undefined","componentDidMount","this","_loadData","componentDidUpdate","prevProps","prevState","alert","state","_loadAlertDetails","available","props","alertId","stream_id","setState","condition_id","error","additional","status","alertCondition","UserNotification","_isLoading","availableConditions","render","statusLabel","resolvedState","condition","conditionExists","Object","keys","length","conditionType","type","is_interval","resolved_at","bsStyle","resolvedAtTime","triggered_at","dateTime","format","DateTime","Formats","DATETIME","title","className","style","alertStatusLabel","conditionDetailsTooltip","id","to","Routes","LEGACY_ALERTS","LIST","overlay","placement","useOverlay","trigger","show_alert_condition","disabled","withParams","___CSS_LOADER_EXPORT___","push","module","i"],"mappings":"qZAGIA,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAML,GAJF,IAAI,IAASA,GAIX,IAAQC,QAAU,I,ECqBMC,IAAiBC,IAAI,UAApDC,E,EAAAA,YAAaC,E,EAAAA,c,EACoCH,IAAiBC,IAAI,mBAAtEG,E,EAAAA,qBAAsBC,E,EAAAA,uBACtBC,EAAiBN,IAAiBC,IAAI,WAAtCK,aAEFC,EAAgBC,IAAiB,CACrCC,YAAa,gBAEbC,UAAW,CACTC,OAAQC,IAAUC,OAAOC,YAG3BC,OAAQ,CAACC,IAAOC,QAAQf,GAAcc,IAAOC,QAAQb,IAErDc,gBATqC,WAUnC,MAAO,CACLC,YAAQC,IAIZC,kBAfqC,WAgBnCC,KAAKC,aAGPC,mBAnBqC,SAmBlBC,EAAWC,GACxBA,EAAUC,QAAUL,KAAKM,MAAMD,OACjCL,KAAKO,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,8BAAOhB,EAAkBD,EAAUiB,OAAS,iBAAmB,gBAA/D,IACE,4CACY,4BAAK5C,EAAO4C,OADxB,IAEE,0BAAMC,UAAWC,EAAMC,kBAAmBtB,KAK1CuB,EACJ,kBAAC,IAAD,CAASC,GAAG,8BAAZ,8FAKF,OACE,kBAAC,IAAD,CAAeL,MAAK,UAAKhB,EAAkBD,EAAUiB,OAAS,iBAAmB,gBAA7D,sBAA0F5C,EAAO4C,QACnH,6BACE,kBAAC,IAAD,CAAYA,MAAOA,GACjB,6IAKA,8BACGlB,GAGH,8BACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAewB,GAAIC,IAAOC,cAAcC,MACtC,kBAAC,IAAD,CAAQjB,QAAQ,QAAhB,WAEF,kBAAC,IAAD,CAAgBkB,QAASN,EACTO,UAAU,MACVC,YAAa7B,EAAUsB,GACvBQ,QAAS,CAAC,QAAS,UACjC,kBAAC,IAAD,CAAeP,GAAIC,IAAOO,qBAAqB1D,EAAOiD,GAAItB,EAAUsB,IAAKU,UAAWhC,EAAUsB,IAC5F,kBAAC,IAAD,CAAQb,QAAQ,QAAhB,0BAOV,kBAAC,IAAD,CAAc5B,MAAOA,EAAOmB,UAAWC,GAAmBD,EAAWK,cAAeA,EAAehC,OAAQA,SAOtG4D,sBAAWxE,I,sCC/K1B,6CAGIyE,EAHJ,MAG8B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,EAAI,qDAAsD,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,2CAA2C,MAAQ,GAAG,SAAW,uBAAuB,eAAiB,CAAC,uDAAuD,WAAa,MAExSH,EAAwBjF,OAAS,CAChC,iBAAoB,2BAEN","file":"6e61897c-76.472622149827c1587209.js","sourcesContent":["import api from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../node_modules/css-loader/dist/cjs.js??ref--10-1!./ShowAlertPage.css\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/*\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 PropTypes from 'prop-types';\nimport React from 'react';\nimport createReactClass from 'create-react-class';\nimport Reflux from 'reflux';\n\nimport { LinkContainer } from 'components/graylog/router';\nimport { ButtonToolbar, Label, Tooltip, Button } from 'components/graylog';\nimport { DocumentTitle, OverlayElement, PageHeader, Spinner, Timestamp } from 'components/common';\nimport { AlertDetails } from 'components/alerts';\nimport DateTime from 'logic/datetimes/DateTime';\nimport UserNotification from 'util/UserNotification';\nimport Routes from 'routing/Routes';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport withParams from 'routing/withParams';\n\nimport style from './ShowAlertPage.css';\n\nconst { AlertsStore, AlertsActions } = CombinedProvider.get('Alerts');\nconst { AlertConditionsStore, AlertConditionsActions } = CombinedProvider.get('AlertConditions');\nconst { StreamsStore } = CombinedProvider.get('Streams');\n\nconst ShowAlertPage = createReactClass({\n displayName: 'ShowAlertPage',\n\n propTypes: {\n params: PropTypes.object.isRequired,\n },\n\n mixins: [Reflux.connect(AlertsStore), Reflux.connect(AlertConditionsStore)],\n\n getInitialState() {\n return {\n stream: undefined,\n };\n },\n\n componentDidMount() {\n this._loadData();\n },\n\n componentDidUpdate(prevProps, prevState) {\n if (prevState.alert !== this.state.alert) {\n this._loadAlertDetails(this.state.alert);\n }\n },\n\n _loadData() {\n AlertConditionsActions.available();\n AlertsActions.get(this.props.params.alertId);\n },\n\n _loadAlertDetails(alert) {\n StreamsStore.get(alert.stream_id, (stream) => {\n this.setState({ stream: stream });\n });\n\n AlertConditionsActions.get(alert.stream_id, alert.condition_id, (error) => {\n if (error.additional && error.additional.status === 404) {\n this.setState({ alertCondition: {} });\n } else {\n UserNotification.error(`Fetching alert condition ${alert.condition_id} failed with status: ${error}`,\n 'Could not get alert condition information');\n }\n });\n },\n\n _isLoading() {\n return !this.state.alert || !this.state.alertCondition || !this.state.availableConditions || !this.state.stream;\n },\n\n render() {\n if (this._isLoading()) {\n return ;\n }\n\n const { alert } = this.state;\n const condition = this.state.alertCondition;\n const conditionExists = Object.keys(condition).length > 0;\n const conditionType = this.state.availableConditions[condition.type] || {};\n const { stream } = this.state;\n\n let statusLabel;\n let resolvedState;\n\n if (!alert.is_interval || alert.resolved_at) {\n statusLabel = ;\n const resolvedAtTime = alert.resolved_at || alert.triggered_at;\n\n if (resolvedAtTime) {\n resolvedState = (\n \n This alert was resolved at .\n \n );\n }\n } else {\n statusLabel = ;\n\n resolvedState = (\n \n This alert was triggered at{' '}\n {' '}\n and is still unresolved.\n \n );\n }\n\n const title = (\n {conditionExists ? condition.title || 'Untitled alert' : 'Unknown alert'} \n \n on stream {stream.title} \n {statusLabel}\n \n \n );\n\n const conditionDetailsTooltip = (\n \n The condition was most likely deleted since the alert was triggered, no details available.\n \n );\n\n return (\n \n
\n \n \n Check the timeline of this alert, including the notifications sent, and messages received during the\n alert.\n \n\n \n {resolvedState}\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n