maxctrl/lib/cluster.js
// Removes some unwanted properties from the object
Removes some unwanted properties from the object
Removes some unwanted properties from the object
function removeUnwanted(a) {
  var relationships = [
    "relationships.services.data",
    "relationships.servers.data",
    "relationships.monitors.data",
    "relationships.filters.data",
  ];
  var res = _.pick(a, _.concat(["id", "attributes.parameters"], relationships));
  for (r of relationships) {
    var rel = _.get(res, r, []);
    for (o of rel) {
      delete o.type;
    }
  }
  return res;
}
function removeUnwanted ( a ) { var relationships = [ "relationships.services.data" , "relationships.servers.data" , "relationships.monitors.data" , "relationships.filters.data" , ] ; var res = _ . pick ( a , _ . concat ( [ "id" , "attributes.parameters" ] , relationships ) ) ; for ( r of relationships ) { var rel = _ . get ( res , r , [ ] ) ; for ( o of rel ) { delete o . type ; } } return res ; }
Removes some unwanted properties from the object
Removes some unwanted properties from the object