Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 75E56102E7 for ; Tue, 7 May 2013 18:12:48 +0000 (UTC) Received: (qmail 25164 invoked by uid 500); 7 May 2013 18:12:48 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 25133 invoked by uid 500); 7 May 2013 18:12:48 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 25126 invoked by uid 99); 7 May 2013 18:12:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 May 2013 18:12:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 May 2013 18:12:47 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BFE8823889DA; Tue, 7 May 2013 18:12:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1479998 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/models/service_config.js ambari-web/app/utils/config.js Date: Tue, 07 May 2013 18:12:26 -0000 To: ambari-commits@incubator.apache.org From: jaimin@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130507181226.BFE8823889DA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jaimin Date: Tue May 7 18:12:26 2013 New Revision: 1479998 URL: http://svn.apache.org/r1479998 Log: AMBARI-2085. UI allows user to set empty value for configs in Advanced category. (jaimin) Modified: incubator/ambari/trunk/CHANGES.txt incubator/ambari/trunk/ambari-web/app/models/service_config.js incubator/ambari/trunk/ambari-web/app/utils/config.js Modified: incubator/ambari/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1479998&r1=1479997&r2=1479998&view=diff ============================================================================== --- incubator/ambari/trunk/CHANGES.txt (original) +++ incubator/ambari/trunk/CHANGES.txt Tue May 7 18:12:26 2013 @@ -830,6 +830,9 @@ Trunk (unreleased changes): BUG FIXES + AMBARI-2085. UI allows user to set empty value for configs in + Advanced category. (jaimin) + AMBARI-2087. Tasks are not filtered by parent request id. (smohanty) AMBARI-2086. Agent on host with clients and DATANODE only seems to schedule Modified: incubator/ambari/trunk/ambari-web/app/models/service_config.js URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/service_config.js?rev=1479998&r1=1479997&r2=1479998&view=diff ============================================================================== --- incubator/ambari/trunk/ambari-web/app/models/service_config.js (original) +++ incubator/ambari/trunk/ambari-web/app/models/service_config.js Tue May 7 18:12:26 2013 @@ -439,14 +439,13 @@ App.ServiceConfigProperty = Ember.Object }.property('displayType'), validate: function () { - var value = this.get('value'); var valueRange = this.get('valueRange'); var values = [];//value split by "," to check UNIX users, groups list var isError = false; - if (typeof value === 'string' && value.trim().length === 0) { + if (typeof value === 'string' && value.length === 0) { if (this.get('isRequired')) { this.set('errorMessage', 'This is required'); isError = true; Modified: incubator/ambari/trunk/ambari-web/app/utils/config.js URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/config.js?rev=1479998&r1=1479997&r2=1479998&view=diff ============================================================================== --- incubator/ambari/trunk/ambari-web/app/utils/config.js (original) +++ incubator/ambari/trunk/ambari-web/app/utils/config.js Tue May 7 18:12:26 2013 @@ -103,7 +103,7 @@ App.config = Em.Object.create({ } else { config.category = 'Advanced'; config.filename = isAdvanced && advancedConfigs.findProperty('name', config.name).filename; - config.isRequired = false; + config.isRequired = true; } }, /** @@ -227,7 +227,7 @@ App.config = Em.Object.create({ isUserProperty: stored.isUserProperty === true, isOverridable: true, overrides: stored.overrides, - isRequired: !isAdvanced + isRequired: true }; this.calculateConfigProperties(configData, isAdvanced, advancedConfigs); } else if (preDefined && !stored) { @@ -272,7 +272,7 @@ App.config = Em.Object.create({ * false; _config.value = ''; } else if * (/^\s+$/.test(_config.value)) { _config.isRequired = false; } */ - _config.isRequired = false; + _config.isRequired = true; _config.isVisible = true; _config.displayType = 'advanced'; serviceConfigs.push(_config);