ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject ambari git commit: AMBARI-8759. Basic Alerts Notification isn't available on the installer (stack 1.3) (onechiporenko)
Date Thu, 18 Dec 2014 10:28:15 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 737b0e5ad -> 18e831dea


AMBARI-8759. Basic Alerts Notification isn't available on the installer (stack 1.3)  (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 18e831deabcf66007be72e69eac2c77b16ccd4c2
Parents: 737b0e5
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Wed Dec 17 18:11:37 2014 +0200
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Thu Dec 18 12:25:01 2014 +0200

----------------------------------------------------------------------
 .../app/controllers/wizard/step7_controller.js  |   4 +-
 .../app/controllers/wizard/step8_controller.js  |   2 +-
 ambari-web/app/data/site_properties.js          | 126 +++++++++++++++++++
 .../app/views/common/configs/services_config.js |   3 -
 .../test/controllers/wizard/step8_test.js       |  10 +-
 5 files changed, 130 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/18e831de/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 a27f780..7953fab 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -721,8 +721,8 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
{
         serviceConfigs.findProperty('serviceName', 'HDFS').configs = c;
       }
 
-      // Remove Notifications from MISC if it isn't Installer Controller or stack is <
2.0
-      if (this.get('wizardController.name') !== 'installerController' || !App.get('isHadoop2Stack'))
{
+      // Remove Notifications from MISC if it isn't Installer Controller
+      if (this.get('wizardController.name') !== 'installerController') {
         var miscService = serviceConfigs.findProperty('serviceName', 'MISC');
         if (miscService) {
           c = miscService.configs;

http://git-wip-us.apache.org/repos/asf/ambari/blob/18e831de/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 73b831f..288b48b 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1824,7 +1824,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
App.wiz
    * @method createNotification
    */
   createNotification: function () {
-    if (this.get('content.controllerName') !== 'installerController' || !App.get('isHadoop2Stack'))
return;
+    if (this.get('content.controllerName') !== 'installerController') return;
     var miscConfigs = this.get('configs').filterProperty('serviceName', 'MISC'),
       createNotification = miscConfigs.findProperty('name', 'create_notification').value;
     if (createNotification === 'yes') {

http://git-wip-us.apache.org/repos/asf/ambari/blob/18e831de/ambari-web/app/data/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/site_properties.js b/ambari-web/app/data/site_properties.js
index 352e461..7de9470 100644
--- a/ambari-web/app/data/site_properties.js
+++ b/ambari-web/app/data/site_properties.js
@@ -2378,6 +2378,132 @@ module.exports =
       "serviceName": "MISC",
       "filename": "cluster-env.xml",
       "category": "Users and Groups"
+    },
+    {
+      "id": "puppet var",
+      "name": "create_notification",
+      "displayName": "Create Notification",
+      "isRequired": true,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "isVisible": false,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "defaultValue": "no"
+    },
+    {
+      "id": "puppet var",
+      "name": "mail.smtp.host",
+      "displayName": "SMTP Host",
+      "displayType": "host",
+      "isRequired": false,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "isVisible": true,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "rowStyleClass": "indent-1"
+    },
+    {
+      "id": "puppet var",
+      "name": "mail.smtp.port",
+      "displayName": "SMTP Port",
+      "displayType": "int",
+      "isRequired": false,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "isVisible": true,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "rowStyleClass": "indent-1"
+    },
+    {
+      "id": "puppet var",
+      "name": "mail.smtp.from",
+      "displayName": "FROM Email Address",
+      "displayType": "email",
+      "isRequired": false,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "isVisible": true,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "rowStyleClass": "indent-1"
+    },
+    {
+      "id": "puppet var",
+      "name": "ambari.dispatch.recipients",
+      "displayName": " TO Email Address",
+      "displayType": "email",
+      "isRequired": false,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "isVisible": true,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "rowStyleClass": "indent-1"
+    },
+    {
+      "id": "puppet var",
+      "name": "smtp_use_auth",
+      "displayName": "SMTP server requires authentication",
+      "displayType": "checkbox",
+      "isRequired": false,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "defaultValue": true,
+      "isVisible": true,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "rowStyleClass": "indent-1"
+    },
+    {
+      "id": "puppet var",
+      "name": "ambari.dispatch.credential.username",
+      "displayName": "SMTP Username",
+      "displayType": "string",
+      "isRequired": false,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "isVisible": true,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "rowStyleClass": "indent-2"
+    },
+    {
+      "id": "puppet var",
+      "name": "ambari.dispatch.credential.password",
+      "displayName": "SMTP Password",
+      "displayType": "string",
+      "isRequired": false,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "isVisible": true,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "rowStyleClass": "indent-2"
+    },
+    {
+      "id": "puppet var",
+      "name": "mail.smtp.starttls.enable",
+      "isRequired": false,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "isVisible": false,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "rowStyleClass": "indent-1"
+    },
+    {
+      "id": "puppet var",
+      "name": "mail.smtp.startssl.enable",
+      "isRequired": false,
+      "isReconfigurable": true,
+      "isOverridable": false,
+      "isVisible": false,
+      "serviceName": "MISC",
+      "category": "Notifications",
+      "rowStyleClass": "indent-1"
     }
   ]
 };

http://git-wip-us.apache.org/repos/asf/ambari/blob/18e831de/ambari-web/app/views/common/configs/services_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/services_config.js b/ambari-web/app/views/common/configs/services_config.js
index 4945916..a034df5 100644
--- a/ambari-web/app/views/common/configs/services_config.js
+++ b/ambari-web/app/views/common/configs/services_config.js
@@ -802,9 +802,6 @@ App.ServiceConfigContainerView = Em.ContainerView.extend({
       var categoriesToPush = [];
       this.get('controller.selectedService.configCategories').forEach(function (item) {
 
-        // stack 1.3 doesn't need customView
-        if (!App.get('isHadoop2Stack') && item.get('isCustomView')) return;
-
         var categoryView = item.get('isCustomView') ? item.get('customView') : App.ServiceConfigsByCategoryView;
         if (categoryView !== null) {
           categoriesToPush.pushObject(categoryView.extend({

http://git-wip-us.apache.org/repos/asf/ambari/blob/18e831de/ambari-web/test/controllers/wizard/step8_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step8_test.js b/ambari-web/test/controllers/wizard/step8_test.js
index 823424c..e10c44a 100644
--- a/ambari-web/test/controllers/wizard/step8_test.js
+++ b/ambari-web/test/controllers/wizard/step8_test.js
@@ -1404,16 +1404,8 @@ describe('App.WizardStep8Controller', function () {
           {name: 'mail.smtp.from', value: 'from@f.c', serviceName: 'MISC'},
           {name: 'mail.smtp.starttls.enable', value: true, serviceName: 'MISC'},
           {name: 'mail.smtp.startssl.enable', value: false, serviceName: 'MISC'},
-          {name: 'smtp_use_auth', value: 'false', serviceName: 'MISC'},
+          {name: 'smtp_use_auth', value: 'false', serviceName: 'MISC'}
         ]);
-        sinon.stub(App, 'get', function (k) {
-          if ('isHadoop2Stack' === k) return true;
-          return Em.get(App, k);
-        });
-      });
-
-      afterEach(function () {
-        App.get.restore();
       });
 
       it('should add request to queue', function () {


Mime
View raw message