Sha256: 4ae73b25070cf3397264a91c3ed93ca32fcfae7c6d6aa3da2810087f7a6d3c91

Contents?: true

Size: 1.89 KB

Versions: 8

Compression:

Stored size: 1.89 KB

Contents

import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as settingActions from 'foremanReact/components/Settings/SettingsActions';

import * as subscriptionActions from './SubscriptionActions';
import * as taskActions from '../Tasks/TaskActions';
import * as tableActions from '../Settings/Tables/TableActions';
import * as manifestActions from './Manifest/ManifestActions';

import {
  selectSubscriptionsState,
  selectSearchQuery,
  selectManifestModalOpened,
  selectDeleteModalOpened,
  selectTaskModalOpened,
  selectDeleteButtonDisabled,
  selectSubscriptionsTasks,
  selectTableSettings,
} from './SubscriptionsSelectors';

import reducer from './SubscriptionReducer';
import { SUBSCRIPTION_TABLE_NAME } from './SubscriptionConstants';
import SubscriptionsPage from './SubscriptionsPage';

// map state to props
const mapStateToProps = (state) => {
  const subscriptions = selectSubscriptionsState(state);
  const subscriptionTableSettings = selectTableSettings(state, SUBSCRIPTION_TABLE_NAME);

  return {
    subscriptions,
    subscriptionTableSettings,
    tasks: selectSubscriptionsTasks(state),
    searchQuery: selectSearchQuery(state),
    manifestModalOpened: selectManifestModalOpened(state),
    deleteModalOpened: selectDeleteModalOpened(state),
    taskModalOpened: selectTaskModalOpened(state),
    deleteButtonDisabled: selectDeleteButtonDisabled(state),
    organization: state.katello.organization,
    taskDetails: state.katello.manifestHistory.taskDetails,
  };
};

// map action dispatchers to props
const actions = {
  ...subscriptionActions,
  ...taskActions,
  ...settingActions,
  ...tableActions,
  ...manifestActions,
};

const mapDispatchToProps = dispatch => bindActionCreators(actions, dispatch);

// export reducers
export const subscriptions = reducer;

// export connected component
export default connect(mapStateToProps, mapDispatchToProps)(SubscriptionsPage);

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
katello-3.13.4 webpack/scenes/Subscriptions/index.js
katello-3.13.3 webpack/scenes/Subscriptions/index.js
katello-3.13.2 webpack/scenes/Subscriptions/index.js
katello-3.13.1 webpack/scenes/Subscriptions/index.js
katello-3.13.0 webpack/scenes/Subscriptions/index.js
katello-3.13.0.rc2.1 webpack/scenes/Subscriptions/index.js
katello-3.13.0.rc2 webpack/scenes/Subscriptions/index.js
katello-3.13.0.rc1 webpack/scenes/Subscriptions/index.js