ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-17709 Empty dropdowns when selecting config group for dependent service. (ababiichuk)
Date Thu, 14 Jul 2016 13:30:07 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 19322e115 -> b515ff95d


AMBARI-17709 Empty dropdowns when selecting config group for dependent service. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b515ff95
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b515ff95
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b515ff95

Branch: refs/heads/trunk
Commit: b515ff95dc3ae7ec6d301606935b84ce5ad63b83
Parents: 19322e1
Author: ababiichuk <ababiichuk@hortonworks.com>
Authored: Thu Jul 14 15:46:03 2016 +0300
Committer: ababiichuk <ababiichuk@hortonworks.com>
Committed: Thu Jul 14 15:46:03 2016 +0300

----------------------------------------------------------------------
 ambari-web/app/messages.js                                   | 1 +
 ambari-web/app/styles/application.less                       | 4 +++-
 .../templates/common/modal_popups/select_groups_popup.hbs    | 8 +++++++-
 .../app/views/common/modal_popups/select_groups_popup.js     | 2 ++
 4 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b515ff95/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index bbac1bd..e7a6df7 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -452,6 +452,7 @@ Em.I18n.translations = {
 
 
   'popup.dependent.configs.select.config.group.header': 'Select Config Group',
+  'popup.dependent.configs.select.config.group.no.groups': 'No config groups for current
service',
   'popup.dependent.configs.select.config.group': 'Please select to which config group would
you like to save dependent properties',
 
   'popup.dependent.configs.dependencies.config.singular': 'There is {0} configuration change
',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b515ff95/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 903b329..200c7be 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5737,7 +5737,9 @@ input[type="radio"].align-checkbox, input[type="checkbox"].align-checkbox
{
 .margin-bottom-5 {
   margin-bottom: 5px;
 }
-
+.line-height-30 {
+  line-height: 30px;
+}
 .rolling-restart-view {
   table {
     td:first-of-type {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b515ff95/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs b/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs
index 2c45af5..39e23b7 100644
--- a/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs
@@ -20,7 +20,13 @@
   <div class="form-group">
     <label class="col-sm-2 control-label"><strong>{{view.serviceName}}&nbsp;</strong>&nbsp;</label>
     <div class="col-sm-8">
-      {{view Ember.Select contentBinding="view.groups" valueBinding="view.selectedGroup"}}
+      {{#if view.hasGroups}}
+        {{view Ember.Select contentBinding="view.groups" valueBinding="view.selectedGroup"
disabledBinding="view.disabled"}}
+        {{else}}
+        <span class="line-height-30">
+          {{t popup.dependent.configs.select.config.group.no.groups}}
+        </span>
+      {{/if}}
     </div>
   </div>
 </form>

http://git-wip-us.apache.org/repos/asf/ambari/blob/b515ff95/ambari-web/app/views/common/modal_popups/select_groups_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popups/select_groups_popup.js b/ambari-web/app/views/common/modal_popups/select_groups_popup.js
index f33cd9e..fc54d22 100644
--- a/ambari-web/app/views/common/modal_popups/select_groups_popup.js
+++ b/ambari-web/app/views/common/modal_popups/select_groups_popup.js
@@ -46,6 +46,7 @@ App.showSelectGroupsPopup = function (selectedServiceName, selectedConfigGroup,
         didInsertElement: function() {
           this.set('selectedGroup', this.get('parentView.parentView.selectedConfigGroup.dependentConfigGroups')[this.get('serviceName')]);
         },
+        hasGroups: Em.computed.bool('groups.length'),
         serviceName: Em.computed.alias('content.serviceName'),
         selectedGroup: null,
         updateGroup: function() {
@@ -64,6 +65,7 @@ App.showSelectGroupsPopup = function (selectedServiceName, selectedConfigGroup,
         var selectedGroupName = this.get('selectedConfigGroup.dependentConfigGroups')[serviceName];
         var currentGroupName = this.get('selectedGroups')[serviceName] || "";
         var configGroup = this.get('dependentStepConfigs').findProperty('serviceName', serviceName).get('configGroups').findProperty('name',
selectedGroupName);
+        if (!configGroup) return; //There can be no dependent config group.
         if (selectedGroupName != currentGroupName) {
           /** changing config group for recommendations **/
           configs.filterProperty('serviceName', serviceName).filterProperty('configGroup',
selectedGroupName).forEach(function (c) {


Mime
View raw message