ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [45/50] [abbrv] ambari git commit: AMBARI-13941. Sorting works wrong on config history tab for config groups
Date Wed, 18 Nov 2015 16:51:41 GMT
AMBARI-13941. Sorting works wrong on config history tab for config groups


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 5b67afe55f8cdbfb33a81db22fc9e156a0c62f53
Parents: 0959b60
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Wed Nov 18 16:22:36 2015 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Wed Nov 18 18:21:17 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host/add_controller.js       | 6 ++++--
 ambari-web/app/mappers/configs/config_groups_mapper.js       | 2 +-
 ambari-web/app/models/configs/service_config_version.js      | 2 +-
 ambari-web/test/controllers/main/host/add_controller_test.js | 8 ++++----
 4 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5b67afe5/ambari-web/app/controllers/main/host/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/add_controller.js b/ambari-web/app/controllers/main/host/add_controller.js
index a510f68..01da508 100644
--- a/ambari-web/app/controllers/main/host/add_controller.js
+++ b/ambari-web/app/controllers/main/host/add_controller.js
@@ -281,7 +281,7 @@ App.AddHostController = App.WizardController.extend({
             var serviceName = service.get('serviceName');
             var configGroups = this.get('content.configGroups').filterProperty('ConfigGroup.tag',
serviceName);
             var configGroupsNames = configGroups.mapProperty('ConfigGroup.group_name');
-            var defaultGroupName = service.get('displayName') + ' Default';
+            var defaultGroupName = 'Default';
             var selectedService = selectedServices.findProperty('serviceId', serviceName);
             configGroupsNames.unshift(defaultGroupName);
             if (selectedService) {
@@ -324,7 +324,7 @@ App.AddHostController = App.WizardController.extend({
         } else {
           var configGroups = this.get('content.configGroups').filterProperty('ConfigGroup.tag',
serviceName);
           var configGroupsNames = configGroups.mapProperty('ConfigGroup.group_name').sort();
-          var defaultGroupName = service.get('displayName') + ' Default';
+          var defaultGroupName = 'Default';
           configGroupsNames.unshift(defaultGroupName);
           selectedServices.push({
             serviceId: serviceName,
@@ -404,6 +404,8 @@ App.AddHostController = App.WizardController.extend({
   /**
    * send request to server in order to install services
    * @param isRetry
+   * @param callback
+   * @param errorCallback
    */
   installServices: function (isRetry, callback, errorCallback) {
     callback = callback || Em.K;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b67afe5/ambari-web/app/mappers/configs/config_groups_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/configs/config_groups_mapper.js b/ambari-web/app/mappers/configs/config_groups_mapper.js
index 7a823f5..94929a7 100644
--- a/ambari-web/app/mappers/configs/config_groups_mapper.js
+++ b/ambari-web/app/mappers/configs/config_groups_mapper.js
@@ -127,7 +127,7 @@ App.configGroupsMapper = App.QuickDataMapper.create({
     return {
       id: App.ServiceConfigGroup.getParentConfigGroupId(serviceName),
       config_group_id: '-1',
-      name: App.format.role(serviceName) + ' Default',
+      name: 'Default',
       service_name: serviceName,
       description: 'Default cluster level ' + App.format.role(serviceName) + ' configuration',
       hosts: hostNames ? hostNames.slice() : App.get('allHostNames').slice(),

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b67afe5/ambari-web/app/models/configs/service_config_version.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/service_config_version.js b/ambari-web/app/models/configs/service_config_version.js
index 0f66f75..6020fe6 100644
--- a/ambari-web/app/models/configs/service_config_version.js
+++ b/ambari-web/app/models/configs/service_config_version.js
@@ -49,7 +49,7 @@ App.ServiceConfigVersion = DS.Model.extend({
     return Em.I18n.t('dashboard.configHistory.table.current.tooltip').format(this.get('displayName'),
this.get('configGroupName'));
   }.property('displayName', 'configGroupName'),
   configGroupName: function () {
-    return this.get('isDefault') ? (this.get('displayName') + ' ' + Em.I18n.t('common.default'))
: this.get('groupName');
+    return this.get('isDefault') ? Em.I18n.t('common.default') : this.get('groupName');
   }.property('groupName','isDefault'),
   authorFormatted: function () {
     var author = this.get('author');

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b67afe5/ambari-web/test/controllers/main/host/add_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/host/add_controller_test.js b/ambari-web/test/controllers/main/host/add_controller_test.js
index 09375bd..5c5bd32 100644
--- a/ambari-web/test/controllers/main/host/add_controller_test.js
+++ b/ambari-web/test/controllers/main/host/add_controller_test.js
@@ -940,7 +940,7 @@ describe('App.AddHostController', function () {
             "host2"
           ],
           "configGroupsNames": [
-            "s1 Default",
+            "Default",
             "G1"
           ],
           "configGroups": [
@@ -951,7 +951,7 @@ describe('App.AddHostController', function () {
               }
             }
           ],
-          "selectedConfigGroup": "s1 Default"
+          "selectedConfigGroup": "Default"
         }
       ]);
     });
@@ -1048,7 +1048,7 @@ describe('App.AddHostController', function () {
             "host1"
           ],
           "configGroupsNames": [
-            "s1 Default",
+            "Default",
             "G1"
           ],
           "configGroups": [
@@ -1059,7 +1059,7 @@ describe('App.AddHostController', function () {
               }
             }
           ],
-          "selectedConfigGroup": "s1 Default"
+          "selectedConfigGroup": "Default"
         }
       ]);
     });


Mime
View raw message