Procházet zdrojové kódy

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

ababiichuk před 9 roky
rodič
revize
5d92271a63

+ 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.