ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [26/35] git commit: AMBARI-7558. Slider View: 'Enable Metrics' should not be checked by default. (onechiporenko)
Date Tue, 30 Sep 2014 20:48:32 GMT
AMBARI-7558. Slider View: 'Enable Metrics' should not be checked by default. (onechiporenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 5518104c102e0ea9ad01bcff9161638f83146f12
Parents: d8f4b1e
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Tue Sep 30 17:40:02 2014 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Tue Sep 30 17:40:02 2014 +0300

----------------------------------------------------------------------
 .../createAppWizard/step3_controller.js         | 20 +++++++++-----------
 .../src/main/resources/ui/app/helpers/ajax.js   |  2 +-
 .../ui/app/views/common/config_set_view.js      |  7 ++++---
 3 files changed, 14 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5518104c/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js
b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js
index ef28d66..ac635cb 100644
--- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js
+++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step3_controller.js
@@ -155,10 +155,9 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({
         delete configSet.configNames;
         if (configSet.name === 'ganglia_metrics') {
           configSet.trigger.readOnly = (!App.get('gangliaClusters') || App.get('gangliaClusters').length
=== 0);
-          configSet.trigger.value = (App.get('gangliaClusters') && App.get('gangliaClusters').length
> 0);
         }
         configSet.trigger = App.ConfigProperty.create(configSet.trigger);
-        this.initConfigSetDependecies(configSet);
+        this.initConfigSetDependencies(configSet);
         configs.unshift(configSet);
       }
     }, this);
@@ -167,16 +166,16 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({
   }.observes('newAppConfigs'),
 
   /**
-   * initialize dependecies map for config set by name
+   * initialize dependencies map for config set by name
    * configSet map changed by reference
    *
    * @param {object} configSet
-   * @method initConfigSetDependecies
+   * @method initConfigSetDependencies
    */
-  initConfigSetDependecies: function (configSet) {
+  initConfigSetDependencies: function (configSet) {
     configSet.dependencies.forEach(function (item) {
       item.map = Em.get(item.name);
-    })
+    });
   },
 
   /**
@@ -193,10 +192,10 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({
    * @method validateConfigs
    */
   validateConfigs: function () {
-    var self = this;
-    var result = true;
-    var configs = this.addConfigSetProperties(this.get('configs'));
-    var configsObject = {};
+    var self = this,
+      result = true,
+      configs = this.addConfigSetProperties(this.get('configs')),
+      configsObject = {};
 
     try {
       configs.forEach(function (item) {
@@ -216,7 +215,6 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({
    * @return {Array}
    */
   addConfigSetProperties: function (configs) {
-    var configSets = configs.filterBy('isSet');
     var newConfigs = [];
     configs.filterBy('isSet').forEach(function (item) {
       if (item.trigger.value) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5518104c/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
index 8447d3c..dfee360 100644
--- a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
+++ b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
@@ -131,7 +131,7 @@ var urls = {
 
   'createNewApp': {
     real: 'apps',
-    mock: '',
+    mock: '/data/resource/empty_json.json',
     headers: {
       "Content-Type": "text/plain; charset=utf-8"
     },

http://git-wip-us.apache.org/repos/asf/ambari/blob/5518104c/contrib/views/slider/src/main/resources/ui/app/views/common/config_set_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/config_set_view.js
b/contrib/views/slider/src/main/resources/ui/app/views/common/config_set_view.js
index b421129..388b9ff 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/common/config_set_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/common/config_set_view.js
@@ -39,14 +39,15 @@ App.ConfigSetView = Ember.View.extend({
   }.property('configSet.trigger.value'),
 
   /**
-   * observe change of config values to resolve their dependecies
+   * observe change of config values to resolve their dependencies
+   * @method changeConfigValues
    */
   changeConfigValues: function () {
     var configs = this.get('configs');
-    var dependecies = this.get('configSet.dependencies');
+    var dependencies = this.get('configSet.dependencies');
 
     if (configs.length > 0) {
-      dependecies.forEach(function (item) {
+      dependencies.forEach(function (item) {
         var origin = configs.findBy('name', item.origin);
         var dependent = configs.findBy('name', item.dependent);
         item.mapFunction(origin, dependent);


Mime
View raw message