This is an automated email from the ASF dual-hosted git repository. akshayrai09 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push: new d000501 [TE] Fix alert owner; use consistent filter convention (#4017) d000501 is described below commit d000501d10c38eb5e10f7e987cc60379c8149b23 Author: Akshay Rai <akshayra...@gmail.com> AuthorDate: Mon Mar 25 17:09:36 2019 -0700 [TE] Fix alert owner; use consistent filter convention (#4017) --- .../pods/components/self-serve-alert-details/template.hbs | 6 +++--- .../components/self-serve-alert-yaml-details/template.hbs | 2 +- .../tests/acceptance/self-serve-alert-tuning-test.js | 6 +++--- .../components/self-serve-alert-details/component-test.js | 2 +- .../thirdeye/api/user/dashboard/UserDashboardResource.java | 6 +----- .../detection/yaml/YamlDetectionConfigTranslator.java | 1 + .../dashboard/resource/v2/UserDashboardResourceTest.java | 14 +++++++------- 7 files changed, 17 insertions(+), 20 deletions(-) diff --git a/thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-details/template.hbs b/thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-details/template.hbs index ec22bdc..f8c7082 100644 --- a/thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-details/template.hbs +++ b/thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-details/template.hbs @@ -55,7 +55,7 @@ </div> </li> <li class="te-search-results__row"> - <div class="te-search-results__option te-search-results__option--{{modeSubClass}} te-search-results__option--left">Alert Owner</div> + <div class="te-search-results__option te-search-results__option--{{modeSubClass}} te-search-results__option--left">Created By</div> <div class="te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}> <span class="{{unless alertData.createdBy 'te-search-results__prop--missing' 'te-search-results__prop'}}"> {{if alertData.createdBy alertData.createdBy 'N/A'}} @@ -65,7 +65,7 @@ </div> <div class="col-xs-12 col-sm-7"> <li class="te-search-results__row"> - <div class="te-search-results__option te-search-results__option--{{modeSubClass}}">Data Filter</div> + <div class="te-search-results__option te-search-results__option--{{modeSubClass}}">Filtered By</div> <div class="te-search-results__value{{valueClassSuffix}}" title={{alertData.filters}}> <span class="{{unless alertData.filters 'te-search-results__prop--missing' 'te-search-results__prop'}}"> {{if alertData.filters alertData.filters 'N/A'}} @@ -73,7 +73,7 @@ </div> </li> <li class="te-search-results__row"> - <div class="te-search-results__option te-search-results__option--{{modeSubClass}}">Dimensions</div> + <div class="te-search-results__option te-search-results__option--{{modeSubClass}}">Breakdown By</div> <div class="te-search-results__value{{valueClassSuffix}}" title={{alertData.exploreDimensions}}> <span class="{{unless alertData.exploreDimensions 'te-search-results__prop--missing' 'te-search-results__prop'}}"> {{if alertData.exploreDimensions alertData.exploreDimensions 'N/A'}} diff --git a/thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs b/thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs index 1a8f882..2e6fc0c8 100644 --- a/thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs +++ b/thirdeye/thirdeye-frontend/app/pods/components/self-serve-alert-yaml-details/template.hbs @@ -54,7 +54,7 @@ </div> <div class="col-xs-12 col-sm-7"> <li class="te-search-results__row"> - <div class="te-search-results__option te-search-results__option--{{modeSubClass}} te-search-results__option--left">Owner</div> + <div class="te-search-results__option te-search-results__option--{{modeSubClass}} te-search-results__option--left">Created By</div> <div class="te-search-results__value{{valueClassSuffix}}" title={{alertData.createdBy}}> <span class="{{unless alertData.createdBy 'te-search-results__prop--missing' 'te-search-results__prop'}}"> {{if alertData.createdBy alertData.createdBy 'N/A'}} diff --git a/thirdeye/thirdeye-frontend/tests/acceptance/self-serve-alert-tuning-test.js b/thirdeye/thirdeye-frontend/tests/acceptance/self-serve-alert-tuning-test.js index 55ccfcf..e87ce2a 100644 --- a/thirdeye/thirdeye-frontend/tests/acceptance/self-serve-alert-tuning-test.js +++ b/thirdeye/thirdeye-frontend/tests/acceptance/self-serve-alert-tuning-test.js @@ -15,9 +15,9 @@ module('Acceptance | tune alert settings', function(hooks) { 'Dataset', 'Granularity', 'Application', - 'Alert Owner', - 'Data Filter', - 'Dimensions', + 'Created By', + 'Filtered By', + 'Breakdown By', 'Detection Type', 'Subscription Group' ]; diff --git a/thirdeye/thirdeye-frontend/tests/integration/pods/components/self-serve-alert-details/component-test.js b/thirdeye/thirdeye-frontend/tests/integration/pods/components/self-serve-alert-details/component-test.js index 0dcb6ae..b7de13e 100644 --- a/thirdeye/thirdeye-frontend/tests/integration/pods/components/self-serve-alert-details/component-test.js +++ b/thirdeye/thirdeye-frontend/tests/integration/pods/components/self-serve-alert-details/component-test.js @@ -9,7 +9,7 @@ module('Integration | Component | self serve alert details', function(hooks) { test('it renders', async function(assert) { this.set('alerts', [server.createList('alert', 1)[0].attrs][0]); - const actualPropNames = ["Metric", "Dataset", "Granularity", "Application", "Alert Owner", "Data Filter", "Dimensions", "Detection Type", "Subscription Group"]; + const actualPropNames = ["Metric", "Dataset", "Granularity", "Application", "Created By", "Filtered By", "Breakdown By", "Detection Type", "Subscription Group"]; const headerSel = '.te-search-results__header .te-search-results__tag'; const propTitleSel = '.te-search-results__row .te-search-results__option'; const titleSel = '.te-search-results__title span'; diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/api/user/dashboard/UserDashboardResource.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/api/user/dashboard/UserDashboardResource.java index 6bf84fc..ad2e50c 100644 --- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/api/user/dashboard/UserDashboardResource.java +++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/api/user/dashboard/UserDashboardResource.java @@ -43,7 +43,6 @@ import org.apache.pinot.thirdeye.api.Constants; import org.apache.pinot.thirdeye.constant.AnomalyFeedbackType; import org.apache.pinot.thirdeye.dashboard.resources.v2.ResourceUtils; import org.apache.pinot.thirdeye.dashboard.resources.v2.pojo.AnomalySummary; -import org.apache.pinot.thirdeye.datalayer.bao.AlertConfigManager; import org.apache.pinot.thirdeye.datalayer.bao.DatasetConfigManager; import org.apache.pinot.thirdeye.datalayer.bao.DetectionAlertConfigManager; import org.apache.pinot.thirdeye.datalayer.bao.DetectionConfigManager; @@ -120,7 +119,6 @@ public class UserDashboardResource { * * @param start window start time * @param end window end time (optional) - * @param owner anomaly function owner only (optional) * @param application anomaly function for application alert groups only (optional) * * @return List of AnomalySummary @@ -133,8 +131,6 @@ public class UserDashboardResource { @QueryParam("start") Long start, @ApiParam(value = "end time of anomaly retrieval window") @QueryParam("end") Long end, - @ApiParam(value = "alert owner") - @QueryParam("owner") String owner, @ApiParam(value = "alert application/product/team") @QueryParam("application") String application, @ApiParam(value = "subscription group") @@ -148,7 +144,7 @@ public class UserDashboardResource { @ApiParam(value = "max number of results") @QueryParam("limit") Integer limit) throws Exception { LOG.info("[USER DASHBOARD] Fetching anomalies with filters. Start: " + start + " end: " + end + " metric: " - + metric + " dataset: " + dataset + " owner: " + owner + " application: " + application + " group: " + group + + metric + " dataset: " + dataset + " application: " + application + " group: " + group + " fetchTrueAnomaly: " + fetchTrueAnomaly + " limit: " + limit); // Safety conditions diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlDetectionConfigTranslator.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlDetectionConfigTranslator.java index 377355b..0cdb18d 100644 --- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlDetectionConfigTranslator.java +++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlDetectionConfigTranslator.java @@ -97,6 +97,7 @@ public abstract class YamlDetectionConfigTranslator { if (existingConfig != null) { config.setId(existingConfig.getId()); config.setLastTimestamp(existingConfig.getLastTimestamp()); + config.setCreatedBy(existingConfig.getCreatedBy()); } return config; diff --git a/thirdeye/thirdeye-pinot/src/test/java/org/apache/pinot/thirdeye/dashboard/resource/v2/UserDashboardResourceTest.java b/thirdeye/thirdeye-pinot/src/test/java/org/apache/pinot/thirdeye/dashboard/resource/v2/UserDashboardResourceTest.java index a64a331..40a3efc 100644 --- a/thirdeye/thirdeye-pinot/src/test/java/org/apache/pinot/thirdeye/dashboard/resource/v2/UserDashboardResourceTest.java +++ b/thirdeye/thirdeye-pinot/src/test/java/org/apache/pinot/thirdeye/dashboard/resource/v2/UserDashboardResourceTest.java @@ -110,47 +110,47 @@ public class UserDashboardResourceTest { @Test public void testAnomaliesByApplication() throws Exception { - List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, "myApplicationA", null, null, null, false, null); + List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, "myApplicationA", null, null, null, false, null); Assert.assertEquals(anomalies.size(), 2); Assert.assertEquals(extractIds(anomalies), makeSet(this.anomalyIds.get(1), this.anomalyIds.get(2))); } @Test public void testAnomaliesByApplicationInvalid() throws Exception { - List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, "Invalid", null, null, null, false, null); + List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, "Invalid", null, null, null, false, null); Assert.assertEquals(anomalies.size(), 0); } @Test public void testAnomaliesByGroup() throws Exception { - List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, null, "myAlertB", null, null, false, null); + List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, "myAlertB", null, null, false, null); Assert.assertEquals(anomalies.size(), 2); Assert.assertEquals(extractIds(anomalies), makeSet(this.anomalyIds.get(3), this.anomalyIds.get(4))); } @Test public void testAnomaliesByGroupInvalid() throws Exception { - List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, null, "Invalid", null, null, false, null); + List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, "Invalid", null, null, false, null); Assert.assertEquals(anomalies.size(), 0); } @Test public void testAnomaliesLimit() throws Exception { - List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, "myApplicationA", null, null, null, false, 1); + List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, "myApplicationA", null, null, null, false, 1); Assert.assertEquals(anomalies.size(), 1); Assert.assertEquals(extractIds(anomalies), makeSet(this.anomalyIds.get(1))); } @Test public void testAnomaliesByMetric() throws Exception { - List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, null, null, "test_metric", "test_dataset", false, null); + List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, null, "test_metric", "test_dataset", false, null); Assert.assertEquals(anomalies.size(), 3); Assert.assertEquals(extractIds(anomalies), makeSet(this.anomalyIds.get(1), this.anomalyIds.get(2), this.anomalyIds.get(3))); } @Test public void testAnomaliesByDataset() throws Exception { - List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, null, null, null, "test_dataset", false, null); + List<AnomalySummary> anomalies = this.resource.queryAnomalies(1000L, null, null, null, null, "test_dataset", false, null); Assert.assertEquals(anomalies.size(), 4); Assert.assertEquals(extractIds(anomalies), makeSet(this.anomalyIds.get(1), this.anomalyIds.get(2), this.anomalyIds.get(3), this.anomalyIds.get(4))); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org