ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-22169. Service separating lines are off by a pixel (akovalenko)
Date Mon, 09 Oct 2017 12:54:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 013b388f4 -> 518172c10


AMBARI-22169. Service separating lines are off by a pixel (akovalenko)


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

Branch: refs/heads/branch-2.6
Commit: 518172c1010ab4f028d7db77c563ca213d77e780
Parents: 013b388
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Mon Oct 9 14:30:36 2017 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Mon Oct 9 14:30:36 2017 +0300

----------------------------------------------------------------------
 .../upgrade_version_column_view.js              | 22 ++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/518172c1/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
index 7e23720..e76a9ec 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_column_view.js
@@ -38,10 +38,24 @@ App.UpgradeVersionColumnView = App.UpgradeVersionBoxView.extend({
     var height = App.Service.find().get('length') > 10 ? ((App.Service.find().get('length')
- 10) * 40 + 500) : 500;
     $('.version-column').height(height);
 
-    // fix the line up minor diff issue in FireFox
-    if ($.browser.mozilla) {
-      $('.line-separator').css('top', '-6px');
-      $('.line-separator-bottom').css('top', '-4px');
+    // fix the line up minor diff issue
+    var serviceNamesOffset = $('.service-display-name').offset().top;
+    var separatorOffset = $('.line-separator').offset().top;
+    this.fixSeparator(serviceNamesOffset - separatorOffset);
+  },
+
+  /**
+   * Move line-separator and line-separator bottom on gap
+   * @param gap
+   */
+  fixSeparator: function (gap) {
+    if (gap !== 1) {
+      var topSeparators = $('.line-separator');
+      var bottomSeparators = $('.line-separator-bottom');
+      var topPosition = parseInt(topSeparators.css('top'), 10);
+      var bottomPosition = parseInt(bottomSeparators.css('top'), 10);
+      topSeparators.css('top', topPosition + gap - 1 + 'px');
+      bottomSeparators.css('top', bottomPosition + gap - 1 +'px');
     }
   },
 


Mime
View raw message