ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject git commit: AMBARI-7603. Slider View: Going backward and forward on create app wizard loses values (alexantonenko)
Date Thu, 02 Oct 2014 00:27:31 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b10cb648c -> 051f0705b


AMBARI-7603. Slider View: Going backward and forward on create app wizard loses values (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 051f0705bcde09387952e14ec805b5324f9f4cc4
Parents: b10cb64
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Thu Oct 2 01:38:10 2014 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Thu Oct 2 03:27:10 2014 +0300

----------------------------------------------------------------------
 .../slider/src/main/resources/ui/app/assets/index.html      | 9 ---------
 .../ui/app/controllers/createAppWizard/step3_controller.js  | 9 +++++++--
 2 files changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/051f0705/contrib/views/slider/src/main/resources/ui/app/assets/index.html
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/assets/index.html b/contrib/views/slider/src/main/resources/ui/app/assets/index.html
index baa534e..0094188 100755
--- a/contrib/views/slider/src/main/resources/ui/app/assets/index.html
+++ b/contrib/views/slider/src/main/resources/ui/app/assets/index.html
@@ -42,14 +42,5 @@
     <script src="./javascripts/app.js"></script>
     <script>require('initialize');</script>
 
-    <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
-    <script>
-      (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
-      function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
-      e=o.createElement(i);r=o.getElementsByTagName(i)[0];
-      e.src='//www.google-analytics.com/analytics.js';
-      r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
-      ga('create','UA-XXXXX-X');ga('send','pageview');
-    </script>
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/ambari/blob/051f0705/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 ac635cb..308378d 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
@@ -112,7 +112,9 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({
    * @method initConfigs
    */
   initConfigs: function (setDefaults) {
-    var newAppConfigs = this.get('newAppConfigs') || {},
+    var self = this,
+      newAppConfigs = this.get('newAppConfigs') || {},
+      defaultConfigs = self.get('appWizardController.newApp.appType.configs');
       configs = Em.A(),
       configsSet = $.extend(true, [], this.get('configsSet')),
       allSetConfigs = {},
@@ -122,6 +124,9 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({
     configsSet.forEach(function (item) {
       item.configNames.forEach(function (configName) {
         allSetConfigs[configName] = item;
+        if(!newAppConfigs[configName] && defaultConfigs && defaultConfigs[configName]){
+          newAppConfigs[configName] = defaultConfigs[configName];
+        }
       });
     });
 
@@ -163,7 +168,7 @@ App.CreateAppWizardStep3Controller = Ember.ObjectController.extend({
     }, this);
 
     this.set('configs', configs);
-  }.observes('newAppConfigs'),
+  },
 
   /**
    * initialize dependencies map for config set by name


Mime
View raw message