瀏覽代碼

AMBARI-16016 Properly handle 'properties' in Manage Config Group popup. (ababiichuk)

ababiichuk 9 年之前
父節點
當前提交
5d92271a63
共有 1 個文件被更改,包括 15 次插入0 次删除
  1. 15 0
      ambari-web/app/models/configs/objects/service_config_property.js

+ 15 - 0
ambari-web/app/models/configs/objects/service_config_property.js

@@ -268,6 +268,21 @@ App.ServiceConfigProperty = Em.Object.extend({
     this.updateDescription();
   },
 
+  /**
+   * updates configs list that belongs to config group
+   */
+  updateGroupConfigs: function() {
+    if (this.get('group')) {
+      var o = this.get('group.properties').find(function(c) {
+        return Em.get(c, 'name') === this.get('name') && Em.get(c, 'filename') === this.get('filename');
+      }, this);
+
+      if (o) {
+        Em.set(o, 'value', this.get('value'));
+      }
+    }
+  }.observes('value'),
+
   /**
    * Indicates when value is not the default value.
    * Returns false when there is no default value.