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/950d1db8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/950d1db8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/950d1db8 Branch: refs/heads/branch-feature-AMBARI-18634 Commit: 950d1db879b203a9d8090f414cc75fb54a5deb55 Parents: 780bf94 Author: Zhe (Joe) Wang <[email protected]> Authored: Wed Nov 2 15:28:39 2016 -0700 Committer: Zhe (Joe) Wang <[email protected]> Committed: Wed Nov 2 15:28:39 2016 -0700 ---------------------------------------------------------------------- .../resources/common-services/LOGSEARCH/0.5.0/metainfo.xml | 2 +- .../main/resources/common-services/SPARK2/2.0.0/metainfo.xml | 1 + 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 +- 6 files changed, 12 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/950d1db8/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml index e0280b4..5b82e74 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml @@ -23,7 +23,7 @@ <displayName>Log Search</displayName> <comment>Log aggregation, analysis, and visualization for Ambari managed services. This service is <b>Technical Preview</b>.</comment> <version>0.5.0</version> - + <selection>TECH_PREVIEW</selection> <components> <component> http://git-wip-us.apache.org/repos/asf/ambari/blob/950d1db8/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/metainfo.xml index fb50f68..324746a 100755 --- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/metainfo.xml @@ -24,6 +24,7 @@ <displayName>Spark2</displayName> <comment>Apache Spark 2.0 is a fast and general engine for large-scale data processing. This service is <b>Technical Preview</b>.</comment> <version>2.0.0</version> + <selection>TECH_PREVIEW</selection> <components> <component> <name>SPARK2_JOBHISTORYSERVER</name> http://git-wip-us.apache.org/repos/asf/ambari/blob/950d1db8/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/950d1db8/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/950d1db8/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/950d1db8/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 26c304e..1dbf5e6 100644 --- a/ambari-web/app/templates/wizard/step4.hbs +++ b/ambari-web/app/templates/wizard/step4.hbs @@ -45,7 +45,7 @@ <td> <div class="checkbox"> {{view App.CheckboxView checkboxClassNamesBinding="serviceName" - disabledBinding="isInstalled" + disabledBinding="isDisabled" checkedBinding="isSelected" }} </div>
