Sha256: 87b2eefe1d99e479ae39e2b5ec90c451e6b80ebe531d0a583000079ec125167b

Contents?: true

Size: 1.52 KB

Versions: 11

Compression:

Stored size: 1.52 KB

Contents

import {
  selectAPIStatus,
  selectAPIError,
  selectAPIResponse,
} from 'foremanReact/redux/API/APISelectors';
import { STATUS } from 'foremanReact/constants';
import {
  cvDetailsKey,
  cvDetailsRepoKey,
  cvDetailsFilterKey,
  REPOSITORY_TYPES,
} from '../ContentViewsConstants';

export const selectCVDetails = (state, cvId) =>
  selectAPIResponse(state, cvDetailsKey(cvId)) || {};

export const selectCVDetailStatus =
  (state, cvId) => selectAPIStatus(state, cvDetailsKey(cvId)) || STATUS.PENDING;

export const selectCVDetailError =
  (state, cvId) => selectAPIError(state, cvDetailsKey(cvId));

export const selectCVRepos = (state, cvId) =>
  selectAPIResponse(state, cvDetailsRepoKey(cvId)) || {};

export const selectCVReposStatus = (state, cvId) =>
  selectAPIStatus(state, cvDetailsRepoKey(cvId)) || STATUS.PENDING;

export const selectCVReposError = (state, cvId) =>
  selectAPIError(state, cvDetailsRepoKey(cvId));

export const selectRepoTypes = state =>
  selectAPIResponse(state, REPOSITORY_TYPES) || {};

export const selectRepoTypesStatus = state =>
  selectAPIStatus(state, REPOSITORY_TYPES) || STATUS.PENDING;

export const selectCVFilters = (state, cvId) =>
  selectAPIResponse(state, cvDetailsFilterKey(cvId)) || {};

export const selectCVFiltersStatus = (state, cvId) =>
  selectAPIStatus(state, cvDetailsFilterKey(cvId)) || STATUS.PENDING;

export const selectCVFiltersError = (state, cvId) =>
  selectAPIError(state, cvDetailsFilterKey(cvId));

export const selectIsCVUpdating = state => state.katello?.contentViewDetails?.updating;

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
katello-4.0.3 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.2.1 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.2 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.1.2 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.1.1 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.1 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.0 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.0.rc3.1 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.0.rc3 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.0.rc2 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js
katello-4.0.0.rc1 webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js