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/07/21 16:30:14 UTC
[1/2] ambari git commit: AMBARI-12470. Can't switch config group on
the host's configs page (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 a30f44912 -> ceab346d7
AMBARI-12470. Can't switch config group on the host's configs page (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ceab346d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ceab346d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ceab346d
Branch: refs/heads/branch-2.1
Commit: ceab346d76105a4de5e4561f3ff2879d9957a76f
Parents: 2da898b
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Jul 21 17:24:23 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Tue Jul 21 17:30:08 2015 +0300
----------------------------------------------------------------------
ambari-web/app/mixins/main/service/configs/config_overridable.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/ceab346d/ambari-web/app/mixins/main/service/configs/config_overridable.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js b/ambari-web/app/mixins/main/service/configs/config_overridable.js
index 324ce1e..f2a3916 100644
--- a/ambari-web/app/mixins/main/service/configs/config_overridable.js
+++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js
@@ -271,6 +271,7 @@ App.ConfigOverridable = Em.Mixin.create({
* @method updateConfigurationGroup
*/
updateConfigurationGroup: function (configGroup, successCallback, errorCallback) {
+ var configSiteTags = configGroup.get('configSiteTags') || [];
var putConfigGroup = {
ConfigGroup: {
group_name: configGroup.get('name'),
@@ -281,7 +282,7 @@ App.ConfigOverridable = Em.Mixin.create({
host_name: h
};
}),
- desired_configs: configGroup.get('configSiteTags').map(function (cst) {
+ desired_configs: configSiteTags.map(function (cst) {
return {
type: cst.get('site'),
tag: cst.get('tag')
[2/2] ambari git commit: AMBARI-12471. Unsaved Configs popup appears
when switching config versions quickly (alexantonenko)
Posted by al...@apache.org.
AMBARI-12471. Unsaved Configs popup appears when switching config versions quickly (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2da898b8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2da898b8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2da898b8
Branch: refs/heads/branch-2.1
Commit: 2da898b8c078f965e606e35d54245c23063493fb
Parents: a30f449
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Jul 21 17:08:11 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Tue Jul 21 17:30:08 2015 +0300
----------------------------------------------------------------------
.../views/common/configs/config_history_flow.js | 25 ++++++++++++++++----
1 file changed, 20 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2da898b8/ambari-web/app/views/common/configs/config_history_flow.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/config_history_flow.js b/ambari-web/app/views/common/configs/config_history_flow.js
index 364d1c5..4f11bfd 100644
--- a/ambari-web/app/views/common/configs/config_history_flow.js
+++ b/ambari-web/app/views/common/configs/config_history_flow.js
@@ -118,6 +118,17 @@ App.ConfigHistoryFlowView = Em.View.extend({
}.property('serviceName', 'controller.selectedConfigGroup.name'),
/**
+ * disable versions visible to the user to prevent actions on them
+ */
+ disableVersions: function () {
+ var allServiceVersions = App.ServiceConfigVersion.find().filterProperty('serviceName', this.get('serviceName'));
+
+ allServiceVersions.forEach(function (version) {
+ version.set('isDisabled', true);
+ }, this);
+ },
+
+ /**
* service versions which in viewport and visible to user
*/
visibleServiceVersion: function () {
@@ -309,11 +320,15 @@ App.ConfigHistoryFlowView = Em.View.extend({
self[type].call(self, event);
}
- if (controller.hasUnsavedChanges()) {
- controller.showSavePopup(null, callback);
- return;
- }
- callback();
+ Em.run.next(function() {
+ if (controller.hasUnsavedChanges()) {
+ controller.showSavePopup(null, callback);
+ return;
+ }
+
+ self.disableVersions();
+ callback();
+ });
},
/**