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

web-interface.assets.325e2d4b-296.07c32b0713a0a2795f8c.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
{"version":3,"file":"325e2d4b-296.07c32b0713a0a2795f8c.js","mappings":"yaAwBO,MAAMA,GAAeC,E,cAAAA,IAC1B,gBACA,IAAMC,IAAAA,YAAmB,CACvBC,UAAYC,GAAY,YAAWA,YAEnCC,KAAKD,GAOH,OANgBE,EAAAA,EAAAA,IAAM,MAAOC,EAAAA,GAAoBC,KAAKL,UAAUC,KAC7DK,MACEC,GAAaA,EAASC,UACtBC,GAAUC,EAAAA,EAAAA,MAAwB,4BAA2BT,cAAmBQ,IAAS,0BAI/F,MCGL,MAAME,EAAeC,IAAiB,CAEpCC,YAAa,eAGbC,UAAW,CACTC,OAAQC,IAAAA,OAAAA,YAGVC,OAAQ,CACNlB,IAAAA,cAAqBmB,EAAAA,EAAY,QAlBrC,SAAoBC,GAClB,OAAOA,EAAMC,MAAQD,EAAMC,MAAMf,KAAKgB,MAAMN,OAAOd,QAAUkB,EAAMC,KACpE,IAiBGrB,IAAAA,cAAqBuB,EAAAA,EAAsB,kBAf/C,SAA+BH,GAC7B,OAAOA,EAAMI,gBAAkBJ,EAAMI,gBAAgBlB,KAAKgB,MAAMN,OAAOd,aAAUuB,CAClF,IAcGzB,IAAAA,QAAe0B,EAAAA,IAGjBC,gBAAe,KACN,CACLC,oBAAgBH,EAChBhB,aAASgB,IAIbI,4BACEC,QAAQC,IAAI,CACVR,EAAAA,EAAAA,IAAyBjB,KAAKgB,MAAMN,OAAOd,QACxCK,MAAMqB,GAAmBtB,KAAK0B,SAAS,CAAEJ,eAAgBA,MAC5D9B,EAAaK,KAAKG,KAAKgB,MAAMN,OAAOd,QAAQK,MAAME,GAAYH,KAAK0B,SAAS,CAAEvB,QAASA,MACvFwB,EAAAA,EAAAA,OAAwB1B,MAAM2B,IAE5B,MAAMC,EAAWC,OAAOC,KAAKH,GACvBI,EA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IS,GACF,MAAMJ,GAAU5E,EAAAA,EAAAA,IAAM,OAAO0E,EAAAA,EAAAA,IAAY,GAAExE,KAAKL,aAAamF,MAE7DJ,EACGK,OAAO3E,IACNC,EAAAA,EAAAA,MAAwB,kBAAiByE,yBAAmC1E,IAC1E,2BADF,IAIJ8D,EAAkBG,IAAIK,QAAQA,EAC/B,K","sources":["webpack://graylog-web-interface/./src/stores/plugins/PluginsStore.js","webpack://graylog-web-interface/./src/pages/ShowNodePage.jsx","webpack://graylog-web-interface/./src/stores/inputs/InputStatesStore.js","webpack://graylog-web-interface/./src/stores/inputs/InputTypesStore.ts"],"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 */\nimport Reflux from 'reflux';\n\nimport * as URLUtils from 'util/URLUtils';\nimport UserNotification from 'util/UserNotification';\nimport fetch from 'logic/rest/FetchProvider';\nimport { singletonStore } from 'logic/singleton';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const PluginsStore = singletonStore(\n  'core.Plugins',\n  () => Reflux.createStore({\n    sourceUrl: (nodeId) => `/cluster/${nodeId}/plugins`,\n\n    list(nodeId) {\n      const promise = fetch('GET', URLUtils.qualifyUrl(this.sourceUrl(nodeId)))\n        .then(\n          (response) => response.plugins,\n          (error) => UserNotification.error(`Getting plugins on node \"${nodeId}\" failed: ${error}`, 'Could not get plugins'),\n        );\n\n      return promise;\n    },\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 PropTypes from 'prop-types';\nimport React from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport createReactClass from 'create-react-class';\nimport Reflux from 'reflux';\n\nimport { NodeMaintenanceDropdown, NodeOverview } from 'components/nodes';\nimport { DocumentTitle, PageErrorOverview, PageHeader, Spinner } from 'components/common';\nimport withParams from 'routing/withParams';\nimport { ClusterOverviewStore } from 'stores/cluster/ClusterOverviewStore';\nimport { InputStatesStore } from 'stores/inputs/InputStatesStore';\nimport { InputTypesStore } from 'stores/inputs/InputTypesStore';\nimport { NodesStore } from 'stores/nodes/NodesStore';\n\nimport { PluginsStore } from '../stores/plugins/PluginsStore';\n\nfunction nodeFilter(state) {\n  return state.nodes ? state.nodes[this.props.params.nodeId] : state.nodes;\n}\n\nfunction clusterOverviewFilter(state) {\n  return state.clusterOverview ? state.clusterOverview[this.props.params.nodeId] : undefined;\n}\n\nconst ShowNodePage = createReactClass({\n  // eslint-disable-next-line react/no-unused-class-component-methods\n  displayName: 'ShowNodePage',\n\n  // eslint-disable-next-line react/no-unused-class-component-methods\n  propTypes: {\n    params: PropTypes.object.isRequired,\n  },\n\n  mixins: [\n    Reflux.connectFilter(NodesStore, 'node', nodeFilter),\n    Reflux.connectFilter(ClusterOverviewStore, 'systemOverview', clusterOverviewFilter),\n    Reflux.connect(InputTypesStore),\n  ],\n\n  getInitialState() {\n    return {\n      jvmInformation: undefined,\n      plugins: undefined,\n    };\n  },\n\n  UNSAFE_componentWillMount() {\n    Promise.all([\n      ClusterOverviewStore.jvm(this.props.params.nodeId)\n        .then((jvmInformation) => this.setState({ jvmInformation: jvmInformation })),\n      PluginsStore.list(this.props.params.nodeId).then((plugins) => this.setState({ plugins: plugins })),\n      InputStatesStore.list().then((inputStates) => {\n        // We only want the input states for the current node\n        const inputIds = Object.keys(inputStates);\n        const filteredInputStates = [];\n\n        inputIds.forEach((inputId) => {\n          const inputObject = inputStates[inputId][this.props.params.nodeId];\n\n          if (inputObject) {\n            filteredInputStates.push(inputObject);\n          }\n        });\n\n        this.setState({ inputStates: filteredInputStates });\n      }),\n    ]).then(() => {}, (errors) => this.setState({ errors: errors }));\n  },\n\n  _isLoading() {\n    return !(this.state.node && this.state.systemOverview);\n  },\n\n  render() {\n    if (this.state.errors) {\n      return ;\n    }\n\n    if (this._isLoading()) {\n      return ;\n    }\n\n    const { node } = this.state;\n    const title = Node {node.short_node_id} / {node.hostname};\n\n    return (\n      \n        
\n }>\n \n This page shows details of a Graylog server node that is active and reachable in your cluster.
\n {node.is_leader ? This is the leader node. : This is not the leader node.}\n
\n
\n \n
\n
\n );\n },\n});\n\nexport default withParams(ShowNodePage);\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 Reflux from 'reflux';\n\nimport UserNotification from 'util/UserNotification';\nimport * as URLUtils from 'util/URLUtils';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport fetch from 'logic/rest/FetchProvider';\nimport { singletonStore } from 'logic/singleton';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const InputStatesStore = singletonStore(\n 'core.InputStates',\n () => Reflux.createStore({\n listenables: [],\n\n init() {\n this.list();\n },\n\n getInitialState() {\n return { inputStates: this.inputStates };\n },\n\n list() {\n const url = URLUtils.qualifyUrl(ApiRoutes.ClusterInputStatesController.list().url);\n\n return fetch('GET', url)\n .then((response) => {\n const result = {};\n\n Object.keys(response).forEach((node) => {\n if (!response[node]) {\n return;\n }\n\n response[node].forEach((input) => {\n if (!result[input.id]) {\n result[input.id] = {};\n }\n\n result[input.id][node] = input;\n });\n });\n\n this.inputStates = result;\n this.trigger({ inputStates: this.inputStates });\n\n return result;\n });\n },\n\n _checkInputStateChangeResponse(input, response, action) {\n const nodes = Object.keys(response).filter((node) => (input.global ? true : node === input.node));\n const failedNodes = nodes.filter((nodeId) => response[nodeId] === null);\n\n if (failedNodes.length === 0) {\n UserNotification.success(`Request to ${action.toLowerCase()} input '${input.title}' was sent successfully.`,\n `Input '${input.title}' will be ${action === 'START' ? 'started' : 'stopped'} shortly`);\n } else if (failedNodes.length === nodes.length) {\n UserNotification.error(`Request to ${action.toLowerCase()} input '${input.title}' failed. Check your Graylog logs for more information.`,\n `Input '${input.title}' could not be ${action === 'START' ? 'started' : 'stopped'}`);\n } else {\n UserNotification.warning(`Request to ${action.toLowerCase()} input '${input.title}' failed in some nodes. Check your Graylog logs for more information.`,\n `Input '${input.title}' could not be ${action === 'START' ? 'started' : 'stopped'} in all nodes`);\n }\n },\n\n start(input) {\n const url = URLUtils.qualifyUrl(ApiRoutes.ClusterInputStatesController.start(input.id).url);\n\n return fetch('PUT', url)\n .then(\n (response) => {\n this._checkInputStateChangeResponse(input, response, 'START');\n this.list();\n\n return response;\n },\n (error) => {\n UserNotification.error(`Error starting input '${input.title}': ${error}`, `Input '${input.title}' could not be started`);\n },\n );\n },\n\n stop(input) {\n const url = URLUtils.qualifyUrl(ApiRoutes.ClusterInputStatesController.stop(input.id).url);\n\n return fetch('DELETE', url)\n .then(\n (response) => {\n this._checkInputStateChangeResponse(input, response, 'STOP');\n this.list();\n\n return response;\n },\n (error) => {\n UserNotification.error(`Error stopping input '${input.title}': ${error}`, `Input '${input.title}' could not be stopped`);\n },\n );\n },\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 Reflux from 'reflux';\n\nimport { qualifyUrl } from 'util/URLUtils';\nimport fetch from 'logic/rest/FetchProvider';\nimport UserNotification from 'util/UserNotification';\nimport { singletonStore, singletonActions } from 'logic/singleton';\n\ntype InputTypesActionsType = {\n list: () => Promise,\n get: (inputTypeId: string) => Promise,\n}\nexport const InputTypesActions = singletonActions(\n 'core.InputTypes',\n () => Reflux.createActions({\n list: { asyncResult: true },\n get: { asyncResult: true },\n }),\n);\n\nexport type InputTypes = {\n [type: string]: string,\n};\n\nexport type ConfigurationField = {\n field_type: 'boolean' | 'text' | 'dropdown' | 'list' | 'number',\n name: string,\n human_name: string,\n description: string,\n default_value: any,\n is_optional: boolean,\n attributes: Array,\n additional_info: any,\n position: number,\n};\n\nexport type InputDescription = {\n type: string,\n name: string,\n is_exclusive: boolean,\n requested_configuration: {\n [key: string]: ConfigurationField,\n },\n link_to_docs: string,\n};\n\nexport type InputDescriptions = {\n [type: string]: InputDescription,\n};\n\nexport const InputTypesStore = singletonStore(\n 'core.InputTypes',\n () => Reflux.createStore({\n listenables: [InputTypesActions],\n sourceUrl: '/system/inputs/types',\n inputTypes: undefined,\n inputDescriptions: undefined,\n\n init() {\n this.list();\n },\n\n getInitialState(): { inputTypes: InputTypes, inputDescriptions: InputDescriptions } {\n return { inputTypes: this.inputTypes, inputDescriptions: this.inputDescriptions };\n },\n\n list() {\n const promiseTypes = fetch('GET', qualifyUrl(this.sourceUrl));\n const promiseDescriptions = fetch('GET', qualifyUrl(`${this.sourceUrl}/all`));\n const promise: Promise<[{ types: InputTypes }, InputDescriptions]> = Promise.all([promiseTypes, promiseDescriptions]);\n\n promise\n .then(\n ([typesResponse, descriptionsResponse]) => {\n this.inputTypes = typesResponse.types;\n this.inputDescriptions = descriptionsResponse;\n this.trigger(this.getInitialState());\n },\n (error) => {\n UserNotification.error(`Fetching Input Types failed with status: ${error}`,\n 'Could not retrieve Inputs');\n },\n );\n\n InputTypesActions.list.promise(promise);\n },\n\n get(inputTypeId: string) {\n const promise = fetch('GET', qualifyUrl(`${this.sourceUrl}/${inputTypeId}`));\n\n promise\n .catch((error) => {\n UserNotification.error(`Fetching input ${inputTypeId} failed with status: ${error}`,\n 'Could not retrieve input');\n });\n\n InputTypesActions.get.promise(promise);\n },\n }),\n);\n"],"names":["PluginsStore","singletonStore","Reflux","sourceUrl","nodeId","list","fetch","URLUtils","this","then","response","plugins","error","UserNotification","ShowNodePage","createReactClass","displayName","propTypes","params","PropTypes","mixins","NodesStore","state","nodes","props","ClusterOverviewStore","clusterOverview","undefined","InputTypesStore","getInitialState","jvmInformation","UNSAFE_componentWillMount","Promise","all","setState","InputStatesStore","inputStates","inputIds","Object","keys","filteredInputStates","forEach","inputId","inputObject","push","errors","_isLoading","node","systemOverview","render","title","short_node_id","hostname","actions","is_leader","inputDescriptions","withParams","listenables","init","url","ApiRoutes","result","input","id","trigger","_checkInputStateChangeResponse","action","filter","global","failedNodes","length","toLowerCase","start","stop","InputTypesActions","singletonActions","asyncResult","get","inputTypes","promiseTypes","qualifyUrl","promiseDescriptions","promise","typesResponse","descriptionsResponse","types","inputTypeId","catch"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy