Sha256: fe7d99d7af2cc8fefa5a88740e69de753ef7c5d22edcb7e85ecac5a9b25ef4a4
Contents?: true
Size: 1.12 KB
Versions: 59
Compression:
Stored size: 1.12 KB
Contents
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; import SwitcherPF4 from '../../../common/Switcher/SwitcherPF4'; import './insightsSettings.scss'; class InsightsSettings extends Component { componentDidMount() { const { getInsightsSyncSettings } = this.props; getInsightsSyncSettings(); } render() { const { insightsSyncEnabled, setInsightsSyncEnabled } = this.props; return ( <div className="insights_settings"> <SwitcherPF4 id="insights_sync_switcher" label={__('Sync automatically')} tooltip={__( 'Enable automatic synchronization of Insights recommendations from the Red Hat cloud' )} isChecked={insightsSyncEnabled} onChange={() => setInsightsSyncEnabled(!insightsSyncEnabled)} /> </div> ); } } InsightsSettings.propTypes = { insightsSyncEnabled: PropTypes.bool.isRequired, getInsightsSyncSettings: PropTypes.func.isRequired, setInsightsSyncEnabled: PropTypes.func.isRequired, }; export default InsightsSettings;
Version data entries
59 entries across 59 versions & 1 rubygems