You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/09/04 15:54:53 UTC

[1/3] ambari git commit: AMBARI-13011. Add service: js error while adding service (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 706ff5149 -> a9d52fad8


AMBARI-13011. Add service: js error while adding service (alexantonenko)


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

Branch: refs/heads/branch-2.1
Commit: 6e6981bae178a885201aa200a886434a5dc25078
Parents: 706ff51
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Sep 4 16:29:26 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Sep 4 16:51:58 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/installer.js             |  4 ++++
 .../app/controllers/main/service/add_controller.js  | 16 +++++-----------
 .../app/controllers/wizard/step7_controller.js      |  2 +-
 .../app/mixins/common/configs/configs_loader.js     |  2 +-
 ambari-web/app/views/common/controls_view.js        |  6 ++----
 5 files changed, 13 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6e6981ba/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index ef2d569..f01a8f8 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -233,6 +233,10 @@ App.InstallerController = App.WizardController.extend({
   loadStacks: function () {
     var stacks = this.get('content.stacks');
     var dfd = $.Deferred();
+    App.StackConfigProperty.find().clear();
+    App.Section.find().clear();
+    App.SubSection.find().clear();
+    App.Tab.find().clear();
     if (stacks && stacks.get('length')) {
       App.set('currentStackVersion', App.Stack.find().findProperty('isSelected').get('id'));
       dfd.resolve(true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e6981ba/ambari-web/app/controllers/main/service/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/add_controller.js b/ambari-web/app/controllers/main/service/add_controller.js
index 0eac9ad..a9bfa4e 100644
--- a/ambari-web/app/controllers/main/service/add_controller.js
+++ b/ambari-web/app/controllers/main/service/add_controller.js
@@ -118,18 +118,12 @@ App.AddServiceController = App.WizardController.extend(App.AddSecurityConfigs, {
           var self = this;
           var dfd = $.Deferred();
           this.loadKerberosDescriptorConfigs().done(function() {
-            if (App.get('isClusterSupportsEnhancedConfigs')) {
-              var serviceNames = App.StackService.find().filter(function(s) {
-                return s.get('isSelected') || s.get('isInstalled');
-              }).mapProperty('serviceName');
-              self.loadConfigThemes().then(function() {
-                dfd.resolve();
-              });
-            }
-            else {
-              self.set('stackConfigsLoaded', true);
+            var serviceNames = App.StackService.find().filter(function(s) {
+              return s.get('isSelected') || s.get('isInstalled');
+            }).mapProperty('serviceName');
+            self.loadConfigThemes().then(function() {
               dfd.resolve();
-            }
+            });
             self.loadServiceConfigGroups();
             self.loadServiceConfigProperties();
           });

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e6981ba/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index b4c2197..6e71902 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -922,7 +922,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
       if (!Em.isNone(mappedConfigValue) && ((installedServiceNames && installedServiceNames.contains(_config.serviceName) || nonServiceTab.someProperty('serviceName', _config.serviceName)))) {
         // prevent overriding already edited properties
         if (_config.savedValue != mappedConfigValue || _config.displayType == 'password') {
-          _config.value = mappedConfigValue;
+          _config.value = App.config.formatPropertyValue(_config, mappedConfigValue);
         }
         _config.savedValue = mappedConfigValue;
         _config.hasInitialValue = true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e6981ba/ambari-web/app/mixins/common/configs/configs_loader.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/configs_loader.js b/ambari-web/app/mixins/common/configs/configs_loader.js
index 3d2fd17..7e86921 100644
--- a/ambari-web/app/mixins/common/configs/configs_loader.js
+++ b/ambari-web/app/mixins/common/configs/configs_loader.js
@@ -148,7 +148,7 @@ App.ConfigsLoader = Em.Mixin.create(App.GroupsMappingMixin, {
         data: {
           serviceName: this.get('content.serviceName'),
           serviceConfigVersions: versions,
-          additionalParams: App.get('isClusterSupportsEnhancedConfigs') && this.get('dependentServiceNames.length') ? '|service_name.in(' +  this.get('dependentServiceNames') + ')&is_current=true' : ''
+          additionalParams: this.get('dependentServiceNames.length') ? '|service_name.in(' +  this.get('dependentServiceNames') + ')&is_current=true' : ''
         },
         success: 'loadSelectedVersionsSuccess'
       }));

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e6981ba/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 4f87279..e3e0a8c 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -76,9 +76,7 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
    * do not apply recommended value if user change value by himself.
    */
   keyUp: function() {
-    if (App.get('isClusterSupportsEnhancedConfigs')) {
-      this.get('controller').removeCurrentFromDependentList(this.get('serviceConfig') || this.get('config'));
-    }
+    this.get('controller').removeCurrentFromDependentList(this.get('serviceConfig') || this.get('config'));
   },
 
   /**
@@ -90,7 +88,7 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
    */
   sendRequestRorDependentConfigs: function(config) {
     if (!config || !config.get('isValid')) return $.Deferred().resolve().promise();
-    if (App.get('isClusterSupportsEnhancedConfigs') && ['mainServiceInfoConfigsController','wizardStep7Controller'].contains(this.get('controller.name'))) {
+    if (['mainServiceInfoConfigsController','wizardStep7Controller'].contains(this.get('controller.name'))) {
       var name = config.get('name');
       var saveRecommended = (this.get('config.value') === this.get('config.recommendedValue'));
       var controller = this.get('controller');


[2/3] ambari git commit: AMBARI-13012. Kerberos wizard: Inform user about the deletion of YARN log and local dir, and RM state format (alexantonenko)

Posted by al...@apache.org.
AMBARI-13012. Kerberos wizard: Inform user about the deletion of YARN log and local dir, and RM state format (alexantonenko)


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

Branch: refs/heads/branch-2.1
Commit: 3929b0668a68b26566603bc346d2bac0144e4605
Parents: 6e6981b
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Sep 4 16:34:03 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Sep 4 16:53:56 2015 +0300

----------------------------------------------------------------------
 .../app/controllers/main/admin/kerberos.js      | 83 ++++++++++++++++----
 ambari-web/app/messages.js                      |  1 +
 2 files changed, 69 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3929b066/ambari-web/app/controllers/main/admin/kerberos.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos.js b/ambari-web/app/controllers/main/admin/kerberos.js
index d63b114..db67545 100644
--- a/ambari-web/app/controllers/main/admin/kerberos.js
+++ b/ambari-web/app/controllers/main/admin/kerberos.js
@@ -54,18 +54,20 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({
 
   notifySecurityOffPopup: function () {
     var self = this;
-    App.ModalPopup.show({
-      header: Em.I18n.t('popup.confirmation.commonHeader'),
-      primary: Em.I18n.t('ok'),
-      onPrimary: function () {
-        App.db.setSecurityDeployCommands(undefined);
-        self.setDisableSecurityStatus("RUNNING");
-        App.router.transitionTo('disableSecurity');
-        this.hide();
-      },
-      bodyClass: Ember.View.extend({
-        templateName: require('templates/main/admin/security/notify_security_off_popup')
-      })
+    this.checkServiceWarnings().then(function() {
+      App.ModalPopup.show({
+        header: Em.I18n.t('popup.confirmation.commonHeader'),
+        primary: Em.I18n.t('ok'),
+        onPrimary: function () {
+          App.db.setSecurityDeployCommands(undefined);
+          self.setDisableSecurityStatus("RUNNING");
+          App.router.transitionTo('disableSecurity');
+          this.hide();
+        },
+        bodyClass: Ember.View.extend({
+          templateName: require('templates/main/admin/security/notify_security_off_popup')
+        })
+      });
     });
   },
 
@@ -229,9 +231,12 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({
   },
 
   startKerberosWizard: function () {
-    this.setAddSecurityWizardStatus('RUNNING');
-    App.router.get('kerberosWizardController').setDBProperty('onClosePath', 'main.admin.adminKerberos.index');
-    App.router.transitionTo('adminKerberos.adminAddKerberos');
+    var self = this;
+    this.checkServiceWarnings().then(function() {
+      self.setAddSecurityWizardStatus('RUNNING');
+      App.router.get('kerberosWizardController').setDBProperty('onClosePath', 'main.admin.adminKerberos.index');
+      App.router.transitionTo('adminKerberos.adminAddKerberos');
+    });
   },
 
   /**
@@ -530,4 +535,52 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({
     }
   }
 
+  /**
+   * List of the warnings regarding specific services before enabling/disabling Kerberos.
+   *
+   * @type {String[]}
+   */
+  serviceAlerts: function() {
+    var messages = [];
+    var serviceAlertMap = {
+      YARN: Em.I18n.t('admin.kerberos.service.alert.yarn')
+    };
+    var installedServices = App.Service.find().mapProperty('serviceName');
+    Em.keys(serviceAlertMap).forEach(function(serviceName) {
+      if (installedServices.contains(serviceName)) {
+        messages.push(serviceAlertMap[serviceName]);
+      }
+    });
+    return messages;
+  }.property(),
+
+  /**
+   * Check for additional info to display before enabling/disabling kerberos and show appropriate
+   * messages in popup if needed.
+   * @returns {$.Deferred} - promise
+   */
+  checkServiceWarnings: function() {
+    var dfd = $.Deferred();
+    this.displayServiceWarnings(this.get('serviceAlerts'), dfd);
+    return dfd.promise();
+  },
+
+  /**
+   * Show appropriate message regarding changes affected after enabling/disabling Kerberos
+   *
+   * @param {String[]} messages - list of the messages to display
+   * @param {$.Deferred} dfd - used to break recursive calls and reject/resolve promise returned by <code>checkServiceWarnings</code>
+   */
+  displayServiceWarnings: function(messages, dfd) {
+    var self = this;
+    if (!messages.get('length')) {
+      dfd.resolve();
+    } else {
+      App.showConfirmationPopup(function() {
+        self.displayServiceWarnings(messages.slice(1), dfd);
+      }, messages[0], function() {
+        dfd.reject();
+      }, Em.I18n.t('common.warning'), Em.I18n.t('common.proceedAnyway'));
+    }
+  }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/3929b066/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 119b1db..d34485b 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1080,6 +1080,7 @@ Em.I18n.translations = {
   'admin.kerberos.regenerate_keytabs.checkbox.label': ' Only regenerate keytabs for missing hosts and components',
   'admin.kerberos.regenerate_keytabs.popup.restart.body': 'After keytab regerate is complete, services relying on them <strong>must</strong> be restarted. This can be done automatically, or manually.',
   'admin.kerberos.regenerate_keytabs.checkbox.restart.label': 'Automatically restart components after keytab regeneration',
+  'admin.kerberos.service.alert.yarn': 'YARN log and local dir will be deleted and ResourceManager state will be formatted as part of Enabling/Disabling Kerberos.',
 
   'admin.kerberos.disable.step1.task0.title': 'Stop Services',
   'admin.kerberos.disable.step1.task1.title': 'Unkerberize Cluster',


[3/3] ambari git commit: AMBARI-13013. 'Metrics and Expression' window is empty for Number widget (alexantonenko)

Posted by al...@apache.org.
AMBARI-13013. 'Metrics and Expression' window is empty for Number widget (alexantonenko)


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

Branch: refs/heads/branch-2.1
Commit: a9d52fad88fec9dd809664404073d96442c828d2
Parents: 3929b06
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Sep 4 16:38:35 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Sep 4 16:53:56 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/routes/create_widget.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a9d52fad/ambari-web/app/routes/create_widget.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/create_widget.js b/ambari-web/app/routes/create_widget.js
index 609509e..7975811 100644
--- a/ambari-web/app/routes/create_widget.js
+++ b/ambari-web/app/routes/create_widget.js
@@ -80,12 +80,12 @@ module.exports = App.WizardRoute.extend({
       widgetWizardController.save('widgetType', widgetStep1controller.get('widgetType'));
       widgetWizardController.setDBProperties({
         widgetProperties: {},
-        widgetMetrics: {},
-        allMetrics: {},
-        widgetValues: {},
-        expressions: {},
-        dataSets: {},
-        templateValue: {}
+        widgetMetrics: [],
+        allMetrics: [],
+        widgetValues: [],
+        expressions: [],
+        dataSets: [],
+        templateValue: ''
       });
       router.transitionTo('step2');
     }