You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2015/04/14 05:45:45 UTC

ambari git commit: AMBARI-10460. Last sub-section configs should have hovers to their left (Richard Zang via srimanth)

Repository: ambari
Updated Branches:
  refs/heads/trunk dc69558c8 -> 922cf0773


AMBARI-10460. Last sub-section configs should have hovers to their left (Richard Zang via srimanth)


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

Branch: refs/heads/trunk
Commit: 922cf0773479d818cc258cd42922866c1efc1773
Parents: dc69558
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Mon Apr 13 20:45:23 2015 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Mon Apr 13 20:45:23 2015 -0700

----------------------------------------------------------------------
 .../stacks/HDP/2.2/services/HBASE/themes/theme.json     |  4 ++--
 .../stacks/HDP/2.2/services/HDFS/themes/theme.json      |  2 +-
 .../stacks/HDP/2.2/services/YARN/themes/theme.json      |  2 +-
 .../main/service/configs/widget_popover_support.js      | 12 +++++++++++-
 .../common/configs/service_config_layout_tab.hbs        |  2 +-
 5 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/922cf077/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
index 9c76b11..38c298e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
@@ -44,7 +44,7 @@
                     "name": "section-hbase-client",
                     "display-name": "Client",
                     "row-index": "0",
-                    "column-index": "1",
+                    "column-index": "2",
                     "row-span": "1",
                     "column-span": "1",
                     "section-columns": "1",
@@ -86,7 +86,7 @@
                       {
                         "name": "subsection-hbase-disk-col3",
                         "row-index": "0",
-                        "column-index": "1",
+                        "column-index": "2",
                         "row-span": "1",
                         "column-span": "1"
                       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/922cf077/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json
index e55d1d4..3d97149 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json
@@ -43,7 +43,7 @@
                     "name": "section-datanode",
                     "display-name": "DataNode",
                     "row-index": "0",
-                    "column-index": "1",
+                    "column-index": "2",
                     "row-span": "1",
                     "column-span": "1",
                     "section-columns": "1",

http://git-wip-us.apache.org/repos/asf/ambari/blob/922cf077/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes/theme.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes/theme.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes/theme.json
index 6074029..8132d03 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes/theme.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes/theme.json
@@ -44,7 +44,7 @@
                     "name": "section-yarn-platform-features",
                     "display-name": "YARN Platform Features",
                     "row-index": "0",
-                    "column-index": "1",
+                    "column-index": "2",
                     "row-span": "1",
                     "column-span": "1",
                     "section-columns": "1",

http://git-wip-us.apache.org/repos/asf/ambari/blob/922cf077/ambari-web/app/mixins/main/service/configs/widget_popover_support.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/main/service/configs/widget_popover_support.js b/ambari-web/app/mixins/main/service/configs/widget_popover_support.js
index 0068f47..3ae1d6c 100644
--- a/ambari-web/app/mixins/main/service/configs/widget_popover_support.js
+++ b/ambari-web/app/mixins/main/service/configs/widget_popover_support.js
@@ -41,7 +41,17 @@ App.WidgetPopoverSupport = Em.Mixin.create({
    * Where popover should be displayed - top|left|right|bottom
    * @type {string}
    */
-  popoverPlacement: 'right',
+  popoverPlacement: function () {
+    // popover to left if config is located at the right most sub-section of the right most section.
+    var secCI = this.get('section.columnIndex');
+    var secCS = this.get('section.columnSpan');
+    var tabCols = this.get('tab.columns');
+    var subsecCI = this.get('subSection.columnIndex');
+    var subsecCS = this.get('subSection.columnSpan');
+    var secCols = this.get('section.sectionColumns');
+
+    return ((secCI + secCS == tabCols) && (subsecCI + subsecCS == secCols))? 'left' : 'right';
+  }.property(),
 
   initPopover: function () {
     // if description for this config not exist, then no need to show popover

http://git-wip-us.apache.org/repos/asf/ambari/blob/922cf077/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs b/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
index 12cdea3..358b9e8 100644
--- a/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
+++ b/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
@@ -32,7 +32,7 @@
                       {{#each config in subsection.configs}}
                         {{#if config.widget}}
                           {{#unless config.isHiddenByFilter}}
-                            {{view config.widget configBinding="config" canEditBinding="view.canEdit"}}
+                            {{view config.widget configBinding="config" canEditBinding="view.canEdit" sectionBinding="section" subSectionBinding="subsection" tabBinding="tab"}}
                           {{/unless}}
                         {{/if}}
                       {{/each}}