function getElementServices (app, name) {
  let forecasts = app.get('forecasts')
  if (name) {
    forecasts = forecasts.filter(forecast => forecast.name === name)
  }

  // Iterate over configured forecast models
  let services = []
  for (let forecast of forecasts) {
    for (let element of forecast.elements) {
      let service = app.getService(forecast.name + '/' + element.name)
      if (service) {
        services.push(service)
      }
    }
  }
  return services
}
function getElementServices (app, name) {
  let forecasts = app.get('forecasts')
  if (name) {
    forecasts = forecasts.filter(forecast => forecast.name === name)
  }

  
  let services = []
  for (let forecast of forecasts) {
    for (let element of forecast.elements) {
      let service = app.getService(forecast.name + '/' + element.name)
      if (service) {
        services.push(service)
      }
    }
  }
  return services
}
function getElementServices ( app , name ) { let forecasts = app . get ( 'forecasts' ) if ( name ) { forecasts = forecasts . filter ( forecast => forecast . name === name ) } // Iterate over configured forecast models
 let services = [ ] for ( let forecast of forecasts ) { for ( let element of forecast . elements ) { let service = app . getService ( forecast . name + '/' + element . name ) if ( service ) { services . push ( service ) } } } return services }
Get all element services
Get all element services