harleyjj 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_r235230479
##########
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:
@apucher thank you for the help - I updated the code as specified
----------------------------------------------------------------
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]