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.16.2 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.1.2 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.1.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc5.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc5 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc4.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.15.3.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.15.3 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc4 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc3.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.15.2 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc3 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc2.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc2 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.15.1.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc1.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.15.1 webpack/scenes/Subscriptions/SubscriptionHelpers.js
katello-3.16.0.rc1 webpack/scenes/Subscriptions/SubscriptionHelpers.js