Sha256: da7b242ae46b3a84fbb456e24908550d8d2813e5374d60ce9aa8c6215e78ee35

Contents?: true

Size: 1.37 KB

Versions: 20

Compression:

Stored size: 1.37 KB

Contents

import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';

import AnsibleRolesSwitcher from './AnsibleRolesSwitcher';
import * as AnsibleRolesSwitcherActions from './AnsibleRolesSwitcherActions';
import AnsiblePermissionDenied from './components/AnsiblePermissionDenied';
import withProtectedView from './components/withProtectedView';
import {
  selectUnassignedRoles,
  selectAssignedRolesPage,
  selectAssignedRoles,
  selectAssignedRolesCount,
  selectResults,
  selectPaginationMemoized,
  selectItemCount,
  selectLoading,
  selectAssignedPagination,
  selectError,
} from './AnsibleRolesSwitcherSelectors';

const mapStateToProps = state => ({
  results: selectResults(state),
  pagination: selectPaginationMemoized(state),
  itemCount: selectItemCount(state),
  loading: selectLoading(state),
  error: selectError(state),
  assignedPagination: selectAssignedPagination(state),
  assignedRolesCount: selectAssignedRolesCount(state),
  assignedRoles: selectAssignedRolesPage(state),
  allAssignedRoles: selectAssignedRoles(state),
  unassignedRoles: selectUnassignedRoles(state),
});

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

export default withProtectedView(
  connect(
    mapStateToProps,
    mapDispatchToProps
  )(AnsibleRolesSwitcher),
  AnsiblePermissionDenied,
  props => props.data && props.data.canView
);

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
foreman_ansible-4.0.3.5 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-4.0.3.4 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-4.0.3.3 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-4.0.3.2 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-4.0.3.1 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-4.0.3 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-4.0.2 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-4.0.0 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.9 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.8 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.7 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.6 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.5 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.4 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.3 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-2.3.4 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.2 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.1 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-3.0.0 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-2.3.3 webpack/components/AnsibleRolesSwitcher/index.js