diff --git a/.eslintrc.json b/.eslintrc.json index bca484b1f..f79a235d0 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -24,7 +24,9 @@ "no-extra-boolean-cast": "off", "node/no-unpublished-require": 0, "node/no-unsupported-features": 0, - "node/no-unsupported-features/es-syntax": 0 + "node/no-unsupported-features/es-syntax": 0, + "react/prop-types": 0, + "node/no-unsupported-features/es-builtins": 0 }, "plugins": ["node", "async-await"], "extends": [ diff --git a/public/services/notifications/global_toast_list.tsx b/public/services/notifications/global_toast_list.tsx deleted file mode 100644 index 92d15f24c..000000000 --- a/public/services/notifications/global_toast_list.tsx +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { EuiGlobalToastList, Toast } from '@elastic/eui'; - -import React from 'react'; -import * as Rx from 'rxjs'; - -interface Props { - toasts$: Rx.Observable; - dismissToast: (t: Toast) => void; -} - -interface State { - toasts: Toast[]; -} - -export class GlobalToastListw extends React.Component { - public state: State = { - toasts: [] - }; - - private subscription?: Rx.Subscription; - - public componentDidMount() { - this.subscription = this.props.toasts$.subscribe(toasts => { - this.setState({ toasts }); - }); - } - - public componentWillUnmount() { - if (this.subscription) { - this.subscription.unsubscribe(); - } - } - - public render() { - const increaseTime = ((this.state || {}).toasts || []).some( - item => item.color === 'danger' - ); - - return ( - - ); - } -} diff --git a/public/services/notifications/toasts_service.tsx b/public/services/notifications/toasts_service.tsx deleted file mode 100644 index f3d95771c..000000000 --- a/public/services/notifications/toasts_service.tsx +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import { render, unmountComponentAtNode } from 'react-dom'; - -import { Toast } from '@elastic/eui'; -import { I18nSetup } from '../../../../../src/core/public/i18n'; -import { GlobalToastList } from '../../../../../src/core/public/notifications/toasts/global_toast_list'; -import { ToastsApi } from '../../../../../src/core/public/notifications/toasts/toasts_api'; - -interface StartDeps { - i18n: I18nSetup; - targetDomElement: HTMLElement; -} - -export class ToastsService { - private api?: ToastsApi; - private targetDomElement?: HTMLElement; - - public setup() { - this.api = new ToastsApi(); - return this.api!; - } - - public start({ i18n, targetDomElement }: StartDeps) { - this.targetDomElement = targetDomElement; - - render( - - this.api!.remove(toast)} - toasts$={this.api!.get$()} - /> - , - targetDomElement - ); - - return this.api!; - } - - public stop() { - if (this.targetDomElement) { - unmountComponentAtNode(this.targetDomElement); - this.targetDomElement.textContent = ''; - } - } -} diff --git a/test/server/wazuh-elastic.js b/test/server/wazuh-elastic.js index b60eb10a1..a1258ec08 100644 --- a/test/server/wazuh-elastic.js +++ b/test/server/wazuh-elastic.js @@ -1,8 +1,6 @@ const chai = require('chai'); const needle = require('needle'); -const { version, revision } = require('../../package.json'); - const kibanaServer = process.env.KIBANA_IP || 'localhost'; chai.should();