You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pinot.apache.org by GitBox <gi...@apache.org> on 2018/11/20 23:45:06 UTC

[GitHub] apucher commented on a change in pull request #3532: [TE] frontend - harleyjj/rootcause - fix data inconsistency warning t…

apucher commented on a change in pull request #3532: [TE] frontend - harleyjj/rootcause - fix data inconsistency warning t…
URL: https://github.com/apache/incubator-pinot/pull/3532#discussion_r235210157
 
 

 ##########
 File path: thirdeye/thirdeye-frontend/app/pods/components/rootcause-anomaly/component.js
 ##########
 @@ -66,12 +67,40 @@ export default Component.extend({
    */
   options: Object.keys(ANOMALY_OPTIONS_MAPPING),
 
+  /**
+   * Can be set by isWarning if data inconsistent
+   * @type {boolean}
+   */
+  warningValue: false,
+
   /**
    * A mapping of the status and a more human readable version
    * @type {Object}
    */
   optionsMapping: ANOMALY_OPTIONS_MAPPING,
 
+  /**
+   * Locally cache original time range on init
+   *
+   */
+  init() {
+    this._super(...arguments);
+    set(this, 'anomalyRangeOld', get(this, 'anomalyRange'));
+  },
+
+  /**
+   * Checks if anomalyRange has been changed since init
+   * @type {boolean}
+   */
+  isRangeChanged: computed(
+    'anomalyRange',
+    function () {
+      const anomalyRange = get(this, 'anomalyRange');
+      const anomalyRangeOld = get(this, 'anomalyRangeOld');
+      return (anomalyRange != anomalyRangeOld);
 
 Review comment:
   This isn't gonna work, unfortunately. You'll need to compare the **start** and **end** of the anomaly entity with the anomaly range in the rca context

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


With regards,
Apache Git Services

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