ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-10683 HDFS Review - Need theme changes for configs. (ababiichuk)
Date Thu, 23 Apr 2015 11:20:10 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 8d8b5280d -> ec5de2712


AMBARI-10683 HDFS Review - Need theme changes for configs. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: ec5de27122290f3a37f15800d1f606d005b9f0bd
Parents: 8d8b528
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Thu Apr 23 14:18:05 2015 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Thu Apr 23 14:19:56 2015 +0300

----------------------------------------------------------------------
 .../HDP/2.2/services/HDFS/themes/theme.json     | 111 ++-----------------
 .../mixins/common/configs/enhanced_configs.js   |  28 +++--
 ambari-web/app/views/common/controls_view.js    |  14 +--
 3 files changed, 33 insertions(+), 120 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ec5de271/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 3d97149..bcffd0f 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
@@ -11,8 +11,8 @@
               "name": "settings",
               "display-name": "Settings",
               "layout": {
-                "tab-columns": "3",
-                "tab-rows": "2",
+                "tab-columns": "2",
+                "tab-rows": "1",
                 "sections": [
                   {
                     "name": "section-namenode",
@@ -20,8 +20,8 @@
                     "row-index": "0",
                     "column-index": "0",
                     "row-span": "1",
-                    "column-span": "2",
-                    "section-columns": "2",
+                    "column-span": "1",
+                    "section-columns": "1",
                     "section-rows": "1",
                     "subsections": [
                       {
@@ -30,12 +30,6 @@
                         "column-index": "0",
                         "row-span": "1",
                         "column-span": "1"
-                      }, {
-                        "name": "subsection-namenode-col2",
-                        "row-index": "0",
-                        "column-index": "1",
-                        "row-span": "1",
-                        "column-span": "1"
                       }
                     ]
                   },
@@ -43,7 +37,7 @@
                     "name": "section-datanode",
                     "display-name": "DataNode",
                     "row-index": "0",
-                    "column-index": "2",
+                    "column-index": "1",
                     "row-span": "1",
                     "column-span": "1",
                     "section-columns": "1",
@@ -57,31 +51,6 @@
                         "column-span": "1"
                       }
                     ]
-                  },
-                  {
-                    "name": "section-encryption",
-                    "display-name": "Encryption",
-                    "row-index": "1",
-                    "column-index": "0",
-                    "row-span": "1",
-                    "column-span": "2",
-                    "section-columns": "2",
-                    "section-rows": "1",
-                    "subsections": [
-                      {
-                        "name": "subsection-encryption-col1",
-                        "row-index": "0",
-                        "column-index": "0",
-                        "row-span": "1",
-                        "column-span": "1"
-                      }, {
-                        "name": "subsection-encryption-col2",
-                        "row-index": "0",
-                        "column-index": "1",
-                        "row-span": "1",
-                        "column-span": "1"
-                      }
-                    ]
                   }
                 ]
               }
@@ -98,7 +67,7 @@
           "subsection-name": "subsection-namenode-col1"
         },
         {
-          "config": "hdfs-site/dfs.namenode.safemode.threshold-pct",
+          "config": "hadoop-env/namenode_heapsize",
           "subsection-name": "subsection-namenode-col1"
         },
         {
@@ -106,31 +75,15 @@
           "subsection-name": "subsection-namenode-col1"
         },
         {
-          "config": "hadoop-env/namenode_opt_newsize",
+          "config": "hdfs-site/dfs.namenode.safemode.threshold-pct",
           "subsection-name": "subsection-namenode-col1"
         },
         {
-          "config": "hadoop-env/namenode_opt_maxnewsize",
-          "subsection-name": "subsection-namenode-col2"
-        },
-        {
-          "config": "hadoop-env/namenode_opt_permsize",
-          "subsection-name": "subsection-namenode-col2"
-        },
-        {
-          "config": "hadoop-env/namenode_opt_maxpermsize",
-          "subsection-name": "subsection-namenode-col2"
-        },
-        {
-          "config": "hadoop-env/namenode_heapsize",
-          "subsection-name": "subsection-namenode-col2"
-        },
-        {
-          "config": "hdfs-site/dfs.datanode.failed.volumes.tolerated",
+          "config": "hdfs-site/dfs.datanode.data.dir",
           "subsection-name": "subsection-datanode-col1"
         },
         {
-          "config": "hdfs-site/dfs.datanode.data.dir",
+          "config": "hdfs-site/dfs.datanode.failed.volumes.tolerated",
           "subsection-name": "subsection-datanode-col1"
         },
         {
@@ -168,50 +121,6 @@
         }
       },
       {
-        "config":"hadoop-env/namenode_opt_newsize",
-        "widget":{
-          "type":"slider",
-          "units":[
-            {
-              "unit-name":"GB"
-            }
-          ]
-        }
-      },
-      {
-        "config": "hadoop-env/namenode_opt_maxnewsize",
-        "widget":{
-          "type":"slider",
-          "units":[
-            {
-              "unit-name":"GB"
-            }
-          ]
-        }
-      },
-      {
-        "config": "hadoop-env/namenode_opt_permsize",
-        "widget":{
-          "type":"slider",
-          "units":[
-            {
-              "unit-name":"GB"
-            }
-          ]
-        }
-      },
-      {
-        "config": "hadoop-env/namenode_opt_maxpermsize",
-        "widget":{
-          "type":"slider",
-          "units":[
-            {
-              "unit-name":"GB"
-            }
-          ]
-        }
-      },
-      {
         "config": "hadoop-env/namenode_heapsize",
         "widget":{
           "type":"slider",
@@ -263,4 +172,4 @@
       }
     ]
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/ec5de271/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index 7762188..83edf45 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -394,6 +394,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
           var cp = configProperties.findProperty('name', propertyName);
           var override = (notDefaultGroup && group && cp && cp.get('overrides'))
? cp.get('overrides').findProperty('group.name', group.get('name')) : null;
 
+          var value = override ? override.get('value') : cp && cp.get('value');
           var defaultValue = override ? override.get('defaultValue') : cp && cp.get('defaultValue');
           var recommendedValue = configObject[key].properties[propertyName];
 
@@ -430,20 +431,23 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
            * clear _dependentPropertyValues from
            * properties that wasn't changed while recommendations
            */
-          if (dependentProperty) {
-            if ((defaultValue == recommendedValue) || (Em.isNone(defaultValue) &&
Em.isNone(recommendedValue))) {
-              /** if recommended value same as default we shouldn't show it in popup **/
-              if (notDefaultGroup) {
-                if (override) {
-                  if (override.get('isNotSaved')) {
-                    cp.get('overrides').removeObject(override);
-                  } else {
-                    override.set('value', defaultValue);
-                  }
+
+          if ((defaultValue == recommendedValue) || (Em.isNone(defaultValue) && Em.isNone(recommendedValue)))
{
+            /** if recommended value same as default we shouldn't show it in popup **/
+            if (notDefaultGroup) {
+              if (override) {
+                if (override.get('isNotSaved')) {
+                  cp.get('overrides').removeObject(override);
+                } else {
+                  override.set('value', defaultValue);
+                }
+                if (dependentProperty) {
                   this.get('_dependentConfigValues').removeObject(dependentProperty);
                 }
-              } else {
-                cp.set('value', defaultValue);
+              }
+            } else {
+              cp.set('value', defaultValue);
+              if (dependentProperty) {
                 this.get('_dependentConfigValues').removeObject(dependentProperty);
               }
             }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ec5de271/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index 4b8b31e..e0824c0 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -76,7 +76,6 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
    * and in case there was changes shows popup with info about changed configs
    *
    * @param {App.ServiceConfigProperty} config
-   * @param {function} complete
    * @returns {$.Deferred}
    */
   sendRequestRorDependentConfigs: function(config) {
@@ -159,9 +158,7 @@ App.ServiceConfigTextField = Ember.TextField.extend(App.ServiceConfigPopoverSupp
   },
   //Set editDone true for last edited config text field parameter
   focusOut: function () {
-    if (this.get('serviceConfig.isNotDefaultValue')) {
-      this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
-    }
+    this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
     this.get('serviceConfig').set("editDone", true);
   },
   //Set editDone false for all current category config text field parameter
@@ -194,9 +191,7 @@ App.ServiceConfigTextFieldWithUnit = Ember.View.extend(App.ServiceConfigPopoverS
 
   //Set editDone true for last edited config text field parameter
   focusOut: function () {
-    if (this.get('serviceConfig.isNotDefaultValue')) {
-      this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
-    }
+    this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
   },
   templateName: require('templates/wizard/controls_service_config_textfield_with_unit')
 });
@@ -250,6 +245,10 @@ App.ServiceConfigPasswordField = Ember.TextField.extend({
  */
 App.ServiceConfigTextArea = Ember.TextArea.extend(App.ServiceConfigPopoverSupport, App.ServiceConfigCalculateId,
App.SupportsDependentConfigs, {
 
+  focusOut: function () {
+    this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
+  },
+
   valueBinding: 'serviceConfig.value',
   rows: 4,
   classNames: ['directories'],
@@ -330,6 +329,7 @@ App.ServiceConfigCheckbox = Ember.Checkbox.extend(App.ServiceConfigPopoverSuppor
     if (this.isNotAppropriateValue()){
       this.set('serviceConfig.value', this.get(this.get('checked') + 'Value'));
       this.get('serviceConfig').set("editDone", true);
+      this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
     }
   }.observes('checked'),
 


Mime
View raw message