This is an automated email from the ASF dual-hosted git repository.

ishanbha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 4c09f53  [AMBARI-23839] Show Limited Functionality warning for Ranger 
and Atlas during installer wizard.
4c09f53 is described below

commit 4c09f532d421fdf15d2ba872cea49bfff3bbd577
Author: Ishan Bhatt <ishanbhatt.1...@gmail.com>
AuthorDate: Mon May 14 17:02:18 2018 -0700

    [AMBARI-23839] Show Limited Functionality warning for Ranger and Atlas 
during installer wizard.
---
 .../app/controllers/wizard/step4_controller.js     |  9 +++-
 ambari-web/app/messages.js                         |  9 ++++
 .../step4/step4_service_validation_popup.hbs       | 19 +++++++++
 ambari-web/test/controllers/wizard/step4_test.js   | 48 ++++++++++++----------
 4 files changed, 62 insertions(+), 23 deletions(-)

diff --git a/ambari-web/app/controllers/wizard/step4_controller.js 
b/ambari-web/app/controllers/wizard/step4_controller.js
index 5f9eea2..ec57cac 100644
--- a/ambari-web/app/controllers/wizard/step4_controller.js
+++ b/ambari-web/app/controllers/wizard/step4_controller.js
@@ -192,6 +192,8 @@ App.WizardStep4Controller = Em.ArrayController.extend({
     if (this.get('wizardController.name') === 'installerController') {
       this.serviceValidation(callback, 'AMBARI_METRICS', 'ambariMetricsCheck');
       this.serviceValidation(callback, 'SMARTSENSE', 'smartSenseCheck');
+      this.serviceValidation(callback, 'RANGER', 'rangerCheck');
+      this.serviceValidation(callback, 'ATLAS', 'atlasCheck');
     }
     this.dependentServiceValidation('ATLAS', 'AMBARI_INFRA_SOLR', 
'ambariInfraCheck', callback);
     this.dependentServiceValidation('LOGSEARCH', 'AMBARI_INFRA_SOLR', 
'ambariLogsearchCheck', callback);
@@ -542,7 +544,12 @@ App.WizardStep4Controller = Em.ArrayController.extend({
     var self = this;
     return App.ModalPopup.show({
       header: Em.I18n.t('installer.step4.limitedFunctionality.popup.header'),
-      body: Em.I18n.t('installer.step4.' + id + '.popup.body'),
+      //body: Em.I18n.t('installer.step4.' + id + '.popup.body'),
+      bodyClass: Em.View.extend({
+        serviceHeader: Em.I18n.t('installer.step4.' + id + '.popup.header'),
+        serviceBody: Em.I18n.t('installer.step4.' + id + '.popup.body'),
+        templateName: 
require('templates/wizard/step4/step4_service_validation_popup')
+      }),
       primary: Em.I18n.t('common.proceedAnyway'),
       primaryClass: 'btn-warning',
       onPrimary: function () {
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 69db174..52861bd 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -901,13 +901,22 @@ Em.I18n.translations = {
   'installer.step4.serviceCheck.popup.body.multiOptions':'You did not select 
{0}, but it is needed by other services you selected. Select a compatible 
service from the following list: {1}',
   'installer.step4.hcfs.displayName':'a Hadoop Compatible File System',
   'installer.step4.limitedFunctionality.popup.header':'Limited Functionality 
Warning',
+  'installer.step4.ambariMetricsCheck.popup.header': 'Ambari Metrics',
   'installer.step4.ambariMetricsCheck.popup.body':'Ambari Metrics collects 
metrics from the cluster and makes them available to Ambari.  If you do not 
install Ambari Metrics service, metrics will not be accessible from Ambari.  
Are you sure you want to proceed without Ambari Metrics?',
+  'installer.step4.ambariInfraCheck.popup.header': 'Ambari Infra',
   'installer.step4.ambariInfraCheck.popup.body':'Since Ambari Infra is not 
selected, you must supply your own Solr to make Atlas work. Are you sure you 
want to proceed?',
+  'installer.step4.ambariLogsearchCheck.popup.header': 'Ambari Logsearch',
   'installer.step4.ambariLogsearchCheck.popup.body':'Since Ambari Infra is not 
selected, you must supply your own Solr to make Log Search work. Are you sure 
you want to proceed?',
+  'installer.step4.smartSenseCheck.popup.header': 'Apache SmartSense',
   'installer.step4.smartSenseCheck.popup.body':'SmartSense securely collects 
cluster diagnostics in order to send you recommendations and automate analysis 
for ' +
   'troubleshooting support cases. If you choose not to install SmartSense, you 
will not receive any recommendations, and you ' +
   'will need to collect configuration and logs manually for troubleshooting 
support cases. ' +
   'Are you sure you want to proceed without SmartSense?',
+  'installer.step4.rangerCheck.popup.header': 'Apache Ranger',
+  'installer.step4.rangerCheck.popup.body':'Apache Ranger provides fine 
grained authorization and audit of access attempts for many Hadoop ecosystem 
services. If you do not install the Apache Ranger Service, the security of your 
cluster will be diminished. Are you sure you want to proceed without it? ',
+  'installer.step4.atlasCheck.popup.header': 'Apache Atlas',
+  'installer.step4.atlasCheck.popup.body':'Apache Atlas provides strong data 
governance, lineage and metadata management for many hadoop ecosystem services. 
If you do not install Apache Atlas service, the data governance capabilities of 
you cluster will be diminished. Are you sure you want to proceed without it? ',
+
   'installer.step4.rangerRequirements.popup.header': 'Ranger Requirements',
   'installer.step4.rangerRequirements.popup.body.requirements': '<ol><li>You 
must have an <strong>MySQL/Oracle/Postgres/MSSQL/SQL Anywhere Server</strong> 
database instance running to be used by Ranger.</li>' +
     '<li>In Assign Masters step of this wizard, you will be prompted to 
specify which host for the Ranger Admin. On that host, you <strong>must have DB 
Client installed</strong> for Ranger to access to the database. (Note: This is 
applicable for only Ranger 0.4.0)</li>' +
diff --git 
a/ambari-web/app/templates/wizard/step4/step4_service_validation_popup.hbs 
b/ambari-web/app/templates/wizard/step4/step4_service_validation_popup.hbs
new file mode 100644
index 0000000..1d4599f
--- /dev/null
+++ b/ambari-web/app/templates/wizard/step4/step4_service_validation_popup.hbs
@@ -0,0 +1,19 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<h5><strong>{{view.serviceHeader}}</strong></h5>
+{{view.serviceBody}}
\ No newline at end of file
diff --git a/ambari-web/test/controllers/wizard/step4_test.js 
b/ambari-web/test/controllers/wizard/step4_test.js
index 8d17138..c2248e9 100644
--- a/ambari-web/test/controllers/wizard/step4_test.js
+++ b/ambari-web/test/controllers/wizard/step4_test.js
@@ -274,84 +274,88 @@ describe('App.WizardStep4Controller', function () {
     var tests = [
         {
           services: ['HDFS', 'ZOOKEEPER'],
-          errorsExpected: ['ambariMetricsCheck', 'smartSenseCheck']
+          errorsExpected: ['ambariMetricsCheck', 'smartSenseCheck', 
'rangerCheck', 'atlasCheck']
         },
         {
           services: ['ZOOKEEPER'],
-          errorsExpected: ['ambariMetricsCheck', 'smartSenseCheck']
+          errorsExpected: ['ambariMetricsCheck', 'smartSenseCheck', 
'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS'],
-          errorsExpected: ['serviceCheck_ZOOKEEPER', 'ambariMetricsCheck', 
'smartSenseCheck']
+          errorsExpected: ['serviceCheck_ZOOKEEPER', 'ambariMetricsCheck', 
'smartSenseCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS', 'TEZ', 'ZOOKEEPER'],
-          errorsExpected: ['serviceCheck_YARN', 'ambariMetricsCheck' , 
'smartSenseCheck']
+          errorsExpected: ['serviceCheck_YARN', 'ambariMetricsCheck' , 
'smartSenseCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS', 'ZOOKEEPER', 'FALCON'],
-          errorsExpected: ['serviceCheck_OOZIE', 'ambariMetricsCheck' , 
'smartSenseCheck']
+          errorsExpected: ['serviceCheck_OOZIE', 'ambariMetricsCheck' , 
'smartSenseCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS', 'ZOOKEEPER', 'GANGLIA', 'HIVE'],
-          errorsExpected: ['serviceCheck_YARN', 'ambariMetricsCheck' , 
'smartSenseCheck']
+          errorsExpected: ['serviceCheck_YARN', 'ambariMetricsCheck' , 
'smartSenseCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS', 'GLUSTERFS', 'ZOOKEEPER', 'HIVE'],
-          errorsExpected: ['serviceCheck_YARN', 'multipleDFS', 
'ambariMetricsCheck', 'smartSenseCheck']
+          errorsExpected: ['serviceCheck_YARN', 'multipleDFS', 
'ambariMetricsCheck', 'smartSenseCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS','ZOOKEEPER', 'GANGLIA'],
-          errorsExpected: ['ambariMetricsCheck', 'smartSenseCheck']
+          errorsExpected: ['ambariMetricsCheck', 'smartSenseCheck', 
'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS','ZOOKEEPER', 'AMBARI_METRICS'],
-          errorsExpected: ['smartSenseCheck']
+          errorsExpected: ['smartSenseCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['ZOOKEEPER', 'AMBARI_METRICS'],
-          errorsExpected: ['smartSenseCheck']
+          errorsExpected: ['smartSenseCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS', 'AMBARI_METRICS'],
-          errorsExpected: ['serviceCheck_ZOOKEEPER', 'smartSenseCheck']
+          errorsExpected: ['serviceCheck_ZOOKEEPER', 'smartSenseCheck', 
'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS', 'TEZ', 'ZOOKEEPER', 'AMBARI_METRICS'],
-          errorsExpected: ['serviceCheck_YARN', 'smartSenseCheck']
+          errorsExpected: ['serviceCheck_YARN', 'smartSenseCheck', 
'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS', 'ZOOKEEPER', 'FALCON', 'AMBARI_METRICS'],
-          errorsExpected: ['serviceCheck_OOZIE', 'smartSenseCheck']
+          errorsExpected: ['serviceCheck_OOZIE', 'smartSenseCheck', 
'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS', 'ZOOKEEPER', 'GANGLIA', 'HIVE', 'AMBARI_METRICS'],
-          errorsExpected: ['serviceCheck_YARN', 'smartSenseCheck']
+          errorsExpected: ['serviceCheck_YARN', 'smartSenseCheck', 
'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS', 'GLUSTERFS', 'ZOOKEEPER', 'HIVE', 
'AMBARI_METRICS'],
-          errorsExpected: ['serviceCheck_YARN', 'multipleDFS', 
'smartSenseCheck']
+          errorsExpected: ['serviceCheck_YARN', 'multipleDFS', 
'smartSenseCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['HDFS','ZOOKEEPER', 'GANGLIA', 'AMBARI_METRICS'],
-          errorsExpected: ['smartSenseCheck']
+          errorsExpected: ['smartSenseCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['RANGER'],
-          errorsExpected: ['ambariMetricsCheck', 'smartSenseCheck', 
'rangerRequirements']
+          errorsExpected: ['ambariMetricsCheck', 'smartSenseCheck', 
'atlasCheck', 'rangerRequirements']
         },
         {
           services: ['SMARTSENSE'],
-          errorsExpected: ['ambariMetricsCheck']
+          errorsExpected: ['ambariMetricsCheck', 'rangerCheck', 'atlasCheck']
         },
         {
           services: ['ATLAS', 'AMBARI_METRICS', 'SMARTSENSE'],
-          errorsExpected: ['ambariInfraCheck']
+          errorsExpected: ['rangerCheck', 'ambariInfraCheck', ]
         },
         {
           services: ['LOGSEARCH', 'AMBARI_METRICS', 'SMARTSENSE'],
-          errorsExpected: ['ambariLogsearchCheck']
-        }
+          errorsExpected: ['rangerCheck', 'atlasCheck', 'ambariLogsearchCheck']
+        },
+        {
+          services: ['ATLAS', 'AMBARI_METRICS', 'SMARTSENSE', 'RANGER'],
+          errorsExpected: ['ambariInfraCheck', 'rangerRequirements']
+        },
       ],
       controllerNames = ['installerController', 'addServiceController'],
       wizardNames = {
@@ -387,7 +391,7 @@ describe('App.WizardStep4Controller', function () {
       tests.forEach(function(test) {
         var errorsExpected = test.errorsExpected;
         if (name !== 'installerController') {
-          errorsExpected = 
test.errorsExpected.without('ambariMetricsCheck').without('smartSenseCheck');
+          errorsExpected = 
test.errorsExpected.without('ambariMetricsCheck').without('smartSenseCheck').without('rangerCheck').without('atlasCheck');
         }
         var message = '{0}, {1} selected validation should be {2}, errors: {3}'
           .format(wizardNames[name], test.services.join(','), 
errorsExpected.length ? 'passed' : 'failed',

-- 
To stop receiving notification emails like this one, please contact
ishan...@apache.org.

Reply via email to