Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 656C4200B8F for ; Fri, 30 Sep 2016 17:09:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 64241160AD9; Fri, 30 Sep 2016 15:09:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D0EAA160AC4 for ; Fri, 30 Sep 2016 17:09:49 +0200 (CEST) Received: (qmail 31004 invoked by uid 500); 30 Sep 2016 15:09:49 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 30989 invoked by uid 99); 30 Sep 2016 15:09:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Sep 2016 15:09:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AC9F6E03CE; Fri, 30 Sep 2016 15:09:48 +0000 (UTC) From: neykov To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-ui pull request #34: Use new pinned and constraints flag returned b... Content-Type: text/plain Message-Id: <20160930150948.AC9F6E03CE@git1-us-west.apache.org> Date: Fri, 30 Sep 2016 15:09:48 +0000 (UTC) archived-at: Fri, 30 Sep 2016 15:09:50 -0000 Github user neykov commented on a diff in the pull request: https://github.com/apache/brooklyn-ui/pull/34#discussion_r81357381 --- Diff: src/main/webapp/assets/js/view/application-add-wizard.js --- @@ -680,8 +680,13 @@ define([ this.$('.required-config-loading').hide() if (catalogEntryItem!=null && catalogEntryItem.config!=null) { var that = this - _.each(catalogEntryItem.config, function (cfg) { - if (cfg.priority !== undefined) { + _.chain(catalogEntryItem.config).sortBy(function (cfg){ + return cfg.priority ? cfg.priority : 99999; + }).each(function (cfg) { + if (cfg.pinned === true) { + var html = _.template(RequiredConfigEntryHtml, {data:cfg}); + that.$('.config-table').append(html); + } else if (cfg.constraints.indexOf('required') > - 1 && (!cfg.defaultValue || cfg.defaultValue === '')) { --- End diff -- More importantly having a default value of 0 will mess the check - handle it explicitly (should not show if required & defaultVAlue = 0). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---