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 2013/11/27 21:53:01 UTC
git commit: AMBARI-3908. Disable 'Add Property...' action in
non-default config-groups (alexantonenko)
Updated Branches:
refs/heads/trunk 599cbe27a -> 4d21a67da
AMBARI-3908. Disable 'Add Property...' action in non-default config-groups (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4d21a67d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4d21a67d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4d21a67d
Branch: refs/heads/trunk
Commit: 4d21a67da77f628229f72ee868667fe301af375a
Parents: 599cbe2
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Nov 27 22:02:55 2013 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Nov 27 22:02:55 2013 +0200
----------------------------------------------------------------------
.../app/views/common/configs/services_config.js | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/4d21a67d/ambari-web/app/views/common/configs/services_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/services_config.js b/ambari-web/app/views/common/configs/services_config.js
index 89e029d..5e02741 100644
--- a/ambari-web/app/views/common/configs/services_config.js
+++ b/ambari-web/app/views/common/configs/services_config.js
@@ -58,7 +58,24 @@ App.ServiceConfigView = Em.View.extend({
this.$('.service-body').hide();
$(".restart-required-property").tooltip({html: true});
$(".icon-lock").tooltip({placement: 'right'});
- }
+ },
+
+ /**
+ * Check if we should show Custom Property category
+ */
+ checkCanEdit: function () {
+ var controller = App.get('router.'+this.get('controller.name'));
+ var canAddProperty = false;
+ if(controller.get('selectedConfigGroup').isDefault){
+ canAddProperty = true;
+ }
+ this.get('controller.selectedService.configCategories').filterProperty('siteFileName').forEach(function (config) {
+ config.set('canAddProperty', canAddProperty);
+ });
+ }.observes(
+ 'App.router.mainServiceInfoConfigsController.selectedConfigGroup.name',
+ 'App.router.wizardStep7Controller.selectedConfigGroup.name'
+ )
});