Sha256: d396f2c77eeb974bec316e48f26a378e74e04ff1aa7872b543007c8e678c5d85

Contents?: true

Size: 1.23 KB

Versions: 28

Compression:

Stored size: 1.23 KB

Contents

import {
  selectAPIStatus,
} from 'foremanReact/redux/API/APISelectors';

import { STATUS } from 'foremanReact/constants';

import {
  UPDATE_CDN_CONFIGURATION_KEY,
} from './OrganizationConstants';

export const selectOrganizationState = state => state.katello.organization;
export const selectOrgLoading = state => state.katello.organization.loading;

export const selectManifestName = state =>
  selectOrganizationState(state).owner_details?.upstreamConsumer?.name;

// for use in ManageManifestModal to replace getManifestName()
export const selectManifestHref = state =>
  selectManifestName(state) && [
    'https://',
    selectOrganizationState(state).owner_details.upstreamConsumer.webUrl,
    selectOrganizationState(state).owner_details.upstreamConsumer.uuid,
  ].join('/');

export const selectIsManifestImported = state =>
  !!selectOrganizationState(state).owner_details?.upstreamConsumer?.webUrl;

export const selectSimpleContentAccessEnabled = state =>
  selectOrganizationState(state).simple_content_access;

export const selectCdnConfigurationUpdateStatus = state =>
  selectAPIStatus(state, UPDATE_CDN_CONFIGURATION_KEY);

export const selectUpdatingCdnConfiguration = state =>
  selectCdnConfigurationUpdateStatus(state) === STATUS.PENDING;

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
katello-4.11.1 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.11.0 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.11.0.rc2 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.11.0.rc1 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.10.0 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.9.2 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.10.0.rc2 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.10.0.rc1 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.8.4 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.9.1 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.8.3 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.9.0 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.7.6 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.8.2 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.9.0.rc2 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.9.0.rc1 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.8.1 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.7.5 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.8.0 webpack/scenes/Organizations/OrganizationSelectors.js
katello-4.8.0.rc2 webpack/scenes/Organizations/OrganizationSelectors.js