[TE] rootcause poc - prevent newly loaded session from displaying as modified
@@ -102,11 +102,14 @@ export default Ember.Component.extend({
},
onSelect() {
- const { baseUrn, filterMap, onSelection } =
- this.getProperties('baseUrn', 'filterMap', 'onSelection');
+ const { baseUrn, filterMap, selectedUrn, onSelection } =
+ this.getProperties('baseUrn', 'filterMap', 'selectedUrn', 'onSelection');
const metricUrn = appendFilters(baseUrn, fromFilterMap(filterMap));
+ // only trigger on actual metric/filter change
+ if (_.isEqual(metricUrn, selectedUrn)) { return; }
+
const updates = { [metricUrn]: true, [toBaselineUrn(metricUrn)]: true, [toCurrentUrn(metricUrn)]: true };
onSelection(updates);
