You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/02/04 20:25:40 UTC

[GitHub] [incubator-pinot] tejasajmera opened a new pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

tejasajmera opened a new pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545


   Composite alerts can have multiple metrics instead of just 1. The backend would be making the change to return a list of metrics. On the frontend we would be displaying the name of the first metric and the count of the remaining metrics for now. 
   If need be, we may show tooltips later to display the entire metric list, but at this point there is no decision made yet for that.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] zhangloo333 commented on a change in pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
zhangloo333 commented on a change in pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#discussion_r570528578



##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>

Review comment:
       you could format it to set `dd` on the next line.

##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>
+  </dl>
+
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Created By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
+      {{if alertData.createdBy alertData.createdBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Updated By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
+      {{if alertData.updatedBy alertData.updatedBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Last detection</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>

Review comment:
       you could format it to set `dd` on the next line.

##########
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:
       if the metrics is empty, the count should be 0, but it shows -1.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] bryantachen commented on pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
bryantachen commented on pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#issuecomment-773695184


   So right now we just list the entire list of metrics without the +# where it could be expanded right?


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] tejasajmera commented on a change in pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
tejasajmera commented on a change in pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#discussion_r570718317



##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>
+  </dl>
+
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Created By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
+      {{if alertData.createdBy alertData.createdBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Updated By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
+      {{if alertData.updatedBy alertData.updatedBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Last detection</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>

Review comment:
       Actually you can discard my comment. Rebasing messed up some of the formatting. I have fixed it now.

##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>

Review comment:
       Actually you can discard my comment. Rebasing messed up some of the formatting. I have fixed it now.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] bryantachen commented on pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
bryantachen commented on pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#issuecomment-773695184


   So right now we just list the entire list of metrics without the +# where it could be expanded right?


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] jihaozh merged pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
jihaozh merged pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] zhangloo333 commented on a change in pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
zhangloo333 commented on a change in pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#discussion_r570528578



##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>

Review comment:
       you could format it to set `dd` on the next line.

##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>
+  </dl>
+
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Created By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
+      {{if alertData.createdBy alertData.createdBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Updated By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
+      {{if alertData.updatedBy alertData.updatedBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Last detection</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>

Review comment:
       you could format it to set `dd` on the next line.

##########
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:
       if the metrics is empty, the count should be 0, but it shows -1.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] zhangloo333 commented on a change in pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
zhangloo333 commented on a change in pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#discussion_r571110089



##########
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:
       Ok, that's great.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] tejasajmera commented on a change in pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
tejasajmera commented on a change in pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#discussion_r570717049



##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>

Review comment:
       I would refrain from making any manual changes to formatting. It is confusing when exactly to make changes and when not to since I am and we all should be relying on hbs prettier. We want to modify prettify rules instead of making any manual changes as it is counterproductive.

##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>
+  </dl>
+
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Created By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
+      {{if alertData.createdBy alertData.createdBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Updated By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
+      {{if alertData.updatedBy alertData.updatedBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Last detection</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>

Review comment:
       I would refrain from making any manual changes to formatting. It is confusing when exactly to make changes and when not to since I am and we all should be relying on hbs prettier. We want to modify prettify rules instead of making any manual changes as it is counterproductive.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] tejasajmera commented on pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
tejasajmera commented on pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#issuecomment-773783026


   @bryantachen Currently behavior -  Display entire list.
   New behavior - Display just the first metric and the count of remaining metrics. The count is not clickable, per mocks it does not have to expand. I agree with this behavior because I sort of struggle to see the utility of having the user see the entire list of potentially hundreds of metrics present in the yaml.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] tejasajmera commented on a change in pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] tejasajmera commented on a change in pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
tejasajmera commented on a change in pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#discussion_r570717049



##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>

Review comment:
       I would refrain from making any manual changes to formatting. It is confusing when exactly to make changes and when not to since I am and we all should be relying on hbs prettier. We want to modify prettify rules instead of making any manual changes as it is counterproductive.

##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>
+  </dl>
+
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Created By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
+      {{if alertData.createdBy alertData.createdBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Updated By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
+      {{if alertData.updatedBy alertData.updatedBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Last detection</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>

Review comment:
       I would refrain from making any manual changes to formatting. It is confusing when exactly to make changes and when not to since I am and we all should be relying on hbs prettier. We want to modify prettify rules instead of making any manual changes as it is counterproductive.

##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>
+  </dl>
+
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Created By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
+      {{if alertData.createdBy alertData.createdBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Updated By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
+      {{if alertData.updatedBy alertData.updatedBy 'N/A'}}</dd>
+
+    <dt class="col-md-4">Last detection</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>

Review comment:
       Actually you can discard my comment. Rebasing messed up some of the formatting. I have fixed it now.

##########
File path: thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs
##########
@@ -40,58 +40,49 @@
   {{alertData.description}}
 </h4>
 {{#if (not isLoadError)}}
-  <div class="te-alert-detail-breakdown row">
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Metric
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
-        {{if alertData.metric alertData.metric "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Dataset
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
-        {{if alertData.dataset alertData.dataset "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Filtered By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
-        {{if alertData.filters alertData.filters "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Breakdown By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
-        {{if alertData.dimensionExploration alertData.dimensionExploration "N/A"}}
-      </dd>
-    </dl>
-    <dl class="col-xs-12 col-sm-5 row">
-      <dt class="col-md-4">
-        Created By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}>
-        {{if alertData.createdBy alertData.createdBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Updated By
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.updatedBy}}>
-        {{if alertData.updatedBy alertData.updatedBy "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Last detection
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.lastDetectionTime}}>
-        {{if alertData.lastDetectionTime alertData.lastDetectionTime "N/A"}}
-      </dd>
-      <dt class="col-md-4">
-        Subscribed Groups
-      </dt>
-      <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{subscribedGroups}}>
-        {{if subscribedGroups subscribedGroups "N/A"}}
-      </dd>
-    </dl>
-  </div>
-{{/if}}
\ No newline at end of file
+<div class="te-alert-detail-breakdown row">
+  <dl class="col-xs-12 col-sm-5 row">
+    <dt class="col-md-4">Metric</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.metric}}>
+      <span>{{if firstMetric firstMetric 'N/A'}}</span>
+      {{#if (gt remainingMetricCount 0)}}
+      <span class="te-search-results__value te-search-results__value--remaining-metric-count">
+        +{{remainingMetricCount}}
+      </span>
+      {{/if}}
+    </dd>
+
+    <dt class="col-md-4">Dataset</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dataset}}>
+      {{if alertData.dataset alertData.dataset 'N/A'}}
+    </dd>
+
+    <dt class="col-md-4">Filtered By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}>
+      {{if alertData.filters alertData.filters 'N/A'}}</dd>
+
+    <dt class="col-md-4">Breakdown By</dt>
+    <dd class="col-md-8 te-search-results__value{{valueClassSuffix}}" title={{alertData.dimensionExploration}}>
+      {{if alertData.dimensionExploration alertData.dimensionExploration 'N/A'}}</dd>

Review comment:
       Actually you can discard my comment. Rebasing messed up some of the formatting. I have fixed it now.

##########
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] tejasajmera commented on pull request #6545: [TE]frontend - Change the formatting of metric display in exploration page

Posted by GitBox <gi...@apache.org>.
tejasajmera commented on pull request #6545:
URL: https://github.com/apache/incubator-pinot/pull/6545#issuecomment-773783026


   @bryantachen Currently behavior -  Display entire list.
   New behavior - Display just the first metric and the count of remaining metrics. The count is not clickable, per mocks it does not have to expand. I agree with this behavior because I sort of struggle to see the utility of having the user see the entire list of potentially hundreds of metrics present in the yaml.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org