This is an automated email from the ASF dual-hosted git repository.

xhsun 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 977c79c  [TE] frontend - harleyjj/rca - cube table updates (#5159)
977c79c is described below

commit 977c79c6959a4fd58cba48ed2305a4b560b6d7e5
Author: Harley Jackson <[email protected]>
AuthorDate: Mon Mar 23 08:11:13 2020 -0700

    [TE] frontend - harleyjj/rca - cube table updates (#5159)
---
 .../rootcause-dimensions-algorithm/component.js      | 15 ++++++---------
 .../custom/dimensions-table/change-bars/component.js |  4 ++--
 .../custom/dimensions-table/change-bars/template.hbs |  2 +-
 .../contribution-change/template.hbs                 |  1 -
 .../{contribution-change => cost}/component.js       |  3 +--
 .../pods/custom/dimensions-table/cost/template.hbs   |  1 +
 .../custom/dimensions-table/dimension/template.hbs   |  2 +-
 .../{percent-change => node-size}/component.js       |  0
 .../custom/dimensions-table/node-size/template.hbs   |  1 +
 .../dimensions-table/percent-change/template.hbs     |  1 -
 .../app/shared/dimensionAnalysisTableConfig.js       | 20 ++++++++++----------
 .../app/styles/pods/custom/dimensions-table.scss     |  5 +++--
 12 files changed, 26 insertions(+), 29 deletions(-)

diff --git 
a/thirdeye/thirdeye-frontend/app/pods/components/rootcause-dimensions-algorithm/component.js
 
b/thirdeye/thirdeye-frontend/app/pods/components/rootcause-dimensions-algorithm/component.js
index 0d021eb..e7d106b 100644
--- 
a/thirdeye/thirdeye-frontend/app/pods/components/rootcause-dimensions-algorithm/component.js
+++ 
b/thirdeye/thirdeye-frontend/app/pods/components/rootcause-dimensions-algorithm/component.js
@@ -238,14 +238,13 @@ export default Component.extend({
             dimensions: dimensionNames,
             isSelected: selectedUrns.has(dimensionUrn),
             percentageChange: record.percentageChange,
-            contributionChange: record.contributionChange,
-            contributionToOverallChange: record.contributionToOverallChange,
-            cob: `${toFixedIfDecimal(record.currentValue) || 0} / 
${toFixedIfDecimal(record.baselineValue) || 0}`,
+            nodeSize: record.sizeFactor,
+            cost: record.cost,
+            boc: `${toFixedIfDecimal(record.baselineValue) || 0} / 
${toFixedIfDecimal(record.currentValue) || 0}`,
             elementWidth: this._calculateContributionBarWidth(dimensionRows, 
record)
           });
         });
       }
-
       return newDimensionRows;
     }
   ),
@@ -350,8 +349,6 @@ export default Component.extend({
       currentValue: dimSubGroup.map(row => row.currentValue).reduce((total, 
amount) => total + amount),
       baselineValue: dimSubGroup.map(row => row.baselineValue).reduce((total, 
amount) => total + amount),
       percentageChange: recordToCopy.percentageChange,
-      contributionChange: recordToCopy.contributionChange,
-      contributionToOverallChange: recordToCopy.contributionToOverallChange,
       cost: recordToCopy.cost
     };
     dimensionRows.splice(whereToInsert, 0, newRecordObj);
@@ -484,7 +481,7 @@ export default Component.extend({
    * @private
    */
   _calculateContributionBarWidth(dimensionRows, record) {
-    const overallChangeValues = dimensionRows.map(row => 
toWidthNumber(row.contributionToOverallChange));
+    const overallChangeValues = dimensionRows.map(row => row.percentageChange 
? toWidthNumber(row.percentageChange) : 0);
     const allValuesPositive = overallChangeValues.every(val => val > 0);
     const allValuesNegative = overallChangeValues.every(val => val < 0);
     const widthAdditivePositive = allValuesPositive ? EXTRA_WIDTH : 0;
@@ -492,7 +489,7 @@ export default Component.extend({
 
     // Find the largest change value across all rows
     const maxChange = d3.max(dimensionRows.map((row) => {
-      return Math.abs(toWidthNumber(row.contributionToOverallChange));
+      return Math.abs(row.percentageChange ? 
toWidthNumber(row.percentageChange) : 0);
     }));
 
     // Generate a scale mapping the change value span to a specific range
@@ -501,7 +498,7 @@ export default Component.extend({
       .range([0, 100]);
 
     // Convert contribution value to a width based on our scale
-    const contributionValue = 
toWidthNumber(record.contributionToOverallChange);
+    const contributionValue = record.percentageChange ? 
toWidthNumber(record.percentageChange) : 0;
     const widthPercent = Math.round(widthScale(Math.abs(contributionValue)));
 
     // These will be used to set our bar widths/classes in 
dimensions-table/change-bars component
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/change-bars/component.js
 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/change-bars/component.js
index 16700c6..c340518 100644
--- 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/change-bars/component.js
+++ 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/change-bars/component.js
@@ -5,7 +5,7 @@
  *
  * @example for usage in models table columns definitions
  *  {
- *    propertyName: 'contributionToOverallChange',
+ *    propertyName: 'percentageChange',
  *    component: 'custom/dimensions-table/change-bars',
  *    title: 'Contribution to Overall Change',
  *    className: 'rootcause-dimensions-table__column 
rootcause-dimensions-table__column--bar-cell',
@@ -63,7 +63,7 @@ export default Component.extend({
     setProperties(this, {
       containerWidthNegative,
       containerWidthPositive,
-      isNegativeChange: toWidthNumber(this.record.contributionToOverallChange) 
< 0,
+      isNegativeChange: toWidthNumber(this.record.percentageChange) < 0,
       barWidthNegative: 
negativeBarScale(toWidthNumber(this.record.elementWidth.negative)),
       barWidthPositive: 
positiveBarScale(toWidthNumber(this.record.elementWidth.positive))
     });
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/change-bars/template.hbs
 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/change-bars/template.hbs
index 12169ff..b1a8c7e 100644
--- 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/change-bars/template.hbs
+++ 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/change-bars/template.hbs
@@ -6,4 +6,4 @@
   <div class="rootcause-dimensions-table__bar 
rootcause-dimensions-table__bar--positive" 
style="width:{{barWidthPositive}}%"></div>
 </div>
 
-<div class="rootcause-dimensions-table__bar-metric {{if isNegativeChange 
"rootcause-dimensions-table__bar-metric--negative"}}">{{record.contributionToOverallChange}}</div>
+<div class="rootcause-dimensions-table__bar-metric {{if isNegativeChange 
"rootcause-dimensions-table__bar-metric--negative"}}">{{record.percentageChange}}</div>
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/contribution-change/template.hbs
 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/contribution-change/template.hbs
deleted file mode 100644
index f7a05ae..0000000
--- 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/contribution-change/template.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{record.contributionChange}}
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/contribution-change/component.js
 b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/cost/component.js
similarity index 91%
rename from 
thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/contribution-change/component.js
rename to 
thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/cost/component.js
index 5fcf278..9cb511b 100644
--- 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/contribution-change/component.js
+++ 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/cost/component.js
@@ -17,9 +17,8 @@ export default Component.extend({
 
   init() {
     this._super(...arguments);
-    if (toWidthNumber(this.record.contributionChange) < 0) {
+    if (toWidthNumber(this.record.percentageChange) < 0) {
       set(this, 'isNegativeChange', true);
     }
   }
 });
-
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/cost/template.hbs 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/cost/template.hbs
new file mode 100644
index 0000000..7aadf27
--- /dev/null
+++ 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/cost/template.hbs
@@ -0,0 +1 @@
+{{record.cost}}
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/dimension/template.hbs
 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/dimension/template.hbs
index 4cd7976..08a913a 100644
--- 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/dimension/template.hbs
+++ 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/dimension/template.hbs
@@ -8,7 +8,7 @@
 <div class="rootcause-dimensions-table__dimension-content {{if 
column.isFirstColumn "rootcause-dimensions-table__dimension-content--first"}}" 
title="{{dimensionValue}}">
   {{#if isValueShown}}
     {{#if excludedDimensions}}
-      <a class="te-anomaly-table__link" href="#">
+      <a class="te-anomaly-table__link">
         {{dimensionValue}}
         {{#tooltip-on-element}}
           OTHER includes => {{excludedDimensions}}
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/percent-change/component.js
 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/node-size/component.js
similarity index 100%
rename from 
thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/percent-change/component.js
rename to 
thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/node-size/component.js
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/node-size/template.hbs
 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/node-size/template.hbs
new file mode 100644
index 0000000..53b5d47
--- /dev/null
+++ 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/node-size/template.hbs
@@ -0,0 +1 @@
+{{record.nodeSize}}
diff --git 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/percent-change/template.hbs
 
b/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/percent-change/template.hbs
deleted file mode 100644
index a58a4ff..0000000
--- 
a/thirdeye/thirdeye-frontend/app/pods/custom/dimensions-table/percent-change/template.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{record.percentageChange}}
diff --git 
a/thirdeye/thirdeye-frontend/app/shared/dimensionAnalysisTableConfig.js 
b/thirdeye/thirdeye-frontend/app/shared/dimensionAnalysisTableConfig.js
index e818574..af4498c 100644
--- a/thirdeye/thirdeye-frontend/app/shared/dimensionAnalysisTableConfig.js
+++ b/thirdeye/thirdeye-frontend/app/shared/dimensionAnalysisTableConfig.js
@@ -19,32 +19,32 @@ export const groupedHeaders = (advDimensionCount, 
overallChange) => [
  */
 export const baseColumns = [
   {
-    propertyName: 'cob',
-    title: 'Current/Baseline',
+    propertyName: 'boc',
+    title: 'Baseline/Current',
     className: `${COLUMN_CLASS} ${COLUMN_CLASS}--large-width`,
     disableSorting: true,
     disableFiltering: true
   },
   {
-    propertyName: 'contributionToOverallChange',
+    propertyName: 'percentageChange',
     component: 'custom/dimensions-table/change-bars',
-    title: 'Contribution to Overall Change',
+    title: '% Change',
     className: `${COLUMN_CLASS} ${COLUMN_CLASS}--bar-cell`,
     disableSorting: true,
     disableFiltering: true
   },
   {
-    propertyName: 'percentageChange',
-    title: '% Change',
-    component: 'custom/dimensions-table/percent-change',
+    propertyName: 'nodeSize',
+    title: 'Node Size',
+    component: 'custom/dimensions-table/node-size',
     className: `${COLUMN_CLASS} ${COLUMN_CLASS}--med-width`,
     disableSorting: true,
     disableFiltering: true
   },
   {
-    propertyName: 'contributionChange',
-    title: 'Change in Contribution',
-    component: 'custom/dimensions-table/contribution-change',
+    propertyName: 'cost',
+    title: 'Cost',
+    component: 'custom/dimensions-table/cost',
     className: `${COLUMN_CLASS} ${COLUMN_CLASS}--med-width`,
     disableSorting: true,
     disableFiltering: true
diff --git 
a/thirdeye/thirdeye-frontend/app/styles/pods/custom/dimensions-table.scss 
b/thirdeye/thirdeye-frontend/app/styles/pods/custom/dimensions-table.scss
index bf8834a..64522cf 100644
--- a/thirdeye/thirdeye-frontend/app/styles/pods/custom/dimensions-table.scss
+++ b/thirdeye/thirdeye-frontend/app/styles/pods/custom/dimensions-table.scss
@@ -46,8 +46,9 @@
     }
   }
   &__dimension-content {
-    overflow: hidden;
-    text-overflow: ellipsis;
+    display: inline-block;
+    overflow: auto !important;
+    text-overflow: initial !important;
     max-width: 164px;
   }
   &__dimension-content--first {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to