ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbhowm...@apache.org
Subject ambari git commit: Revert - Applied a wrong patch - "AMBARI_14717. Fixed the visual issues in Hive History view. (Rajendra Patil via dipayanb)"
Date Mon, 21 Mar 2016 16:06:58 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e4d955cdf -> 8d8b61f4e


Revert - Applied a wrong patch - "AMBARI_14717. Fixed the visual issues in Hive History view.
(Rajendra Patil via dipayanb)"

This reverts commit c78296809ef24e516a7d42ef4d7ae606c29ff8d8.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8d8b61f4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8d8b61f4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8d8b61f4

Branch: refs/heads/trunk
Commit: 8d8b61f4eaf555e1662e0d8120844877b447602b
Parents: e4d955c
Author: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Authored: Mon Mar 21 21:36:17 2016 +0530
Committer: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Committed: Mon Mar 21 21:36:17 2016 +0530

----------------------------------------------------------------------
 .../ui/hive-web/app/controllers/history.js      |  5 +-
 .../ui/hive-web/app/initializers/i18n.js        |  5 +-
 .../resources/ui/hive-web/app/styles/app.scss   |  8 ---
 .../components/column-filter-widget.hbs         |  2 +-
 .../ui/hive-web/app/utils/functions.js          | 76 ++++++--------------
 .../unit/components/number-range-widget-test.js |  3 -
 6 files changed, 25 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8b61f4/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/history.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/history.js
b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/history.js
index 2c9cc7d..e63362a 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/history.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/history.js
@@ -82,7 +82,7 @@ export default Ember.ArrayController.extend(FilterableMixin, {
       });
 
       minDuration = items.length ? Math.min.apply(Math, items) : 0;
-      maxDuration = items.length ? Math.max.apply(Math, items) : 60; //Default 1 min
+      maxDuration = items.length ? Math.max.apply(Math, items) : 0;
 
       durationColumn.set('numberRange.min', minDuration);
       durationColumn.set('numberRange.max', maxDuration);
@@ -160,9 +160,6 @@ export default Ember.ArrayController.extend(FilterableMixin, {
 
               rangeFilter.set('from', rangeFilter.get('min'));
               rangeFilter.set('to', rangeFilter.get('max'));
-
-              rangeFilter.set('fromDuration', rangeFilter.get('min'));
-              rangeFilter.set('toDuration', rangeFilter.get('max'));
             }
           }
         });

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8b61f4/contrib/views/hive/src/main/resources/ui/hive-web/app/initializers/i18n.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/initializers/i18n.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/initializers/i18n.js
index b3630c1..46847ae 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/initializers/i18n.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/initializers/i18n.js
@@ -212,10 +212,7 @@ TRANSLATIONS = {
 
   labels: {
     noTablesMatch: 'No tables match',
-    table: 'Table ',
-    hoursShort: "{{hours}} hrs",
-    minsShort: "{{minutes}} mins",
-    secsShort: "{{seconds}} secs"
+    table: 'Table '
   },
 
   popover: {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8b61f4/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss b/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
index e1acd5e..716dc02 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/styles/app.scss
@@ -151,14 +151,6 @@ aside  {
   }
 }
 
-.history-date-range {
-  white-space: nowrap;
-}
-.history-date-range .fromDate,
-.history-date-range .toDate {
-  width: 40%;
-}
-
 .form-control::-moz-placeholder {
   color: $placeholder-color;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8b61f4/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/column-filter-widget.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/column-filter-widget.hbs
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/column-filter-widget.hbs
index 3435093..72c72c1 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/column-filter-widget.hbs
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/components/column-filter-widget.hbs
@@ -17,7 +17,7 @@
 }}
 
 {{#if column.dateRange}}
-    {{date-range-widget class="pull-left history-date-range"
+    {{date-range-widget class="pull-left"
                         rangeChanged="sendFilter"
                         dateRange=column.dateRange}}
 {{else}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8b61f4/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
index 32d81d3..91e1a1c 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/utils/functions.js
@@ -40,21 +40,13 @@ export default Ember.Object.create({
 
   validationValues: {
     bool: [
-      Ember.Object.create({
-        value: 'true'
-      }),
-      Ember.Object.create({
-        value: 'false'
-      })
+      Ember.Object.create({ value: 'true' }),
+      Ember.Object.create({ value: 'false' })
     ],
 
     execEngine: [
-      Ember.Object.create({
-        value: 'tez'
-      }),
-      Ember.Object.create({
-        value: 'mr'
-      })
+      Ember.Object.create({ value: 'tez' }),
+      Ember.Object.create({ value: 'mr' })
     ]
   },
 
@@ -74,7 +66,7 @@ export default Ember.Object.create({
     return sourceString.toLowerCase().indexOf(destString.toLowerCase()) > -1;
   },
 
-  convertToArray: function (inputObj) {
+  convertToArray : function (inputObj) {
     var array = [];
 
     for (var key in inputObj) {
@@ -93,47 +85,23 @@ export default Ember.Object.create({
    *
    * @param integer secs Number of seconds to convert
    * @return object
-   */
-  secondsToHHMMSS: function (secs) {
-    var hours = 0,
-      minutes = 0,
-      seconds = secs,
-      divisor_for_minutes,
-      divisor_for_seconds,
-      formattedVal = [];
-
-    if (seconds < 60) {
-      formattedVal.push(Ember.I18n.t('labels.secsShort', {
-        seconds: seconds
-      }));
-    } else {
-      hours = Math.floor(seconds / (60 * 60));
-
-      divisor_for_minutes = seconds % (60 * 60);
-      minutes = Math.floor(divisor_for_minutes / 60);
-
-      divisor_for_seconds = divisor_for_minutes % 60;
-      seconds = Math.ceil(divisor_for_seconds);
-
-      if (hours > 0) {
-        formattedVal.push(Ember.I18n.t('labels.hrsShort', {
-          hours: hours
-        }));
-      }
-      if (minutes > 0) {
-        formattedVal.push(Ember.I18n.t('labels.minsShort', {
-          minutes: minutes
-        }));
-      }
-      if (seconds > 0) {
-        formattedVal.push(Ember.I18n.t('labels.secsShort', {
-          seconds: seconds
-        }));
-      }
-
-    }
-
-    return formattedVal.join(' ');
+  */
+  secondsToHHMMSS: function (secs)
+   {
+    var hours = Math.floor(secs / (60 * 60));
+
+    var divisor_for_minutes = secs % (60 * 60);
+    var minutes = Math.floor(divisor_for_minutes / 60);
+
+    var divisor_for_seconds = divisor_for_minutes % 60;
+    var seconds = Math.ceil(divisor_for_seconds);
+
+    var obj = {
+      "h": hours,
+      "m": minutes,
+      "s": seconds
+    };
+    return  ((obj.h > 0) ? obj.h + ' hr ' : '') + ((obj.m > 0) ? obj.m + ' min ' :
'') + ((obj.s >= 0) ? obj.m + ' sec ' : '');
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/8d8b61f4/contrib/views/hive/src/main/resources/ui/hive-web/tests/unit/components/number-range-widget-test.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/tests/unit/components/number-range-widget-test.js
b/contrib/views/hive/src/main/resources/ui/hive-web/tests/unit/components/number-range-widget-test.js
index 93aaf4d..edc65b1 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/tests/unit/components/number-range-widget-test.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/tests/unit/components/number-range-widget-test.js
@@ -40,9 +40,6 @@ test('Component is initialized correctly', function() {
   equal(component.get('numberRange.from'), numberRange.get('min'), 'from is set to min');
   equal(component.get('numberRange.to'), numberRange.get('max'), 'to is set to max');
 
-  equal(component.get('numberRange.fromDuration'), numberRange.get('min'), 'fromDuration
is set to min');
-  equal(component.get('numberRange.toDuration'), numberRange.get('max'), 'toDuration is set
to max');
-
 });
 
 test('external change action is called', function() {


Mime
View raw message