tejasajmera commented on a change in pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#discussion_r570719078
##########
File path:
thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/component.js
##########
@@ -38,6 +39,15 @@ export default Component.extend({
}
},
+ didReceiveAttrs() {
+ this._super(...arguments);
+
+ const { alertData: { metric: metrics = [] } = {} } = this;
+
+ this.set('firstMetric', metrics[0]);
+ this.set('remainingMetricCount', metrics.length - 1);
Review comment:
This is remaining metric count, not the actual metric count. We display
the first metric and the count of remaining metrics. That is the reason you
subtract by 1. If there are no metrics or just 1 metric then the remaining
metric count will not be displayed in `hbs` as the `hbs` has the condition to
display the count only if the count is greater than 0.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]