Repository: ambari
Updated Branches:
  refs/heads/trunk 22988751d -> 864f6de29


AMBARI-16238 VDF UI edits: #1 (zhewang)


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

Branch: refs/heads/trunk
Commit: 864f6de298e5a2d2cbba660d786ec20f127dd77a
Parents: 2298875
Author: Zhe (Joe) Wang <[email protected]>
Authored: Wed May 4 10:49:06 2016 -0700
Committer: Zhe (Joe) Wang <[email protected]>
Committed: Wed May 4 10:49:06 2016 -0700

----------------------------------------------------------------------
 .../stackVersions/StackVersionsCreateCtrl.js    | 28 ++++++++++--
 .../stackVersions/StackVersionsEditCtrl.js      | 23 ++++++++--
 .../ui/admin-web/app/scripts/i18n.config.js     |  8 +++-
 .../resources/ui/admin-web/app/styles/main.css  |  4 ++
 .../views/modals/BodyForUseRedhatSatellite.html | 18 ++++++++
 .../views/stackVersions/stackVersionPage.html   |  8 ++--
 ambari-web/app/controllers/installer.js         |  2 +-
 .../app/controllers/wizard/step1_controller.js  | 22 +++++++--
 .../app/controllers/wizard/step8_controller.js  |  5 ++
 ambari-web/app/mappers/stack_mapper.js          |  1 +
 ambari-web/app/messages.js                      |  8 +++-
 .../app/models/stack_version/service_simple.js  | 14 +++++-
 ambari-web/app/styles/application.less          |  3 ++
 .../admin/stack_upgrade/edit_repositories.hbs   |  2 +-
 .../main/host/details/doDeleteHostPopup.hbs     |  4 +-
 ambari-web/app/templates/wizard/step1.hbs       | 48 ++++++++++----------
 ambari-web/app/templates/wizard/step8.hbs       | 24 +++++++---
 ambari-web/app/utils/ajax/ajax.js               |  4 +-
 ambari-web/app/views/wizard/step10_view.js      |  2 +-
 ambari-web/app/views/wizard/step1_view.js       |  8 ++--
 .../views/wizard/step7/assign_master_view.js    |  2 +-
 .../test/controllers/wizard/step8_test.js       |  6 +++
 .../test/views/wizard/step10_view_test.js       |  2 +-
 .../wizard/step7/assign_master_view_test.js     |  2 +-
 24 files changed, 184 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
----------------------------------------------------------------------
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index e6748b8..47b72e6 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-.controller('StackVersionsCreateCtrl', ['$scope', 'Stack', '$routeParams', 
'$location', 'Alert', '$translate', 'Cluster', 'AddRepositoryModal', 
function($scope, Stack, $routeParams, $location, Alert, $translate, Cluster, 
AddRepositoryModal) {
+.controller('StackVersionsCreateCtrl', ['$scope', 'Stack', '$routeParams', 
'$location', 'Alert', '$translate', 'Cluster', 'AddRepositoryModal', 
'ConfirmationModal', function($scope, Stack, $routeParams, $location, Alert, 
$translate, Cluster, AddRepositoryModal, ConfirmationModal) {
   var $t = $translate.instant;
   $scope.constants = {
     os: $t('versions.os')
@@ -94,7 +94,7 @@ angular.module('ambariAdminConsole')
         selectedCnt ++;
       }
     });
-    return $scope.osList.length == selectedCnt;
+    return $scope.osList.length == selectedCnt || $scope.useRedhatSatellite;
   };
 
   $scope.allInfoCategoriesBlank = function () {
@@ -179,6 +179,9 @@ angular.module('ambariAdminConsole')
    * On click handler for removing OS
    */
   $scope.removeOS = function() {
+    if ($scope.useRedhatSatellite) {
+      return;
+    }
     this.os.selected = false;
     if (this.os.repositories) {
       this.os.repositories.forEach(function(repo) {
@@ -237,7 +240,8 @@ angular.module('ambariAdminConsole')
       }
     });
     if ($scope.isPublicVersion) {
-      return Stack.validateBaseUrls($scope.skipValidation, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+      var skip = $scope.skipValidation || $scope.useRedhatSatellite;
+      return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
         if (invalidUrls.length === 0) {
           var data = {
             "VersionDefinition": {
@@ -274,7 +278,8 @@ angular.module('ambariAdminConsole')
   };
 
   $scope.updateRepoVersions = function () {
-    return Stack.validateBaseUrls($scope.skipValidation, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+    var skip = $scope.skipValidation || $scope.useRedhatSatellite;
+    return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
       if (invalidUrls.length === 0) {
         Stack.updateRepo($scope.upgradeStack.stack_name, 
$scope.upgradeStack.stack_version, $scope.id, $scope.updateObj).then(function 
() {
           Alert.success($t('versions.alerts.versionEdited', {
@@ -307,6 +312,16 @@ angular.module('ambariAdminConsole')
         }
       });
     }
+    if ($scope.useRedhatSatellite) {
+      ConfirmationModal.show(
+          $t('common.important'),
+          {
+            "url": 'views/modals/BodyForUseRedhatSatellite.html'
+          }
+      ).catch(function () {
+        $scope.useRedhatSatellite = !$scope.useRedhatSatellite;
+      });
+    }
   };
 
   $scope.clearError = function() {
@@ -344,7 +359,10 @@ angular.module('ambariAdminConsole')
       stack_version: response.stackVersion,
       display_name: response.displayName || $t('common.NA')
     };
-    $scope.services = response.services || [];
+    $scope.services = response.services.filter(function (service) {
+          var skipServices = ['MAPREDUCE2', 'GANGLIA', 'KERBEROS'];
+          return skipServices.indexOf(service.name) === -1;
+        }) || [];
     //save default values of repos to check if they were changed
     $scope.defaulfOSRepos = {};
     response.updateObj.operating_systems.forEach(function(os) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
----------------------------------------------------------------------
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
index 8246c2b..22ec5ae 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
@@ -49,7 +49,10 @@ angular.module('ambariAdminConsole')
         stack_version: response.stackVersion,
         display_name: response.displayName
       };
-      $scope.services = response.services || [];
+      $scope.services = response.services.filter(function (service) {
+            var skipServices = ['MAPREDUCE2', 'GANGLIA', 'KERBEROS'];
+            return skipServices.indexOf(service.name) === -1;
+          }) || [];
       //save default values of repos to check if they were changed
       $scope.defaulfOSRepos = {};
       response.updateObj.operating_systems.forEach(function(os) {
@@ -161,7 +164,8 @@ angular.module('ambariAdminConsole')
   };
 
   $scope.updateRepoVersions = function () {
-    return Stack.validateBaseUrls($scope.skipValidation, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+    var skip = $scope.skipValidation || $scope.useRedhatSatellite;
+    return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
       if (invalidUrls.length === 0) {
         Stack.updateRepo($scope.upgradeStack.stack_name, 
$scope.upgradeStack.stack_version, $scope.id, $scope.updateObj).then(function 
() {
           Alert.success($t('versions.alerts.versionEdited', {
@@ -217,6 +221,9 @@ angular.module('ambariAdminConsole')
    * On click handler for removing OS
    */
   $scope.removeOS = function() {
+    if ($scope.useRedhatSatellite) {
+      return;
+    }
     this.os.selected = false;
     if (this.os.repositories) {
       this.os.repositories.forEach(function(repo) {
@@ -243,7 +250,7 @@ angular.module('ambariAdminConsole')
         selectedCnt ++;
       }
     });
-    return $scope.osList.length == selectedCnt;
+    return $scope.osList.length == selectedCnt || $scope.useRedhatSatellite;
   };
 
   $scope.hasNotDeletedRepo = function () {
@@ -291,6 +298,16 @@ angular.module('ambariAdminConsole')
         }
       });
     }
+    if ($scope.useRedhatSatellite) {
+      ConfirmationModal.show(
+          $t('common.important'),
+          {
+            "url": 'views/modals/BodyForUseRedhatSatellite.html'
+          }
+      ).catch(function () {
+        $scope.useRedhatSatellite = !$scope.useRedhatSatellite;
+      });
+    }
   };
 
   $scope.clearError = function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
----------------------------------------------------------------------
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
index 175792c..7706af4 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
@@ -82,6 +82,7 @@ angular.module('ambariAdminConsole')
       'blockViewLabel': 'BLOCK',
       'listViewLabel': 'LIST',
       'rbac': 'Role Based Access Control',
+      'important': 'Important',
 
       'clusterNameChangeConfirmation': {
         'title': 'Confirm Cluster Name Change',
@@ -378,7 +379,12 @@ angular.module('ambariAdminConsole')
         'actualVersion': 'Actual Version',
         'releaseNotes': 'Release Notes'
       },
-      'useRedhatSatellite': 'Use RedHat Satellite/Spacewalk',
+      'useRedhatSatellite': {
+        'title': 'Use RedHat Satellite/Spacewalk',
+        'warning': 'By selecting to <b>"Use RedHat Satellite/Spacewalk"</b> 
for the software repositories, ' +
+        'you are responsible for configuring the repository channel in 
Satellite/Spacewalk and confirming the repositories for the selected <b>stack 
version</b> are available on the hosts in the cluster. ' +
+        'Refer to the Ambari documentation for more information.'
+      },
       'changeBaseURLConfirmation': {
         'title': 'Confirm Base URL Change',
         'message': 'You are about to change repository Base URLs that are 
already in use. Please confirm that you intend to make this change and that the 
new Base URLs point to the same exact Stack version and build'

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css 
b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index 3e0bd30..1bf9472 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -1552,6 +1552,10 @@ thead.view-permission-header > tr > th {
   text-align: center;
   cursor: pointer;
 }
+.register-version-form .repos-panel .remove-icon.disabled{
+  color: grey;
+}
+
 .register-version-form .repos-panel .repo-name-label {
   text-align: left;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-admin/src/main/resources/ui/admin-web/app/views/modals/BodyForUseRedhatSatellite.html
----------------------------------------------------------------------
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/modals/BodyForUseRedhatSatellite.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/modals/BodyForUseRedhatSatellite.html
new file mode 100644
index 0000000..67cd9df
--- /dev/null
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/modals/BodyForUseRedhatSatellite.html
@@ -0,0 +1,18 @@
+<!--
+* 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.
+-->
+<span translate="versions.useRedhatSatellite.warning"></span>

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
----------------------------------------------------------------------
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
index 26068a2..8fc0f89 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
@@ -177,10 +177,10 @@
               <div class="form-group {{repository.Repositories.repo_name}}" 
ng-class="{'has-error': repository.hasError }" ng-repeat="repository in 
os.repositories">
                 <label class="repo-name-label control-label 
col-sm-3">{{repository.Repositories.repo_name}}</label>
                 <div class="col-sm-9"><input type="text" class="form-control" 
ng-model="repository.Repositories.base_url"
-                                         ng-change="clearError()" 
ng-disabled="!os.selected"></div>
+                                         ng-change="clearError()" 
ng-disabled="useRedhatSatellite"></div>
               </div>
             </div>
-            <div class="col-sm-1 remove-icon" ng-click="removeOS()"><span 
class="glyphicon glyphicon-minus"></span>{{'common.controls.remove' | 
translate}}</div>
+            <div class="col-sm-1 remove-icon" ng-click="removeOS()" 
ng-class="{'disabled' : useRedhatSatellite}"><span class="glyphicon 
glyphicon-minus"></span>{{'common.controls.remove' | translate}}</div>
           </div>
         </div>
       </div>
@@ -195,7 +195,7 @@
         <div class="col-sm-9" id="skip-validation">
           <div class="checkbox">
             <label>
-              <input type="checkbox" ng-model="skipValidation" 
ng-change="clearErrors()">
+              <input type="checkbox" ng-model="skipValidation" 
ng-change="clearErrors()" ng-disabled="useRedhatSatellite">
               {{'versions.skipValidation' | translate}} <span class="glyphicon 
glyphicon-question-sign" 
tooltip-html-unsafe="{{'versions.alerts.skipValidationWarning' | 
translate}}"></span>
             </label>
           </div>
@@ -204,7 +204,7 @@
           <div class="checkbox">
             <label>
               <input type="checkbox" ng-model="useRedhatSatellite" 
ng-change="clearErrors()">
-              {{'versions.useRedhatSatellite' | translate}} <span 
class="glyphicon glyphicon-question-sign" 
tooltip-html-unsafe="{{'versions.alerts.useRedhatSatelliteWarning' | 
translate}}"></span>
+              {{'versions.useRedhatSatellite.title' | translate}} <span 
class="glyphicon glyphicon-question-sign" 
tooltip-html-unsafe="{{'versions.alerts.useRedhatSatelliteWarning' | 
translate}}"></span>
             </label>
           </div>
         </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index 02511e8..369e319 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -822,7 +822,7 @@ App.InstallerController = App.WizardController.extend({
     var dfd = $.Deferred();
     if (selectedStack && selectedStack.get('operatingSystems')) {
       this.set('validationCnt', 
selectedStack.get('repositories').filterProperty('isSelected').length);
-      var verifyBaseUrl = !wizardStep1Controller.get('skipValidationChecked');
+      var verifyBaseUrl = !wizardStep1Controller.get('skipValidationChecked') 
&& !wizardStep1Controller.get('selectedStack.useRedhatSatellite');
       selectedStack.get('operatingSystems').forEach(function (os) {
         if (os.get('isSelected')) {
           os.get('repositories').forEach(function (repo) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/controllers/wizard/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step1_controller.js 
b/ambari-web/app/controllers/wizard/step1_controller.js
index 86117c8..dc95a45 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -27,8 +27,6 @@ App.WizardStep1Controller = Em.Controller.extend({
    */
   skipValidationChecked: false,
 
-  useRedhatSatellite: false,
-
   selectedStack: function() {
     return App.Stack.find().findProperty('isSelected');
   }.property('[email protected]'),
@@ -51,7 +49,8 @@ App.WizardStep1Controller = Em.Controller.extend({
       'enterUrl': {
         index: 1,
         name: 'enterUrl',
-        url: 'http://',
+        url: '',
+        placeholder: 'Enter URL to Version Definition File',
         hasError: false,
         isSelected: false
       }
@@ -106,6 +105,9 @@ App.WizardStep1Controller = Em.Controller.extend({
    * On click handler for removing OS
    */
   removeOS: function(event) {
+    if (this.get('selectedStack.useRedhatSatellite')) {
+      return;
+    }
     var osToRemove = event.context;
     Em.set(osToRemove, 'isSelected', false);
   },
@@ -116,5 +118,17 @@ App.WizardStep1Controller = Em.Controller.extend({
   addOS: function(event) {
     var osToAdd = event.context;
     Em.set(osToAdd, 'isSelected', true);
-  }
+  },
+
+  changeUseRedhatSatellite: function () {
+    if (this.get('selectedStack.useRedhatSatellite')) {
+      return App.ModalPopup.show({
+        header: Em.I18n.t('common.important'),
+        secondary: false,
+        bodyClass: Ember.View.extend({
+          template: 
Ember.Handlebars.compile(Em.I18n.t('installer.step1.advancedRepo.useRedhatSatellite.warning'))
+        })
+      });
+    }
+  }.observes('selectedStack.useRedhatSatellite')
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/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 11ff7ed..9cfc9d5 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -311,6 +311,7 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
         }, this);
       }
       allRepos.set('display_name', 
Em.I18n.t("installer.step8.repoInfo.displayName"));
+      this.get('clusterInfo').set('useRedhatSatellite', 
selectedStack.get('useRedhatSatellite'));
       this.get('clusterInfo').set('repoInfo', allRepos);
     }
   },
@@ -348,6 +349,8 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
       var allRepos = this.generateRepoInfo(Em.getWithDefault(data, 
'items.0.repository_versions.0.operating_systems', []));
       allRepos.set('display_name', 
Em.I18n.t("installer.step8.repoInfo.displayName"));
       this.get('clusterInfo').set('repoInfo', allRepos);
+      //if the property is missing, set as false
+      this.get('clusterInfo').set('useRedhatSatellite', 
data.items[0].repository_versions[0].operating_systems[0].OperatingSystems.ambari_managed_repositories
 === false);
     } else {
       this.loadDefaultRepoInfo();
     }
@@ -400,6 +403,8 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
     var allRepos = this.generateRepoInfo(Em.getWithDefault(data, 'items', []));
     allRepos.set('display_name', 
Em.I18n.t("installer.step8.repoInfo.displayName"));
     this.get('clusterInfo').set('repoInfo', allRepos);
+    //if the property is missing, set as false
+    this.get('clusterInfo').set('useRedhatSatellite', 
data.items[0].OperatingSystems.ambari_managed_repositories === false);
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/mappers/stack_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/stack_mapper.js 
b/ambari-web/app/mappers/stack_mapper.js
index e3fb8fc..a430ea5 100644
--- a/ambari-web/app/mappers/stack_mapper.js
+++ b/ambari-web/app/mappers/stack_mapper.js
@@ -137,6 +137,7 @@ App.stackMapper = App.QuickDataMapper.create({
         servicesArray.pushObject(serviceObj);
       }, this);
 
+      //In case ambari_managed_repositories is undefined, set 
use_redhat_satellite to be false
       stack.use_redhat_satellite = 
item.operating_systems[0].OperatingSystems.ambari_managed_repositories === 
false;
       stack.stack_services = servicesArray;
       stack.operating_systems = operatingSystemsArray;

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index c5e1145..d08d96f 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -230,7 +230,8 @@ Em.I18n.translations = {
   'common.persist.error' : 'Error in persisting web client state at ambari 
server:',
   'common.update.error' : 'Error in retrieving web client state from ambari 
server',
   'common.tags': 'Tags',
-  'common.important': '<strong>Important:</strong>',
+  'common.important': 'Important',
+  'common.important.strong': '<strong>Important:</strong>',
   'common.allServices':'All Services',
   'common.move':'Move',
   'common.change': 'Change',
@@ -561,7 +562,7 @@ Em.I18n.translations = {
   'installer.step1.selectUseRepoOptions.public.networkLost.popup.msg3': 'Use 
the Local Repositoy option.',
   'installer.step1.selectUseRepoOptions.public.select':'Select Version',
   'installer.step1.selectUseRepoOptions.local':'Use Local Repository',
-  'installer.step1.usePublicRepo.ReposList.empty':'No other repositories',
+  'installer.step1.usePublicRepo.ReposList.empty':'No other versions',
   'installer.step1.usePublicRepo.viewRepos':'View Repositories',
   'installer.step1.useLocalRepo.uploadFile': 'Upload Version Definition File',
   'installer.step1.useLocalRepo.uploadFile.error.title': 'Upload Version 
Definition File Error',
@@ -592,6 +593,9 @@ Em.I18n.translations = {
   'installer.step1.advancedRepo.useRedhatSatellite.tooltip':'Disable 
distributed repositories and use RedHat Satellite/Spacewalk channels instead',
   'installer.step1.advancedRepo.skipValidation.message':'Skip Repository Base 
URL validation (Advanced)',
   'installer.step1.advancedRepo.useRedhatSatellite.message': 'Use RedHat 
Satellite/Spacewalk',
+  'installer.step1.advancedRepo.useRedhatSatellite.warning': 'By selecting to 
<b>“Use RedHat Satellite/Spacewalk”</b> for the software repositories, ' +
+    'you are responsible for configuring the repository channel in 
Satellite/Spacewalk and confirming the repositories for the selected <b>stack 
version</b> are available on the hosts in the cluster. ' +
+    'Refer to the Ambari documentation for more information.',
   'installer.step1.attentionNeeded':'<b>Attention:</b> Repository URLs are 
REQUIRED before you can proceed.',
   'installer.step1.invalidURLAttention': '<b>Attention:</b> Please make sure 
all repository URLs are valid before proceeding.',
   'installer.step1.checkAtLeastOneAttention': '<b>Attention:</b> Please check 
at least one repository.',

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/models/stack_version/service_simple.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_version/service_simple.js 
b/ambari-web/app/models/stack_version/service_simple.js
index 3f4b36d..13ca381 100644
--- a/ambari-web/app/models/stack_version/service_simple.js
+++ b/ambari-web/app/models/stack_version/service_simple.js
@@ -22,7 +22,19 @@ App.ServiceSimple = DS.Model.extend({
   id: DS.attr('string'),
   name: DS.attr('string'),
   displayName: DS.attr('string'),
-  latestVersion: DS.attr('string')
+  latestVersion: DS.attr('string'),
+  isHidden: function () {
+    var hiddenServices = ['MAPREDUCE2'];
+    return hiddenServices.contains(this.get('name')) || 
this.get('doNotShowAndInstall');
+  }.property('name'),
+
+  doNotShowAndInstall: function () {
+    var skipServices = [];
+    if(!App.supports.installGanglia) {
+      skipServices.push('GANGLIA');
+    }
+    return skipServices.contains(this.get('name'));
+  }.property('name')
 });
 
 App.ServiceSimple.FIXTURES = [];
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 87fc485..31bc1f9 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -6308,6 +6308,9 @@ input[type="radio"].align-checkbox, 
input[type="checkbox"].align-checkbox {
       padding: 0px;
       text-align: center;
       cursor: pointer;
+      &.disabled {
+        color: grey;
+      }
     }
     .border-bottom {
       border-bottom: 1px solid #ebebeb;

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs 
b/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs
index 63690b7..bb197bd 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs
@@ -38,7 +38,7 @@
       {{#each repository in os.repositories}}
         <div {{bindAttr class="repository.repoName :row-fluid"}}>
           <div class="span3">{{repository.repoName}}</div>
-          <div {{bindAttr class="repository.hasError:error :control-group 
:span9"}}>{{view App.BaseUrlTextField repositoryBinding="repository"}}</div>
+          <div {{bindAttr class="repository.hasError:error :control-group 
:span9"}}>{{view App.BaseUrlTextField repositoryBinding="repository" 
disabledBinding="view.content.useRedhatSatellite"}}</div>
         </div>
       {{/each}}
     </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs 
b/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs
index d209d54..fa4845e 100644
--- a/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs
+++ b/ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs
@@ -38,7 +38,7 @@
     {{view decommissionWarning}}
   </div>
 {{/if}}
-<div class='alert'>{{{t common.important}}}
+<div class='alert'>{{{t common.important.strong}}}
   {{#if unknownComponents}}
     {{t hosts.delete.popup.body.msg.unknownComponents}}
   {{/if}}
@@ -54,4 +54,4 @@
 {{/unless}}
 
 
-<div class='alert'>{{{t common.important}}} {{t 
hosts.delete.popup.body.msg3}}</div>
+<div class='alert'>{{{t common.important.strong}}} {{t 
hosts.delete.popup.body.msg3}}</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/templates/wizard/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step1.hbs 
b/ambari-web/app/templates/wizard/step1.hbs
index 2b5dc38..56c62a2 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -30,28 +30,28 @@
         {{t installer.step1.selectUseRepoOptions.public.select}}
       </div>
       <div class="span7 right-stack-info">
-        <div class="repo-list-button btn-group">
-          {{#if view.selectedPublicRepoVersion}}
+        {{#if view.selectedPublicRepoVersion}}
+          <div class="repo-list-button btn-group">
             <button type="button" {{bindAttr 
class="optionsToSelect.useLocalRepo.isSelected:disabled :btn :btn-primary 
:dropdown-toggle"}} data-toggle="dropdown">
               {{view.selectedPublicRepoVersion.displayName}} &nbsp;<span 
class="caret"></span>
             </button>
-          {{else}}
-            <button type="button" class="disabled btn btn-primary 
dropdown-toggle"}} data-toggle="dropdown">
-             {{t 
installer.step1.selectUseRepoOptions.public.networkLost.button}}
-            </button>
-          {{/if}}
-          <ul class="dropdown-menu available-repos-dropdown">
-            {{#if view.availableStackRepoList}}
-              {{#each repo in view.availableStackRepoList}}
-                {{#if repo.repositoryVersion}}
-                  <li><a {{action "selectRepoInList" repo 
target="view"}}>{{repo.displayName}}</a></li>
-                {{/if}}
-              {{/each}}
-            {{else}}
-              <li><a class="disabled">{{t 
installer.step1.usePublicRepo.ReposList.empty}}</a></li>
-            {{/if}}
-          </ul>
-        </div>
+            <ul class="dropdown-menu available-repos-dropdown">
+              {{#if view.availableStackRepoList}}
+                {{#each repo in view.availableStackRepoList}}
+                  {{#if repo.repositoryVersion}}
+                    <li><a {{action "selectRepoInList" repo 
target="view"}}>{{repo.displayName}}</a></li>
+                  {{/if}}
+                {{/each}}
+              {{else}}
+                <li><a class="disabled">{{t 
installer.step1.usePublicRepo.ReposList.empty}}</a></li>
+              {{/if}}
+            </ul>
+          </div>
+        {{else}}
+          <button type="button" class="disabled btn btn-primary 
dropdown-toggle"}} data-toggle="dropdown">
+            {{t 
installer.step1.selectUseRepoOptions.public.networkLost.button}}
+          </button>
+        {{/if}}
       </div>
     </form>
 
@@ -79,7 +79,7 @@
         </div>
         <div class="span7 vdf-url">
           <div {{bindAttr class="optionsToSelect.useLocalRepo.enterUrl.name 
optionsToSelect.useLocalRepo.enterUrl.url.hasError:has-error }"}}>
-            {{view Ember.TextField 
valueBinding="optionsToSelect.useLocalRepo.enterUrl.url" 
disabledBinding="view.enterUrlFieldDisabled"}}
+            {{view Ember.TextField 
valueBinding="optionsToSelect.useLocalRepo.enterUrl.url" 
placeholderBinding="optionsToSelect.useLocalRepo.enterUrl.placeholder" 
disabledBinding="view.enterUrlFieldDisabled"}}
           </div>
         </div>
         <div class="span12 read-info-button">
@@ -161,12 +161,12 @@
                             {{/if}}
                           </div>
                           <div {{bindAttr class=":span8 :repo-url 
repository.invalidFormatError:textfield-error 
repository.invalidError:textfield-error"}}>
-                            {{view Ember.TextField 
valueBinding="repository.baseUrl"}}
+                            {{view Ember.TextField 
valueBinding="repository.baseUrl" 
disabledBinding="controller.selectedStack.useRedhatSatellite"}}
                           </div>
                         </div>
                       {{/each}}
                     </div>
-                    <div class="span1 remove-icon" {{action "removeOS" 
operatingSystem target="controller"}}><i class="icon-minus"></i>{{t 
common.remove}}</div>
+                    <div {{bindAttr class=":span1 :remove-icon 
controller.selectedStack.useRedhatSatellite:disabled"}} {{action "removeOS" 
operatingSystem target="controller"}}><i class="icon-minus"></i>{{t 
common.remove}}</div>
                   </div>
                 {{/if}}
               {{/each}}
@@ -183,8 +183,8 @@
                   {{/each}}
                 </ul>
               </div>
-              <div id="skip-validation">
-                <label>{{view Ember.Checkbox 
checkedBinding="skipValidationChecked" class="checkbox"}}{{t 
installer.step1.advancedRepo.skipValidation.message}}
+              <div id="skip-validation" {{bindAttr 
class="controller.selectedStack.useRedhatSatellite:disabled"}}>
+                <label>{{view Ember.Checkbox 
checkedBinding="skipValidationChecked" 
disabledBinding="controller.selectedStack.useRedhatSatellite" 
class="checkbox"}}{{t installer.step1.advancedRepo.skipValidation.message}}
                   <i class="icon-question-sign" rel="skip-validation-tooltip"
                      data-toggle="tooltip" {{translateAttr 
title="installer.step1.advancedRepo.skipValidation.tooltip"}}></i></label>
               </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/templates/wizard/step8.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step8.hbs 
b/ambari-web/app/templates/wizard/step8.hbs
index 9a56b28..f19e020 100644
--- a/ambari-web/app/templates/wizard/step8.hbs
+++ b/ambari-web/app/templates/wizard/step8.hbs
@@ -36,15 +36,25 @@
 
       <p><b>{{controller.clusterInfo.repoInfo.display_name}}</b>:</p>
 
-      <div>
-        <ul>
-          {{#each item in controller.clusterInfo.repoInfo}}
+      {{#if controller.clusterInfo.useRedhatSatellite}}
+        <div>
+          <ul>
             <li>
-              <p><span class="text text-info">{{item.os_type}} 
({{item.repo_id}}): <br/></span>{{item.base_url}}</p>
+              <p>{{t 
installer.step1.advancedRepo.useRedhatSatellite.message}}</p>
             </li>
-          {{/each}}
-        </ul>
-      </div>
+          </ul>
+        </div>
+      {{else}}
+        <div>
+          <ul>
+            {{#each item in controller.clusterInfo.repoInfo}}
+              <li>
+                <p><span class="text text-info">{{item.os_type}} 
({{item.repo_id}}): <br/></span>{{item.base_url}}</p>
+              </li>
+            {{/each}}
+          </ul>
+        </div>
+      {{/if}}
 
       <div>
         {{#if controller.services.length}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js 
b/ambari-web/app/utils/ajax/ajax.js
index bccdc1b..dbe6891 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1355,7 +1355,7 @@ var urls = {
     }
   },
   'cluster.load_repositories': {
-    'real': 
'/stacks/{stackName}/versions/{stackVersion}/operating_systems?fields=repositories/*',
+    'real': 
'/stacks/{stackName}/versions/{stackVersion}/operating_systems?fields=repositories/*,OperatingSystems/*',
     'mock': '/data/stacks/HDP-2.1/operating_systems.json',
     'format': function (data) {
       return {
@@ -1364,7 +1364,7 @@ var urls = {
     }
   },
   'cluster.load_repo_version': {
-    'real': 
'/stacks/{stackName}/versions?fields=repository_versions/operating_systems/repositories/*,repository_versions/RepositoryVersions/display_name&repository_versions/RepositoryVersions/repository_version={repositoryVersion}',
+    'real': 
'/stacks/{stackName}/versions?fields=repository_versions/operating_systems/repositories/*,repository_versions/operating_systems/OperatingSystems/*,repository_versions/RepositoryVersions/display_name&repository_versions/RepositoryVersions/repository_version={repositoryVersion}',
     'mock': ''
   },
   'cluster.load_detailed_repo_version': {

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/views/wizard/step10_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step10_view.js 
b/ambari-web/app/views/wizard/step10_view.js
index d1e7be7..e44f799 100644
--- a/ambari-web/app/views/wizard/step10_view.js
+++ b/ambari-web/app/views/wizard/step10_view.js
@@ -30,7 +30,7 @@ App.WizardStep10View = Em.View.extend({
   serviceRestartText: function () {
     var controller = this.get('controller');
     if (controller.get('isAddServiceWizard'))
-      return Em.I18n.t('common.important') + 
Em.I18n.t('installer.step10.staleServicesRestartRequired');
+      return Em.I18n.t('common.important.strong') + 
Em.I18n.t('installer.step10.staleServicesRestartRequired');
     else
       return '';
   }.property('controller.isAddServiceWizard')

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/views/wizard/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step1_view.js 
b/ambari-web/app/views/wizard/step1_view.js
index 7348cbf..96dcf39 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -83,7 +83,9 @@ App.WizardStep1View = Em.View.extend({
 
   selectedServices: function () {
     var selectedStack = this.get('controller.selectedStack');
-    return Em.isNone(selectedStack) ? [] : 
selectedStack.get('stackServices').toArray().map(function (service) {
+    return Em.isNone(selectedStack) ? [] : 
selectedStack.get('stackServices').toArray().filter(function (service) {
+      return !service.get('isHidden');
+    }).map(function (service) {
       return Em.Object.create({
         displayName: service.get('displayName'),
         version: service.get('latestVersion')
@@ -253,8 +255,8 @@ App.WizardStep1View = Em.View.extend({
   }.property('controller.selectedStack'),
 
   isAddOsButtonDisabled: function () {
-    return this.get('operatingSystems').get('length') == 
this.get('operatingSystems').filterProperty('isSelected').get('length');
-  }.property('operatingSystems', '[email protected]'),
+    return this.get('operatingSystems').get('length') == 
this.get('operatingSystems').filterProperty('isSelected').get('length') || 
this.get('controller.selectedStack.useRedhatSatellite') === true;
+  }.property('operatingSystems', '[email protected]', 
'controller.selectedStack.useRedhatSatellite'),
 
   /**
    * List of all repositories under selected stack operatingSystems

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/app/views/wizard/step7/assign_master_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step7/assign_master_view.js 
b/ambari-web/app/views/wizard/step7/assign_master_view.js
index 1ad818a..d6a456f 100644
--- a/ambari-web/app/views/wizard/step7/assign_master_view.js
+++ b/ambari-web/app/views/wizard/step7/assign_master_view.js
@@ -57,7 +57,7 @@ App.AssignMasterOnStep7View = 
App.AssignMasterComponentsView.extend({
     }
 
     if (isManualKerberos) {
-      var warnMessage = Em.I18n.t('common.important') + ': ' + 
Em.I18n.t('installer.step8.kerberors.warning');
+      var warnMessage = Em.I18n.t('common.important.strong') + ': ' + 
Em.I18n.t('installer.step8.kerberors.warning');
       alertMessage += '<br/>' + 
Em.I18n.t('common.warn.message').format(warnMessage);
     }
     this.set('alertMessage', alertMessage);

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/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 a3e3f7e..b2c108a 100644
--- a/ambari-web/test/controllers/wizard/step8_test.js
+++ b/ambari-web/test/controllers/wizard/step8_test.js
@@ -681,6 +681,9 @@ describe('App.WizardStep8Controller', function () {
               {
                 operating_systems: [
                   {
+                    OperatingSystems: {
+                      ambari_managed_repositories: true
+                    },
                     repositories: [
                       {
                         Repositories: {
@@ -692,6 +695,9 @@ describe('App.WizardStep8Controller', function () {
                     ]
                   },
                   {
+                    OperatingSystems: {
+                      ambari_managed_repositories: true
+                    },
                     repositories: [
                       {
                         Repositories: {

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/test/views/wizard/step10_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/wizard/step10_view_test.js 
b/ambari-web/test/views/wizard/step10_view_test.js
index 92668e6..2ff6663 100644
--- a/ambari-web/test/views/wizard/step10_view_test.js
+++ b/ambari-web/test/views/wizard/step10_view_test.js
@@ -50,7 +50,7 @@ describe('App.WizardStep10View', function() {
     });
     it("text is complete", function() {
       view.set('controller.isAddServiceWizard', true);
-      
expect(view.get('serviceRestartText')).to.equal(Em.I18n.t('common.important') + 
Em.I18n.t('installer.step10.staleServicesRestartRequired'));
+      
expect(view.get('serviceRestartText')).to.equal(Em.I18n.t('common.important.strong')
 + Em.I18n.t('installer.step10.staleServicesRestartRequired'));
     });
   });
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/864f6de2/ambari-web/test/views/wizard/step7/assign_master_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/wizard/step7/assign_master_view_test.js 
b/ambari-web/test/views/wizard/step7/assign_master_view_test.js
index 7c4a63e..a947ffe 100644
--- a/ambari-web/test/views/wizard/step7/assign_master_view_test.js
+++ b/ambari-web/test/views/wizard/step7/assign_master_view_test.js
@@ -124,7 +124,7 @@ describe('App.AssignMasterOnStep7View', function () {
       var expected = [
         Em.I18n.t('installer.step7.assign.master.body').format('c1', 
Em.I18n.t('common.host').toLowerCase(), Em.I18n.t('it')),
         
Em.I18n.t('installer.step7.assign.master.dependent.component.body').format(''),
-        Em.I18n.t('common.warn.message').format(Em.I18n.t('common.important') 
+ ': ' + Em.I18n.t('installer.step8.kerberors.warning'))
+        
Em.I18n.t('common.warn.message').format(Em.I18n.t('common.important.strong') + 
': ' + Em.I18n.t('installer.step8.kerberors.warning'))
       ].join('<br/>');
 
       view.set('controller.mastersToCreate', ['c1']);

Reply via email to