浏览代码

AMBARI-4138 Possibility duplicate one group many times with the same name (ababiichuk)

aBabiichuk 11 年之前
父节点
当前提交
ba8f51094e
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      ambari-web/app/controllers/main/service/manage_config_groups_controller.js

+ 3 - 0
ambari-web/app/controllers/main/service/manage_config_groups_controller.js

@@ -361,6 +361,9 @@ App.ManageConfigGroupsController = Em.Controller.extend({
       configGroupName: duplicated ? self.get('selectedConfigGroup.name') + ' Copy' : "",
       configGroupDesc: duplicated ? self.get('selectedConfigGroup.description') + ' (Copy)' : "",
       warningMessage: '',
+      didInsertElement: function(){
+        this.validate();
+      },
       validate: function () {
         var warningMessage = '';
         if (self.get('configGroups').mapProperty('name').contains(this.get('configGroupName').trim())) {