Sha256: 61409704f7d0982feda023be4b1d78006a783fe83793c6d365b5737720f04357

Contents?: true

Size: 718 Bytes

Versions: 56

Compression:

Stored size: 718 Bytes

Contents

// eslint-disable-next-line import/prefer-default-export
export const filterRHSubscriptions = subscriptions =>
  subscriptions.filter(sub =>
    sub.available >= 0 && sub.upstream_pool_id);

export const manifestExists = organization =>
  organization.owner_details && organization.owner_details.upstreamConsumer;

export const selectSubscriptionsQuantitiesFromResponse = ({ results }) => {
  const quantityMap = {};

  results.forEach(pool =>
    pool.local_pool_ids &&
      pool.local_pool_ids.forEach((localId) => {
        if (quantityMap[localId]) {
          quantityMap[localId] += pool.available;
        } else {
          quantityMap[localId] = pool.available;
        }
      }));
  return quantityMap;
};

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
katello-3.13.0.rc1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.12.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.11.2 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.10.2 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.12.0 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.12.0.rc2 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.10.1.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.12.0.rc1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.10.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.11.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.11.0 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.11.0.rc2 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.11.0.rc1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.10.0 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.10.0.rc1.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.10.0.rc1 webpack/scenes/Subscriptions/SubscriptionHelpers.js