aaronucsd commented on a change in pull request #3715: Email share
URL: https://github.com/apache/incubator-pinot/pull/3715#discussion_r251548237
##########
File path: thirdeye/thirdeye-frontend/app/pods/home/share-dashboard/route.js
##########
@@ -123,6 +126,69 @@ export default Route.extend(AuthenticatedRouteMixin, {
anomalyMapping[metricName].items[functionName].items.push(get(this,
'anomaliesApiService').getHumanizedEntity(anomaly, humanizedObject));
});
+ anomalyMapping = yield get(this, '_fetchOffsets').perform(anomalyMapping);
+ return anomalyMapping;
+ }).drop(),
+
+ _fetchOffsets: task (function * (anomalyMapping) {
+ if (!anomalyMapping) { return; }
+
+ let map = {};
+ let index = 1;
+ // Iterate through each anomaly
+ yield Object.keys(anomalyMapping).some(function(metric) {
+ Object.keys(anomalyMapping[metric].items).some(function(alert) {
+ anomalyMapping[metric].items[alert].items.forEach(async (item) => {
+ const metricName = get(item.anomaly, 'metricName');
Review comment:
Since this is duplicating accessing `item` for anomaly. We can make a const
for it.
```
const anomaly = item.anomaly;
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]