瀏覽代碼

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

ababiichuk 9 年之前
父節點
當前提交
5af78751e8
共有 2 個文件被更改,包括 12 次插入0 次删除
  1. 4 0
      ambari-web/app/app.js
  2. 8 0
      ambari-web/app/controllers/wizard/step7/assign_master_controller.js

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

@@ -311,6 +311,10 @@ module.exports = Em.Application.create({
    * @type {Em.Object}
    * @type {Em.Object}
    */
    */
   components: Em.Object.create({
   components: Em.Object.create({
+    isMasterAddableOnlyOnHA: function () {
+      return App.StackServiceComponent.find().filterProperty('isMasterAddableOnlyOnHA').mapProperty('componentName')
+    }.property('App.router.clusterController.isLoaded'),
+
     allComponents: function () {
     allComponents: function () {
       return App.StackServiceComponent.find().mapProperty('componentName')
       return App.StackServiceComponent.find().mapProperty('componentName')
     }.property('App.router.clusterController.isLoaded'),
     }.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,
   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.
    * Marks component add/delete action to be performed ahead.
    * @param context {Object} Context of the calling function
    * @param context {Object} Context of the calling function