Sha256: fe7d99d7af2cc8fefa5a88740e69de753ef7c5d22edcb7e85ecac5a9b25ef4a4

Contents?: true

Size: 1.12 KB

Versions: 58

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

58 entries across 58 versions & 1 rubygems

Version Path
foreman_rh_cloud-9.0.59 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-11.0.2 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-11.0.1 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-11.0.0 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-9.0.58 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-10.0.2 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-9.0.57 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-10.0.1 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-9.0.56 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-9.0.55 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-9.0.54 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-9.0.53 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-9.0.52 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-8.0.52 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-9.0.51 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-8.0.51 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-7.0.48 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-7.0.47 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-8.0.50 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js
foreman_rh_cloud-8.0.49 webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettings.js