Sha256: f27051cf7c81e5edbc32d8d16055edadf1ee37a450781a3369fb50ea89d14b97

Contents?: true

Size: 1.36 KB

Versions: 13

Compression:

Stored size: 1.36 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

13 entries across 13 versions & 1 rubygems

Version Path
foreman_ansible-6.1.1 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-6.0.2 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-6.1.0 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-6.0.1 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-5.1.3 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-6.0.0 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-5.1.2 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-5.1.1 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-5.1.0 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-5.0.1 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-4.0.5 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-4.0.4 webpack/components/AnsibleRolesSwitcher/index.js
foreman_ansible-5.0.0 webpack/components/AnsibleRolesSwitcher/index.js