Sha256: 64df6c9a46a506751ec4452eb0ffc0f03a1e0d3957987673fb4a132d6607635a

Contents?: true

Size: 306 Bytes

Versions: 10

Compression:

Stored size: 306 Bytes

Contents

function calculateServiceUsage(hostServiceId, services) {
  const service = services.find(serv => serv['id'] == hostServiceId);
  if ('currentCount' in service) {
    service['currentCount'] += 1;
  } else {
    service['currentCount'] = 1;
  }

  return services;
}

export {
  calculateServiceUsage,
};

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_acd-0.9.7 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js
foreman_acd-0.9.5 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js
foreman_acd-0.9.4 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js
foreman_acd-0.9.3 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js
foreman_acd-0.9.2.3 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js
foreman_acd-0.9.2.2 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js
foreman_acd-0.9.2.1 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js
foreman_acd-0.9.2 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js
foreman_acd-0.9.1 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js
foreman_acd-0.9.0 webpack/components/ApplicationInstance/ApplicationInstanceHelper.js