graphite-project/graphite-web — pull request #569 by justenwalker (2014-01-09 22:45:20+00:00)
Title: Add groupByNodeMetric render function

# Summary

Takes a seriesList and maps a callback to subgroups within as defined by a common node and filtered by metricsNode matching one of the metrics defined by metricsList.

Note:
- Order of the series matching metricsList is preserved when mapped
to the provided callback.
- Both groupNode and metricNode are 0 indexed

# Example

Given a series of metrics such as:

```
servers.server1.cpu.cpu-user
servers.server1.cpu.cpu-user
```

When executing

target=groupByNodeMetric(servers.*.cpu.*,1,3,"asPercent","cpu-user","cpu-total")

The render produces:

asPercent(servers.server1.cpu.cpu-user,servers.server1.cpu.cpu-total),
asPercent(servers.server2.cpu.cpu-user,servers.server2.cpu.cpu-total),
asPercent(servers.server3.cpu.cpu-user,servers.server3.cpu.cpu-total),
...
asPercent(servers.serverN.cpu.cpu-user,servers.serverN.cpu.cpu-total)