ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-13941. Sorting works wrong on config history tab for config groups
Date Wed, 18 Nov 2015 16:21:48 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 70e2dde67 -> bdd29b766


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/bdd29b76
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bdd29b76
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bdd29b76

Branch: refs/heads/branch-2.1
Commit: bdd29b7665a3a96b93da744dac1e2e467b2d9e68
Parents: 70e2dde
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Wed Nov 18 16:10:05 2015 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Wed Nov 18 18:21:44 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host/add_controller.js       | 6 ++++--
 .../main/service/manage_config_groups_controller.js          | 2 +-
 ambari-web/app/controllers/wizard/step7_controller.js        | 4 ++--
 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 ++++----
 ambari-web/test/controllers/wizard/step7_test.js             | 2 +-
 7 files changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bdd29b76/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 12a5f8a..4677e03 100644
--- a/ambari-web/app/controllers/main/host/add_controller.js
+++ b/ambari-web/app/controllers/main/host/add_controller.js
@@ -264,7 +264,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) {
@@ -307,7 +307,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,
@@ -388,6 +388,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/bdd29b76/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
index 9089abd..0981e77 100644
--- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
+++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
@@ -373,7 +373,7 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable,
{
     var unusedHosts = [];
     var serviceName = this.get('serviceName');
     var defaultConfigGroup = App.ConfigGroup.create({
-      name: App.format.role(serviceName) + " Default",
+      name: "Default",
       description: "Default cluster level " + serviceName + " configuration",
       isDefault: true,
       parentConfigGroup: null,

http://git-wip-us.apache.org/repos/asf/ambari/blob/bdd29b76/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 4091720..a9aca28 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -404,7 +404,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
App.E
       }, this);
     }
     var defaultConfigGroup = App.ConfigGroup.create({
-      name: App.format.role(serviceName) + " Default",
+      name: "Default",
       description: "Default cluster level " + serviceName + " configuration",
       isDefault: true,
       hosts: defaultConfigGroupHosts,
@@ -1127,7 +1127,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
App.E
       if (!serviceRawGroups.length) {
         service.set('configGroups', [
           App.ConfigGroup.create({
-            name: service.displayName + " Default",
+            name: "Default",
             description: "Default cluster level " + service.serviceName + " configuration",
             isDefault: true,
             hosts: Em.copy(hosts),

http://git-wip-us.apache.org/repos/asf/ambari/blob/bdd29b76/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 48758a7..9b85306 100644
--- a/ambari-web/app/mappers/configs/config_groups_mapper.js
+++ b/ambari-web/app/mappers/configs/config_groups_mapper.js
@@ -128,7 +128,7 @@ App.configGroupsMapper = App.QuickDataMapper.create({
     return {
       id: serviceName + '0',
       config_group_id: '-1',
-      name: displayName + ' Default',
+      name: 'Default',
       service_name: serviceName,
       description: 'Default cluster level ' + displayName + ' configuration',
       host_names: hostNames ? hostNames : App.get('allHostNames'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/bdd29b76/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/bdd29b76/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"
         }
       ]);
     });

http://git-wip-us.apache.org/repos/asf/ambari/blob/bdd29b76/ambari-web/test/controllers/wizard/step7_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js
index fabbd6f..89632c5 100644
--- a/ambari-web/test/controllers/wizard/step7_test.js
+++ b/ambari-web/test/controllers/wizard/step7_test.js
@@ -913,7 +913,7 @@ describe('App.InstallerStep7Controller', function () {
       installerStep7Controller.loadConfigGroups(serviceConfigGroups);
       expect(installerStep7Controller.get('stepConfigs.firstObject.configGroups.length')).to.equal(1);
       var group = installerStep7Controller.get('stepConfigs.firstObject.configGroups.firstObject');
-      expect(group.get('name')).to.equal(serviceName + ' Default');
+      expect(group.get('name')).to.equal('Default');
       expect(group.get('description').contains(serviceName)).to.equal(true);
       expect(group.get('isDefault')).to.equal(true);
       expect(group.get('hosts')).to.eql(['h1', 'h2', 'h3']);


Mime
View raw message