Sha256: 5939945f502cb47b83cace591021d6d59466e4b41291952ff05d5becd8bbe07a

Contents?: true

Size: 1.43 KB

Versions: 51

Compression:

Stored size: 1.43 KB

Contents

import { selectAPIError, selectAPIResponse, selectAPIStatus } from 'foremanReact/redux/API/APISelectors';
import { STATUS } from 'foremanReact/constants';
import ACS_KEY, { acsDetailsKey, CREATE_ACS_KEY, PRODUCTS_KEY } from './ACSConstants';

export const selectAlternateContentSources = (state, index = '') => selectAPIResponse(state, ACS_KEY + index) || {};

export const selectAlternateContentSourcesStatus = (state, index = '') =>
  selectAPIStatus(state, ACS_KEY + index) || STATUS.PENDING;

export const selectAlternateContentSourcesError = (state, index = '') =>
  selectAPIError(state, ACS_KEY + index);

export const selectCreateACS = (state, name) =>
  selectAPIResponse(state, CREATE_ACS_KEY + name) || {};

export const selectCreateACSStatus = (state, name) =>
  selectAPIStatus(state, CREATE_ACS_KEY + name) || STATUS.PENDING;

export const selectCreateACSError = (state, name) =>
  selectAPIError(state, CREATE_ACS_KEY + name);

export const selectACSDetails = (state, acsId) =>
  selectAPIResponse(state, acsDetailsKey(acsId)) || {};

export const selectACSDetailsStatus =
    (state, acsId) => selectAPIStatus(state, acsDetailsKey(acsId)) || STATUS.PENDING;

export const selectACSDetailsError =
    (state, acsId) => selectAPIError(state, acsDetailsKey(acsId));

export const selectProducts = state => selectAPIResponse(state, PRODUCTS_KEY) || {};

export const selectProductsStatus = state => selectAPIStatus(state, PRODUCTS_KEY) || STATUS.PENDING;

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
katello-4.16.0 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.15.1 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.16.0.rc2 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.16.0.rc1 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.14.3 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.14.2 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.15.0 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.15.0.rc2 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.15.0.rc1 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.14.1 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.14.0 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.14.0.rc3 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.14.0.rc2 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.14.0.rc1.1 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.14.0.rc1 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.13.1 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.13.0 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.12.1 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.13.0.rc1 webpack/scenes/AlternateContentSources/ACSSelectors.js
katello-4.12.0 webpack/scenes/AlternateContentSources/ACSSelectors.js