Repository: ambari Updated Branches: refs/heads/branch-2.5 e5f0dfc8d -> 6ed95d5d6
AMBARI-18346 SmartSense Mandatory Install (Vivek Ratnavel Subramanian via zhewang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ed95d5d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ed95d5d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ed95d5d Branch: refs/heads/branch-2.5 Commit: 6ed95d5d6981b3c6b28f7260887742b4eda8d525 Parents: e5f0dfc Author: Zhe (Joe) Wang <[email protected]> Authored: Wed Nov 2 15:27:28 2016 -0700 Committer: Zhe (Joe) Wang <[email protected]> Committed: Wed Nov 2 15:27:28 2016 -0700 ---------------------------------------------------------------------- ambari-web/app/controllers/wizard/step4_controller.js | 2 +- ambari-web/app/mappers/stack_service_mapper.js | 7 ++++++- ambari-web/app/models/stack_service.js | 8 ++------ ambari-web/app/templates/wizard/step4.hbs | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/6ed95d5d/ambari-web/app/controllers/wizard/step4_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step4_controller.js b/ambari-web/app/controllers/wizard/step4_controller.js index 7ad78cc..317c548 100644 --- a/ambari-web/app/controllers/wizard/step4_controller.js +++ b/ambari-web/app/controllers/wizard/step4_controller.js @@ -34,7 +34,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({ */ isAllChecked: function(key, value) { if (arguments.length > 1) { - this.filterProperty('isInstalled', false).setEach('isSelected', value); + this.filterProperty('isDisabled', false).setEach('isSelected', value); return value; } return this.filterProperty('isInstalled', false). http://git-wip-us.apache.org/repos/asf/ambari/blob/6ed95d5d/ambari-web/app/mappers/stack_service_mapper.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mappers/stack_service_mapper.js b/ambari-web/app/mappers/stack_service_mapper.js index c800e83..fa8f3f3 100644 --- a/ambari-web/app/mappers/stack_service_mapper.js +++ b/ambari-web/app/mappers/stack_service_mapper.js @@ -32,6 +32,8 @@ App.stackServiceMapper = App.QuickDataMapper.create({ service_version: 'service_version', stack_name: 'stack_name', stack_version: 'stack_version', + selection: 'selection', + is_disabled: 'is_disabled', is_selected: 'is_selected', is_installed: 'is_installed', is_installable: 'is_installable', @@ -115,9 +117,12 @@ App.stackServiceMapper = App.QuickDataMapper.create({ stackService.is_installable = false; stackService.is_selected = false; } - if (App.StackService.unSelectByDefault.contains(stackService.service_name)) { + if (stackService.selection === "TECH_PREVIEW") { stackService.is_selected = false; } + if(stackService.selection === "MANDATORY" || stackService.is_installed) { + stackService.is_disabled = true; + } result.push(this.parseIt(stackService, this.get('config'))); }, this); App.store.loadMany(this.get('component_model'), stackServiceComponents); http://git-wip-us.apache.org/repos/asf/ambari/blob/6ed95d5d/ambari-web/app/models/stack_service.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index 9cf9d49..756c177 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -35,6 +35,8 @@ App.StackService = DS.Model.extend({ serviceCheckSupported: DS.attr('boolean'), stackName: DS.attr('string'), stackVersion: DS.attr('string'), + selection: DS.attr('string'), + isDisabled: DS.attr('boolean', {defaultValue: false}), isSelected: DS.attr('boolean', {defaultValue: true}), isInstalled: DS.attr('boolean', {defaultValue: false}), isInstallable: DS.attr('boolean', {defaultValue: true}), @@ -213,12 +215,6 @@ App.StackService.displayOrder = [ 'ZEPPELIN' ]; -App.StackService.unSelectByDefault = [ - 'SPARK2', - 'LOGSEARCH' -]; - - App.StackService.componentsOrderForService = { 'HAWQ': ['HAWQMASTER', 'HAWQSTANDBY'] }; http://git-wip-us.apache.org/repos/asf/ambari/blob/6ed95d5d/ambari-web/app/templates/wizard/step4.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step4.hbs b/ambari-web/app/templates/wizard/step4.hbs index c62d369..afdc81a 100644 --- a/ambari-web/app/templates/wizard/step4.hbs +++ b/ambari-web/app/templates/wizard/step4.hbs @@ -37,7 +37,7 @@ {{#unless isHiddenOnSelectServicePage}} <tr {{bindAttr class="isSelected:success isSelected:service-selected"}}> <td><label class="checkbox">{{view Ember.Checkbox classBinding="serviceName" - disabledBinding="isInstalled" + disabledBinding="isDisabled" checkedBinding="isSelected"}}{{displayNameOnSelectServicePage}}</label> </td> <td>{{serviceVersionDisplay}}</td>
