Browse Source

AMBARI-17963 Hide remove NameNode buttons for assign Hive Interactive popup. (ababiichuk)

ababiichuk 9 years ago
parent
commit
5af78751e8

+ 4 - 0
ambari-web/app/app.js

@@ -311,6 +311,10 @@ module.exports = Em.Application.create({
    * @type {Em.Object}
    */
   components: Em.Object.create({
+    isMasterAddableOnlyOnHA: function () {
+      return App.StackServiceComponent.find().filterProperty('isMasterAddableOnlyOnHA').mapProperty('componentName')
+    }.property('App.router.clusterController.isLoaded'),
+
     allComponents: function () {
       return App.StackServiceComponent.find().mapProperty('componentName')
     }.property('App.router.clusterController.isLoaded'),

+ 8 - 0
ambari-web/app/controllers/wizard/step7/assign_master_controller.js

@@ -41,6 +41,14 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App
 
   markSavedComponentsAsInstalled: true,
 
+  /**
+   * Array of master component names, that should be addable
+   * Are used in HA wizards to add components, that are not addable for other wizards
+   * @type {Array}
+   * @override
+   */
+  mastersAddableInHA: Em.computed.alias('App.components.isMasterAddableOnlyOnHA'),
+
   /**
    * Marks component add/delete action to be performed ahead.
    * @param context {Object} Context of the calling function