Browse Source

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

Zhe (Joe) Wang 9 years ago
parent
commit
864f6de298
24 changed files with 184 additions and 64 deletions
  1. 23 5
      ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
  2. 20 3
      ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsEditCtrl.js
  3. 7 1
      ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
  4. 4 0
      ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
  5. 18 0
      ambari-admin/src/main/resources/ui/admin-web/app/views/modals/BodyForUseRedhatSatellite.html
  6. 4 4
      ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
  7. 1 1
      ambari-web/app/controllers/installer.js
  8. 18 4
      ambari-web/app/controllers/wizard/step1_controller.js
  9. 5 0
      ambari-web/app/controllers/wizard/step8_controller.js
  10. 1 0
      ambari-web/app/mappers/stack_mapper.js
  11. 6 2
      ambari-web/app/messages.js
  12. 13 1
      ambari-web/app/models/stack_version/service_simple.js
  13. 3 0
      ambari-web/app/styles/application.less
  14. 1 1
      ambari-web/app/templates/main/admin/stack_upgrade/edit_repositories.hbs
  15. 2 2
      ambari-web/app/templates/main/host/details/doDeleteHostPopup.hbs
  16. 24 24
      ambari-web/app/templates/wizard/step1.hbs
  17. 17 7
      ambari-web/app/templates/wizard/step8.hbs
  18. 2 2
      ambari-web/app/utils/ajax/ajax.js
  19. 1 1
      ambari-web/app/views/wizard/step10_view.js
  20. 5 3
      ambari-web/app/views/wizard/step1_view.js
  21. 1 1
      ambari-web/app/views/wizard/step7/assign_master_view.js
  22. 6 0
      ambari-web/test/controllers/wizard/step8_test.js
  23. 1 1
      ambari-web/test/views/wizard/step10_view_test.js
  24. 1 1
      ambari-web/test/views/wizard/step7/assign_master_view_test.js

+ 23 - 5
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) {

+ 20 - 3
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 () {

+ 7 - 1
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'

+ 4 - 0
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;
 }

+ 18 - 0
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>

+ 4 - 4
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>

+ 1 - 1
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) {

+ 18 - 4
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('content.stacks.@each.isSelected'),
@@ -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')
 });

+ 5 - 0
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);
   },
 
   /**

+ 1 - 0
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;

+ 6 - 2
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.',

+ 13 - 1
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 = [];

+ 3 - 0
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;

+ 1 - 1
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>

+ 2 - 2
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>

+ 24 - 24
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>

+ 17 - 7
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}}

+ 2 - 2
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': {

+ 1 - 1
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')

+ 5 - 3
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', 'operatingSystems.@each.isSelected'),
+    return this.get('operatingSystems').get('length') == this.get('operatingSystems').filterProperty('isSelected').get('length') || this.get('controller.selectedStack.useRedhatSatellite') === true;
+  }.property('operatingSystems', 'operatingSystems.@each.isSelected', 'controller.selectedStack.useRedhatSatellite'),
 
   /**
    * List of all repositories under selected stack operatingSystems

+ 1 - 1
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);

+ 6 - 0
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: {

+ 1 - 1
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'));
     });
   });
 });

+ 1 - 1
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']);