You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/11/18 17:21:22 UTC
ambari git commit: AMBARI-13941. Sorting works wrong on config
history tab for config groups
Repository: ambari
Updated Branches:
refs/heads/trunk 0959b6099 -> 5b67afe55
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/trunk
Commit: 5b67afe55f8cdbfb33a81db22fc9e156a0c62f53
Parents: 0959b60
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Nov 18 16:22:36 2015 +0200
Committer: Alex Antonenko <hi...@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"
}
]);
});